Path switching method and device, network equipment, and computer-readable storage medium

By detecting faults in the MPLS network and switching to a better MPLS public network tunnel, the problem of easy congestion in the escape path is solved, and network transmission stability and service packet transmission effect are improved.

CN114567593BActive Publication Date: 2024-12-03NANJING ZHONGXING SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011345723.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-26
Publication Date
2024-12-03
Estimated Expiration
2040-11-26

AI Technical Summary

Technical Problem

In multi-protocol label switching (MPLS) networks, the escape path is usually not set to a constraint, and a path that is prone to congestion may be selected, resulting in interruption of service packet transmission and affecting network stability.

Method used

When a MPLS public network tunnel failure is detected, the better forwarding path priority is determined, and then the better MPLS public network tunnel is switched to a better MPLS public network tunnel for data packet forwarding to avoid congestion paths.

Benefits of technology

It improves the stability of network transmission, reduces the impact on normal transmission of service messages, and ensures normal forwarding of data messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114567593B_ABST
    Figure CN114567593B_ABST
Patent Text Reader

Abstract

The present invention provides a path switching method and its device, network device, and computer-readable storage medium. The path switching method is applied to a first PE device, and includes: when a failure is detected in a first multi-protocol label switching MPLS public network tunnel from a first PE device to a second PE device and a first escape path is selected to forward a data message to a second PE device, when it is determined that the second forwarding path priority of the second MPLS public network tunnel from the first PE device to a third PE device is higher than the first forwarding path priority of the first escape path, the data message is switched from the first escape path to the second MPLS public network tunnel. In an embodiment of the present invention, a better second MPLS public network tunnel can be selected to forward data messages, thereby improving the stability of network transmission and reducing the impact on normal transmission of service messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to, but are not limited to, the field of communication technology, and in particular to a path switching method and apparatus thereof, a network device, and a computer-readable storage medium. Background Art

[0002] At present, networks based on Multi-Protocol Label Switching (MPLS) technology are becoming more and more common, and the requirements for network stability are also increasing. In order to ensure the stability of the network, protection for MPLS public network tunnels will be deployed. For example, two Label Switched Paths (LSPs) are used to protect the MPLS public network tunnel. These two LSPs include a main LSP and a backup LSP. The backup LSP is used as an alternative path for the MPLS public network tunnel when the main LSP is unavailable. In addition, in order to better protect the network, an escape LSP can also be added as another alternative path when both the main LSP and the backup LSP are unavailable. For example, when both the main LSP and the backup LSP of the MPLS public network tunnel fail, the network controller or the service initiating node will seek a dynamic escape path to establish a forwarding tunnel for the service, thereby realizing the forwarding of service messages based on the escape path. However, in the current network mechanism, since there are generally no constraints on the escape path, as long as there is a reachable path, an escape path through a congested network may be chosen, affecting the normal forwarding of business messages, and may even cause the transmission of business messages to be interrupted, affecting the stability of network transmission, and bringing great risks to network operations. Summary of the invention

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] The embodiments of the present invention provide a path switching method and device thereof, a network device, and a computer-readable storage medium, which can improve the stability of network transmission and reduce the impact on normal transmission of service messages.

[0005] In a first aspect, an embodiment of the present invention provides a path switching method, which is applied to a first operator network edge PE device, and the method includes:

[0006] When it is detected that the first multi-protocol label switching MPLS public network tunnel from the first PE device to the second PE device fails and the first escape path is selected to forward the data packet to the second PE device, when it is determined that the second forwarding path priority of the second MPLS public network tunnel from the first PE device to the third PE device is higher than the first forwarding path priority of the first escape path, the forwarding of the data packet from the first escape path is switched to forwarding from the second MPLS public network tunnel.

[0007] In a second aspect, an embodiment of the present invention further provides a path switching device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the path switching method described in the first aspect above when executing the computer program.

[0008] In a third aspect, an embodiment of the present invention further provides a network device, including: a path switching device as described in the second aspect above.

[0009] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the path switching method described in the first aspect above.

[0010] An embodiment of the present invention includes: when it is detected that a first MPLS public network tunnel from a first PE device to a second PE device fails and a first escape path is selected to forward data packets to a second PE device, when it is determined that a second forwarding path priority of a second MPLS public network tunnel from the first PE device to a third PE device is higher than a first forwarding path priority of the first escape path, forwarding of the data packet is switched from the first escape path to forwarding from the second MPLS public network tunnel. According to the solution provided by the embodiment of the present invention, when it is detected that the first MPLS public network tunnel from the first PE device to the second PE device fails and the first escape path is selected to forward data packets to the second PE device, by determining that the second forwarding path priority of the path to the third PE device is higher than the first forwarding path priority of the first escape path, it is possible to determine that the transmission path to the third PE device is a more optimal transmission path, and then the first escape path is switched to the second MPLS public network tunnel to the third PE device, so that the data packet can be forwarded to the third PE device, which can reduce the probability of affecting the normal forwarding of service packets and the stability of network transmission due to the congested network passed by the first escape path. Therefore, the solution of the embodiment of the present invention can select a more optimal second MPLS public network tunnel to forward data packets, thereby improving the stability of network transmission and reducing the impact on the normal transmission of service packets.

[0011] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0013] Figure 1 is a schematic diagram of a network architecture for executing a path switching method provided by an embodiment of the present invention;

[0014] Figure 2 is a schematic diagram of a network architecture for executing a path switching method provided by another embodiment of the present invention;

[0015] Figure 3 is a flow chart of a path switching method provided by an embodiment of the present invention;

[0016] Figure 4 This is a flow chart of a path switching method provided by an embodiment of the present invention after forwarding a data packet to a second PE device;

[0017] Figure 5 It is a flow chart of switching a first escape path to a second MPLS public network tunnel in a path switching method provided by an embodiment of the present invention;

[0018] Figure 6 is a flow chart of switching a first escape path to a second MPLS public network tunnel in a path switching method provided by another embodiment of the present invention;

[0019] Figure 7 is a flow chart of switching a first escape path to a second MPLS public network tunnel in a path switching method provided by another embodiment of the present invention;

[0020] Figure 8 It is a flow chart after a data message is switched to be forwarded from a second escape path in a path switching method provided by an embodiment of the present invention;

[0021] Fig. 9 is a flow chart after a data message is switched to be forwarded from a second escape path in a path switching method provided by another embodiment of the present invention;

[0022] Fig.10 is a flow chart of determining the priority of a first forwarding path in a path switching method provided by an embodiment of the present invention;

[0023] Fig.11 is a flowchart of determining the priority of a first forwarding path in a path switching method provided by another embodiment of the present invention;

[0024] Fig.12 is a schematic diagram of a path switching device provided by an embodiment of the present invention;

[0025] Fig.13 It is a schematic diagram of a network device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0027] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0028] The present invention provides a path switching method and its device, network equipment, and computer-readable storage medium. When a first MPLS public network tunnel from a first PE device to a second PE device is detected to have a fault and a first escape path is selected to forward data packets to a second PE device, by determining that the second forwarding path priority of the path to a third PE device is higher than the first forwarding path priority of the first escape path, it is possible to determine that the transmission path to the third PE device is a more optimal transmission path, and then the first escape path is switched to a second MPLS public network tunnel to the third PE device, so that data packets can be forwarded to the third PE device, and the probability of affecting the normal forwarding of service packets and the stability of network transmission due to the first escape path passing through a congested network can be reduced. Therefore, the solution of the embodiment of the present invention can select a more optimal second MPLS public network tunnel to forward data packets, thereby improving the stability of network transmission and reducing the impact on the normal transmission of service packets.

[0029] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.

[0030] like Figure 1 As shown, Figure 1 It is a schematic diagram of a network architecture for executing a path switching method provided by an embodiment of the present invention.

[0031] exist Figure 1 In the example, the network architecture includes a first network side edge (Provider Edge, PE) device, a second PE device and a third PE device, the first PE device is connected to the second PE device and the third PE device, that is, the first PE device is a peer PE device to the second PE device and the third PE device, respectively, wherein the first PE device is also connected to a first customer side edge (Customer Edge, CE) device, the second PE device and the third PE device are dual-homed to the second CE device, therefore, the second PE device and the third PE device can generate the same network segment routing.

[0032] It is worth noting that in order to more conveniently explain the composition relationship and principle of the network architecture, Figure 1 The network architecture shown here is only the most basic one. In an actual network, the number of PE devices and their corresponding CE devices may not be limited. For example, Figure 2 As shown, the network architecture may further include a fourth PE device or more other PE devices, wherein the fourth PE device may be a peer PE device with the first PE device and the second PE device, or may be a peer PE device with the first PE device and the third PE device, or may be connected to a corresponding CE device, etc., which is not limited in this embodiment. Based on this, those skilled in the art can understand that the network architecture of this embodiment can be Figure 1 The shown infrastructure is evolved accordingly, and the network architecture after the corresponding evolution is also within the scope of the network architecture defined in this embodiment.

[0033] In one embodiment, the first PE device can establish a Border Gateway Protocol (BGP) neighbor with the second PE device or the third PE device, respectively, wherein BGP is a routing protocol of an autonomous system running on the Transmission Control Protocol (TCP). Under current network communication conditions, BGP can be used as a protocol for processing networks similar to the Internet layer, and can also be used as a protocol for processing multi-path connections between unrelated routing domains. The first PE device can obtain the network address of the adjacent PE device through the BGP neighbor established with the adjacent PE device, thereby realizing information exchange with the adjacent PE device, such as exchanging network reachability information.

[0034] In one embodiment, the first PE device receives data packets from the first CE device, and then can perform operations such as aggregation and encapsulation on the corresponding data packets, and can further transmit the processed data packets to the second CE device through the second PE device or the third PE device, so that the second CE device can realize network communication, that is, realize network communication transmission on the client side through the transmission of business packets, thereby realizing complete network operation. At the same time, since it is possible to transmit to the second CE device through the second PE device or the third PE device, that is, it has different data packet forwarding paths, it is possible to select an appropriate data packet forwarding path in different situations to realize network transmission, which is beneficial to improving the stability of network transmission.

[0035] In one embodiment, the network architecture may further include a core (Provider, P) device that may be arranged between two PE devices, such as Figure 2 As shown in , the P device is arranged between the first PE device and the fourth PE device, which is equivalent to a network node as a transit between the first PE device and the fourth PE device. It has a certain network switching capability and can communicate with the first PE device or the fourth PE device through a tunnel, thereby improving the stability of network transmission.

[0036] In one embodiment, the first CE device and the second CE device may be, but are not limited to, switches, routers, routing switches, integrated access devices, and various network devices connected to customers.

[0037] Each PE device and CE device may include a memory and a processor respectively, wherein the memory and the processor may be connected via a bus or other means.

[0038] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0039] The network architecture and application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of network architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.

[0040] It can be understood by those skilled in the art that Figure 1 and Figure 2 The network architecture shown in the figure does not constitute a limitation on the embodiments of the present invention, and may include more or fewer components than those shown in the figure, or combine certain components, or arrange the components differently.

[0041] exist Figure 1 and Figure 2 In the network architecture shown, each device can respectively call its stored path switching program to execute the path switching method.

[0042] Based on the structure of the above network architecture, various embodiments of the path switching method of the present invention are proposed.

[0043] like Figure 3 As shown, Figure 3 is a flow chart of a path switching method provided by an embodiment of the present invention. The path switching method can be applied to Figure 1 or Figure 2 The network architecture shown includes but is not limited to:

[0044] Step S100, when it is detected that a failure occurs in the first multi-protocol label switching MPLS public network tunnel from the first PE device to the second PE device and the first escape path is selected to forward the data message to the second PE device, when it is determined that the second forwarding path priority of the second MPLS public network tunnel from the first PE device to the third PE device is higher than the first forwarding path priority of the first escape path, the data message is switched from being forwarded by the first escape path to being forwarded by the second MPLS public network tunnel.

[0045] In one embodiment, when a failure is detected in the first MPLS public network tunnel from the first PE device to the second PE device and the first escape path is selected to forward data packets to the second PE device, by determining that the second forwarding path priority of the path to the third PE device is higher than the first forwarding path priority of the first escape path, it is possible to determine that the transmission path to the third PE device is a more optimal transmission path, and then switch the first escape path to the second MPLS public network tunnel to the third PE device, so that the data packet can be forwarded to the third PE device, which can reduce the probability of affecting the normal forwarding of service packets and the stability of network transmission due to the congested network passed by the first escape path. Therefore, the scheme of the embodiment of the present invention can select a more optimal second MPLS public network tunnel to forward data packets, thereby improving the stability of network transmission and reducing the impact on the normal transmission of service packets.

[0046] In one embodiment, the routes announced by the second PE device and the third PE device may be, but are not limited to, virtual private network (VPN) routes, BGP public network routes, etc., that is, the route type announced by each PE device does not constitute a substantial impact on this embodiment. It can be understood that this embodiment mainly considers the impact caused by the forwarding path priority between each PE device. Therefore, in actual applications, the routes announced by each PE device can be set accordingly according to the specific situation.

[0047] In one embodiment, the forwarding path priority can be carried or determined by each PE device itself, which can be determined by the routing priority announced by each PE device. The routing priority can be set according to actual conditions, such as by the user or defined by the network architecture. For example, the user defines the routing priority of the third PE device as 50, and defines the routing priority of the second PE device as 100. Then, when the first PE device enables fast reroute (FRR), when the first PE device receives the route announced by the third PE device, the first PE device can determine that the second forwarding path priority of the path from the first PE device to the third PE device is 50. Similarly, when the first PE device receives the routing priority announced by the second PE device, the first PE device can determine that the third forwarding path priority of the path from the first PE device to the second PE device is 100. Therefore, according to the second forwarding path priority and the third forwarding path priority, the path to the second PE device can be determined as the main routing path, and the path to the third PE device can be determined as the backup routing path, thereby determining the main and backup protection relationship for the first PE device, and then being able to preferentially establish the first MPLS public network tunnel from the first PE device to the second PE device.

[0048] In one embodiment, the forwarding path priority can also be set by the BGP neighbor established between the first PE device and each PE device. The forwarding path priority in this case is different from the forwarding path priority determined according to the routing priority carried or determined by each PE device in the above embodiment. Specifically, the first PE device can set the forwarding path priority according to the corresponding parameters of the MPLS public network tunnel when establishing a BGP neighbor. For example, a setting method can refer to Figure 4 , wherein, after executing “selecting a first escape path to forward the data message to the second PE device” in step S100, the process also includes but is not limited to:

[0049] Step S200, obtaining a first identification parameter corresponding to a first escape path;

[0050] Step S300: determining a first forwarding path priority according to a first identification parameter and a preset identification parameter range.

[0051] In one embodiment, when the first escape path is selected to forward a data message to the second PE device, the first PE device can determine the forwarding path priority of the first escape path in the current situation through the obtained first identification parameter and the preset identification parameter range, so that the first PE device can determine that the forwarding path priority from the first PE device to the third PE device is higher than the forwarding path priority of the first escape path in this situation, and then the first escape path can be switched to the second MPLS public network tunnel from the first PE device to the third PE device, that is, when a better path exists in the backup route, the transmission path of the backup route can be selected instead of the escape path of the main route, thereby improving the stability of network transmission and reducing the impact on the normal transmission of service messages.

[0052] In one embodiment, the first identification parameter can be set manually or set for the MPLS public network tunnel between corresponding PE devices in the network architecture. This is not limited in the present embodiment. Similarly, the preset identification parameter range can also be set similarly. For example, assuming that the obtained first identification parameter is 1, the preset identification parameter range is set to be less than 2. It can be seen that in this case, the first identification parameter is within the preset identification parameter range and meets the identification condition. Therefore, the first PE device can set the first forwarding path priority of the first escape path at this time to maintain the unchanged state, that is, the default state; for the first escape path, the forwarding path priority determined by the first PE device according to the first identification parameter is kept consistent with the forwarding path priority originally carried by the first escape path and does not change, thereby determining the first forwarding path priority. Similarly, if the first identification parameter is 255, the first identification parameter is outside the preset identification parameter range. At this time, the first PE device can reduce the original routing priority of the first escape path, thereby obtaining the forwarding path priority determined by the first PE device.

[0053] In one embodiment, the first PE device reduces the forwarding path priority originally carried by the first escape path, for example, the original forwarding path priority is reduced from 100 to 80. It can also be reduced in a hierarchical manner. For example, the level of forwarding path priority can be set, such as classifying some forwarding path priorities as "high" and other forwarding path priorities as "low". Then, when the first PE device reduces the forwarding path priority originally carried by the first escape path, it can be directly set to "low", where "high" and "low" can be distinguished by specific levels and can also be defined by specific values. For example, a forwarding path priority less than 50 is set to "low", etc. This is not limited in the present embodiment.

[0054] It is worth noting that the originally carried route priority described in the above embodiments may not be set separately, but in the stage of announcing the route, the first PE device may determine the forwarding path priority of the first escape path under the condition by acquiring the first identification parameter corresponding to the first escape path in real time, that is, the first PE device may also set the original forwarding path priority for the PE device. In addition, although the above embodiments only provide that the first escape path forwards the data message to the second PE device, the first escape path forwarding path priority needs to be re-determined by the relevant parameters of the first escape path, but in fact, for similar situations, for example, the first MPLS public network tunnel may need to reselect the transmission path (the transmission path is different from the first escape path) for data message forwarding, or the second MPLS public network tunnel may need to reselect the path for data message forwarding, similar operations may be performed on the selected path, so as to determine the forwarding path priority corresponding to the selected path. Since this situation is consistent with the principle of the above embodiments, it is not repeated here to avoid redundancy.

[0055] Reference Figure 5 In another embodiment, the second MPLS public network tunnel includes a primary label switched path (Label Switched Path, LSP) and a backup LSP, wherein the "switching the first escape path to a second MPLS public network tunnel from the first PE device to the third PE device" in step S100 includes but is not limited to:

[0056] Step S110: Switch the forwarding of the data message from the first escape path to the main LSP from the first PE device to the third PE device for forwarding.

[0057] In one embodiment, after determining to switch the first escape path to the second MPLS public network tunnel from the first PE device to the third PE device, if the main path link of the second MPLS public network tunnel is in a normal conductive state, the first escape path can be preferentially switched to the main LSP from the first PE device to the third PE device, so as to achieve stable network transmission.

[0058] Reference Figure 6 In another embodiment, the “switching the first escape path to a second MPLS public network tunnel from the first PE device to the third PE device” in step S100 further includes but is not limited to:

[0059] Step S120: When a failure of the primary LSP is detected, forwarding of data packets is switched from the primary LSP to the backup LSP.

[0060] In one embodiment, when it is determined that the main LSP fails, the first escape path can be switched to the backup LSP from the first PE device to the third PE device, so that a second MPLS public network tunnel can be established even when the main LSP fails. Therefore, it is possible to ensure that data packets are forwarded to the third PE device, thereby improving the stability of network transmission.

[0061] Reference Figure 7 In another embodiment, the “switching the first escape path to a second MPLS public network tunnel from the first PE device to the third PE device” in step S100 further includes but is not limited to:

[0062] Step S130: When it is detected that the standby LSP fails, the data message is switched from being forwarded from the standby LSP to being forwarded from the second escape path.

[0063] In one embodiment, when it is determined that both the primary LSP and the backup LSP have failed, the second MPLS public network tunnel can be switched to a second escape path from the first PE device to the third PE device, so that when both the primary LSP and the backup LSP have failed, a data transmission channel from the first PE device to the third PE device can be established. Therefore, it is possible to ensure the forwarding of data packets to the third PE device, which can improve the stability of network transmission.

[0064] Reference Figure 8 After executing step S130, the following steps are also included but not limited to:

[0065] Step S400, lowering the priority of the second forwarding path of the second MPLS public network tunnel;

[0066] Step S500: When it is determined that the priority of the second forwarding path is not higher than the priority of the first forwarding path, the data message is switched from being forwarded through the second escape path to being forwarded through the first escape path.

[0067] In one embodiment, when the data packet is switched from the backup LSP to the second escape path for forwarding, the second forwarding path priority of the second MPLS public network tunnel is lowered, and the relationship between the second forwarding path priority and the first forwarding path priority is compared, so that the escape path with a higher forwarding path priority can be selected to forward the data packet, thereby improving the stability of network transmission and reducing the impact on normal transmission of business packets.

[0068] Reference Fig. 9 After executing step S130, the following steps are also included but not limited to:

[0069] Step S600, notifying the fourth PE device of the second forwarding path priority of the second MPLS public network tunnel from the first PE device to the third PE device, so that the fourth PE device forwards the data packet from the fourth PE device to the third PE device when determining that the fourth forwarding path priority of the path from the fourth PE device to the third PE device is higher than the second forwarding path priority.

[0070] In one embodiment, since the fourth PE device is the opposite PE device to the first PE device and the third PE device respectively, the fourth PE device can obtain the second forwarding path priority announced by the first PE device and the fourth forwarding path priority of the path from the fourth PE device to the third PE device. In this case, since both the primary and backup routes corresponding to the first PE device fail, the fourth PE device can determine that the fourth forwarding path priority of the path from the fourth PE device to the third PE device is higher than the second forwarding path priority, so that the path from the fourth PE device to the third PE device with a higher forwarding path priority can be selected to forward data packets, thereby improving the stability of network transmission and reducing the impact on normal transmission of service packets.

[0071] It is worth noting that the first PE device can also notify the fourth PE device of the first forwarding path priority of the first MPLS public network tunnel from the first PE device to the second PE device. Since the first forwarding path priority of the first MPLS public network tunnel is not higher than the second forwarding path priority of the second MPLS public network tunnel, it can be understood that when the first PE device simultaneously notifies the first forwarding path priority and the second forwarding path priority to the fourth PE device, the fourth PE device can still compare and select the corresponding path based on the second forwarding path priority and the fourth forwarding path priority, and thus can also select the path with a higher forwarding path priority from the fourth PE device to the third PE device to forward data packets, thereby improving the stability of network transmission and reducing the impact on normal transmission of service packets.

[0072] In order to more accurately illustrate the working principle of the path switching method of the present invention, based on the contents disclosed in the above embodiments, the following is an example of the method being applied to: Figure 2 A specific process description of an embodiment of the network architecture shown.

[0073] Example 1

[0074] First, the routing priorities of the corresponding routes are set to 100 and 50 on the second PE device and the third PE device, respectively. At this time, the first PE device enables FRR and sets the preset identification parameter range to be less than or equal to 2.

[0075] Further, after receiving the routes of the second PE device and the third PE device, the first PE device determines the primary and backup routing paths according to the routing priority, thereby forming a primary and backup protection relationship on the first PE device, that is, the next hops of the primary and backup routing are the second PE device and the third PE device, respectively, wherein the primary routing path corresponds to the path to the second PE device, and the backup routing path corresponds to the path to the third PE device;

[0076] Further, the first PE device establishes a first MPLS public network tunnel for the route of the second PE device, the tunnel is configured with a main LSP1 and a backup LSP2 as the primary and backup protection paths, and a first escape path is enabled; wherein, the main LSP1 is identified as 1, and the backup LSP2 is identified as 2. When the main route selects the main LSP1 to forward a data message, since the main LSP1 is within the preset identification parameter range, the corresponding first forwarding path priority remains unchanged; and, the first PE device establishes a second MPLS public network tunnel for the route of the third PE device, the tunnel is configured with a main LSP3 and a backup LSP4 as the primary and backup protection paths, and a second escape path LSP6 is enabled, wherein, the main LSP3 is identified as 1, and the backup LSP4 is identified as 2. When the backup route selects the main LSP3 to forward a data message, since the main LSP3 is within the preset identification parameter range, the corresponding second forwarding path priority remains unchanged;

[0077] Further, if the main path main LSP1 between the first PE device and the second PE device fails, the first MPLS public network tunnel switches to the backup LSP2. Since the backup LSP2 identifier is 2, that is, the identifier parameter is within the preset identifier parameter range, the priority of the first forwarding path remains unchanged. At this time, the main route is the route announced by the second PE device, and the backup route is the route announced by the third PE device.

[0078] Further, if the backup path LSP2 between the first PE device and the second PE device fails, the first MPLS tunnel switches to the first escape path LSP5, and notifies the first PE device of the identification parameter 255 corresponding to LSP5. The first PE device senses that it exceeds the preset identification parameter range, and therefore marks the first forwarding path priority of the route corresponding to LSP5 as "low". Since the second forwarding path priority corresponding to the path to the third PE device is still set to "high", the main path is selected as the main LSP3 of the second public network tunnel to the third PE device, and the backup path is selected as the backup LSP4 of the second public network tunnel to the third PE device. LSP5 is switched to the main LSP3 of the second MPLS public network tunnel to forward data packets.

[0079] Furthermore, if both the main LSP3 and the backup LSP4 between the first PE device and the third PE device fail, the path of the second MPLS public network tunnel is switched to the second escape path LSP6, and the identification parameter 255 corresponding to LSP6 is notified to the first PE device. The first PE device senses that it exceeds the preset identification parameter range, and therefore marks the second forwarding path priority of the route corresponding to LSP6 as "low". Since the first forwarding path priority corresponding to LSP5 and the second forwarding path priority corresponding to LSP6 are both marked as "low", at this time, the forwarding path of the data message is determined according to the routing priority announced by the second PE device and the routing priority announced by the third PE device. Since the routing priority announced by the second PE device is higher than the routing priority announced by the third PE device, the forwarding of the data message is switched from LSP6 to LSP5.

[0080] Further, the first PE device notifies the fourth PE device of the second forwarding path priority of the second MPLS public network tunnel from the first PE device to the third PE device. In addition, the first PE device may also simultaneously notify the fourth PE device of the first forwarding path priority of the first MPLS public network tunnel from the first PE device to the second PE device. Since the second forwarding route priority of the second MPLS public network tunnel from the first PE device to the third PE device received by the fourth PE device is set to "low", and the forwarding path priority corresponding to the path from the fourth PE device to the third PE device through the P device is still set to "high", the fourth PE device selects the transmission path from the P device to the third PE device as the main path to forward data packets.

[0081] It is worth noting that the "high" and "low" forwarding path priorities mentioned in the above embodiments may also be replaced by specific numbers. It can be understood that as long as the comparison between the forwarding path priorities can be achieved, the path for forwarding data packets can be determined based on the comparison results. Based on this, the forwarding path priority may also be set in a manner other than the above, which is not limited in the present embodiment.

[0082] like Fig.10 As shown, in another embodiment, step 300 includes but is not limited to:

[0083] Step S310: When the first identification parameter is outside the preset identification parameter range, the third forwarding path priority of the first MPLS public network tunnel is reduced to obtain the first forwarding path priority.

[0084] In one embodiment, when the first identification parameter is outside the preset identification parameter range, that is, it does not meet the identification condition, the first PE device can reduce the third forwarding path priority of the path from the first PE device to the second PE device at this time. For the first escape path, the determined third forwarding path priority is lower than the original forwarding path priority of the first escape path, thereby obtaining the first forwarding path priority of the first escape path in this situation.

[0085] like Fig.11 As shown, in another embodiment, step 300 includes but is not limited to:

[0086] Step S320: When the first identification parameter is within a preset identification parameter range, the third forwarding path priority of the first MPLS public network tunnel is maintained unchanged to obtain the first forwarding path priority.

[0087] In one embodiment, when the first identification parameter is within a preset identification parameter range, that is, it meets the identification condition, the first PE device can set the third forwarding path priority of the path from the first PE device to the second PE device at this time to a hold state. For the first escape path, the determined third forwarding path priority is equal to the original forwarding path priority of the first escape path, thereby obtaining the first forwarding path priority of the first escape path in this situation.

[0088] In addition, if Fig.12 As shown, an embodiment of the present invention provides a path switching device 200 , which includes: a memory 210 , a processor 220 , and a computer program stored in the memory 210 and executable on the processor 220 .

[0089] The processor 220 and the memory 210 may be connected via a bus or in other ways.

[0090] It should be noted that the path switching device 200 in this embodiment can be applied to Figure 1 or Figure 2 The network architecture in the embodiment shown in the figure, the path switching device 200 in this embodiment can constitute Figure 1 or Figure 2 Part of the network architecture in the illustrated embodiments, these embodiments all belong to the same inventive concept, so these embodiments have the same implementation principles and technical effects, and will not be described in detail here.

[0091] The non-transient software program and instructions required to implement the path switching method of the above embodiment are stored in the memory 210. When executed by the processor 220, the path switching method of the above embodiment is executed, for example, the above described Figure 3 In the method step S100, Figure 4 Steps S200 to S300, Figure 5 Step S110 of the method, Figure 6 Step S120 of the method, Figure 7 Step S130 of the method, Figure 8 Steps S400 to S500 of the method, Fig. 9 In the method step S600, Fig.10 Method step S310 or Fig.11 Method step S320 in .

[0092] In addition, if Fig.13 As shown, an embodiment of the present invention further provides a network device 100, and the network device 100 includes: a path switching device 200 as described in the above embodiment.

[0093] Since the network device 100 in this embodiment and the path switching device 200 in the above embodiment belong to the same inventive concept, the specific implementation of the network device 100 in this embodiment can refer to the specific implementation of the path switching device 200 in the above embodiment. To avoid redundancy, the specific implementation of the network device 100 in this embodiment will not be repeated here.

[0094] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0095] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by a processor or a controller, for example, by a processor in the above-mentioned path switching device embodiment, so that the above-mentioned processor can execute the path switching method in the above-mentioned embodiment, for example, execute the above-mentioned Figure 3 In the method step S100, Figure 4 Steps S200 to S300, Figure 5 Step S110 of the method, Figure 6 Step S120 of the method, Figure 7 Step S130 of the method, Figure 8 Steps S400 to S500 of the method, Fig. 9 In the method step S600, Fig.10 Method step S310 or Fig.11 Method step S320 in .

[0096] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0097] The above is a specific description of the preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A path switching method, applied to a first network side edge PE device, the method comprising: When a first multi-protocol label switching MPLS public network tunnel from the first PE device to the second PE device is detected to fail and a first escape path is selected to forward data packets to the second PE device, obtaining a first identification parameter corresponding to the first escape path; Determining the first forwarding path priority according to the first identification parameter and the preset identification parameter range, specifically: when the first identification parameter is outside the preset identification parameter range, reducing the forwarding path priority of the first MPLS public network tunnel at this time, and using the reduced forwarding path priority as the first forwarding path priority; when the first identification parameter is within the preset identification parameter range, maintaining the forwarding path priority of the first MPLS public network tunnel at this time unchanged, and using the unchanged forwarding path priority as the first forwarding path priority; When it is determined that the second forwarding path priority of the second MPLS public network tunnel from the first PE device to the third PE device is higher than the first forwarding path priority, the data message is switched from being forwarded from the first escape path to being forwarded from the second MPLS public network tunnel.

2. The method according to claim 1, characterized in that: The second MPLS public network tunnel includes a primary label switching path LSP and a backup LSP, and the switching of forwarding the data message from the first escape path to forwarding from the second MPLS public network tunnel includes: The data message is forwarded from the first escape path and switched to the main LSP from the first PE device to the third PE device for forwarding.

3. The method according to claim 2, characterized in that Also includes: When it is detected that the primary LSP fails, the data message forwarding from the primary LSP is switched to forwarding from the backup LSP.

4. The method according to claim 3, characterized in that The second MPLS public network tunnel further includes a second escape path, and the method further includes: When it is detected that the standby LSP fails, the data message is switched from being forwarded from the standby LSP to being forwarded from the second escape path.

5. The method according to claim 4, characterized in that Also includes: Lowering the priority of the second forwarding path of the second MPLS public network tunnel; When it is determined that the priority of the second forwarding path is not higher than the priority of the first forwarding path, the data message is switched from being forwarded through the second escape path to being forwarded through the first escape path.

6. The method according to claim 4, characterized in that Also includes: The second forwarding path priority of the second MPLS public network tunnel from the first PE device to the third PE device is notified to the fourth PE device, so that the fourth PE device forwards the data packet from the fourth PE device to the third PE device when determining that the fourth forwarding path priority of the path from the fourth PE device to the third PE device is higher than the second forwarding path priority.

7. A path switching device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the path switching method according to any one of claims 1 to 6 when executing the computer program.

8. A network device comprising: The path switching device as claimed in claim 7.

9. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the path switching method according to any one of claims 1 to 6.