Route publishing method and related equipment
By carrying two next hop information in the BGP update message and establishing different types of forwarding paths, the problems of complex configuration and deployment difficulty in the existing technology are solved, and routing releases of multiple different types of tunnels are realized, simplifying configuration and Deployment process.
Patent Information
- Application Number
- CN202310985101.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art has complex configurations when implementing routing releases between multiple different types of tunnels, which increases deployment difficulty and workload.
The BGP update message carries two next hop information, which are used to establish different types of forwarding paths, such as IPv4 and IPv6 forwarding paths, so that multiple different types of tunnels are available.
There is no need to establish multiple BGP neighbors or enable Add-path between two communication devices, reducing configuration and deployment difficulty and simplifying the routing release process.
Smart Images

Figure CN119449709A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a routing publishing method and related equipment. Background Art
[0002] The Border Gateway Protocol (BGP) is a dynamic routing protocol used between autonomous systems (AS). Communication devices publish routes by exchanging BGP update messages.
[0003] With the continuous evolution of routing technology, many different types of tunnels have emerged. For scenarios where there are multiple different types of tunnels between two communication devices at the same time, for routes to the same destination, if you want to maintain the paths corresponding to different types of tunnels, for example, the main path corresponds to the Segment Routing-Internet Protocol version 6 (SRv6) tunnel of the sixth version of the Internet Protocol, and the backup path corresponds to the Multi-Protocol Label Switching (MPLS) tunnel, you need to establish multiple BGP neighbors or use additional paths (Add-path) for capability negotiation, which will complicate the configuration and increase the difficulty and workload of deployment. Summary of the invention
[0004] Based on this, the present application provides a route publishing method and related equipment, which can publish two routes that can iterate to different types of forwarding paths through the two next hop information carried in the BGP update message, making it possible for multiple different types of forwarding paths to be available between two communication devices.
[0005] In the first aspect, the present application provides a route publishing method, which is applied to a first communication device, and the method may include, for example: receiving a BGP update message sent by a second communication device, establishing a first forwarding path based on the first next hop information in the BGP update message, and establishing a second forwarding path based on the second next hop information in the BGP update message, wherein the first forwarding path is a fourth version of the Internet Protocol (Internet Protocol version 4, IPv4) forwarding path, and the second forwarding path is a sixth version of the Internet Protocol (Internet Protocol version 6, IPv6) forwarding path. In this way, when publishing routes between two communication devices that are BGP neighbors and have multiple different types of tunnels, the next hop information corresponding to each type of tunnel is carried in a route announcement message, and the communication device that receives the route announcement message can iterate the multiple next hop information in the route announcement message to the corresponding type of tunnel, respectively, and establish different types of forwarding paths, so that multiple different types of forwarding paths between two communication devices with different types of tunnels are available, without the need to establish two BGP neighbors between the two communication devices, and without the need to enable Add-path and perform Add-path capability negotiation, which reduces the amount of configuration and simplifies the difficulty of configuration and deployment.
[0006] In some possible implementations, the BGP update message may include a path attribute, and the first next hop information is carried through the next hop (NEXT_HOP) field of the path attribute, and the second next hop information is carried through the multiprotocol reachable network layer reachability information (MP_REACH_NLRI) of the path attribute. In this way, the next hop information corresponding to two different types of tunnels is respectively carried through the two fields in the BGP update message that can carry the next hop information, making it possible for the forwarding paths corresponding to the two types of tunnels to be established and available.
[0007] In some possible implementations, the first communication device and the second communication device support the use of both next hop information carried in two fields capable of carrying next hop information in a BGP update message. As an example, the first communication device and the second communication device implement the above support through local configuration. As another example, the BGP update message may also include first indication information, and the first indication information is used for both the first next hop information and the second next hop information to be used. Among them, the BGP update message may carry the first indication information through an extended field of a path attribute. The following description is given by taking the BGP update message including the first indication information as an example.
[0008] In some possible implementations, the method may further include: the first communication device obtains a first forwarding table entry based on the first forwarding path, and obtains a second forwarding table entry based on the second forwarding path, the first forwarding table entry includes a routing prefix and the first next hop information, and the second forwarding table entry includes the routing prefix and the second next hop information. In this way, by establishing the forwarding table entry, the two forwarding paths corresponding to different types of tunnels can both carry service messages, thereby realizing service transmission.
[0009] As an example, if the first forwarding path and the second forwarding path on the first communication device can belong to a load sharing relationship, then when the first communication device receives the first service message and the second service message, the destination addresses of the first service message and the second service message both match the routing prefix, then the first communication device forwards the first service message to the second communication device along the first forwarding path, and forwards the second service message to the second communication device along the second forwarding path. In this way, not only can different types of tunnels between the two communication devices be used, but also the traffic load can be shared between different types of forwarding paths, which creates better conditions for load balancing in the network and improves network forwarding performance.
[0010] In some possible implementations, the first forwarding path and the second forwarding path on the first communication device may belong to a primary-backup protection relationship. As an example, the first indication information in the BGP update message may also be used to indicate that the forwarding path established based on the first next-hop information is the primary path, or the first indication information may also be used to indicate that the forwarding path established based on the second next-hop information is the backup path. As another example, the BGP update message may also include second indication information, and the second indication message indicates that the forwarding path established based on the first next-hop information is the primary path, or the second indication information is used to indicate that the forwarding path established based on the second next-hop information is the backup path.
[0011] In this implementation, the method may further include: the first communication device obtains a first forwarding table entry based on the first forwarding path, obtains a second forwarding table entry based on the second forwarding path, the first forwarding table entry includes a routing prefix and first next hop information, the second forwarding table entry includes the routing prefix and the second next hop information, the first forwarding table entry may also include an identifier of a primary path, or the first forwarding table entry belongs to a primary forwarding table. In this way, by establishing a forwarding table entry, two forwarding paths corresponding to different types of tunnels can both carry service messages, thereby realizing service transmission.
[0012] As an example, when the first forwarding path is normal, the method may further include: the first communication device receives a third service message, the destination address of the third service message matches the routing prefix; the first communication device forwards the third service message to the second communication device along the first forwarding path. When the first forwarding path fails, the method may further include: the first communication device receives a fourth service message, the destination address of the fourth service message matches the routing prefix; the first communication device forwards the fourth service message to the second communication device along the second forwarding path. In this way, not only can different types of tunnels between the two communication devices be used, but also primary and backup protection can be performed between forwarding paths of different types, and the primary path can be switched to the backup path after the primary path fails, so that the transmission of traffic in the network is not affected by the failure of the primary path, thereby improving the reliability of the network.
[0013] The first forwarding path may be, for example, an MPLS forwarding path, and the second forwarding path may be, for example, an SRv6 forwarding path.
[0014] In the second aspect, the present application also provides a route publishing method, which is applied to a second communication device. The method may include: generating a BGP update message, the BGP update message including first next hop information, second next hop information and first indication information, the first indication information is used for the first next hop information and the second next hop information to be used, the first next hop information is an IPv4 address, and the second next hop information is an IPv6 address; sending the BGP update message to the first communication device. In this way, by using two fields in the BGP update message that can carry the next hop information to carry the two next hop information, and carrying the first indication information that can indicate that the two next hop information need to be used, after the route is published by the BGP update message, it is possible to realize that different types of forwarding paths between two communication devices with different types of tunnels are available, without the need to establish two BGP neighbors between the two communication devices, which can reduce the number of BGP neighbor deployments and reduce the impact on the network; and, there is no need to enable Add-path and perform Add-path capability negotiation, which can reduce the number of route publications, especially for the network in the evolution process, which can greatly reduce the configuration amount and simplify the difficulty of configuration and deployment.
[0015] In some possible implementations, the BGP update message may include a path attribute, carry the first next hop information through the NEXT_HOP field of the path attribute, carry the second next hop information through the MP_REACH_NLRI of the path attribute, and carry the first indication information through the extension field of the path attribute.
[0016] It should be noted that the specific implementation method and technical effect achieved by the method provided in this application can refer to the method provided in the first aspect.
[0017] In a third aspect, the present application further provides a first communication device, which may include, for example, a receiving unit and a processing unit. The receiving unit is used to receive a BGP update message sent by a second communication device, wherein the BGP update message includes first next hop information and second next hop information; and the processing unit is used to establish a first forwarding path based on the first next hop information and a second forwarding path based on the second next hop information, wherein the first forwarding path is an IPv4 forwarding path and the second forwarding path is an IPv6 forwarding path.
[0018] In some possible implementations, the BGP update message includes a path attribute, and the first next hop information is carried through a NEXT_HOP field of the path attribute, and the second next hop information is carried through an MP_REACH_NLRI field of the path attribute.
[0019] In some possible implementations, the BGP update message further includes first indication information, where the first indication information is used to indicate that both the first next hop information and the second next hop information need to be used.
[0020] As an example, the BGP update message carries the first indication information through an extended field of a path attribute.
[0021] In some possible implementations, the processing unit is further used to obtain a first forwarding table entry based on the first forwarding path, and to obtain a second forwarding table entry based on the second forwarding path, wherein the first forwarding table entry includes a routing prefix and the first next hop information, and the second forwarding table entry includes the routing prefix and the second next hop information.
[0022] As an example, the first communication device may further include a sending unit. The receiving unit is further used to receive a first service message and a second service message, wherein the destination addresses of the first service message and the second service message both match the routing prefix; and the sending unit is used to forward the first service message to the second communication device along the first forwarding path, and forward the second service message to the second communication device along the second forwarding path.
[0023] In some possible implementations, the first indication information is further used to indicate that the forwarding path established based on the first next hop information is a primary path, or the first indication information is further used to indicate that the forwarding path established based on the second next hop information is a backup path.
[0024] In some other possible implementations, the BGP update message also includes second indication information, where the second indication message indicates that the forwarding path established by the first next hop information is a primary path, or the second indication information is used to indicate that the forwarding path established based on the second next hop information is a backup path.
[0025] As an example, the processing unit is also used to obtain a first forwarding table entry based on the first forwarding path, and to obtain a second forwarding table entry based on the second forwarding path, wherein the first forwarding table entry includes a routing prefix and the first next hop information, the second forwarding table entry includes the routing prefix and the second next hop information, the first forwarding table entry also includes an identifier of a main path, or the first forwarding table entry belongs to a main forwarding table.
[0026] In this example, the first communication device may further include a sending unit. The receiving unit is further used to receive a third service message, the destination address of which matches the routing prefix; the sending unit is used to forward the third service message to the second communication device along the first forwarding path when the first forwarding path is normal. Alternatively, the receiving unit is further used to receive a fourth service message, the destination address of which matches the routing prefix; the sending unit is used to forward the fourth service message to the second communication device along the second forwarding path when a failure occurs in the first forwarding path.
[0027] The first forwarding path may be, for example, an MPLS forwarding path, and the second forwarding path may be, for example, an SRv6 forwarding path.
[0028] It should be noted that the specific implementation method of the first communication device provided in this application and the technical effect achieved can refer to the method provided in the first aspect.
[0029] In a fourth aspect, the present application further provides a second communication device, which may include, for example, a processing unit and a sending unit. The processing unit is used to generate a BGP update message, wherein the BGP update message includes first next hop information, second next hop information, and first indication information, wherein the first indication information is used for both the first next hop information and the second next hop information to be used, the first next hop information is an IPv4 address, and the second next hop information is an IPv6 address; and the sending unit is used to send the BGP update message to the first communication device.
[0030] In some possible implementations, the BGP update message includes a path attribute, carries the first next hop information through a NEXT_HOP field of the path attribute, carries the second next hop information through an MP_REACH_NLRI of the path attribute, and carries the first indication information through an extension field of the path attribute.
[0031] It should be noted that the specific implementation method and technical effect achieved by the second communication device provided in this application can refer to the method provided in the second aspect.
[0032] In a fifth aspect, the present application provides a communication device, comprising a processor and a memory, the memory being used to store instructions or program codes, and the processor being used to call and run the instructions or program codes from the memory to execute the method in the first aspect, any possible implementation of the first aspect, the second aspect, and any possible implementation of the second aspect.
[0033] In a sixth aspect, the present application also provides a communication system, which may include a first communication device and a second communication device, the first communication device being used to execute the method in the first aspect or any possible implementation of the first aspect, and the second communication device being used to execute the method in the second aspect or any possible implementation of the second aspect.
[0034] In the seventh aspect, the present application provides a storage medium, including instructions, programs or codes, which, when executed on a processor, enable the processor to execute the method in the first aspect, any possible implementation of the first aspect, the second aspect, and any possible implementation of the second aspect.
[0035] In an eighth aspect, the present application provides a program product. When the program product runs on a processor, the processor executes the method in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0037] Figure 1 A schematic diagram of a process of a route publishing method 100 in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of a BGP update message in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of another BGP update message in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of a method flow in an exemplary scenario in an embodiment of the present application;
[0041] Figure 5 This is a schematic diagram of the structure of a first communication device 500 in an embodiment of the present application;
[0042] Figure 6 This is a schematic diagram of the structure of a second communication device 600 in an embodiment of the present application;
[0043] Figure 7 This is a schematic diagram of the structure of a communication device 700 in an embodiment of the present application;
[0044] Figure 8This is a schematic diagram of the structure of another communication device 800 in an embodiment of the present application;
[0045] Fig. 9 Schematic diagram of the structure of a communication system 900 in an embodiment of the present application. DETAILED DESCRIPTION
[0046] With the continuous development of data communication technology, the network has gradually evolved from IPv4 to IPv6. In the network, there may be multiple different types of tunnels between two communication devices that are BGP neighbors. For example, communication device 1 and communication device 2 are BGP neighbors, and there are MPLS tunnels and SRv6 tunnels between communication device 1 and communication device 2. In some scenarios, multiple types of tunnels between communication devices need to be available.
[0047] Currently, the methods for making multiple types of tunnels available between two communication devices include: Method 1, establishing BGP neighbors with the same number as the tunnel types, and under different BGP neighbors, for each BGP neighbor, publishing routes applicable to the tunnel type corresponding to the BGP neighbor, and the routes include the next hop information corresponding to the tunnel type. For example, there is an MPLS tunnel and an SRv6 tunnel between communication device 1 and communication device 2. Then, two BGP neighbors are established between communication device 1 and communication device 2: BGP neighbor 1 and BGP neighbor 2. BGP neighbor 1 is an IPv4 neighbor, and BGP neighbor 2 is an IPv6 neighbor. Taking the path from communication device 1 to communication device 2 as an example, communication device 2 publishes route 1 with the next hop information as an IPv6 address and route 2 with the next hop information as an IPv4 address to communication information 1. Communication device 1 establishes an IPv6 forwarding path to communication device 2 based on route 1, and establishes an IPv4 forwarding path to communication device 2 based on route 1. In this way, there are two types of paths available from communication device 1 to communication device 2. The traffic from communication device 1 to communication device 2 can be imported into the MPLS tunnel corresponding to the IPv4 forwarding path, or imported into the SRv6 tunnel corresponding to the IPv6 forwarding path. Method 2: Establish a BGP neighbor, enable Add-path, and publish multiple routes according to Add-path for the same route prefix, each route carrying the next hop information corresponding to different types of tunnels. For example, there is an MPLS tunnel and an SRv6 tunnel between communication device 1 and communication device 2, then, a BGP neighbor is established between communication device 1 and communication device 2, and Add-path is enabled. Taking the path from communication device 1 to communication device 2 as an example, communication device 2 publishes route 3 with the next hop information as an IPv6 address and route 4 with the next hop information as an IPv4 address to communication information 1 respectively. Communication device 1 establishes an IPv6 forwarding path to communication device 2 based on route 3, and establishes an IPv4 forwarding path to communication device 2 based on route 4. In this way, there are two types of paths available from communication device 1 to communication device 2, and the traffic from communication device 1 to communication device 2 can be imported into the MPLS tunnel corresponding to the IPv4 forwarding path, or imported into the SRv6 tunnel corresponding to the IPv6 forwarding path.
[0048] Both of the above two implementation methods can make multiple different types of forwarding paths between two communication devices with different types of tunnels available, but both have the problem of complex configuration, which will increase the difficulty and workload of deployment. In method 1, in order to achieve the availability of different types of tunnels at the BGP level, multiple BGP neighbors need to be established, resulting in an increase in the number of BGP connections. In addition to the need to configure multiple BGP neighbors, the communication device also needs to configure complex routing control policies for different BGP neighbors to publish different routes. Therefore, this method has a large amount of configuration and high configuration difficulty. In method 2, in order to achieve the availability of different types of tunnels at the BGP level, although only one BGP neighbor needs to be established, after enabling Add-path, the Add-path capability negotiation is performed by interrupting the BGP neighbor, or by redeploying the dynamic protocol capability to negotiate and determine the Add-path capability, wherein interrupting the BGP neighbor will cause the BGP neighbor to be damaged; redeploying the dynamic negotiation capability requires that the two communication devices as BGP neighbors must be new version devices. In the process of network evolution, it is inevitable that there are old version devices that do not support the redeployment of dynamic negotiation capabilities, so method 2 has the problem of difficult deployment.
[0049] Based on this, the embodiment of the present application provides a route publishing method. When publishing routes between two communication devices that are BGP neighbors and have multiple different types of tunnels, the next hop information corresponding to each type of tunnel is carried in a route announcement message. The communication device that receives the route announcement message can iterate the multiple next hop information in the route announcement message to the corresponding type of tunnel, establish different types of forwarding paths, so that multiple different types of forwarding paths between the two communication devices with different types of tunnels are available. As an example, the method may include: a first communication device receives a BGP update message sent by a second communication device, and the BGP update message includes first next hop information and second next hop information; the first communication device establishes a first forwarding path based on the first next hop information, and establishes a second forwarding path based on the second next hop information, the first forwarding path is an IPv4 forwarding path, and the second forwarding path is an IPv6 forwarding path. In this way, there is no need to establish two BGP neighbors between the first communication device and the second communication device, and there is no need to enable Add-path and perform Add-path capability negotiation. By using the two next hop information in the BGP update message, different types of forwarding paths between two communication devices with different types of tunnels can be made available, which reduces the amount of configuration and simplifies the difficulty of configuration and deployment.
[0050] In the embodiment of the present application, different types of forwarding paths between two communication devices are available, which means that both forwarding paths can be used to transmit traffic. The different types of available forwarding paths may be in a load sharing or active / standby protection relationship, for example.
[0051] In the embodiments of the present application, the communication device may be a network device such as a switch or a router; it may also be a component of a network device, such as a single board or a line card on the network device; it may also be a functional module on the network device; it may also be a chip used to implement the method provided in the embodiments of the present application, and the embodiments of the present application are not specifically limited. When the communication device is a chip, the transceiver unit used to implement the method may be, for example, an interface circuit of the chip, and the processing unit may be a processing circuit with processing functions in the chip. Communication devices may be directly connected, for example, but not limited to, via Ethernet cables or optical cables.
[0052] In order to more clearly introduce the embodiments of the present application, Figure 1 The routing publishing method provided in the embodiment of the present application is described.
[0053] Figure 1 A flowchart of a route publishing method 100 provided for an embodiment of the present application. In the method 100, the embodiment of the present application is introduced by the interaction between a first communication device and a second communication device. The embodiment of the present application is described by taking the establishment of a BGP neighbor between the first communication device and the second communication device and the existence of an IPv4 tunnel and an IPv6 tunnel as an example, and the route publishing process between two communication devices with other types of tunnels is also applicable.
[0054] like Figure 1 As shown, the method 100 may include, for example, the following S101 to S104:
[0055] S101: A second communication device generates a BGP update message, where the BGP update message includes first next hop information and second next hop information.
[0056] The BGP update message includes two fields for carrying next hop information, both of which are located in the path attributes of the BGP update message. Figure 2As shown, the Path Attributes in the BGP update message may include: Origin, Autonomous System Path (AS-path), NEXT_HOP and MP_REACH_NLRI, and the MP_REACH_NLRI may include: Address Family Identifier (AFI) field, Subsequent Address Family Identifier (SAFI) field, Next Hop Network Address Length (Length of NHP) field and Next Hop Network Address (Network Address of Next Hop) field. Among them, in the Path Attributes, NEXT_HOP can carry one next hop information, and the Next Hop Network Address field in the MP_REACH_NLRI can carry another next hop information.
[0057] Among them, the first next hop information can be an IPv4 address, such as the first next hop information is 10.1.2.3, and the second next hop information is an IPv6 address, such as the second next hop information is 2000::1, then NEXT_HOP carries the first next hop information, and the next hop network address field in MP_REACH_NLRI carries the second next hop information. Alternatively, the first next hop information can be an IPv6 address, and the second next hop information is an IPv4 address, then NEXT_HOP carries the second next hop information, and the next hop network address field in MP_REACH_NLRI carries the first next hop information. The following is an example of NEXT_HOP carrying the first next hop information and the next hop network address field in MP_REACH_NLRI carrying the second next hop information.
[0058] In some implementations, the first communication device and the second communication device may be configured to support two next hop information carried in a BGP update message, thereby overcoming the problem that the contents carried by the next hop network address fields in NEXT_HOP and MP_REACH_NLRI in the current BGP update message cannot be used simultaneously.
[0059] In other implementations, in order not to add configuration locally on the communication device, the BGP update message may also include first indication information, and the first indication information is used for both the first next hop information and the second next hop information. In this way, after receiving the BGP update message, the first next hop information in NEXT_HOP will be read, and the second next hop information carried by the next hop network address field in MP_REACH_NLRI will also be read, and based on different next hop information, it will iterate to different types of forwarding paths.
[0060] As an example, the BGP update message may carry the first indication information through an extended field of Path Attributes. The extended field may be, for example, a next hop identifier (Next Hop Identifier, NHPIdentifier) newly defined in Path Attributes. The value of the NHPIdentifier is used to indicate the next hop information that needs to be used. For example, if the NHPIdentifier is a 1-bit flag, NHPIdentifier=1, it is used to indicate that both the first next hop information and the second next hop information need to be used, and NHPIdentifier=0, it is used to indicate that both the first next hop information or the second next hop information needs to be used; or, if the NHPIdentifier is a 2-bit flag, each bit can correspond to a next hop information, and the value of the bit indicates whether the corresponding next hop information needs to be used, NHPIdentifier=11, it is used to indicate that both the first next hop information and the second next hop information need to be used, NHPIdentifier=10, it is used to indicate that the first next hop information needs to be used, NHPIdentifier=01, it is used to indicate that the second next hop information needs to be used, and NHPIdentifier=00, it is used to indicate that neither the first next hop information nor the second next hop information is used.
[0061] According to different needs, after multiple next-hop information is iterated to different types of forwarding paths, the different types of forwarding paths may be in a load-sharing or active-standby protection relationship. Then, the relationship between different types of forwarding paths may be configured locally in the communication device, or may be determined based on the indication in the BGP update message. If the relationship between forwarding paths of the same type is determined based on the indication in the BGP update message, then the BGP update message may also include information 1 for indicating the relationship between the first next-hop information and the second next-hop information, and the value of the information 1 may indicate that the forwarding path after the iteration of the first next-hop information and the second next-hop information is a load-sharing relationship or an active-standby protection relationship.
[0062] If multiple next-hop information is iterated to different types of forwarding paths that are in a primary-backup protection relationship, then the roles of different types of forwarding paths in the primary-backup protection relationship (referring to the primary forwarding path or the backup forwarding path) can be locally configured in the communication device, or can be determined based on the indication in the BGP update message. If the roles of different types of forwarding paths in the primary-backup protection relationship are determined based on the indication in the BGP update message, then the BGP update message can also include information 2 for indicating the corresponding roles of the first next-hop information and / or the second next-hop information, and the value of the information 2 can indicate that the forwarding path after the iteration of the first next-hop information or the second next-hop information is the primary forwarding path or the backup forwarding path.
[0063] As an example, both information 1 and information 2 can be implemented through the first indication information, that is, the first indication information is also used to indicate that the forwarding path after iteration of the first next hop information and the second next hop information is a load sharing relationship or a primary-backup protection relationship. When the first indication information indicates that the forwarding path after iteration of the first next hop information and the second next hop information is a primary-backup protection relationship, the first indication information is also used to indicate that the forwarding path after iteration of the first next hop information or the second next hop information is the primary forwarding path or the backup forwarding path.
[0064] As another example, information 1 can be implemented through the first indication information, and information 2 can be implemented through the second indication information in the BGP update message; information 2 can be implemented through the first indication information, and information 1 can be implemented through the second indication information in the BGP update message. The second indication information can also be carried through other extended fields of Path Attributes.
[0065] As another example, information 1 and information 2 can be implemented through the third indication information and the fourth indication information in the BGP update message, respectively. The third indication information and the fourth indication information can also be carried through other extended fields of Path Attributes. The third indication information and the fourth indication information can be two flag bits in an extended field, or can be two different extended fields.
[0066] For example, the newly defined NHPIdentifier in the Path Attributes carries the first indication information, and the first indication information implements the functions of the above information 1 and information 2. Figure 3As shown, the NHPIdentifier can be regarded as an extended type length value (Type Length Value, TLV) in Path Attributes. The NHPIdentifier may include: an attribute flag (Attr.Flag) field, an attribute type (Attr.Type) field, an attribute length (Attr.Len) field, and a value (Value) field. The Value field may include, for example: C1, C2, R, U, and M flags, wherein the values of C1 and C2 are used to indicate the next hop information that needs to be used, R is used to implement the above information 1, and U and M are used to implement the above information 2. Then, when C1=1, C2=1, R=1, U=1, and M=0, it indicates that both the first next hop information and the second next hop information need to be used. The forwarding path after iteration of the first next hop information and the second next hop information is in a primary-backup protection relationship, and the first next hop information corresponds to the primary forwarding path; when C1=1, C2=1, R=1, U=0 and M=1, it indicates that both the first next hop information and the second next hop information need to be used, and the forwarding path after iteration of the first next hop information and the second next hop information is in a primary-backup protection relationship, and the second next hop information corresponds to the primary forwarding path; when C1=1, C2=1, R=0, U=0 and M=0, it indicates that both the first next hop information and the second next hop information need to be used, and the forwarding path after iteration of the first next hop information and the second next hop information is in a load sharing relationship.
[0067] S102: The second communication device sends the BGP update message to the first communication device.
[0068] S103: The first communication device receives a BGP update message sent by the second communication device, where the BGP update message includes first next hop information and second next hop information.
[0069] S104: The first communication device establishes a first forwarding path based on the first next hop information, and establishes a second forwarding path based on the second next hop information, the first forwarding path is an IPv4 forwarding path, and the second forwarding path is an IPv6 forwarding path.
[0070] The second communication device has established a BGP neighbor relationship with the first communication device, and there is an IPv4 tunnel and an IPv6 tunnel between the two. Based on this, after S101, the second communication device can publish the generated BGP update message to the first communication device through the BGP neighbor relationship pre-established with the first communication device.
[0071] After the first communication device receives the BGP update message, based on the local configuration or the indication of the first indication information, the first next hop information and the second next hop information are read from the BGP update message, and the first next hop information is used to iterate the IPv4 forwarding path to establish a first forwarding path, and the first forwarding path is carried on the IPv4 type tunnel, and the second next hop information is used to iterate the IPv6 forwarding path to establish a second forwarding path, and the second forwarding path is carried on the IPv6 type tunnel. Among them, the IPv4 type tunnel can be an IPv4 tunnel or an MPLS tunnel, and the IPv6 type tunnel can be an IPv6 tunnel or an SRv6 tunnel. The first forwarding path can be an IPv4 forwarding path, for example, it can be an MPLS forwarding path. The second forwarding path can be an IPv6 forwarding path, for example, it can be an SRv6 forwarding path.
[0072] As an example, S104 may include: the first communication device generates a first routing table item in a routing information base (RIB, also referred to as a routing table) based on the first next hop information, and the first routing table item may include the first next hop information; similarly, the first communication device generates a second routing table item in the RIB based on the second next hop information, and the second routing table item may include the second next hop information. In this way, the first communication device uses the first routing table item and the second routing table item, both of which are available, to achieve the use of two next hop information, meeting the need to maintain two different types of available forwarding paths between two communication devices during network evolution, for example.
[0073] In addition, the BGP update message may further include a routing prefix, and then both the first routing table entry and the second routing table entry may include the routing prefix.
[0074] After S104, the method 100 may further include: the first communication device updates the forwarding information table (Forwarding Information Base, FIB, also referred to as a forwarding table) based on the change of the RIB. For example, the first communication device obtains a first forwarding table item based on the first forwarding path, and obtains a second forwarding table item based on the second forwarding path, wherein the first forwarding table item includes a routing prefix and first next hop information, and the second forwarding table item includes the routing prefix and the second next hop information. In this way, by generating and maintaining the first forwarding table item and the second forwarding table item that are both available on the first communication device, it is possible to use two different types of tunnels from the first communication device to the second communication device.
[0075] If the first communication device determines, based on local configuration or indication information in a BGP update message, that the first forwarding path and the second forwarding path belong to a load sharing relationship, then the method 100 may further include: the first communication device receives a first service message and a second service message, and the destination addresses of the first service message and the second service message both match the routing prefix; then, the first communication device forwards the first service message to the second communication device along the first forwarding path, and forwards the second service message to the second communication device along the second forwarding path.
[0076] As an example, after receiving the first service message, the first communication device searches for a forwarding table entry whose routing prefix matches the destination address from the FIB based on the destination address of the first service message, and obtains the first forwarding table entry and the second forwarding table entry; then, the first communication device determines that the first service message is forwarded according to the first forwarding table entry according to the load sharing strategy; then, the first communication device determines the first output interface based on the first next hop information in the first forwarding table entry, and forwards the first service message from the first output interface to the second communication device along the first forwarding path. The first output interface is the interface on the first communication device corresponding to the first forwarding path to the second communication device. Similarly, after receiving the second service message, the first communication device searches for a forwarding table entry whose routing prefix matches the destination address from the FIB based on the destination address of the second service message, and obtains the first forwarding table entry and the second forwarding table entry; then, the first communication device determines that the second service message is forwarded according to the second forwarding table entry according to the load sharing strategy; then, the first communication device determines the second output interface based on the second next hop information in the second forwarding table entry, and forwards the second service message from the second output interface to the second communication device along the second forwarding path. The second outgoing interface is an interface on the first communication device corresponding to the second forwarding path to the second communication device. It should be noted that the first outgoing interface and the second outgoing interface can be the same interface or different interfaces.
[0077] In this way, through the method 100 provided in the embodiment of the present application, different types of tunnels can be used between two communication devices, and traffic load can be shared between forwarding paths belonging to different types, creating better conditions for load balancing in the network and improving network forwarding performance.
[0078] If the first communication device determines, based on local configuration or indication information in a BGP update message, that the first forwarding path and the second forwarding path belong to a primary-backup protection relationship, and the first forwarding path is the primary path and the second forwarding path is the backup path, then, in one case, if the forwarding table entries of the primary path and the backup path are maintained in one FIB, then the first forwarding table entry may also include an identifier of the primary path, and / or the second forwarding table entry may also include an identifier of the backup path; in another case, if the forwarding table entries of the primary path and the backup path are maintained in different FIBs respectively, then the first forwarding table entry belongs to the primary FIB, and the second forwarding table entry belongs to the backup FIB.
[0079] As an example, when the first forwarding path is normal, the method 100 may also include: the first communication device receives a third service message, and the destination address of the third service message matches the routing prefix; the first communication device forwards the third service message to the second communication device along the first forwarding path. In specific implementation, if the first forwarding table entry and the second forwarding table entry are maintained in a FIB, then, after the first communication device receives the third service message, it searches the FIB for a forwarding table entry whose routing prefix matches the destination address based on the destination address of the third service message, and obtains the first forwarding table entry and the second forwarding table entry; then, the first communication device determines that the third service message is forwarded according to the first forwarding table entry according to the identifier of the main path of the first forwarding table entry or the identifier of the backup path of the second forwarding table entry; then, the first communication device determines the first output interface based on the first next hop information in the first forwarding table entry, and forwards the third service message from the first output interface to the second communication device along the first forwarding path. If the first forwarding table entry is maintained in the main FIB and the second forwarding table entry is maintained in the backup FIB, then, after the first communication device receives the third service message, it searches the main FIB for a forwarding table entry whose routing prefix matches the destination address based on the destination address of the third service message, and obtains the first forwarding table entry; then, the first communication device determines the first output interface based on the first next hop information in the first forwarding table entry, and forwards the third service message from the first output interface to the second communication device along the first forwarding path. The first output interface is an interface on the first communication device corresponding to the first forwarding path to the second communication device.
[0080] As another example, in the case where the first forwarding path fails, the method 100 may also include: the first communication device receives a fourth service message, the destination address of the fourth service message matches the routing prefix; the first communication device forwards the fourth service message to the second communication device along the second forwarding path. In specific implementation, if the first forwarding table entry and the second forwarding table entry are maintained in a FIB, then, after the first communication device receives the fourth service message, it searches the FIB for a forwarding table entry whose routing prefix matches the destination address based on the destination address of the fourth service message, and obtains the first forwarding table entry and the second forwarding table entry; then, the first communication device determines that the fourth service message is forwarded according to the second forwarding table entry according to the identifier of the backup path of the second forwarding table entry; then, the first communication device determines the second output interface based on the second next hop information in the second forwarding table entry, and forwards the fourth service message from the second output interface to the second communication device along the second forwarding path. If the first forwarding table entry is maintained in the main FIB and the second forwarding table entry is maintained in the backup FIB, then, after receiving the fourth service message, the first communication device searches the backup FIB for a forwarding table entry whose routing prefix matches the destination address based on the destination address of the fourth service message, and obtains the second forwarding table entry; then, the first communication device determines the second output interface based on the second next hop information in the second forwarding table entry, and forwards the fourth service message to the second communication device along the second forwarding path from the second output interface. The second output interface is an interface on the first communication device corresponding to the second forwarding path to the second communication device.
[0081] In this way, through the method 100 provided in the embodiment of the present application, different types of tunnels can be used between two communication devices, and primary and backup protection can be performed between forwarding paths belonging to different types. After the primary path fails, the backup path can be switched to, and the transmission of traffic in the network is not affected by the failure of the primary path, thereby improving the reliability of the network.
[0082] It can be seen that in the method 100, by using the two next hop information in the BGP update message, different types of forwarding paths between two communication devices with different types of tunnels can be made available, and there is no need to establish two BGP neighbors between the first communication device and the second communication device, which can reduce the number of BGP neighbor deployments and reduce the impact on the network; moreover, there is no need to enable Add-path and perform Add-path capability negotiation, which can reduce the number of route announcements, especially for networks in the process of evolution, which can greatly reduce the amount of configuration and simplify the difficulty of configuration and deployment.
[0083] In order to make the method provided in the embodiment of the present application easier to understand, Figure 4 The scenario shown briefly introduces the method provided in the embodiment of the present application by way of example.
[0084] like Figure 4 As shown, the scenario to which the embodiment of the present application is applicable may include, for example: communication device 1, communication device 2, communication device 3 and communication device 4. Taking the establishment of a BGP neighbor between communication device 2 and communication device 3 and the existence of an SRv6 tunnel and an MPLS tunnel as an example, the method provided by the embodiment of the present application is introduced.
[0085] For the process in which communication device 3 publishes a route to communication device 2 and communication device 2 establishes two types of forwarding paths to communication device 3, assuming that the IPv4 address of communication device 3 is 10.1.2.3 and the IPv6 address is 2000::1, the method provided in the embodiment of the present application may include, for example:
[0086] S11, the communication device 3 generates a BGP update message 1, the BGP update message 1 includes a routing prefix 1, the NEXT_HOP of the Path Attributes of the BGP update message 1 carries 10.1.2.3, the MP_REACH_NLRI of the Path Attributes of the BGP update message 1 carries 2000::1, and the NHPIdentifier of the Path Attributes of the BGP update message 1 carries indication information 1, and the indication information 1 is used to indicate that the next hop information carried by the MP_REACH_NLRI corresponds to the main path.
[0087] S12 , the communication device 3 sends a BGP update message 1 to the communication device 2 .
[0088] S13, the communication device 2 receives the BGP update message 1.
[0089] S14, communication device 2 obtains 10.1.2.3 and 2000::1 from BGP update message 1, uses 10.1.2.3 to iterate the IPv4 forwarding path corresponding to the MPLS tunnel to establish forwarding path 1, and uses 2000::1 to iterate the IPv6 forwarding path to establish forwarding path 2.
[0090] Among them, forwarding path 1 is carried on the MPLS tunnel, and forwarding path 2 is carried on the SRv6 tunnel.
[0091] S15, the communication device 2 determines the forwarding path 2 as the main path based on the indication information 1.
[0092] S16, the communication device 2 generates a forwarding table entry 1 and a forwarding table entry 2.
[0093] The routing prefixes of forwarding table item 1 and forwarding table item 2 are, for example, routing prefix 1 carried by BGP update message 1. For example, forwarding table item 1 and forwarding table item 2 can be shown in the following Table 1:
[0094] Table 1
[0095] Route Prefix Next hop information Logo Forwarding table entry 1 Route prefix 1 10.1.2.3 Backup path identifier Forwarding table entry 2 Route prefix 1 2000::1 Identifier of the main path
[0096] S17, the communication device 2 receives the service message 1, and the destination address of the service message 1 matches the routing prefix 1.
[0097] S18, when forwarding path 1 is normal, communication device 2 determines the next hop information as 2000::1 based on forwarding table entry 2 shown in Table 1, and sends service message 1 to communication device 3 along forwarding path 2.
[0098] S19 , when forwarding path 2 is abnormal, communication device 2 determines the next hop information as 10.1.2.3 based on forwarding entry 1 shown in Table 1 , and sends service message 1 to communication device 3 along forwarding path 1 .
[0099] It should be noted that Figure 4 The communication device 2 in the embodiment can correspond to Figure 1 The first communication device in the communication device 3 can correspond to Figure 1 The second communication device in.
[0100] It can be seen that in the method provided by the embodiment of the present application, the communication device can use two locations that carry next-hop information in one BGP update message to publish next-hop information corresponding to different types of tunnels. The communication device that receives the BGP update message can iterate the two next-hop information to the corresponding type of forwarding path, establish two types of forwarding paths, and both types of forwarding paths are available. When the two available forwarding paths are set as a primary-backup protection relationship, the traffic can be switched to the backup path after the primary path fails, effectively improving the reliability of the network. Moreover, compared with the current method of maintaining two different types of paths between two communication devices, there is no need to establish two BGP neighbors or enable Add-path and publish multiple routes for a routing prefix, which reduces the resource consumption of configuration and interaction in the network.
[0101] Accordingly, the embodiment of the present application further provides a first communication device 500, such as Figure 5 The first communication device 500 may include: a receiving unit 501 and a processing unit 502. Wherein:
[0102] The receiving unit 501 is configured to receive a BGP update message sent by a second communication device, wherein the BGP update message includes first next hop information and second next hop information. The receiving unit 501 may execute Figure 1 The S103 shown is also OK Figure 4 S13 shown.
[0103] Processing unit 502 is configured to establish a first forwarding path based on the first next hop information, and to establish a second forwarding path based on the second next hop information, wherein the first forwarding path is an IPv4 forwarding path, and the second forwarding path is an IPv6 forwarding path. The processing unit 502 may execute Figure 1 The S104 shown is also OK Figure 4 S14 shown.
[0104] In some possible implementations, the BGP update message includes a path attribute, and the first next hop information is carried through a NEXT_HOP field of the path attribute, and the second next hop information is carried through an MP_REACH_NLRI field of the path attribute.
[0105] In some possible implementations, the BGP update message further includes first indication information, where the first indication information is used to indicate that both the first next hop information and the second next hop information need to be used.
[0106] As an example, the BGP update message carries the first indication information through an extended field of a path attribute.
[0107] In some possible implementations, the processing unit 502 is further used to obtain a first forwarding table entry based on the first forwarding path, and to obtain a second forwarding table entry based on the second forwarding path, wherein the first forwarding table entry includes a routing prefix and the first next hop information, and the second forwarding table entry includes the routing prefix and the second next hop information.
[0108] As an example, the first communication device 500 may also include a sending unit. The receiving unit 501 is further used to receive a first service message and a second service message, wherein the destination addresses of the first service message and the second service message both match the routing prefix; and the sending unit is used to forward the first service message to the second communication device along the first forwarding path, and forward the second service message to the second communication device along the second forwarding path.
[0109] In some possible implementations, the first indication information is further used to indicate that the forwarding path established based on the first next hop information is a primary path, or the first indication information is further used to indicate that the forwarding path established based on the second next hop information is a backup path.
[0110] In some other possible implementations, the BGP update message also includes second indication information, where the second indication message indicates that the forwarding path established by the first next hop information is a primary path, or the second indication information is used to indicate that the forwarding path established based on the second next hop information is a backup path.
[0111] As an example, the processing unit 502 is also used to obtain a first forwarding table entry based on the first forwarding path, and to obtain a second forwarding table entry based on the second forwarding path, wherein the first forwarding table entry includes a routing prefix and the first next hop information, the second forwarding table entry includes the routing prefix and the second next hop information, the first forwarding table entry also includes an identifier of a main path, or the first forwarding table entry belongs to a main forwarding table.
[0112] In this example, the first communication device 500 may also include a sending unit. The receiving unit 501 is further used to receive a third service message, the destination address of which matches the routing prefix; the sending unit is used to forward the third service message to the second communication device along the first forwarding path when the first forwarding path is normal. Alternatively, the receiving unit 501 is further used to receive a fourth service message, the destination address of which matches the routing prefix; the sending unit is used to forward the fourth service message to the second communication device along the second forwarding path when a failure occurs in the first forwarding path.
[0113] The first forwarding path may be, for example, an MPLS forwarding path, and the second forwarding path may be, for example, an SRv6 forwarding path.
[0114] It should be noted that the specific implementation method of the first communication device 500 and the technical effects achieved can be found in Figure 1 or Figure 4 The method provided.
[0115] Accordingly, the embodiment of the present application further provides a second communication device 600, such as Figure 6 The second communication device 600 may include: a processing unit 601 and a sending unit 602. Wherein:
[0116] Processing unit 601 is used to generate a BGP update message, wherein the BGP update message includes first next hop information, second next hop information and first indication information, wherein the first indication information is used for both the first next hop information and the second next hop information to be used, the first next hop information is an IPv4 address, and the second next hop information is an IPv6 address. The processing unit 601 may execute Figure 1 The S101 shown is also OK Figure 4 S11 shown.
[0117] The sending unit 602 is configured to send the BGP update message to the first communication device. The sending unit 602 may execute Figure 1 S102 shown, can also be executed Figure 4 S12 shown.
[0118] In some possible implementations, the BGP update message includes a path attribute, carries the first next hop information through a NEXT_HOP field of the path attribute, carries the second next hop information through an MP_REACH_NLRI of the path attribute, and carries the first indication information through an extension field of the path attribute.
[0119] It should be noted that the specific implementation method of the second communication device 600 and the technical effects achieved can be found in Figure 1 or Figure 4 The method shown.
[0120] See also Figure 7 , the present application embodiment provides a communication device 700. The communication device 700 may be any of the communication devices in any of the above embodiments, for example, Figure 1 The first communication device or Figure 4 The communication device 2 in the embodiment may be Figure 1 The second communication device or Figure 4 The communication device 700 can implement the functions of various communication devices in the above embodiments. The communication device 700 includes at least one processor 701, a bus system 702, a memory 703 and at least one communication interface 704.
[0121] The communication device 700 is a hardware structure device that can be used to implement Figure 5 The functional modules in the first communication device 500 are shown. For example, those skilled in the art may think of Figure 5 The processing unit 502 in the first communication device 500 shown in the figure can be implemented by the at least one processor 701 calling the code in the memory 703. Alternatively, the communication device 700 can be used to implement Figure 6 The functional modules in the second communication device 600 are shown. For example, those skilled in the art may think of Figure 6 The processing unit 601 in the second communication device 600 shown can be implemented by the at least one processor 701 calling the code in the memory 703 .
[0122] Optionally, the communication device 700 may also be used to implement the functions of the network device, communication device or node in any of the above embodiments.
[0123] Optionally, the processor 701 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0124] The bus system 702 may include a path for transmitting information between the components.
[0125] The communication interface 704 is used to communicate with other devices or communication means.
[0126] The memory 703 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0127] The memory 703 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 701. The processor 701 is used to execute the application code stored in the memory 703, so as to realize the functions in the method of the present application.
[0128] In a specific implementation, as an embodiment, the processor 701 may include one or more CPUs, such as Figure 7 CPU0 and CPU1 in.
[0129] In a specific implementation, as an embodiment, the communication device 700 may include multiple processors, such as Figure 7701 and processor 707 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0130] Figure 8 800 is a schematic diagram of the structure of another communication device 800 provided in an embodiment of the present application. The communication device 800 may be any of the communication devices in any of the above embodiments, for example, Figure 1 The first communication device or Figure 4 The communication device 2 in the embodiment may be Figure 1 The second communication device or Figure 4 The communication device 3 in the embodiment. The communication device 800 can implement the functions of each communication device in the above embodiments.
[0131] The communication device 800 includes a main control board 810 and an interface board 830 .
[0132] The main control board 810 is also called a main processing unit (MPU) or a route processor card. The main control board 810 controls and manages various components in the communication device 800, including route calculation, device management, device maintenance, and protocol processing functions. The main control board 810 includes: a central processing unit 811 and a memory 812.
[0133] The interface board 830 is also called a line processing unit (LPU), a line card or a service board. The interface board 830 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients) service interface. The interface board 830 includes: a central processing unit 831, a network processor 832, a forwarding table entry memory 834 and a physical interface card (PIC) 833.
[0134] The central processor 831 on the interface board 830 is used to control and manage the interface board 830 and communicate with the central processor 811 on the main control board 810 .
[0135] The network processor 832 is used to implement message forwarding processing. The network processor 832 may be in the form of a forwarding chip. Specifically, the processing of uplink messages includes: message inbound interface processing, forwarding table search; the processing of downlink messages: forwarding table search, etc.
[0136] The physical interface card 833 is used to implement the docking function of the physical layer, from which the original traffic enters the interface board 830, and the processed message is sent from the physical interface card 833. The physical interface card 833 includes at least one physical interface, which is also called a physical port. The physical interface card 833 corresponds to the FlexE physical interface in the system architecture. The physical interface card 833 is also called a daughter card, which can be installed on the interface board 830 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 832 for processing after checking the legitimacy of the message. In some embodiments, the central processor 831 of the interface board 830 can also perform the functions of the network processor 832, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 832 is not required in the physical interface card 833.
[0137] Optionally, the communication device 800 includes a plurality of interface boards. For example, the communication device 800 further includes an interface board 840 . The interface board 840 includes a central processor 841 , a network processor 842 , a forwarding table entry memory 844 , and a physical interface card 843 .
[0138] Optionally, the communication device 800 further includes a switching fabric board 820. The switching fabric board 820 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 830, the switching fabric board 820 is used to complete data exchange between the interface boards. For example, the interface board 830 and the interface board 840 may communicate via the switching fabric board 820.
[0139] The main control board 810 is coupled to the interface board 830. For example, the main control board 810, the interface board 830, the interface board 840, and the switching network board 820 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 810 and the interface board 830, and the main control board 810 and the interface board 830 communicate through the IPC channel.
[0140] Logically, the communication device 800 includes a control plane and a forwarding plane. The control plane includes a main control board 810 and a central processing unit 831. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 834, a physical interface card 833, and a network processor 832. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 832 forwards the message received by the physical interface card 833 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 834. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0141] If the communication device 800 is configured as a first communication device, the network processor 832 can trigger the physical interface card 833 to receive a BGP update message sent by the second communication device, wherein the BGP update message includes first next hop information and second next hop information; the central processor 811 can establish a first forwarding path based on the first next hop information, and establish a second forwarding path based on the second next hop information, wherein the first forwarding path is an IPv4 forwarding path, and the second forwarding path is an IPv6 forwarding path.
[0142] It should be understood that the receiving unit 501, the sending unit in the first communication device 500, and the communication interface 704 in the communication device 700 can be equivalent to the physical interface card 833 or the physical interface card 843 in the communication device 800; the processing unit 502 in the first communication device 500 and the processor 701 in the communication device 700 can be equivalent to the central processing unit 811 or the central processing unit 831 in the communication device 800.
[0143] It should be understood that the operation on the interface board 840 in the embodiment of the present application is consistent with the operation of the interface board 830, and for the sake of brevity, it will not be repeated. The communication device 800 of this embodiment may correspond to the first communication device 500 or the communication device 700 in the above-mentioned embodiments. The main control board 810, the interface board 830 and / or the interface board 840 in the communication device 800 may implement the functions and / or various steps implemented in the first communication device 500 or the communication device 700 in the above-mentioned embodiments, and for the sake of brevity, it will not be repeated here.
[0144] If the communication device 800 is configured as a second communication device, the central processor 811 can generate a BGP update message, wherein the BGP update message includes first next hop information, second next hop information and first indication information, wherein the first indication information is used for both the first next hop information and the second next hop information to be used, the first next hop information is an IPv4 address, and the second next hop information is an IPv6 address; the network processor 832 can trigger the physical interface card 833 to send the BGP update message to the first communication device.
[0145] It should be understood that the sending unit 602 in the second communication device 600 and the communication interface 704 in the communication device 700 can be equivalent to the physical interface card 833 or the physical interface card 843 in the communication device 800; the processing unit 601 in the second communication device 600 and the processor 701 in the communication device 700 can be equivalent to the central processing unit 811 or the central processing unit 831 in the communication device 800.
[0146] It should be understood that the operation on the interface board 840 in the embodiment of the present application is consistent with the operation of the interface board 830, and for the sake of brevity, it will not be repeated. The communication device 800 of this embodiment may correspond to the second communication device 600 or the communication device 700 in the above-mentioned embodiments. The main control board 810, the interface board 830 and / or the interface board 840 in the communication device 800 may implement the functions and / or various steps implemented in the second communication device 600 or the communication device 700 in the above-mentioned embodiments, and for the sake of brevity, it will not be repeated here.
[0147] It should be understood that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. Under a centralized forwarding architecture, the network device may not need a switching network board, and the interface board is responsible for the processing function of the business data of the entire system. Under a distributed forwarding architecture, the network device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those of devices with a centralized architecture. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario.
[0148] In some possible embodiments, each of the above-mentioned network devices or network devices can be implemented as a virtualized device. For example, a virtualized device can be a virtual machine (English: Virtual Machine, VM) running a program for sending message functions, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. The virtual machine can be configured as each communication device in the embodiments of the present application. For example, each communication device can be implemented based on a general physical server in combination with Network Function Virtualization (NFV) technology. Each communication device is a virtual host, a virtual router or a virtual switch. Those skilled in the art can virtualize each communication device with the above-mentioned functions on a general physical server in combination with NFV technology by reading this application, and will not be repeated here.
[0149] It should be understood that the communication devices in the above-mentioned various product forms respectively have any functions of the communication devices in the above-mentioned method embodiments, which will not be described in detail here.
[0150] The embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, can be a specific implementation form of the message processing device in the embodiment of the present application, and can be used to execute the above-mentioned routing method. Wherein, the processor is coupled with a memory, and the memory is used to store programs or instructions. When the program or instruction is executed by the processor, the chip system implements the method in any of the above-mentioned method embodiments.
[0151] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0152] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0153] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0154] In addition, the embodiment of the present application also provides a communication system 900, such as Fig. 9 The communication system 900 may include a first communication device 901 and a second communication device 902, wherein the first communication device 901 is used to perform Figure 1The operation performed by the first communication device in the second communication device 902 is used to perform Figure 1 Alternatively, the first communication device 901 is used to perform Figure 4 The operation performed by the communication device 2 in the second communication device 902 is used to perform Figure 4 The first communication device 901 may correspond to Figure 5 The first communication device 500 and the second communication device 902 may correspond to Figure 6 The second communication device 600 in.
[0155] In addition, the embodiment of the present application also provides a readable storage medium, in which a program code or instruction is stored, and when the program code or instruction is executed on the processor, the processor executes the above Figure 1 or Figure 4 A method under any one of the implementation modes in the illustrated embodiments.
[0156] In addition, an embodiment of the present application also provides a program product, which, when executed on a processor, enables the processor to execute any one of the implementation methods of the aforementioned method.
[0157] It should be understood that "based on determining B according to A" mentioned in the embodiments of the present application does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0158] The "first" in the names of "first detection message", "first bypass information" and the like mentioned in this application is only used as a name identifier and does not mean the first in order. The same rule applies to "second" and the like.
[0159] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0160] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for system embodiments and device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, in which the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0161] The above is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. It should be noted that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the present application, and these improvements and modifications should also be regarded as the protection scope of the present application.
Claims
1. A route publishing method, characterized in that: include: The first communication device receives a Border Gateway Protocol update BGP update message sent by the second communication device, wherein the BGP update message includes first next hop information and second next hop information; The first communication device establishes a first forwarding path based on the first next hop information and establishes a second forwarding path based on the second next hop information, the first forwarding path is an Internet Protocol version 4 (IPv4) forwarding path, and the second forwarding path is an Internet Protocol version 6 (IPv6) forwarding path.
2. The method according to claim 1, characterized in that The BGP update message includes a path attribute, and carries the first next hop information through a next hop NEXT_HOP field of the path attribute, and carries the second next hop information through multi-protocol reachable network layer reachability information MP_REACH_NLRI of the path attribute.
3. The method according to claim 1 or 2, characterized in that: The BGP update message also includes first indication information, where the first indication information is used to indicate that both the first next hop information and the second next hop information need to be used.
4. The method according to claim 3, characterized in that The BGP update message carries the first indication information through an extended field of a path attribute.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The first communication device obtains a first forwarding table entry based on the first forwarding path and obtains a second forwarding table entry based on the second forwarding path, wherein the first forwarding table entry includes a routing prefix and the first next hop information, and the second forwarding table entry includes the routing prefix and the second next hop information.
6. The method according to claim 5, characterized in that The method further comprises: The first communication device receives a first service message and a second service message, and the destination addresses of the first service message and the second service message both match the routing prefix; The first communication device forwards the first service message to the second communication device along the first forwarding path, and forwards the second service message to the second communication device along the second forwarding path.
7. The method according to any one of claims 1 to 5, characterized in that: The first indication information is further used to indicate that the forwarding path established based on the first next hop information is a primary path, or the first indication information is further used to indicate that the forwarding path established based on the second next hop information is a backup path.
8. The method according to any one of claims 1 to 5, characterized in that: The BGP update message also includes second indication information, where the second indication message indicates that the forwarding path established by the first next hop information is a primary path, or the second indication information is used to indicate that the forwarding path established based on the second next hop information is a backup path.
9. The method according to claim 7 or 8, characterized in that: The method further comprises: The first communication device obtains a first forwarding table entry based on the first forwarding path, and obtains a second forwarding table entry based on the second forwarding path, the first forwarding table entry includes a routing prefix and the first next hop information, the second forwarding table entry includes the routing prefix and the second next hop information, the first forwarding table entry also includes an identifier of a main path, or the first forwarding table entry belongs to a main forwarding table.
10. The method according to claim 9, characterized in that The first forwarding path is normal, and the method further includes: The first communication device receives a third service message, wherein the destination address of the third service message matches the routing prefix; The first communication device forwards the third service message to the second communication device along the first forwarding path.
11. The method according to claim 9, characterized in that If the first forwarding path fails, the method further includes: The first communication device receives a fourth service message, and the destination address of the fourth service message matches the routing prefix; The first communication device forwards the fourth service message to the second communication device along the second forwarding path.
12. The method according to any one of claims 1 to 11, characterized in that: The second forwarding path is a segment routing SRv6 forwarding path of the sixth version of the Internet Protocol.
13. A route publishing method, characterized in that: include: The second communication device generates a Border Gateway Protocol update BGP update message, wherein the BGP update message includes first next hop information, second next hop information, and first indication information, wherein the first indication information is used for both the first next hop information and the second next hop information to be used, the first next hop information is a fourth version Internet Protocol IPv4 address, and the second next hop information is a sixth version Internet Protocol IPv6 address; The second communication device sends the BGP update message to the first communication device.
14. The method according to claim 13, characterized in that The BGP update message includes a path attribute, carries the first next hop information through the next hop NEXT_HOP field of the path attribute, carries the second next hop information through the multi-protocol reachable network layer reachability information MP_REACH_NLRI of the path attribute, and carries the first indication information through an extension field of the path attribute.
15. A communication device, characterized in that: include: A processing unit, configured to perform other operations except the receiving operation and the sending operation in the method according to any one of claims 1 to 14; A transceiver unit, used to perform the receiving operation and the sending operation in the method described in any one of claims 1-14.
16. A communication device, characterized in that: The communication device includes a memory and a processor; The memory is used to store instructions; The processor is used to execute the instructions in the memory and perform the method according to any one of claims 1 to 14.
17. A communication system, characterized in that: The communication system comprises a first communication device and a second communication device; The first communication device is used to execute the method according to any one of claims 1 to 12; The second communication device is used to execute the method according to claim 13 or 14.
18. A storage medium, characterized in that: The storage medium includes instructions, and when the instructions are executed on a processor, the processor is caused to execute the method according to any one of claims 1 to 14.