The present disclosure relates to the field of communications technologies, and in particular, to a routing information processing method and apparatus.
In an Internet Protocol (IP) network traffic forwarding scenario of Internet Protocol version 6 (IPv6), a network device A configures a virtual private network segment identifier (VPNSID), and uses the VPNSID to advertise routing information. A network device B configures mirror protection for a locator of the network device A. The network device B configures a mirror-segment identifier (SID) to advertise a mirror message, thereby declaring protection for the locator of the network device A and configuring mirror protection for the network device A.
In a scenario in which single-homing and multi-homing coexist and a fault occurs, a provider router (P) directly connected to the network device A perceives occurrence of the fault, performs mirror protection, encapsulates, into a packet, the mirror-SID configured by the network device B, and forwards an encapsulated packet to the network device B. For a packet destined for a network device C single-homed to the network device A, after the network device B receives the packet into which the mirror-SID is encapsulated, the network device B directly discards a packet destined for the network device A, to prevent a traffic loop. This causes traffic interruption. However, actually, in a scenario in which a link between the network device A and the P is faulty and the network device A is not faulty, a packet may reach the network device A through the network device B and then reach the network device C, but the network device B discards the packet. Consequently, in the scenario in which single-homing and multi-homing coexist, traffic of the network device that is not faulty and that is accessed in a single-homed manner is interrupted.
This application provides a routing information processing method and apparatus, to resolve the following problem in a conventional technology: In a single-homing and multi-homing scenario, traffic of a network device that is not faulty and that is accessed in a single-homed manner is interrupted.
According to a first aspect, an embodiment of this application provides a routing information processing method, including a first network device determines a first segment identifier corresponding to a second network device, where the first network device is a single-homing device of the second network device, and the first segment identifier corresponds to a first locator. The first network device determines a second segment identifier corresponding to a third network device, where the first network device is a multi-homing device of the third network device, and the second segment identifier corresponds to a second locator. The first network device sends routing information, where the routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier. Alternatively, the first network device sends first routing information and second routing information, where the first routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and the second routing information includes a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier. A fourth network device receives the routing information or receives the first routing information and the second routing information. The fourth network device advertises mirror routing information specific to the first network device. The mirror routing information includes the second segment identifier, and does not include the first segment identifier. Alternatively, the mirror routing information includes the second locator corresponding to the second segment identifier, and does not include the first locator corresponding to the first segment identifier.
In this method, the fourth network device establishes mirror protection for the second segment identifier or the second locator of the third network device that is a multi-homed network device, and does not establish mirror protection for the first segment identifier or the first locator of the second network device that is a single-homed network device. Therefore, in a scenario in which single-homing and multi-homing coexist, if the first network device is not faulty, a packet destined for the second network device may be sent to a link to the second network device, in an attempt to determine whether the link is faulty, and when the link is not faulty, the packet can be successfully sent to the second network device through the first network device. In this way, it is ensured that traffic of the network device that is not faulty and that is accessed in a single-homed manner is not interrupted in the scenario in which single-homing and multi-homing coexist.
In a possible implementation, the first locator and the second locator are in a same locator pool, and the first locator is different from the second locator.
In this implementation, the first network device dynamically allocates, to the single-homed and multi-homed network devices based on single-homing and multi-homing information and the independent single-homing and multi-homing locators, the segment identifiers corresponding to the corresponding locators, so that protection can be effectively performed for a case in which single-homing and multi-homing coexist.
In a possible implementation, that the first network device determines a second segment identifier corresponding to a third network device further includes the first network device may receive third routing information sent by the fourth network device, where the third routing information includes a device identifier of the third network device; the first network device determines, based on the third routing information, that the fourth network device is a multi-homing device of the third network device; and the first network device determines, based on the fact that the fourth network device is the multi-homing device of the third network device, the second segment identifier corresponding to the third network device.
In this implementation, the first network device may further dynamically allocate, within the locator corresponding to the multi-homed network device, the segment identifier based on multi-homing information obtained through updating. This further improves system robustness.
In a possible implementation, the method further includes the first network device may further receive a plurality of pieces of routing information. The first network device determines, based on the plurality of pieces of routing information, that all of a plurality of network devices corresponding to the plurality of pieces of routing information are multi-homing devices of the third network device.
That the first network device determines a second segment identifier corresponding to a third network device further includes the first network device may determine, based on one or more of the plurality of network devices, the second segment identifier corresponding to the third network device.
In this implementation, the first network device may make full use of allocated locators, to save resources effectively and implement mirror protection in the scenario in which single-homing and multi-homing coexist.
In a possible implementation, the method further includes the first network device may further receive a packet that is forwarded by the fourth network device and that is sent by a fifth network device, where a destination network device of the packet is the second network device, and a link between the fifth network device and the first network device is faulty. The first network device sends the packet to the second network device.
In this implementation, in the scenario in which single-homing and multi-homing coexist, the destination network device of the packet serves as a network device that accesses, in the single-homed manner, the network device that is not faulty, so that the packet can be successfully sent to the destination network device when a link to the destination network device is faulty. This avoids interruption of traffic of the network device that is not faulty and that is accessed in the single-homed manner.
In a possible implementation, that the first network device sends routing information further includes the first network device may send the routing information by using an interior gateway protocol (IGP) protocol. Alternatively, that the first network device sends first routing information and second routing information further includes the first network device sends the first routing information and the second routing information by using an IGP protocol.
In this implementation, the first network device may advertise, by using the IGP, the segment identifiers corresponding to the locators dynamically allocated from the locator pool, to effectively advertise the segment identifiers by using an IGP protocol mechanism, thereby ensuring compatibility of a running system.
According to a second aspect, an embodiment of this application provides a routing information processing method. A first network device and a third network device are multi-homing devices of a second network device. The third network device is a single-homing device of a fourth network device. The method includes the first network device receives routing information sent by the third network device, where the routing information includes a first device identifier of the fourth network device and a first segment identifier corresponding to the first device identifier, and a second device identifier of the second network device and a second segment identifier corresponding to the second device identifier. Alternatively, the first network device receives first routing information and second routing information that are sent by the third network device, where the first routing information includes a first device identifier of the fourth network device and a first segment identifier corresponding to the first device identifier, and the second routing information includes a second device identifier of the second network device and a second segment identifier corresponding to the second device identifier. The first network device advertises mirror routing information specific to the third network device, where the mirror routing information includes the second segment identifier, and does not include the first segment identifier; or the mirror routing information includes a second locator corresponding to the second segment identifier, and does not include a first locator corresponding to the first segment identifier.
In this method, the first network device establishes mirror protection for the second segment identifier or the second locator of the second network device that is a multi-homed network device, and does not establish mirror protection for the first segment identifier or the first locator of the fourth network device that is a single-homed network device. Therefore, in a scenario in which single-homing and multi-homing coexist, if the third network device is not faulty, because the fourth network device serves as a network device that accesses, in a single-homed manner, the third network device that is not faulty, a packet destined for the fourth network device may be sent to a link to the fourth network device, in an attempt to determine whether the link is faulty, and when the link is not faulty, the packet can be successfully sent to the fourth network device through the third network device. In this way, it is ensured that traffic of the network device that is not faulty and that is accessed in the single-homed manner is not interrupted in the scenario in which single-homing and multi-homing coexist, and protection can be effectively performed for both a single-homing scenario and a multi-homing scenario.
In a possible implementation, before the first network device receives the routing information or the second routing information, the method further includes the first network device may further receive third routing information, where the third routing information includes the second device identifier of the second network device and the first segment identifier corresponding to the second device identifier. The first network device determines, based on the first routing information and the third routing information that are received, that the first segment identifier corresponds to the second network device and the fourth network device. The first network device does not advertise the mirror routing information specific to the third network device.
In this implementation, if the first network device determines that the first segment identifier in the third routing information corresponds to both the single-homed network device and the multi-homed network device, the first network device does not establish mirror protection for the first segment identifier. In this way, when the first network device does not definitely know whether the first segment identifier is used by the single-homed network device or the multi-homed network device, incorrect establishment of mirror protection can be avoided, thereby further improving system robustness.
In a possible implementation, before the first network device receives the second routing information, the method further includes the first network device may further send fourth routing information to the third network device, where the fourth routing information is used to indicate a route to the second network device.
In this implementation, the first network device sends the fourth routing information. With the fourth routing information received by the third network device, the second segment identifier corresponding to the multi-homed network device can be accurately allocated to the second network device, thereby better implementing mirror protection in the scenario in which single-homing and multi-homing coexist.
In a possible implementation, the method further includes the first network device receives fifth routing information, where the fifth routing information includes a third device identifier of a fifth network device and a third segment identifier corresponding to the third device identifier, and the third segment identifier corresponds to the second locator.
That the first network device advertises mirror routing information specific to the third network device, where the mirror routing information includes a second locator corresponding to the second segment identifier, and does not include a first locator corresponding to the first segment identifier includes the first network device determines the second locator obtained by aggregating the second segment identifier and the third segment identifier; and the first network device advertises the mirror routing information specific to the third network device, where the mirror routing information includes the second locator obtained through the aggregation, and does not include the first locator corresponding to the first segment identifier.
In this implementation, the first network device may aggregate the segment identifiers of the multi-homed network devices, and dynamically advertise the mirror protection information of the corresponding locator with reference to the locator obtained by aggregating the segment identifiers, thereby saving network resources.
In a possible implementation, the method further includes the first network device may further receive a packet sent by a sixth network device, where a destination network device of the packet is the fourth network device, and a link between the sixth network device and the third network device is faulty. The first network device sends the packet to the third network device.
According to a third aspect, an embodiment of this application further provides a routing information processing apparatus. The routing information processing apparatus has a function of implementing the network device in any one of the first aspect or the method implementations of the first aspect, and includes corresponding parts (means) configured to perform steps or functions described in each corresponding method. The steps or functions may be implemented by using software, hardware (for example, a circuit), or a combination of hardware and software. The network device includes a first network device.
In a possible design, the apparatus includes one or more processing units and a transceiver unit. The one or more processing units are configured to support the apparatus in performing corresponding functions of the network device in the foregoing method.
Specifically, the processing unit is configured to determine a first segment identifier corresponding to a second network device, where the first network device is a single-homing device of the second network device, and the first segment identifier corresponds to a first locator; and determine a second segment identifier corresponding to a third network device, where the first network device is a multi-homing device of the third network device, and the second segment identifier corresponds to a second locator.
The transceiver unit is configured to send routing information, where the routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier; or send first routing information and second routing information, where the first routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and the second routing information includes a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier.
In a possible implementation, the transceiver unit is further configured to receive third routing information sent by a fourth network device, where the third routing information includes a device identifier of the third network device.
The processing unit is further configured to determine, based on the third routing information, that the fourth network device is a multi-homing device of the third network device; and determine, based on the fact that the fourth network device is the multi-homing device of the third network device, the second segment identifier corresponding to the third network device.
In a possible implementation, the transceiver unit is further configured to receive a plurality of pieces of routing information.
The processing unit is further configured to determine, based on the plurality of pieces of routing information, that all of a plurality of network devices corresponding to the plurality of pieces of routing information are multi-homing devices of the third network device; and determine, based on one or more of the plurality of network devices, the second segment identifier corresponding to the third network device.
In a possible implementation, the transceiver unit is further configured to receive a packet that is forwarded by the fourth network device and that is sent by a fifth network device, where a destination network device of the packet is the second network device, and a link between the fifth network device and the first network device is faulty; and send the packet to the second network device.
According to a fourth aspect, an embodiment of this application further provides a routing information processing apparatus. The routing information processing apparatus has a function of implementing the network device in any one of the second aspect or the method implementations of the second aspect, and includes corresponding parts (means) configured to perform steps or functions described in each corresponding method. The steps or functions may be implemented by using software, hardware (for example, a circuit), or a combination of hardware and software. The network device includes a first network device.
In a possible implementation, the apparatus includes one or more processing units and a transceiver unit. The one or more processing units are configured to support the apparatus in performing corresponding functions of the network device in the foregoing method.
Further, the transceiver unit is configured to receive routing information sent by a third network device, where the routing information includes a first device identifier of a fourth network device and a first segment identifier corresponding to the first device identifier, and a second device identifier of a second network device and a second segment identifier corresponding to the second device identifier; or receive first routing information and second routing information that are sent by the third network device, where the first routing information includes a first device identifier of the fourth network device and a first segment identifier corresponding to the first device identifier, the second routing information includes a second device identifier of the second network device and a second segment identifier corresponding to the second device identifier, the first network device and the third network device are multi-homing devices of the second network device, and the third network device is a single-homing device of the fourth network device.
The processing unit is configured to advertise mirror routing information specific to the third network device, where the mirror routing information includes the second segment identifier, and does not include the first segment identifier; or the mirror routing information includes a second locator corresponding to the second segment identifier, and does not include a first locator corresponding to the first segment identifier.
In a possible implementation, the transceiver unit is further configured to receive third routing information, where the third routing information includes the second device identifier of the second network device and the first segment identifier corresponding to the second device identifier.
The processing unit is further configured to determine, based on the first routing information and the third routing information that are received, that the first segment identifier corresponds to the second network device and the fourth network device, and skip, by the first network device, advertising the mirror routing information specific to the third network device.
In a possible implementation, the transceiver unit is further configured to send fourth routing information to the third network device, where the fourth routing information is used to indicate a route to the second network device.
In a possible implementation, the transceiver unit is further configured to receive fifth routing information, where the fifth routing information includes a third device identifier of a fifth network device and a third segment identifier corresponding to the third device identifier, and the third segment identifier corresponds to the second locator.
The processing unit is further configured to determine the second locator obtained by aggregating the second segment identifier and the third segment identifier; and advertise the mirror routing information specific to the third network device, where the mirror routing information includes the second locator obtained through the aggregation, and does not include the first locator corresponding to the first segment identifier.
In a possible implementation, the transceiver unit is further configured to receive a packet sent by a sixth network device, where a destination network device of the packet is the fourth network device, and a link between the sixth network device and the third network device is faulty; and send the packet to the third network device.
According to a fifth aspect, an embodiment of this application further provides a routing information processing apparatus. The routing information processing apparatus includes a processor and a memory. The processor is coupled to the memory.
The memory is configured to store a computer program.
The processor is configured to execute the computer program stored in the memory, so that the apparatus performs the following operations:
determining a first segment identifier corresponding to a second network device, where the first network device is a single-homing device of the second network device, and the first segment identifier corresponds to a first locator; determining a second segment identifier corresponding to a third network device, where the first network device is a multi-homing device of the third network device, and the second segment identifier corresponds to a second locator; and sending routing information, where the routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier; or sending first routing information and second routing information, where the first routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and the second routing information includes a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier.
In a possible implementation, the first locator and the second locator are in a same locator pool, and the first locator is different from the second locator.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operations: receiving third routing information sent by a fourth network device, where the third routing information includes a device identifier of the third network device; determining, based on the third routing information, that the fourth network device is a multi-homing device of the third network device; and determining, based on the fact that the fourth network device is the multi-homing device of the third network device, the second segment identifier corresponding to the third network device.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operations: receiving a plurality of pieces of routing information; determining, based on the plurality of pieces of routing information, that all of a plurality of network devices corresponding to the plurality of pieces of routing information are multi-homing devices of the third network device; and determining, based on one or more of the plurality of network devices, the second segment identifier corresponding to the third network device.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operations: receiving a packet that is forwarded by the fourth network device and that is sent by a fifth network device, where a destination network device of the packet is the second network device, and a link between the fifth network device and the first network device is faulty; and sending the packet to the second network device.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operation: sending the routing information by using an IGP protocol; or sending the first routing information and the second routing information by using an IGP protocol.
According to a sixth aspect, an embodiment of this application further provides a routing information processing apparatus. The routing information processing apparatus includes a processor and a memory. The processor is coupled to the memory.
The memory is configured to store a computer program.
The processor is configured to execute the computer program stored in the memory, so that the apparatus performs the following operations: receiving routing information sent by a third network device, where the routing information includes a first device identifier of a fourth network device and a first segment identifier corresponding to the first device identifier, and a second device identifier of a second network device and a second segment identifier corresponding to the second device identifier; or receiving first routing information and second routing information that are sent by the third network device, where the first routing information includes a first device identifier of the fourth network device and a first segment identifier corresponding to the first device identifier, the second routing information includes a second device identifier of the second network device and a second segment identifier corresponding to the second device identifier, a first network device and the third network device are multi-homing devices of the second network device, and the third network device is a single-homing device of the fourth network device; and advertising mirror routing information specific to the third network device, where the mirror routing information includes the second segment identifier, and does not include the first segment identifier, or the mirror routing information includes a second locator corresponding to the second segment identifier, and does not include a first locator corresponding to the first segment identifier.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operations: receiving third routing information, where the third routing information includes the second device identifier of the second network device and the first segment identifier corresponding to the second device identifier; and determining, based on the first routing information and the third routing information that are received, that the first segment identifier corresponds to the second network device and the fourth network device, and skipping, by the first network device, advertising the mirror routing information specific to the third network device.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operation: sending fourth routing information to the third network device, where the fourth routing information is used to indicate a route to the second network device.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operations: receiving fifth routing information, where the fifth routing information includes a third device identifier of a fifth network device and a third segment identifier corresponding to the third device identifier, and the third segment identifier corresponds to the second locator; determining the second locator obtained by aggregating the second segment identifier and the third segment identifier; and advertising the mirror routing information specific to the third network device, where the mirror routing information includes the second locator obtained through the aggregation, and does not include the first locator corresponding to the first segment identifier.
In a possible implementation, the processor is further configured to execute the computer program, to perform the following operations: receiving a packet sent by a sixth network device, where a destination network device of the packet is the fourth network device, and a link between the sixth network device and the third network device is faulty; and sending the packet to the third network device.
According to a seventh aspect, an embodiment of this application provides a computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are run on a computer, the computer is enabled to perform the method in any one of the first aspect, the second aspect, the possible implementations of the first aspect, or the possible implementations of the second aspect.
According to an eighth aspect, an embodiment of this application provides a computer program product. The computer program product includes computer program code. When the computer program code is run on a computer, the computer is enabled to perform the method in any one of the first aspect, the second aspect, the possible implementations of the first aspect, or the possible implementations of the second aspect.
The following further describes the present disclosure in detail with reference to accompanying drawings.
All aspects, embodiments, or features are presented in the present disclosure by describing a system that may include a plurality of devices, components, modules, and the like. It should be appreciated and understood that, each system may include another device, component, module, and the like, and/or may not include all devices, components, modules, and the like discussed with reference to the accompanying drawings. In addition, a combination of the solutions may be used.
In addition, in the embodiments of the present disclosure, the term “for example” is used to indicate an example, an example illustration, or a description. Any embodiment or design scheme described as an “example” in the present disclosure should not be explained as being more preferred or having more advantages than another embodiment or design. Exactly speaking, use of the term “for example” is intended to present a concept in a specific manner.
A network architecture and a service scenario described in embodiments of the present disclosure are intended to describe the technical solutions in embodiments of the present disclosure more clearly, and do not constitute a limitation on the technical solutions provided in embodiments of the present disclosure. A person of ordinary skill in the art may know that, with evolution of the network architecture and emergence of new service scenarios, the technical solutions provided in embodiments of the present disclosure are also applicable to similar technical problems.
The following describes some terms in embodiments of the present disclosure, to facilitate understanding by persons skilled in the art.
(1) Virtual private network (VPN): A virtual private network may include a customer edge (CE) node, a provider edge (PE) node, and a P. The CE is also referred to as a customer edge router. The PE is also referred to as a backbone-network edge router. The P is also referred to as a backbone-network core router. The network-side PE may be directly connected to the user-side CE, and is responsible for VPN service access and routing information processing. The P is responsible for data forwarding, and is not directly connected to the CE. The P may be directly connected to the PE and/or another P. In the embodiments of the present disclosure, a VPN may also be simply referred to as a network.
(2) Segment routing (SR) protocol: A segment routing protocol is a new protocol proposed based on an IGP. In the SR protocol, a segment identifier (SID) may be used to identify a network device, so that another network device can forward a packet based on an SID label carried in the packet.
(3) Packet: A packet is a data unit exchanged and transmitted in a network. A packet includes complete data information that is to be sent.
(4) Single-homing and multi-homing: In the embodiments of the present disclosure, single-homing means that a CE is connected to only one PE, in other words, a CE is single-homed to one PE; and multi-homing means that a CE is connected to a plurality of PEs, in other words, a CE is multi-homed to a plurality of PEs. If a network includes both single-homing and multi-homing, it means that single-homing and multi-homing are combined or single-homing and multi-homing coexist in the network. In the embodiments of the present disclosure, if a network device A is single-homed to another network device, the network device A is also referred to as a single-homed node, a single-homed network device, or a single-homed device; if a network device B is multi-homed to other network devices, the network device B is also referred to as a multi-homed node, a multi-homed network device, or a multi-homed device. The multi-homed network device B is simultaneously homed to two or more network devices.
(5) Virtual routing and forwarding (VRF) table: A virtual routing and forwarding table is also referred to as a VPN routing and forwarding table or a VPN instance. A VRF is a dedicated entity established and maintained by a PE for a directly connected site. Each site has a corresponding VRF on a PE, and the site may include, for example, a CE and/or a P. In addition, each VRF may be considered as a virtual router. Each VRF includes an independent routing table, a set of interfaces homed to the VRF, and a set of routing protocols used for only the VRF. A VRF may indicate a service accessed by a user. For example, a VRF1 indicates that a user accesses a service 1, and a VRF2 indicates that the user accesses a service 2. The VRF1 and the VRF2 are different, indicating that the services accessed by the user are different.
The term “and/or” in the present disclosure describes an association relationship between associated objects and indicates that three relationships may exist. For example, A and/or B may indicate the following three cases: Only A exists, both A and B exist, and only B exists. The character “/” generally indicates an “or” relationship between associated objects.
“A plurality of” in the present disclosure means two or more.
In addition, it should be understood that in description of the present disclosure, terms such as “first” and “second” are merely used for distinguishing and description, but should not be understood as an indication or implication of relative importance, or should not be understood as an indication or implication of a sequence.
For ease of understanding the embodiments of the present disclosure, the following describes possible application scenarios of the embodiments of the present disclosure.
During packet forwarding in a conventional IP network, when a packet is forwarded to a network device, the network device queries an IP routing table to determine a next-hop network device of the packet. At a head node, a user cannot definitely know a specific packet path of the packet. Therefore, when planning a network, a customer usually adds corresponding configuration information on each network device to guide packet forwarding. Based on an SR technology, the customer can directly customize a complete forwarding path of the packet.
In an IPv6 forwarding scenario, after an end-to-end SRv6 policy (namely, a segment routing policy) is deployed, for a fault of a tail node, a conventional solution is deploying VPN fast reroute (FRR). In a network structure shown in
In this tail node protection solution, the PE24 configures mirror protection for the PE23. In a scenario in which single-homing and multi-homing coexist and a fault occurs, for example, two comparatively common fault scenarios in which a link between the P33 and the PE23 is faulty (which is referred to as a fault 1) and the PE23 is faulty (which is referred to as a fault 2), the P33 perceives occurrence of the faults, performs mirror protection, encapsulates, into a packet, the mirror-SID allocated by the PE24, and forwards an encapsulated packet to the PE24. The PE24 searches the remote routing and forwarding table based on the mirror-SID that is allocated by the PE24 and that is encapsulated into the packet, and determines the VRF41 corresponding to the mirror-SID allocated by the PE24. For a packet destined for the CE14, the PE24 may directly send the packet to the CE14. For a packet destined for the CE13, the PE24 determines that the packet is to be further forwarded to the remote network device PE23. To prevent a traffic loop, because the PE24 determines that a remote route is hit, the PE24 directly discards a packet destined for the PE23. This causes traffic interruption. However, actually, in the scenario of the fault 1, the packet may reach the PE23 through the PE24 and then reach the CE13, but the PE24 discards the packet. As a result, traffic of the PE that is not faulty and that is accessed in a single-homed manner is interrupted in the scenario in which single-homing and multi-homing coexist.
In the foregoing scenario in which the fault occurs, a reason why the PE24 discards the packet destined for the PE23 is that the PE24 determines, after searching for a route, that the packet is to be further forwarded to the remote network device PE23. In this case, the PE24 encapsulates, into the packet, the mirror-SID allocated by the PE23. The PE24 forwards the packet to the P34, and the P34 forwards the packet to the P33. After receiving the packet, the P33 perceives occurrence of the fault, and performs mirror protection. As a result, a traffic loop occurs. The traffic loop does not stop until the P33 or the P34 completes convergence. Therefore, when the PE24 determines that the packet hits the remote network device PE23, the PE24 does not further forward the packet.
To resolve a problem that traffic of a PE that is not faulty and that is accessed in the single-homed manner is interrupted in a scenario in which single-homing and multi-homing coexist, a possible solution is shown in
In view of this, to ensure that traffic of a network device that is not faulty and that is accessed in a single-homed manner is not interrupted in a scenario in which single-homing and multi-homing coexist, the present disclosure proposes a routing information processing method. In the method, a first network device is a single-homing device of a second network device, and determines a first segment identifier corresponding to the second network device. The first network device is a multi-homing device of a third network device, and determines a second segment identifier corresponding to the third network device. The first segment identifier and the second segment identifier correspond to different locators. The first network device sends routing information. The routing information includes the first segment identifier and the second segment identifier. Alternatively, the first network device sends first routing information and second routing information. The first routing information includes the first segment identifier, and the second routing information includes the second segment identifier. A fourth network device receives the routing information or receives the first routing information and the second routing information. The fourth network device advertises mirror routing information specific to the first network device. The mirror routing information includes the second segment identifier, and does not include the first segment identifier. Alternatively, the mirror routing information includes the second locator corresponding to the second segment identifier, and does not include the first locator corresponding to the first segment identifier. According to the method, the fourth network device establishes mirror protection for the second segment identifier or the second locator of the third network device that is a multi-homed network device, and does not establish mirror protection for the first segment identifier or the first locator of the second network device that is a single-homed network device. Therefore, in a scenario in which single-homing and multi-homing coexist, if the first network device is not faulty, a packet destined for the second network device may be sent to a link to the second network device, in an attempt to determine whether the link is faulty, and when the link is not faulty, the packet can be successfully sent to the second network device through the first network device. In this way, it is ensured that traffic of the network device that is not faulty and that is accessed in the single-homed manner is not interrupted in the scenario in which single-homing and multi-homing coexist.
A network device in the present disclosure may include one or more of a PE, a P, or a CE. The network device may be a router or a switch. Optionally, the network device in the present disclosure may support the SR protocol.
An embodiment of the present disclosure provides a routing information processing method. The method may be applied to a network shown in
S301: The first network device determines a first segment identifier corresponding to the second network device, where the first network device is a single-homing device of the second network device, and the first segment identifier corresponds to a first locator; and the first network device determines a second segment identifier corresponding to the third network device, where the first network device is a multi-homing device of the third network device, and the second segment identifier corresponds to a second locator.
After determining single-homed/multi-homed statuses of the second network device and the third network device, the first network device determines the segment identifiers corresponding to the second network device and the third network device. Generally, the first network device may determine the single-homed/multi-homed statuses of the second network device and the third network device based on a locally learned route and/or a route learned from another network device.
For example, the first network device may allocate the corresponding first segment identifier to the second network device based on a network segment range corresponding to the first locator, and allocate the corresponding second segment identifier to the third network device based on a network segment range corresponding to the second locator. For another example, the first network device may determine, based on several segment identifiers specified in the first locator, the first segment identifier corresponding to the second network device, and determine, based on several segment identifiers specified in the second locator, the second segment identifier corresponding to the third network device.
The first locator and the second locator are in a same locator pool, and the first locator is different from the second locator. For example, on the first network device, a locator pool is set, and the first locator corresponding to the single-homed network device and the second locator corresponding to the multi-homed network device are set. For example, the first locator corresponding to the single-homed network device is 1000::/56 locator 64, that is, the locator pool is a 56 network segment, and the locator is allocated based on a 64 network segment. The first segment identifier corresponding to the first locator may include 1000::1/64, 1000::2/64, or the like.
In addition, optionally, first locators corresponding to single-homed network devices of different VRFs may be different, and second locators corresponding to multi-homed network devices of different VRFs may be different. For example, a first locator corresponding to a single-homed network device of a VRF1 may be 1000::1/64, and a first locator corresponding to a single-homed network device of a VRF2 may be 1000::2/64. For another example, a second locator corresponding to a multi-homed network device of the VRF1 may be 2000::1/64, and a second locator corresponding to a multi-homed network device of the VRF2 may be 2000::2/64.
The first network device may determine the single-homed/multi-homed statuses of the second network device and the third network device in the following manners.
1. The first network device first allocates corresponding segment identifiers/a corresponding segment identifier to the second network device and/or the third network device based on locally existing routing information. In this case, the first network device may determine that the second network device and/or the third network device are/is single-homed network devices/a single-homed network device. Then, the first network device determines actual single-homed/multi-homed statuses of the second network device and the third network device based on routing information sent by another network device. When determining that the second network device and/or the third network device are/is actually multi-homed network devices/a multi-homed network device, the first network device re-determines segment identifiers corresponding to the second network device and the third network device.
In other words, in this manner, the first network device pre-assumes that the second network device and/or the third network device are/is single-homed network devices/a single-homed network device, and allocates the corresponding segment identifier on this basis; then, the first network device re-determines, based on the new routing information received from the another network device, that the second network device and/or the third network device are/is multi-homed network devices/a multi-homed network device, and re-determines, on this basis, the segment identifiers corresponding to the second network device and the third network device. It should be noted that, if it is found, based on the new routing information, that the second network device and/or the third network device are/is actually still single-homed network devices/a single-homed network device, the corresponding segment identifier does not need to be updated. For example, in the network shown in
2. The first network device waits for specified duration, to determine the actual single-homed/multi-homed statuses of the second network device and the third network device, and then determines the segment identifiers corresponding to the second network device and the third network device. The specified duration may be any reasonable value, and is not limited in this embodiment of the present disclosure.
Within the specified duration, the first network device may receive routing information sent by another network device. The first network device may determine the single-homed/multi-homed statuses of the second network device and the third network device based on the locally learned route and the routing information sent by the other network device. For example, for the network devices shown in
Multi-homing is used as an example to describe how the first network device determines a single-homed/multi-homed status of the third network device.
For dual-homing, that the first network device determines a second segment identifier corresponding to the third network device further includes the first network device receives third routing information sent by the fourth network device, where the third routing information includes a device identifier of the third network device; the first network device determines, based on the third routing information, that the fourth network device is a dual-homing device of the third network device; and the first network device determines, based on the fact that the fourth network device is the dual-homing device of the third network device, the second segment identifier corresponding to the third network device.
A device identifier sent by a routing information sending party includes a device identifier of a CE. Specifically, the device identifier sent by the transmit end includes a device identifier of a single-homed CE or a device identifier of a multi-homed CE. A device identifier of a CE may be identification information such as an IP address of the CE. For example, the device identifier of the third network device may be identification information such as an IP address of the third network device.
If the manner 1 is used, before the first network device receives the third routing information, the first network device may send fourth routing information. The fourth routing information includes the device identifier of the third network device and a segment identifier corresponding to the device identifier of the third network device. In addition, optionally, the segment identifier corresponding to the device identifier of the third network device may be a segment identifier that corresponds to a single-homed network device and that is determined by the first network device for the third network device.
The first network device may determine, based on the third routing information, that the third network device is multi-homed to the first network device and the fourth network device.
For triple-homing and above, the method further includes the first network device receives a plurality of pieces of routing information. The first network device determines, based on the plurality of pieces of routing information, that all of a plurality of network devices corresponding to the plurality of pieces of routing information are multi-homing devices of the third network device.
That the first network device determines a second segment identifier corresponding to the third network device further includes the first network device determines, based on one or more of the plurality of network devices, the second segment identifier corresponding to the third network device.
For example, it is assumed that a sixth network device further exists based on the network structure shown in
If the manner 1 is used, the plurality of pieces of routing information includes the device identifier of the third network device and the segment identifier that corresponds to the single-homed network device and that is determined by the first network device for the third network device.
S302: The first network device sends first routing information, and the fourth network device receives the first routing information, where the first routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier.
Optionally, the first network device sends the first routing information by using an IGP protocol.
S303: The first network device sends second routing information, and the fourth network device receives the second routing information, where the second routing information includes a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier.
Optionally, the first network device sends the second routing information by using the IGP protocol.
It should be noted that, in another possible implementation, alternatively, the first network device acting as a sending party sends the first segment identifier and the second segment identifier by using one piece of routing information. In this case, the piece of routing information includes the first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and the second device identifier of the third network device and the second segment identifier corresponding to the second device identifier. Correspondingly, the fourth network device acting as a receiving party receives the piece of routing information, to obtain the first segment identifier and the second segment identifier.
S304: The fourth network device advertises mirror routing information specific to the first network device.
The fourth network device determines, based on the received second segment identifier, that the third network device is multi-homed to the first network device and the fourth network device. The fourth network device may generate mirror protection for the first network device based on the second segment identifier.
In a possible implementation, the mirror routing information includes the second segment identifier and does not include the first segment identifier, to generate mirror protection for the first network device. For example, the fourth network device advertises mirror information, and declares mirror protection for the first network device based on the second segment identifier of the third network device. For example, the mirror message advertised by the fourth network device carries the second segment identifier of the third network device, and does not carry the first segment identifier of the second network device.
In another possible implementation, the mirror routing information includes the second locator corresponding to the second segment identifier, and does not include the first locator corresponding to the first segment identifier, to generate mirror protection for the first network device. For example, the fourth network device advertises mirror information, and declares mirror protection for the first network device based on the second locator corresponding to the second segment identifier of the third network device. For example, the mirror message advertised by the fourth network device carries the second locator corresponding to the second segment identifier, and does not carry the first locator corresponding to the first segment identifier.
In this way, when a fault 1 occurs, a packet destined for the third network device hits mirror protection, and a mirror protection procedure is performed, so that the fourth network device sends the received packet to the third network device. This ensures that the third network device can normally receive the packet, thereby avoiding traffic interruption.
For a scenario in which a transmission link for a packet destined for a single-homed network device is faulty, for example, a scenario in which a link between the fifth network device and the first network device is faulty, if a destination network device of the packet is the second network device, the first network device receives the packet that is forwarded by the fourth network device and that is sent by the fifth network device, and the first network device sends the packet to the second network device.
Specifically, after the packet reaches the fifth network device, the fifth network device perceives that a link to the second network device is faulty, and consequently, the packet cannot be sent to the second network device by using the link from the fifth network device through the first network device to the second network device. The fifth network device sends the packet to the fourth network device that serves as a backup device, and the fourth network device sends the packet to the first network device. The first network device is not faulty, and therefore, the first network device sends the packet to the second network device. The first network device is the single-homing device of the second network device.
For a scenario in which a transmission link for a packet destined for a multi-homed network device is faulty, for example, a link between the fifth network device and the first network device is faulty, and/or the first network device is faulty, if a destination network device of the packet is the third network device, the fourth network device receives the packet sent by the fifth network device, and the fourth network device sends the packet to the third network device.
Specifically, after the packet reaches the fifth network device, the fifth network device perceives that a link to the third network device through the first network device is faulty, and consequently, the packet cannot be sent to the third network device by using the link from the fifth network device through the first network device to the third network device. The fifth network device determines, based on the second segment identifier in the packet, that the fourth network device has generated mirror protection based on the second segment identifier or the second locator corresponding to the second segment identifier. The fifth network device sends the packet to the fourth network device by performing the mirror protection. The fourth network device and the first network device are dual-homing devices of the third network device. After receiving the packet, the fourth network device sends the packet to the third network device.
Based on the foregoing embodiment, if the first network device is a network device that receives routing information, in a processing process of the routing information, the first network device and the third network device are multi-homing devices of the second network device, and the third network device is a single-homing device of the fourth network device. A routing information processing process is described in detail with reference to
S401: The first network device receives first routing information, where the first routing information includes a first device identifier of the fourth network device and a first segment identifier corresponding to the first device identifier, and the first segment identifier corresponds to a first locator.
The third network device is a single-homing device of the fourth network device. The first routing information is sent by the third network device. Optionally, the third network device determines that the fourth network device is a single-homed network device of the third network device, and the third network device determines the first segment identifier corresponding to the fourth network device. For a process in which the third network device determines the first segment identifier corresponding to the fourth network device, refer to the foregoing process in which the first network device determines the first segment identifier corresponding to the second network device in
S402: The first network device receives second routing information, where the second routing information includes a second device identifier of the second network device and a second segment identifier corresponding to the second device identifier, and the second segment identifier corresponds to a second locator.
The first network device and the third network device are multi-homing devices of the second network device, and the second routing information is sent by the third network device. Optionally, the third network device determines that the second network device is a multi-homed network device, and the third network device determines the second segment identifier corresponding to the second network device. For a process in which the third network device determines the second segment identifier corresponding to the second network device, refer to the foregoing process in which the first network device determines the second segment identifier corresponding to the third network device in
It should be noted that, in another possible implementation, alternatively, the third network device acting as a sending party sends the first segment identifier and the second segment identifier by using one piece of routing information; and the first network device acting as a receiving party receives the piece of routing information, to obtain the first segment identifier and the second segment identifier. In this case, the piece of routing information includes the first device identifier of the fourth network device and the first segment identifier corresponding to the first device identifier, and the second device identifier of the second network device and the second segment identifier corresponding to the second device identifier.
The first locator and the second locator are in a same locator pool, and the first locator is different from the second locator.
S403: The first network device advertises mirror routing information specific to the third network device.
The first network device may determine, based on the second segment identifier, that the first network device is a multi-homing device of the second network device, and that the third network device is a multi-homing device of the second network device. The first network device may determine that the second network device is a multi-homed network device, and the first network device may determine that the second network device is multi-homed to the first network device and the third network device. The first network device may generate mirror protection for the third network device based on the second segment identifier.
In a possible implementation, the mirror routing information includes the second segment identifier and does not include the first segment identifier, to generate mirror protection for the third network device. For example, the first network device advertises mirror information, and declares mirror protection for the third network device based on the second segment identifier of the third network device.
In another possible implementation, the mirror routing information includes the second locator corresponding to the second segment identifier, and does not include the first locator corresponding to the first segment identifier, to generate mirror protection for the third network device. For example, the first network device advertises mirror information, and declares mirror protection for the first network device based on the second locator corresponding to the second segment identifier of the third network device.
Optionally, the third network device may determine single-homed/multi-homed statuses of the second network device and the fourth network device in the following manners.
1. The third network device first allocates corresponding segment identifiers/a corresponding segment identifier to the second network device and/or the fourth network device based on locally existing routing information. In this case, the third network device may determine that the second network device and/or the fourth network device are/is single-homed network devices/a single-homed network device. Then, the third network device determines the actual single-homed/multi-homed statuses of the second network device and the fourth network device based on routing information sent by another network device. When determining that the second network device and/or the fourth network device are/is actually multi-homed network devices/a multi-homed network device, the third network device re-determines segment identifiers corresponding to the second network device and the fourth network device.
In this manner, before the first network device receives the second routing information, the first network device may further receive third routing information. The third routing information is sent by the third network device. The third routing information includes the second device identifier of the second network device and the first segment identifier corresponding to the second identifier. The first network device determines, based on the first routing information and the third routing information that are received, that the first segment identifier corresponds to the second network device and the fourth network device. The first network device does not advertise the mirror routing information specific to the third network device. In this case, the first network device determines that the first segment identifier corresponds to both a single-homed network device and a multi-homed network device, and the first network device does not establish mirror protection for the third network device based on the first segment identifier, to avoid a traffic loop.
In addition, the first network device may further send fourth routing information to the third network device. The fourth routing information is used to indicate a route to the second network device. For example, the fourth network device may include the second device identifier of the second network device and the first segment identifier corresponding to the second device information.
In other words, in this manner, the third network device pre-assumes that the second network device is a single-homed node, and allocates, on this basis, the first segment identifier corresponding to the second network device; and then, the third network device sends the third routing information to the first network device, where the third routing information includes the second device identifier of the second network device and the first segment identifier corresponding to the second network device. The first network device receives the third routing information, and the first network device sends the fourth routing information to the third network device, where the fourth routing information is used to indicate the route to the second network device. The third network device receives the fourth routing information, determines that the second network device is a multi-homed network device, and determines that the second network device is multi-homed to the first network device and the third network device. The third network device re-determines, on this basis, a segment identifier corresponding to the second network device, and the re-determined segment identifier corresponding to the second network device is the second segment identifier. Then, the third network device sends the second routing information. The second routing information includes the second device identifier of the second network device and the second segment identifier corresponding to the second device identifier.
2. The third network device waits for specified duration, to determine the actual single-homed/multi-homed statuses of the second network device and the fourth network device, and then determines the segment identifiers corresponding to the second network device and the fourth network device. The specified duration may be any reasonable value, and is not specifically limited in this embodiment of the present disclosure.
In addition, the first network device may receive fifth routing information. The fifth routing information includes a third device identifier of the fifth network device and a third segment identifier corresponding to the third device identifier, and the third segment identifier corresponds to the second locator.
That the first network device advertises mirror routing information specific to the third network device, where the mirror routing information includes the second locator corresponding to the second segment identifier, and does not include the first locator corresponding to the first segment identifier includes the first network device may further determine the second locator obtained by aggregating the second segment identifier and the third segment identifier; and the first network device advertises the mirror routing information specific to the third network device, where the mirror routing information includes the second locator obtained through the aggregation, and does not include the first locator corresponding to the first segment identifier.
For example, the second segment identifier corresponding to the second network device is 1001::1, and the third segment identifier corresponding to the fifth network device is 1001::2. In this case, the first network device may aggregate the second segment identifier and the third segment identifier, and determine that the second locator obtained through the aggregation is 1001::/64. In this way, the first network device may aggregate segment identifiers corresponding to a plurality of multi-homed nodes, and advertise corresponding mirror protection information with reference to a locator obtained by aggregating the segment identifiers, thereby saving network resources.
It should be noted that, in another possible implementation, even if the second segment identifier and the third segment identifier correspond to a locator A when being allocated or configured by the transmit-end network device, the second locator generated by aggregating the second segment identifier and the third segment identifier by the receive-end network device may be a locator B, and values of the locator A and the locator B are different. For example, if the second segment identifier and the third segment identifier have more same bits than the locator A, the locator B generated by aggregating the second segment identifier and the third segment identifier is different from the locator A. The second locator used by the receive end to advertise a mirror protection route is the locator B.
For a scenario in which a transmission link for a packet destined for a single-homed network device is faulty, for example, a scenario in which a link between the sixth network device and the third network device is faulty, if a destination network device of the packet is the fourth network device, the first network device receives the packet sent by the sixth network device, and the first network device sends the packet to the third network device.
Specifically, after the packet reaches the sixth network device, the sixth network device perceives that a link to the fourth network device is faulty, and consequently, the packet cannot be sent to the fourth network device by using the link from the sixth network device through the third network device to the fourth network device. The sixth network device sends the packet to the first network device that serves as a backup device, and the first network device sends the packet to the third network device. The third network device is not faulty, and therefore, the third network device sends the packet to the fourth network device. The third network device is the single-homing device of the fourth network device.
For a scenario in which a transmission link for a packet destined for a multi-homed network device is faulty, for example, a link between the sixth network device and the third network device is faulty, and/or the third network device is faulty, if a destination network device of the packet is the second network device, the first network device receives the packet sent by the sixth network device, and the first network device sends the packet to the second network device.
Specifically, after the packet reaches the sixth network device, the sixth network device perceives that a link to the fourth network device through the third network device is faulty, and consequently, the packet cannot be sent to the second network device by using the link from the sixth network device through the third network device to the second network device. The sixth network device determines, based on the second segment identifier in the packet, that the first network device has generated mirror protection for the second segment identifier or the second locator corresponding to the second segment identifier. The sixth network device sends the packet to the first network device by performing the mirror protection. The first network device and the third network device are dual-homing devices of the fourth network device. After receiving the packet, the first network device sends the packet to the second network device.
Based on
On the PE23, a locator pool is set, and a first locator (for example, 1000::/56 locator 64) corresponding to a single-homed network device and a second locator (for example, 1001::/56 locator 64) corresponding to a multi-homed network device are set. The PE23 determines a corresponding segment identifier based on the first locator or the second locator. For the PE23, the single-homed network device is, for example, the CE13 shown in
The PE23 locally learns routes to the CE13 and the CE14, and allocates a corresponding first segment identifier 1000::1 to the CE13 and the CE14 based on the first locator. The PE23 sends first routing information. The first routing information includes a device identifier of the CE13 and the first segment identifier 1000::1 of the CE13. The PE23 sends second routing information. The second routing information includes a device identifier of the CE14 and the first segment identifier 1000::1 of the CE14.
Optionally, the route in this embodiment of the present disclosure may include a route learned from a CE by using a Border Gateway Protocol (BGP), an imported direct route, a static route, an IGP route, a public/private-network route, or the like.
The PE24 receives the first routing information, and finds, through calculation, that the CE13 is a single-homed device of the PE23. A calculation basis of the PE24 may be, for example, that the PE24 learns routing information of the CE13 only from another PE device, where such routing information may be referred to as, for example, a remote route. However, the PE24 does not learn routing information of the CE13 by using a locally directly connected CE device, where a route determined based on such routing information may be referred to as, for example, a local route. Therefore, the PE24 determines that the first segment identifier 1000::1 in the first routing information is a segment identifier of the single-homed network device.
The PE24 receives the second routing information, and finds, through calculation, that a multi-homing case exists for the CE14. A calculation basis of the PE24 may be, for example, that the PE24 learns a local route corresponding to the CE14, and also learns a remote route corresponding to the CE14. Therefore, actually, the PE24 uses the first segment identifier 1000::1 in the second routing information as a segment identifier of the dual-homed network device. However, this may cause the following problem: The PE24 uses 1000::1 as a segment identifier of both the single-homed network device and the multi-homed network device, and consequently, the PE24 provides mirror protection for the single-homed network device due to a calculation error. In a possible implementation, when finding that a same segment identifier is used by both the single-homed network device and the multi-homed network device, the PE24 determines that mirror protection does not need to be provided for the network device corresponding to the segment identifier.
Subsequently, the routing information is continuously updated. For example, the PE23 learns, from the PE24, a route to the CE14, and therefore determines that the multi-homing case exists for the CE14, and the PE23 accordingly allocates, to the CE14, a new segment identifier, for example, a new VPNSID corresponding to the second locator, and sends routing information including the new VPNSID and a device identifier of the PE23 to the PE24. In this case, when the PE24 finds, through calculation, that the CE14 is the dual-homed network device and the new VPNSID is used for only the dual-homed network device, the PE24 determines to provide mirror protection for the PE23. Specifically, the PE24 generates mirror protection for the PE23 based on the new VPNSID or the second locator corresponding to the new VPNSID.
The PE23 receives the third routing information, learns, from the PE24, the route to the CE14, and determines that the CE14 is multi-homed to the PE23 and the PE24. The PE23 determines that a next-hop combination is (local, PE24, VRF1), that is, the PE23 determines that a packet of a service corresponding to the VRF1 can be routed to the CE14 through the PE23 (local), and can be routed to the CE14 through the PE24. The PE23 re-allocates a second segment identifier 1001::1 to the CE14 based on the next-hop combination (local, PE24) and the second locator. The PE23 sends fourth routing information. The fourth routing information includes the device identifier of the CE14 and the second segment identifier 1001::1 of the CE14.
The PE24 receives the fourth routing information. The PE24 determines that the CE14 is multi-homed to the PE23 and the PE24. The PE24 generates mirror protection for the PE23 based on the second locator 1001::/64 corresponding to the second segment identifier 1001::1. For example, the PE24 generates mirror protection for the PE23 based on the second segment identifier 1001::1.
Based on
After the PE25 and the CE15 are added to the network, for the PE23, a single-homed network device is, for example, a CE13 shown in
The PE23 learns a local route to the CE15. In this case, the PE23 has not yet learned another remote route to the CE15, and therefore, the PE23 first allocates a corresponding first segment identifier 1000::1 to the CE15 based on a first locator corresponding to the single-homed network device. The PE23 sends fifth routing information. The fifth routing information includes a device identifier of the CE15 and the first segment identifier 1000::1 of the CE15.
The PE25 receives the fifth routing information, and finds, through calculation, that a multi-homing case exists for the CE15. A calculation basis of the PE23 may be, for example, that the PE25 also learns routing information of the CE15 locally. Therefore, actually, the PE25 uses the first segment identifier 1000::1 in the fifth routing information as a segment identifier of the dual-homed network device. However, this may cause the following problem: The PE25 uses 1000::1 as a segment identifier of both the single-homed network device and the multi-homed network device, and consequently, the PE25 provides mirror protection for the single-homed network device due to a calculation error. In a possible implementation, when finding that a same segment identifier is used by both the single-homed network device and the multi-homed network device, the PE25 determines that mirror protection currently does not need to be provided for the network device corresponding to the segment identifier.
Subsequently, the routing information is continuously updated. For example, the PE23 learns, from the PE25, a route to the CE15, and therefore determines that the multi-homing case exists for the CE15, and the PE23 accordingly allocates, to the CE15, a new segment identifier, for example, a new VPNSID corresponding to a second locator, and sends routing information including the new VPNSID and a device identifier of the PE23 to the PE25. In this case, when the PE25 finds, through calculation, that the CE15 is the dual-homed network device and the new VPNSID is used for only the dual-homed network device, the PE25 determines to provide mirror protection for the PE23. Specifically, the PE25 generates mirror protection for the PE23 based on the new VPNSID or the second locator corresponding to the new VPNSID.
Specifically, the PE25 sends sixth routing information corresponding to the CE15.
The PE23 receives the sixth routing information, learns, from the PE25, the route to the CE15, and determines that the CE15 is multi-homed to the PE23 and the PE25. The PE23 determines that a next-hop combination is (local, PE25, VRF1), that is, the PE23 determines that a packet of a service corresponding to the VRF1 can be routed to the CE15 through the PE23, and can be routed to the CE15 through the PE25. The PE23 re-allocates a third segment identifier 1002::1 to the CE15 based on the next-hop combination (local, PE25) and the second locator. The PE23 advertises seventh routing information. The seventh routing information includes the device identifier of the CE15 and the third segment identifier 1002::1. The second locator that is set by the PE23 and that corresponds to the multi-homed network device may be, for example, 1002::/56 locator 64.
The PE24 receives the seventh routing information. Because the PE24 does not learn the routing information of the CE15 locally, the PE24 does not generate mirror protection for the PE23 with respect to the VPNSID of the CE15.
The PE25 receives the seventh routing information. The PE25 determines that the CE15 is multi-homed to the PE23 and the PE25. The PE generates mirror protection for the CE15 based on the second locator corresponding to the third segment identifier 1002::1. For example, the PE25 generates mirror protection for the PE23 based on the second segment identifier 1002::1.
It should be noted that, in another possible implementation, instead of allocating the VPNSID segment identifier corresponding to the first locator to the CE15 whenever the PE23 learns the local route to the CE15, the PE23 may first wait for a period of time after learning the local route to the CE15, and if the remote route to the CE15 is learned within the waiting time period, the PE23 directly allocates the VPNSID segment identifier corresponding to the second locator to the CE15, rather than first allocating the VPNSID segment identifier corresponding to the first locator and then adjusting the VPNSID segment identifier.
Based on
The PE23 may find, through calculation, that a multi-homing case exists for the CE16. A calculation basis of the PE23 may be, for example, that the PE23, the PE24, and the PE25 separately learn local routing information of the CE16. Specifically, the PE23 determines that the CE16 is a triple-homed network device, that is, the PE23 determines that a packet can be routed to the CE16 through the PE23, can be routed to the CE16 through the PE24, and can be routed to the CE16 through the PE25.
In a possible implementation, a third locator (for example, 1003::/56 locator 64) specially corresponding to the triple-homed node is further set on the PE23. The PE23 may allocate a corresponding triple-homing segment identifier based on a determined next-hop combination (local, PE24, PE25) and the third locator. Specifically, the PE23 may allocate a corresponding fourth segment identifier 1003::1 to the CE16 based on the next-hop combination (local, PE24, PE25) and the third locator.
In another possible implementation, the PE23 may allocate a corresponding dual-homing segment identifier based on any dual-homing subset, including a local route, in (local, PE24, PE25), and a dual-homing dedicated second locator. For example, the PE23 may determine, based on a dual-homing subset (local, PE24) or (local, PE25), a segment identifier to be allocated. Specifically, the PE23 may allocate a corresponding segment identifier 1001::1 based on the next-hop combination (local, PE24), or the PE23 may allocate a corresponding segment identifier 1002::1 based on the next-hop combination (local, PE25).
In the foregoing triple-homing case, the PE24 and the PE25 may create mirror protection based on the triple-homing segment identifier, or may create mirror protection based on the dual-homing segment identifier. A specific applicable rule may be determined in advance depending on a requirement.
The P33 may receive first mirror information advertised by the PE24 for the PE23, and also receive second mirror information advertised by the PE25 for the PE23. In this case, the P33 may select one or both of the first mirror information and the second mirror information according to a local policy, to establish a protection path.
As shown in
In this embodiment, the processor 701 performs corresponding operations according to computer-readable instructions stored in the memory. For example, the processor 701 is configured to determine a first segment identifier corresponding to a second network device, where the first network device is a single-homing device of the second network device, and the first segment identifier corresponds to a first locator; and determine a second segment identifier corresponding to a third network device, where the first network device is a multi-homing device of the third network device, and the second segment identifier corresponds to a second locator. The transceiver 703 is configured to send routing information, where the routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier; or send first routing information and second routing information, where the first routing information includes a first device identifier of the second network device and the first segment identifier corresponding to the first device identifier, and the second routing information includes a second device identifier of the third network device and the second segment identifier corresponding to the second device identifier.
In a possible implementation, the computer-readable instructions stored in the memory 702 may include a plurality of software modules, for example, a sending module 705, a processing module 704, and a receiving module 706. After executing each software module, the processor 701 may perform a corresponding operation based on an indication of each software module.
If the route determining apparatus 800 is the first network device mentioned in
It should be noted that the foregoing division manner of the apparatus 800 is an example, and a division into units may be a logical function division. During specific implementation, there may be another division or combination manner, and different division or combination manners do not affect implementation of corresponding functions.
A person skilled in the art should understand that embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Therefore, the present disclosure may use a form of hardware only embodiments, software only embodiments, or embodiments with a combination of software and hardware. Moreover, the present disclosure may use a form of a computer program product that is implemented on one or more computer-usable storage media (including but not limited to a disk memory, an optical memory, and the like) that include computer-usable program code.
The present disclosure is described with reference to the flowcharts and/or block diagrams of the method, the device (system), and the computer program product according to the present disclosure. It should be understood that computer program instructions may be used to implement each process and/or each block in the flowcharts and/or the block diagrams and a combination of a process and/or a block in the flowcharts and/or the block diagrams. The computer program instructions may be provided for a general-purpose computer, a dedicated computer, an embedded processor, or a processor of another programmable data processing device to generate a machine, so that the instructions executed by the computer or the processor of the other programmable data processing device generate an apparatus for implementing a specific function in one or more procedures in the flowcharts and/or in one or more blocks in the block diagrams.
The computer program instructions may alternatively be stored in a computer-readable memory that can indicate a computer or another programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate an artifact that includes an instruction apparatus. The instruction apparatus implements a specific function in one or more procedures in the flowcharts and/or in one or more blocks in the block diagrams.
Obviously, a person skilled in the art can make various modifications and variations to the present disclosure without departing from the scope of the present disclosure. The present disclosure is intended to cover these modifications and variations of the present disclosure provided that they fall within the scope of protection defined by the following claims and their equivalent technologies.
Number | Date | Country | Kind |
---|---|---|---|
201911403419.0 | Dec 2019 | CN | national |
This application is a continuation of International Patent Application No. PCT/CN2020/119037, filed on Sep. 29, 2020, which claims priority to Chinese Patent Application No. 201911403419.0, filed on Dec. 31, 2019. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Name | Date | Kind |
---|---|---|---|
8787149 | Ramanathan | Jul 2014 | B1 |
9019814 | Mohanty | Apr 2015 | B1 |
9178816 | Ojha | Nov 2015 | B1 |
9397931 | Mohanty | Jul 2016 | B1 |
10142129 | Gupta | Nov 2018 | B1 |
10237177 | Akashi | Mar 2019 | B2 |
10250552 | Sajassi | Apr 2019 | B1 |
10263839 | Li | Apr 2019 | B2 |
10432515 | Sajassi | Oct 2019 | B1 |
11032197 | Nainar | Jun 2021 | B2 |
20100074268 | Raza | Mar 2010 | A1 |
20100208617 | Dong | Aug 2010 | A1 |
20120213222 | Filsfils | Aug 2012 | A1 |
20130080602 | Keesara | Mar 2013 | A1 |
20130107887 | Pearson | May 2013 | A1 |
20130259058 | Vairavakkalai | Oct 2013 | A1 |
20160142963 | Salkintzis | May 2016 | A1 |
20160191374 | Singh | Jun 2016 | A1 |
20160378606 | Sajassi | Dec 2016 | A1 |
20170063600 | Singh | Mar 2017 | A1 |
20170141963 | Chalapathy | May 2017 | A1 |
20170195210 | Jacob | Jul 2017 | A1 |
20170223103 | Keesara | Aug 2017 | A1 |
20170223104 | Keesara | Aug 2017 | A1 |
20180069727 | Keesara | Mar 2018 | A1 |
20180191610 | Sivaraj | Jul 2018 | A1 |
20180287990 | Bickhart | Oct 2018 | A1 |
20180309596 | Brissette | Oct 2018 | A1 |
20180359178 | Brissette | Dec 2018 | A1 |
20190132241 | Vattem | May 2019 | A1 |
20190149456 | Brissette | May 2019 | A1 |
20190229937 | Nagarajan | Jul 2019 | A1 |
20190356599 | Brissette | Nov 2019 | A1 |
20200004635 | Sajassi | Jan 2020 | A1 |
20200014557 | Wang | Jan 2020 | A1 |
20200014623 | Wang | Jan 2020 | A1 |
20200296025 | Wang | Sep 2020 | A1 |
20200296039 | Srinivasan | Sep 2020 | A1 |
20200322183 | Lin | Oct 2020 | A1 |
20200328968 | Kanjariya | Oct 2020 | A1 |
20200382394 | Kalburgi | Dec 2020 | A1 |
20210099400 | Elizabeth | Apr 2021 | A1 |
20210152593 | Gao | May 2021 | A1 |
20210250294 | Wang | Aug 2021 | A1 |
20220131721 | Boutros | Apr 2022 | A1 |
20220231906 | He | Jul 2022 | A1 |
20220247670 | Dong | Aug 2022 | A1 |
20220247679 | Andhe | Aug 2022 | A1 |
20220329458 | Zhuang | Oct 2022 | A1 |
20230031683 | He | Feb 2023 | A1 |
20230090072 | Mishra | Mar 2023 | A1 |
Number | Date | Country |
---|---|---|
104135420 | Nov 2014 | CN |
107113237 | Aug 2017 | CN |
108696414 | Oct 2018 | CN |
108696416 | Oct 2018 | CN |
109873760 | Jun 2019 | CN |
110505152 | Nov 2019 | CN |
111901235 | Nov 2020 | CN |
112769587 | May 2021 | CN |
114363114 | Apr 2022 | CN |
2020244304 | Dec 2020 | WO |
Entry |
---|
Sun Jie et al, “Dual-homing protection scheme and its realization in metropolitan area optical network,” 2016, 4 pages. |
Y. Wang, et al, “Multi-Homing in Unlicensed LTE Networks,” 2018 IEEE International Conference on Communications (ICC), 2018, 6 pages. |
A. Sajassi, Ed. et al., “BGP MPLS-Based Ethernet VPN,” RFC 7432, Feb. 2015, 56 pages. |
Z. Hu et al., SRv6 Path Egress Protection, draft-hu-rtgwg-srv6-egress-protection-03, May 1, 2020, 13 pages. |
Sajassi A et al., BGP MPLS-Based ethernet VPN, Internet Engineering Task Force (IETF), Feb. 2015, 56 pages. |
Number | Date | Country | |
---|---|---|---|
20220337515 A1 | Oct 2022 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2020/119037 | Sep 2020 | US |
Child | 17854539 | US |