Path protection method and device

By generating multi-level routing table entries, the problem of VPN service interruption caused by simultaneous failure of primary and backup paths in SRv6 networks was solved, achieving rapid switching and improved network reliability.

CN115499369BActive Publication Date: 2024-11-01NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210956646.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-10
Publication Date
2024-11-01
Estimated Expiration
2042-08-10

AI Technical Summary

Technical Problem

In a CE multihomed environment, when the primary and backup paths in an SRv6 network fail simultaneously, the VPN FRR path protection function fails, causing VPN service interruption during the recalculation of routes and distribution of forwarding tables by the BGP routing module in the PE, which cannot meet the requirements for rapid network switching.

Method used

By generating multi-level routing table entries in the local network device, including the first primary next hop and the first backup next hop, which indicate the highest and second highest priority paths of multiple paths respectively, a multi-level FRR protection relationship is realized. All primary and backup paths are calculated at once to ensure rapid switching in the event of a path failure.

Benefits of technology

It enables rapid failover when both primary and backup paths fail simultaneously, avoiding VPN service interruptions, improving network reliability, and meeting the need for rapid network convergence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115499369B_ABST
    Figure CN115499369B_ABST
Patent Text Reader

Abstract

The present application provides a path protection method and device, the method comprising: receiving a first configuration instruction input by a user including a path priority and a path switching strategy; generating a first routing table item reaching a user device according to the first configuration instruction; the first routing table item is a multi-level routing structure, the first routing table item comprises a first main next hop and a first backup next hop, the first main next hop comprises a first main path identifier and a first backup path identifier, the first backup next hop comprises a second main path identifier and a second backup path identifier; the first main path identifier indicates a first path with the highest priority among the priorities of multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among the priorities of multiple first paths and a second path with the highest priority among the priorities of multiple second paths; the second backup path identifier indicates a second path with the second highest priority among the priorities of multiple second paths.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a path protection method and device. Background Art

[0002] Segment Routing (SR) uses a source path selection mechanism to divide the network path into segments and assign segment identifiers (SIDs) to the segments and forwarding nodes in the network. The source node encapsulates the SID of each forwarding node along the forwarding path in the outer layer of the service message. When the service message arrives at the forwarding node, the forwarding node forwards the service message according to the SID list (Segment List) included in the service message. Except for the source node, other forwarding nodes and tail nodes on the forwarding path do not need to maintain the path status.

[0003] SRv6 network refers to the use of SR in IPv6 network and IPv6 address as SID to achieve the forwarding of service messages. SRv6 network can carry all services in IP backbone network, including but not limited to: Internet access, dedicated line, voice, etc. Since the service level agreement (English: Service Level Agreement, referred to as: SLA) requirements of different services are different, SRv6-BE (Chinese: Best Effort, English: Best-Effort) tunnel or SRv6-TE (Chinese: Traffic Engineering, English: Traffic Engineering) tunnel can be selected according to business needs.

[0004] In the SRv6 network, there is a CE multi-homing environment, that is, CE accesses different PEs through multiple links to ensure redundant backup of services. In a CE multi-homing environment, a virtual private network (English: Virtual Private Network, referred to as: VPN) fast reroute (English: Fast Reroute, referred to as: FRR) path protection function is usually configured in the PE, which can ensure that IPv6 VPN services can be quickly switched after a PE failure.

[0005] like Figure 1 As shown, Figure 1 The following is a schematic diagram of an existing SRv6 VPN FRR network. Figure 1In the example, PE1 receives two routes with the same route prefix from PE2 and PE3 to the site where CE is located. When PE1 calculates the route to the site where CE is located, it uses PE2 as the primary next hop to the site where CE is located and PE3 as the backup next hop to the site where CE is located. When PE2 fails or the path between PE1 and PE2 fails, IPv6 VPN service traffic can be quickly switched to the path between PE1 and PE3.

[0006] In a CE multi-homing environment, there is another form of networking, that is, there are multiple mutually backup tunnels to the same remote PE. Figure 2 As shown, Figure 2 Figure 1 is another networking diagram of the existing SRv6 VPN FRR. Figure 2 In the example, CE is multi-homed to PE2 and PE3, and PE3 is the backup node of PE2. SRv6-TE tunnels and SRv6-BE tunnels are established between PE1 and PE2 and PE3 at the same time, and the priority of SRv6-TE tunnel is higher than that of SRv6-BE tunnel.

[0007] At this time, the main path for carrying the VPN service of CE is the SRv6-TE-to-PE2 tunnel, and the backup path is the SRv6-TE-to-PE3 tunnel. If the main path fails, PE1 switches the VPN service to the backup path and recalculates the path for carrying the VPN service. At this time, the main path for carrying the VPN service is the SRv6-TE-to-PE3 tunnel, and the backup path is the SRv6-BE-to-PE2 tunnel. If the main path fails again, PE1 switches the VPN service to the backup path and recalculates the path for carrying the VPN service. At this time, the main path for carrying the VPN service is the SRv6-BE-to-PE2 tunnel, and the backup path is the SRv6-BE-to-PE3 tunnel. If the main path fails again, PE1 switches the VPN service to the backup path.

[0008] In actual applications, the VPN FRR path protection function can ensure the fast path switching of IPv6 VPN services. However, each time the PE switches the primary and backup paths, it still needs to recalculate the backup path of the primary path currently carrying VPN services. If the primary and backup paths fail at the same time, that is, the primary and backup paths ( Figure 2 If all four paths in the CE fail at the same time, the VPN FRR path protection function fails. At this time, PE1 can only wait for the BGP routing module to recalculate the route to CE and send the forwarding table. During the period when the BGP routing module recalculates the route and sends the forwarding table (generally more than 200ms), VPN service will be disconnected, which cannot and cannot meet the needs of fast network switching. Summary of the invention

[0009] In view of this, the present application provides a path protection method and device to solve the problem that when the primary and backup paths fail at the same time and the VPN FRR path protection function fails, the VPN service is disconnected during the period when the BGP routing module in the PE recalculates the route and sends down the forwarding table, and the network fast switching requirements cannot be met.

[0010] In a first aspect, the present application provides a path protection method, which is applied to a local network device, wherein a VPN FRR path protection function has been configured in the local network device, and the local network device respectively establishes a first path and a second path with each remote device in at least one remote network device, and a user device multi-homedly accesses the at least one remote network device; the method comprises:

[0011] Receiving a first configuration instruction input by a user, wherein the first configuration instruction includes a path priority and a path switching strategy;

[0012] generating a first routing table entry reaching the user equipment according to the path priority and the path switching strategy;

[0013] The first routing table entry is a multi-level routing structure, the first routing table entry includes a first primary next hop and a first backup next hop, the first primary next hop includes a first primary path identifier and a first backup path identifier, and the first backup next hop includes a second primary path identifier and a second backup path identifier;

[0014] The first main path identifier indicates a first path with the highest priority among multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among multiple first paths and a second path with the highest priority among multiple second paths; the second backup path identifier indicates a second path with the second highest priority among multiple second paths.

[0015] In a second aspect, the present application provides a path protection device, which is applied to a local network device, in which a VPN FRR path protection function has been configured, and the local network device respectively establishes a first path and a second path with each remote device in at least one remote network device, and a user device multi-homed accesses the at least one remote network device; the device includes:

[0016] A receiving unit, configured to receive a first configuration instruction input by a user, wherein the first configuration instruction includes a path priority and a path switching strategy;

[0017] A first generating unit, configured to generate a first routing table entry reaching the user equipment according to the path priority and the path switching strategy;

[0018] The first routing table entry is a multi-level routing structure, the first routing table entry includes a first primary next hop and a first backup next hop, the first primary next hop includes a first primary path identifier and a first backup path identifier, and the first backup next hop includes a second primary path identifier and a second backup path identifier;

[0019] The first main path identifier indicates a first path with the highest priority among multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among multiple first paths and a second path with the highest priority among multiple second paths; the second backup path identifier indicates a second path with the second highest priority among multiple second paths.

[0020] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0021] Therefore, by applying the path protection method and device provided by the present application, the local network device receives a first configuration instruction input by the user, and the first configuration instruction includes a path priority and a path switching strategy; according to the path priority and the path switching strategy, the local network device generates a first routing table entry to reach the user device; wherein the first routing table entry is a multi-level routing structure, the first routing table entry includes a first main next hop and a first backup next hop, the first main next hop includes a first main path identifier and a first backup path identifier, and the first backup next hop includes a second main path identifier and a second backup path identifier; the first main path identifier indicates a first path with the highest priority among the priorities of multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among the priorities of multiple first paths and a second path with the highest priority among the priorities of multiple second paths; the second backup path identifier indicates a second path with the second highest priority among the priorities of multiple second paths.

[0022] In this way, when there are SRv6-TE tunnels and SRv6-BE tunnels between the local network device configured with VPN FRR path protection and the remote network device at the same time, the local network device generates VPN FRR and multi-level FRR protection relationships for the escape path, and calculates all the primary and backup paths at one time. This solves the problem that when the primary and backup paths fail at the same time and the VPN FRR path protection function fails, the BGP routing module in the PE recalculates the route and sends the forwarding table, causing VPN service disconnection and failing to meet the requirements for fast network switching. Fast switching of multiple point failures is achieved, service traffic continues to flow, network reliability is improved, and the requirements for fast network convergence are met. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of a network of existing SRv6 VPN FRR;

[0024] Figure 2 It is another networking diagram of the existing SRv6 VPN FRR;

[0025] Figure 3 A flow chart of a path protection method provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of the routing table structure provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of a routing table entry provided in an embodiment of the present application;

[0028] Figure 6 Another schematic diagram of a routing table provided in an embodiment of the present application;

[0029] Figure 7 A structural diagram of a path protection device provided in an embodiment of the present application;

[0030] Figure 8 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0033] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0034] A path protection method provided by an embodiment of the present application is described in detail below. Figure 3 , Figure 3 A flow chart of a path protection method provided in an embodiment of the present application. The method is applied to a local network device. The path protection method provided in an embodiment of the present application may include the following steps.

[0035] Step 310: Receive a first configuration instruction input by a user, where the first configuration instruction includes a path priority and a path switching strategy;

[0036] Specifically, Figure 2 As shown in the figure, the local network device is PE1, the remote network devices are PE2 and PE3, and the user equipment is CE. The VPN FRR path protection function has been configured in PE1, PE2, and PE3. The VPN FRR path protection function is used to implement FRR protection for the path under the specified VPN.

[0037] MP-BGP sessions are created between PE1, PE2, and PE3, and EVPN L3VPN routes are advertised to each other. PE1 receives multiple routes with the same route prefix from PE2 and PE3 that reach CE. At the same time, PE1 can also receive multiple routes from R1, R2, R3, and R4 that reach PE2 or PE3. PE1 forms a local network topology through the received routes.

[0038] In the local network topology, CE multi-homed access PE2, PE3. The first path established between PE1 and PE2 passes through R1, and the second path established between PE1 and PE3 passes through R2; the first path established between PE1 and PE3 passes through R3, and the second path established between PE1 and PE3 passes through R4.

[0039] PE1 receives a first configuration instruction input by a user, where the first configuration instruction includes a path priority and a path switching strategy.

[0040] Furthermore, the path priority is specifically the priority order of each path of the same type in carrying service traffic. The path switching strategy is specifically the switching order of multiple types of paths when a path fails.

[0041] For example, PE1 establishes a first path with PE2 and PE3, and the priority of the first path from PE1 to PE2 is higher than the priority of the first path from PE1 to PE3. PE1 establishes a second path with PE2 and PE3, and the priority of the second path from PE1 to PE2 is higher than the priority of the second path from PE1 to PE3.

[0042] For example, the user configures the switching order of the SRv6-TE tunnel to be earlier than the SRv6-BE tunnel, that is, the tunnel priority policy; or the user configures the switching order of all paths to PE2 to be earlier than all paths to PE3, that is, the egress node priority policy.

[0043] Optionally, in an embodiment of the present application, the first path (including those established between PE1 and PE2 and PE3 respectively) is specifically an SRv6-TE tunnel, and the second path (including those established between PE1 and PE2 and PE3 respectively) is specifically an SRv6-BE tunnel; and the second path is an escape path of the first path.

[0044] Step 320: Generate a first routing table entry to the user equipment according to the path priority and the path switching strategy.

[0045] Specifically, according to the description of step 310, after PE1 obtains the path priority and the path switching policy, it generates a first routing table entry that reaches the CE.

[0046] In an embodiment of the present application, the first routing table entry is a multi-level routing structure, and the first routing table entry includes a first primary next hop and a first backup next hop, the first primary next hop includes a first primary path identifier and a first backup path identifier, and the first backup next hop includes a second primary path identifier and a second backup path identifier.

[0047] The first main path identifier indicates a first path with the highest priority among multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among multiple first paths and a second path with the highest priority among multiple second paths; the second backup path identifier indicates a second path with the second highest priority among multiple second paths.

[0048] The first primary path identifier and the first backup path identifier are identifiers that characterize PE2, for example, the address, label, SID, etc. of PE2, and the specific identification form can be determined according to the network that PE1 and PE2 are currently in. The second primary path identifier and the second backup path identifier are identifiers that characterize PE3, for example, the address, label, SID, etc. of PE3, and the specific identification form can be determined according to the network that PE1 and PE3 are currently in.

[0049] It can be understood that when the first path is an SRv6-TE tunnel, the sub-table entry corresponding to the first path in the first routing table entry also includes attribute information included in the SRv6-TE-Policy (for example, endpoint, colour, BSID).

[0050] like Figure 4 As shown, Figure 4 A schematic diagram of the routing table structure provided in the embodiment of the present application. Figure 4 In the example, the first routing table entry includes a next hop field, and the next hop field is specifically a multi-level structure. The next hop field includes a main next hop field and a backup next hop field. The main next hop field includes a main path field and a backup path field; the backup next hop field includes a main path field and a backup path field.

[0051] The primary path field and the backup path field may be filled with an identifier representing a certain remote network device, for example, an address, a label, a SID, and the like.

[0052] It should be noted that the routing table entry in the embodiment of the present application also includes a destination address field, a protocol field, an overhead field, a flag field, an outbound interface field, etc., which are the same as the fields included in the existing routing table entries. The embodiment of the present application makes structural changes to the next hop field, and the other fields are the same as the existing definitions and are not included in the existing definitions. Figure 4 It is shown in the figure and will not be repeated here.

[0053] The generated routing table entries belong to the specified VPN configured with the VPN FRR path protection function.

[0054] In one implementation, the path switching strategy received by PE1 is specifically a tunnel priority strategy, that is, the switching order of the SRv6-TE tunnel in the network is prior to the SRv6-BE tunnel, and the SRv6-BE tunnel is the escape path of the SRv6-TE tunnel, then the first routing table entry generated by PE1 is as follows Figure 5 As shown, Figure 5A schematic diagram of a routing table entry provided for an embodiment of the present application.

[0055] exist Figure 5 In the example, the primary path field included in the primary next hop field is filled with the identifier of PE2 used to represent the SRv6-TE tunnel established between PE1, for example, SRv6-TE-to-PE2; the backup path field included in the primary next hop field is filled with the identifier of PE3 used to represent the SRv6-TE tunnel established between PE1, for example, SRv6-TE-to-PE3. The primary path field included in the backup next hop field is filled with the identifier of PE2 used to represent the SRv6-BE tunnel established between PE1, for example, SRv6-BE-PE2; the backup path field included in the backup next hop field is filled with the identifier of PE3 used to represent the SRv6-BE tunnel established between PE1, for example, SRv6-BE-PE3.

[0056] In another implementation, the path switching strategy received by PE1 is specifically an egress node priority strategy, that is, the switching order of all paths to PE2 is prior to all paths to PE3 and the SRv6-BE tunnel is the escape path of the SRv6-TE tunnel, then the first routing table entry generated by PE1 is as follows: Figure 6 As shown, Figure 6 Another routing table entry schematic diagram provided for an embodiment of the present application.

[0057] exist Figure 6 In the example, the primary path field included in the primary next hop field is filled with the identifier of PE2 used to represent the SRv6-TE tunnel established with PE1, for example, SRv6-TE-to-PE2; the backup path field included in the primary next hop field is filled with the identifier of PE2 used to represent the SRv6-BE tunnel established with PE1, for example, SRv6-BE-PE2. The primary path field included in the backup next hop field is filled with the identifier of PE3 used to represent the SRv6-TE tunnel established with PE1, for example, SRv6-TE-to-PE3; the backup path field included in the backup next hop field is filled with the identifier of PE3 used to represent the SRv6-BE tunnel established with PE1, for example, SRv6-BE-PE3.

[0058] It is understandable that if a path failure occurs, the switching priority order is:

[0059] Main Nexthop-Main path>Main Nexthop-Backup path>Backup Nexthop-Mainpath>Backup Nexthop-Backup path.

[0060] Therefore, by applying the path protection method provided by the present application, the local network device receives a first configuration instruction input by the user, and the first configuration instruction includes a path priority and a path switching strategy; according to the path priority and the path switching strategy, the local network device generates a first routing table entry to reach the user device; wherein the first routing table entry is a multi-level routing structure, the first routing table entry includes a first main next hop and a first backup next hop, the first main next hop includes a first main path identifier and a first backup path identifier, and the first backup next hop includes a second main path identifier and a second backup path identifier; the first main path identifier indicates a first path with the highest priority among the priorities of multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among the priorities of multiple first paths and a second path with the highest priority among the priorities of multiple second paths; the second backup path identifier indicates a second path with the second highest priority among the priorities of multiple second paths.

[0061] In this way, when there are SRv6-TE tunnels and SRv6-BE tunnels between the local network device configured with VPN FRR path protection and the remote network device at the same time, the local network device generates VPN FRR and multi-level FRR protection relationships for the escape path, and calculates all the primary and backup paths at one time. This solves the problem that when the primary and backup paths fail at the same time and the VPN FRR path protection function fails, the BGP routing module in the PE recalculates the route and sends the forwarding table, causing VPN service disconnection and failing to meet the requirements for fast network switching. Fast switching of multiple point failures is achieved, service traffic continues to flow, network reliability is improved, and the requirements for fast network convergence are met.

[0062] Optionally, in the embodiment of the present application, the process also includes a local network device generating a first forwarding table entry according to the first routing table entry, and sending the first forwarding table entry to a local forwarding table.

[0063] Specifically, the process of the local network device generating the first forwarding table entry according to the first routing table entry can be performed according to the existing generation method, which will not be repeated here.

[0064] It should be noted that the forwarding table entries in the embodiment of the present application also include a destination address field, a flag field, a timestamp field, an output interface field, etc., which are the same as the fields included in the existing forwarding table entries. The embodiment of the present application makes structural changes to the next hop field, and the other fields are the same as the existing definitions and will not be repeated here.

[0065] In an embodiment of the present application, the first forwarding table entry is a multi-level forwarding structure, the first forwarding table entry includes a second primary next hop and a second backup next hop, the second primary next hop includes a first primary path identifier and a first backup path identifier, and the second backup next hop includes a second primary path identifier and a second backup path identifier.

[0066] The first main path identifier is the address of the next hop network device (ie, R1) of the local network device in the first path with the highest priority;

[0067] The first backup path identifier is the address of the next hop network device (ie, R4) of the local network device in the first path with the second highest priority, or the address of the next hop network device (ie, R2) of the local network device in the second path with the highest priority;

[0068] The second main path identifier is the address of the next hop network device (ie, R2) of the local network device in the second path with the highest priority, or the address of the next hop network device (ie, R4) of the local network device in the first path with the second highest priority;

[0069] The second backup path identifier is the address of the next hop network device (ie, R3) of the local network device in the second path with the second highest priority.

[0070] It can be understood that the format structure of the first forwarding table entry is the same as the format structure of the aforementioned first routing table entry, both of which are structurally changed for the next hop field, and the set fields and field meanings are the same. For details, please refer to Figure 4-Figure 6 The description of the aforementioned embodiments will not be repeated here.

[0071] The generated forwarding table entries belong to the specified VPN for which the VPN FRR path protection function is configured.

[0072] Optionally, in the embodiment of the present application, the process of switching the path carrying the service traffic after a path failure is also included.

[0073] Specifically, in the embodiment of the present application, PE1 deploys BFD detection on the SRv6-TE tunnel, that is, performs BFD detection on the segment list of the SRv6-TE Policy that forms the SRv6-TE tunnel to determine the validity of the SRv6-TE tunnel. PE1 deploys BFD detection on the SRv6-BE tunnel, that is, performs BFD detection on the SRv6 Locator of the SID of each network device that forms the SRv6-BE tunnel to determine the validity of the SRv6-BE tunnel.

[0074] According to the aforementioned BFD detection, if the first main path (SRv6-TE-to-PE2) indicated by the first main path identifier currently carries service traffic and the first main path fails, then according to the path switching strategy, PE1 switches the path currently carrying service traffic to the first backup path indicated by the first backup path identifier.

[0075] If the first backup path fails and the first primary path has not recovered, PE1 switches the path currently carrying service traffic to the second primary path indicated by the second primary path identifier according to the path switching strategy.

[0076] If the second primary path fails and the paths indicated by the path identifiers included in the primary next hop have not recovered, PE1 switches the path currently carrying service traffic to the second backup path indicated by the second backup path identifier according to the path switching policy.

[0077] If the second backup path fails to forward the service traffic, PE1 discards the service traffic.

[0078] It can be understood that, according to the foregoing embodiments, the first backup path is different according to different path switching strategies issued by the user.

[0079] In one implementation, the first backup path is SRv6-TE-to-PE3; after SRv6-TE-to-PE2 fails, PE1 switches the service traffic to SRv6-TE-to-PE3; if SRv6-TE-to-PE3 fails and SRv6-TE-to-PE2 has not recovered to normal, PE1 switches the service traffic to SRv6-BE-PE2; if SRv6-BE-PE2 fails and SRv6-TE-to-PE2, SRv6-TE-to-PE3, and SRv6-BE-PE2 have not recovered to normal, PE1 switches the service traffic to SRv6-BE-PE3.

[0080] In another implementation, the first backup path is SRv6-BE-PE2; after SRv6-TE-to-PE2 fails, PE1 switches the service traffic to SRv6-BE-PE2; if SRv6-BE-PE2 fails and SRv6-TE-to-PE2 has not recovered to normal, PE1 switches the service traffic to SRv6-TE-to-PE3; if SRv6-TE-to-PE3 fails and SRv6-TE-to-PE2, SRv6-BE-PE2, and SRv6-TE-to-PE3 have not recovered to normal, PE1 switches the service traffic to SRv6-BE-PE3.

[0081] PE1 can switch the path currently carrying service traffic according to the current actual situation.

[0082] Optionally, in the embodiment of the present application, the process of PE1 switching back the paths is also included after the failure of each path is recovered.

[0083] If the aforementioned faulty path has been restored to a normal path, PE1 may choose to wait for the WTR (Chinese: Wait Time to Restore) time and then switch the current service traffic back to the path with the highest priority among the currently available paths.

[0084] Alternatively, if the aforementioned faulty path has been restored to a normal path, PE1 can immediately switch the current traffic back to the path with the highest priority among the currently available paths.

[0085] For example, under the tunnel priority policy, the current service traffic is carried on SRv6-BE-PE3. If at this time, both SRv6-TE-to-PE3 and SRv6-BE-PE2 recover from the failure, PE1 can choose to wait for the WTR time or PE1 can immediately switch the current service traffic back to SRv6-TE-to-PE3.

[0086] Under the egress node priority policy, the current service traffic is carried on SRv6-BE-PE3. If at this time, both SRv6-TE-to-PE3 and SRv6-BE-PE2 recover from the failure, PE1 can choose to wait for the WTR time or PE1 can immediately switch the current service traffic back to SRv6-BE-PE2.

[0087] Based on the same inventive concept, the embodiment of the present application also provides a path protection device corresponding to the path protection method. Figure 7 , Figure 7 A path protection device is provided in an embodiment of the present application, the device is applied to a local network device, a VPN FRR path protection function has been configured in the local network device, the local network device respectively establishes a first path and a second path with each remote device in at least one remote network device, and a user device multi-homed accesses the at least one remote network device; the device includes:

[0088] A receiving unit 710 is configured to receive a first configuration instruction input by a user, wherein the first configuration instruction includes a path priority and a path switching strategy;

[0089] A first generating unit 720, configured to generate a first routing table entry reaching the user equipment according to the path priority and the path switching policy;

[0090] The first routing table entry is a multi-level routing structure, the first routing table entry includes a first primary next hop and a first backup next hop, the first primary next hop includes a first primary path identifier and a first backup path identifier, and the first backup next hop includes a second primary path identifier and a second backup path identifier;

[0091] The first main path identifier indicates a first path with the highest priority among multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among multiple first paths and a second path with the highest priority among multiple second paths; the second backup path identifier indicates a second path with the second highest priority among multiple second paths.

[0092] Optionally, the device further comprises:

[0093] A second generating unit (not shown in the figure), configured to generate a first forwarding table entry according to the first routing table entry;

[0094] A sending unit (not shown in the figure), used for sending the first forwarding table entry to a local forwarding table;

[0095] The first forwarding table entry is a multi-level forwarding structure, the first forwarding table entry includes a second primary next hop and a second backup next hop, the second primary next hop includes a first primary path identifier and a first backup path identifier, and the second backup next hop includes a second primary path identifier and a second backup path identifier;

[0096] The first main path identifier is an address of a next-hop network device of the local network device in the first path with the highest priority;

[0097] The first backup path identifier is the address of the next-hop network device of the local network device in the first path with the second highest priority, or the address of the next-hop network device of the local network device in the second path with the highest priority;

[0098] The second main path identifier is the address of the next hop network device of the local network device in the second path with the highest priority, or the address of the next hop network device of the local network device in the first path with the second highest priority;

[0099] The second backup path identifier is an address of a next-hop network device of the local network device in a second path with a second highest priority.

[0100] Optionally, the device also includes: a switching unit (not shown in the figure), which is used to switch the path currently carrying the service traffic to the first backup path indicated by the first backup path identifier according to the path switching strategy if the first main path indicated by the first main path identifier currently carries service traffic and the first main path fails.

[0101] Optionally, the switching unit (not shown in the figure) is further used to, if the first backup path fails and the first main path has not recovered to normal, switch the path currently carrying the service traffic to the second main path indicated by the second main path identifier according to the path switching strategy;

[0102] If the second primary path fails and the paths indicated by the path identifiers included in the primary next hop have not recovered, the path currently carrying the service traffic is switched to the second backup path indicated by the second backup path identifier according to the path switching strategy.

[0103] Optionally, the first path is specifically an SRv6-TE tunnel, and the second path is specifically an SRv6-BE tunnel;

[0104] The second path is an escape path of the first path.

[0105] Therefore, by applying the path protection device provided by the present application, the local network device receives a first configuration instruction input by the user, and the first configuration instruction includes a path priority and a path switching strategy; according to the path priority and the path switching strategy, the local network device generates a first routing table entry to reach the user device; wherein the first routing table entry is a multi-level routing structure, the first routing table entry includes a first main next hop and a first backup next hop, the first main next hop includes a first main path identifier and a first backup path identifier, and the first backup next hop includes a second main path identifier and a second backup path identifier; the first main path identifier indicates a first path with the highest priority among the priorities of multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among the priorities of multiple first paths and a second path with the highest priority among the priorities of multiple second paths; the second backup path identifier indicates a second path with the second highest priority among the priorities of multiple second paths.

[0106] In this way, when there are SRv6-TE tunnels and SRv6-BE tunnels between the local network device configured with VPN FRR path protection and the remote network device at the same time, the local network device generates VPN FRR and multi-level FRR protection relationships for the escape path, and calculates all the primary and backup paths at one time. This solves the problem that when the primary and backup paths fail at the same time and the VPN FRR path protection function fails, the BGP routing module in the PE recalculates the route and sends the forwarding table, causing VPN service disconnection and failing to meet the requirements for fast network switching. Fast switching of multiple point failures is achieved, service traffic continues to flow, network reliability is improved, and the requirements for fast network convergence are met.

[0107] Based on the same inventive concept, the embodiment of the present application also provides a network device, such as Figure 8As shown, it includes a processor 810, a transceiver 820 and a machine-readable storage medium 830, the machine-readable storage medium 830 stores machine-executable instructions that can be executed by the processor 810, and the processor 810 is prompted by the machine-executable instructions to execute the path protection method provided in the embodiment of the present application. Figure 7 The path protection device shown can be used as follows Figure 8 The network device hardware structure shown is implemented.

[0108] The computer-readable storage medium 830 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 830 may also be at least one storage device located away from the processor 810.

[0109] The processor 810 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0110] In the embodiment of the present application, the processor 810 reads the machine executable instructions stored in the machine readable storage medium 830, and the machine executable instructions enable the processor 1210 itself and call the transceiver 820 to execute the path protection method described in the aforementioned embodiment of the present application.

[0111] In addition, an embodiment of the present application provides a machine-readable storage medium 830, which stores machine-executable instructions. When called and executed by the processor 810, the machine-executable instructions prompt the processor 810 itself and the calling transceiver 820 to execute the path protection method described in the aforementioned embodiment of the present application.

[0112] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0113] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0114] As for the path protection device and the machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0115] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A path protection method, It is characterized in that The method is applied to a local network device, wherein a VPN FRR path protection function has been configured in the local network device, the local network device respectively establishes a first path and a second path with each remote device in at least one remote network device, and a user device multi-homedly accesses the at least one remote network device; the method comprises: Receiving a first configuration instruction input by a user, wherein the first configuration instruction includes a path priority and a path switching strategy; generating a first routing table entry reaching the user equipment according to the path priority and the path switching strategy; The first routing table entry is a multi-level routing structure, the first routing table entry includes a first primary next hop and a first backup next hop, the first primary next hop includes a first primary path identifier and a first backup path identifier, and the first backup next hop includes a second primary path identifier and a second backup path identifier; The first main path identifier indicates a first path with the highest priority among the priorities of the multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among the priorities of the multiple first paths and a second path with the highest priority among the priorities of the multiple second paths; the second backup path identifier indicates a second path with the second highest priority among the priorities of the multiple second paths; The method further comprises: If the first primary path indicated by the first primary path identifier currently carries service traffic and the first primary path fails, switching the path currently carrying service traffic to the first backup path indicated by the first backup path identifier according to the path switching strategy; The method further comprises: If the first backup path fails and the first primary path has not recovered, switching the path currently carrying the service traffic to the second primary path indicated by the second primary path identifier according to the path switching strategy; If the second primary path fails and the paths indicated by the path identifiers included in the first primary next hop have not recovered, the path currently carrying the service traffic is switched to the second backup path indicated by the second backup path identifier according to the path switching strategy.

2. The method according to claim 1, It is characterized in that The method further comprises: Generate a first forwarding table entry according to the first routing table entry; Sending the first forwarding table entry to the local forwarding table; The first forwarding table entry is a multi-level forwarding structure, the first forwarding table entry includes a second primary next hop and a second backup next hop, the second primary next hop includes a first primary path identifier and a first backup path identifier, and the second backup next hop includes a second primary path identifier and a second backup path identifier; The first main path identifier is an address of a next-hop network device of the local network device in the first path with the highest priority; The first backup path identifier is the address of the next-hop network device of the local network device in the first path with the second highest priority, or the address of the next-hop network device of the local network device in the second path with the highest priority; The second main path identifier is the address of the next hop network device of the local network device in the second path with the highest priority, or the address of the next hop network device of the local network device in the first path with the second highest priority; The second backup path identifier is an address of a next-hop network device of the local network device in a second path with a second highest priority.

3. The method according to any one of claims 1-2, It is characterized in that The first path is specifically an SRv6-TE tunnel, and the second path is specifically an SRv6-BE tunnel; The second path is an escape path of the first path.

4. A path protection device, It is characterized in that The device is applied to a local network device, wherein the VPN FRR path protection function is configured in the local network device, the local network device respectively establishes a first path and a second path with each remote device in at least one remote network device, and the user device multi-homedly accesses the at least one remote network device; the device comprises: A receiving unit, configured to receive a first configuration instruction input by a user, wherein the first configuration instruction includes a path priority and a path switching strategy; A first generating unit, configured to generate a first routing table entry reaching the user equipment according to the path priority and the path switching strategy; The first routing table entry is a multi-level routing structure, the first routing table entry includes a first primary next hop and a first backup next hop, the first primary next hop includes a first primary path identifier and a first backup path identifier, and the first backup next hop includes a second primary path identifier and a second backup path identifier; The first main path identifier indicates a first path with the highest priority among the priorities of the multiple first paths; the first backup path identifier or the second main path identifier indicates any one of a first path with the second highest priority among the priorities of the multiple first paths and a second path with the highest priority among the priorities of the multiple second paths; the second backup path identifier indicates a second path with the second highest priority among the priorities of the multiple second paths; The device also includes: a switching unit, configured to switch the path currently carrying the service traffic to the first backup path indicated by the first backup path identifier according to the path switching strategy if the first primary path indicated by the first primary path identifier currently carries service traffic and the first primary path fails; The switching unit is further configured to, if the first backup path fails and the first primary path has not recovered to normal, switch the path currently carrying the service traffic to the second primary path indicated by the second primary path identifier according to the path switching strategy; If the second primary path fails and the paths indicated by the path identifiers included in the first primary next hop have not recovered, the path currently carrying the service traffic is switched to the second backup path indicated by the second backup path identifier according to the path switching strategy.

5. The device according to claim 4, It is characterized in that The device also includes: A second generating unit, configured to generate a first forwarding table entry according to the first routing table entry; A sending unit, used for sending the first forwarding table entry to a local forwarding table; The first forwarding table entry is a multi-level forwarding structure, the first forwarding table entry includes a second primary next hop and a second backup next hop, the second primary next hop includes a first primary path identifier and a first backup path identifier, and the second backup next hop includes a second primary path identifier and a second backup path identifier; The first main path identifier is an address of a next-hop network device of the local network device in the first path with the highest priority; The first backup path identifier is the address of the next-hop network device of the local network device in the first path with the second highest priority, or the address of the next-hop network device of the local network device in the second path with the highest priority; The second main path identifier is the address of the next hop network device of the local network device in the second path with the highest priority, or the address of the next hop network device of the local network device in the first path with the second highest priority; The second backup path identifier is an address of a next-hop network device of the local network device in a second path with a second highest priority.

6. The device according to any one of claims 4-5, It is characterized in that The first path is specifically an SRv6-TE tunnel, and the second path is specifically an SRv6-BE tunnel; The second path is an escape path of the first path.