Link failure processing method, device, electronic device and storage medium
By building hybrid routing on PE and increasing its priority when link failure, the problem of inability to achieve millisecond-level convergence when user capacity exceeds the maximum capacity of PE FRR, and fast switching and high reliability after link failure are achieved.
Patent Information
- Application Number
- CN202311290026.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2025-04-08
AI Technical Summary
In the networking scenario of PE when the user gateway is networked, if the user capacity exceeds the maximum FRR capacity of PE, the PE cannot achieve millisecond convergence in the event of a link failure.
By constructing hybrid routing on the first PE, using local direct connection routing and standby routing to form hybrid routing, when the link fails, the hybrid routing priority is higher than the host routing, and the standby routing is enabled to achieve fast re-routing.
It realizes millisecond-level convergence in the event of link failure, and can quickly switch to hybrid routing even if the user capacity exceeds the maximum FRR capacity of the PE, ensuring high reliability of the network.
Smart Images

Figure CN119788598A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a link failure processing method, device, electronic device and storage medium. Background Art
[0002] Figure 1 This is a typical networking diagram of Multi-Protocol Label Switching (MPLS) Layer 3 (L3) Virtual Private Network (VPN) technology, which mainly includes the customer edge device (CE) and the provider edge device (PE). Among them, CE is the router or switch in the customer network (VPN site) connected to the provider network, and PE is the device in the provider network connected to the customer network. CE and PE establish routing neighbors, PE learns CE's routing information, builds VPN local routing table, uses Border Gateway Protocol (BGP) to exchange VPN routing information with other PEs, and distributes VPN routing information synchronized by other PEs to the corresponding CE, thereby realizing intercommunication between VPN sites.
[0003] See also Figure 1 Taking VPN site 1 as an example, in order to ensure the reliability of the network, CE1 on the user side can be dual-homed to PE1 and PE2. Both PE1 and PE2 will learn user routes and synchronize them to PE3. The user routes on PE3 form L3VPN Fast Re-Route (Fast Re-Route, FRR). When PE1 or PE2 fails, PE3 can quickly switch traffic (i.e. data) to PE2 or PE1. However, when a link failure occurs on the user side, such as a link failure between CE1 and PE1, PE3 cannot quickly perceive it. It needs to rely on PE1 to converge and delete the VPN route and synchronize it to PE3 before PE3 will switch the traffic to PE2. This time is in seconds, which cannot meet the operator's millisecond-level fault convergence requirements. VPN site 2 is similar and will not be repeated here.
[0004] In order to achieve fast convergence in case of failure, it is necessary to build a user route hybrid FRR on PE1, that is, synchronize user routes between PE1 and PE2. In this way, there will be two identical user routes on PE1, one is the main route learned locally from CE1, and the other is the VPN route synchronized from PE2, which is the backup route. These two routes form a hybrid route. When the link between CE1 and PE1 fails, the user traffic received by PE1 from PE3 will be switched to the backup route and forwarded by PE2 through the VPN tunnel.
[0005] In the networking scenario where PE acts as a user gateway, PE will directly forward the user traffic received from the remote PE to the local site to the user, that is, the next hop is the corresponding user host. In this way, an FRR table entry needs to be built for each user. However, the FRR table entry capacity that PE hardware can support is limited. When the user capacity exceeds the maximum FRR capacity supported by PE, millisecond-level convergence will still not be achieved. Summary of the invention
[0006] The embodiments of the present application provide a link failure processing method, device, electronic device and storage medium to solve the problem that when a PE is used as a user gateway in a networking scenario and the user capacity exceeds the FRR maximum capacity of the PE, the PE cannot achieve millisecond-level convergence when a link fails.
[0007] In a first aspect, an embodiment of the present application provides a link failure processing method, where a user network edge device CE is connected to a first operator backbone network edge device PE and a second PE, and the method includes:
[0008] When the first PE uses each host route to forward data to each user equipment connected to the CE, if it is determined that the link between the first PE and the CE fails, the priority of the hybrid route is higher than that of each host route, and a backup route in the hybrid route is enabled, wherein the hybrid route includes a local direct route between the first PE and each user equipment and the backup route;
[0009] According to the rule that the priority of the hybrid route is higher than that of each host route, the received first data is route matched to match the backup route;
[0010] The first data is forwarded based on the alternate route.
[0011] In some embodiments, giving priority to hybrid routes over individual host routes includes:
[0012] Change the route matching rule from longest mask match to shortest mask match;
[0013] According to a rule that the priority of the hybrid route is higher than that of each host route, route matching is performed on the received first data to match the backup route, including:
[0014] According to the shortest mask matching rule, query the routing prefix corresponding to the first data from the first routing prefix table;
[0015] The backup route is found through the route prefix corresponding to the first data.
[0016] In some embodiments, after determining that the link with the CE fails, the method further includes:
[0017] Deleting each user address resolution protocol ARP table entry corresponding to the CE to remove each host route;
[0018] If it is determined that the link failure with the CE is restored, the priority of the hybrid route is lower than that of each host route, and the backup route is abandoned;
[0019] Relearn the user ARP table entry corresponding to the CE and generate each host route;
[0020] According to the rule that the priority of the hybrid route is lower than that of each host route, performing route matching on the received second data;
[0021] The second data is forwarded based on the matched host route.
[0022] In some embodiments, making the priority of the hybrid route lower than that of each host route includes:
[0023] Change the route matching rule from shortest mask matching to longest mask matching;
[0024] According to the rule that the priority of the hybrid route is lower than that of each host route, route matching is performed on the received second data, including:
[0025] According to the longest mask matching rule, query the routing prefix corresponding to the second data from the second routing prefix table;
[0026] The host route corresponding to the second data is found through the routing prefix corresponding to the second data.
[0027] In some embodiments, the user ARP entry is learned by any of the following methods:
[0028] The user statically configures ARP entries on the first PE and the second PE, and the egress is the respective local direct connection port;
[0029] The first PE learns the user ARP entry and synchronizes the user ARP entry to the second PE;
[0030] The second PE learns the user ARP entry and synchronizes the user ARP entry to the first PE;
[0031] The CE identifies the ARP message of each user, and forwards the identified ARP message to the first PE and the second PE, and the first PE and the second PE learn the user ARP table entry respectively.
[0032] In a second aspect, an embodiment of the present application provides a link failure processing device, wherein a user network edge device CE is connected to a first operator backbone network edge device PE and a second PE, and the device is applied to the first PE, including:
[0033] a switching module, configured to, in the process of forwarding data to each user equipment connected to the CE by using each host route, if it is determined that the link with the CE fails, make the priority of the hybrid route higher than that of each host route, and enable the backup route in the hybrid route, wherein the hybrid route includes the local direct route between the first PE and each user equipment and the backup route;
[0034] A matching module, configured to perform route matching on the received first data to match the backup route according to a rule that the priority of the hybrid route is higher than that of each host route;
[0035] A forwarding module is used to forward the first data based on the backup route.
[0036] In some embodiments, the switching module is specifically used to modify the routing matching rule from the longest mask match to the shortest mask match;
[0037] The matching module is specifically configured to query the routing prefix corresponding to the first data from the first routing prefix table according to the shortest mask matching rule; and find the backup route through the routing prefix corresponding to the first data.
[0038] In some embodiments, it also includes:
[0039] A deletion module, used to delete each user address resolution protocol ARP table entry corresponding to the CE after determining that the link with the CE fails, so as to remove each host route;
[0040] The switching module is further configured to make the priority of the hybrid route lower than that of each host route and abandon the backup route if it is determined that the link failure with the CE is recovered;
[0041] A generating module, used for relearning the user ARP table entry corresponding to the CE and generating each host route;
[0042] The matching module is further used to perform route matching on the received second data according to the rule that the priority of the hybrid route is lower than that of each host route;
[0043] The forwarding module is further used to forward the second data based on the matched host route.
[0044] In some embodiments, the switching module is specifically used to modify the routing matching rule from the shortest mask match to the longest mask match;
[0045] The matching module is specifically used to query the routing prefix corresponding to the second data from the second routing prefix table according to the longest mask matching rule; and find the host route corresponding to the second data through the routing prefix corresponding to the second data.
[0046] In some embodiments, the user ARP entry is learned by any of the following methods:
[0047] The user statically configures ARP entries on the first PE and the second PE, and the egress is the respective local direct connection port;
[0048] The first PE learns the user ARP entry and synchronizes the user ARP entry to the second PE;
[0049] The second PE learns the user ARP entry and synchronizes the user ARP entry to the first PE;
[0050] The CE identifies the ARP message of each user, and forwards the identified ARP message to the first PE and the second PE, and the first PE and the second PE learn the user ARP table entry respectively.
[0051] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:
[0052] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute any of the above-mentioned link failure processing methods.
[0053] In a fourth aspect, an embodiment of the present application provides a storage medium. When a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned link failure handling methods.
[0054] In the embodiment of the present application, the CE is dual-homed to the first PE and the second PE. When the first PE uses each host route to forward data to each user device connected to the CE, if it is determined that the link between the first PE and the CE is faulty, the priority of the hybrid route is higher than that of each host route, and fast rerouting is performed to enable the backup route in the hybrid route. After that, according to the rule that the priority of the hybrid route is higher than that of each host route, the received first data is route matched and forwarded, wherein the hybrid route includes the local direct route and the backup route between the first PE and each user device. In this way, only one FRR table entry is occupied, and even if the user capacity exceeds the maximum FRR capacity of the first PE, it can be quickly switched when the link fails. Moreover, after the link fails, the priority of the hybrid route is higher than that of each host route, and it is not necessary to wait until the host route is deleted to quickly switch to the hybrid route. Even if the user capacity is large, millisecond-level convergence can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0056] Figure 1 A typical networking diagram of the MPLS L3 VPN technology provided in the embodiment of the present application;
[0057] Figure 2 A schematic diagram of a network architecture of a link failure processing method provided in an embodiment of the present application;
[0058] Figure 3 A flowchart of a link failure processing method provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of the structure of a link failure processing device provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of the hardware structure of an electronic device for implementing a link failure handling method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to solve the problem that in the networking scenario where PE serves as a user gateway, if the user capacity exceeds the FRR maximum capacity of PE, PE cannot achieve millisecond-level convergence when a link fails, the embodiments of the present application provide a link failure processing method, device, electronic device and storage medium.
[0062] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0063] In order to facilitate the understanding of this application, the technical terms involved in this application are:
[0064] L3VPN is a VPN technology. A common L3VPN implementation is MPLS L3VPN. MPLS L3VPN uses BGP protocol to exchange VPN routes and bound labels between edge devices in the service provider network, and uses MPLS to forward private network messages on the public network tunnel, connecting private networks in different geographical branches to achieve intercommunication between different sites. MPLS L3VPN managed by operators has a flexible and advanced dynamic tunnel mechanism, a reasonable networking structure, and scalable routing control and access control, which greatly reduces the VPN construction and maintenance costs of enterprise customers and has become an important means for operators to provide value-added services.
[0065] User traffic refers to user data or user messages.
[0066] The embodiment of the present application provides a method for fast convergence of dual-homing user-side faults. For gateway (PE) access scenarios (user dual-homing access gateways), the direct route and backup route group hybrid route between the gateway and each user device are used. When the direct exit fails, the priority of the hybrid route is increased, and the hybrid route is switched to the primary and backup routes, so that the user traffic hits the backup route for forwarding, and the user traffic is switched in batches, thereby ensuring that all user traffic can converge within 50ms. In addition, the method is applicable to all gateway access scenarios, and the network side is MPLS L3VPN, Ethernet Virtual Private Network (Ethernet Virtual Private Network, EVPN) or ordinary IP network.
[0067] The solution of the embodiment of the present application is introduced below in conjunction with a specific network structure.
[0068] Figure 2A network architecture diagram of a link failure handling method provided in an embodiment of the present application, wherein CE1 has user 1, user 2, and user N, and the IP addresses of these users are 192.168.1.2, 192.168.1.3, and 192.168.1.n, respectively. CE1 is dual-homed to PE1 and PE2, and the direct connection port (gateway port) of PE1 and PE2 is configured with the same IP address 192.168.1.1 / 24 as a dual gateway, and the network segment route of the direct connection port (hereinafter referred to as the direct connection route, the network segment routes of PE1 and PE2 are the same) is imported into BGP, PE1 / PE2 establishes L3VPN and exchanges the direct connection route through BGP, so that PE1 will have two routes with the same prefix, one is the local direct connection route, and the other is the VPN route synchronized by the remote PE2, and PE2 will also have two routes with the same prefix, one is the local direct connection route, and the other is the VPN route synchronized by the remote PE1. The interface FRR function is enabled on the PE1 / PE2 direct connection port. The local direct connection route and the VPN route synchronized with the remote PE form a hybrid route. The primary path is the local direct connection port (no next hop, so there is actually no routing forwarding capability), and the backup path is the remote PE. At the same time, PE1 and PE2 learn the user ARP table entries corresponding to CE1 and generate routes for each host, with the egress being the local direct connection port.
[0069] Under normal circumstances, user traffic on PE1 is forwarded according to the longest IP mask matching rule and matches a host route. Figure 2 According to the table in the figure, assuming that the user traffic on PE1 hits 192.168.1.3 / 32 according to the IP longest mask matching rule, the user traffic can be sent to user 2 with IP 192.168.1.3.
[0070] When the direct connection port of PE1 fails (i.e. the link between PE1 and CE1 fails), the hybrid route on PE1 switches to the active / standby mode and increases the priority of the hybrid route to be higher than that of each host route. User traffic will hit the hybrid route for forwarding, and then the ARP table entry and host route will gradually converge. Figure 2 According to the table in Figure 1, assuming that the user traffic on PE1 hits 192.168.1.0 / 24 according to the IP shortest mask matching rule, the user traffic can be sent to PE2, and then PE2 continues to forward the user traffic.
[0071] In this way, the host routes that have not been deleted can be directly skipped and the hybrid route can be directly matched. The whole process does not affect user traffic. No matter how many users there are under PE1, only one FRR table entry needs to be switched to ensure that all user traffic is switched, so millisecond-level convergence can be guaranteed.
[0072] When the direct connection port of PE1 recovers from the fault, the hybrid route primary and backup paths are switched back, and the priority of the hybrid route is restored to be lower than the priority of each host route. The direct connection port relearns the user ARP table entry and generates a host route, and returns to the normal traffic forwarding mode, that is, the host route is hit first, and traffic is forwarded according to the hit host route.
[0073] In actual applications, the route lookup function of PE1 is provided by hardware, that is, the route lookup algorithm is fixed inside the device, and other developers cannot change the route lookup rules by changing the route lookup algorithm. Under this premise, in order to improve the priority of hybrid routing, the forwarding plane on PE1 can build two routing prefix tables with the same content, one (Table 1) matches according to the longest mask matching principle, and the other (Table 2) matches according to the shortest mask matching principle. By default, query according to Table 1. After the hybrid routing setting improves the priority, the direct route subnet is queried according to Table 2.
[0074] In addition, CE1 is generally dual-homed to PE1 and PE2 through link aggregation. User traffic is evenly sent to PE1 or PE2, including user ARP packets, which are only forwarded to PE1 or PE2. In other words, only one of PE1 and PE2 can learn the user ARP table entry, while dual-homing forwarding requires that both PE1 and PE2 learn the ARP table. The solution can be:
[0075] Users statically configure ARP entries on both PE1 and PE2, and the egress is the local direct connection port.
[0076] PE1 or PE2 learns the user ARP and synchronizes ARP entries with each other. The synchronization can be done using the Ethernet Virtual Private Network (EVPN) standard protocol or a private protocol.
[0077] CE1 sends ARP packets in both directions: CE1 identifies ARP packets in user traffic, receives user ARP packets, and forwards them to PE1 and PE2 at the same time.
[0078] In specific implementation, the CE dual-homing user-side fault protection method provided above can be performed according to the following steps:
[0079] Step 1: CE1 is dual-homed to PE1 and PE2. The same IP address is configured on PE1 and PE2 as on the direct port of CE1. A direct route is automatically generated on the direct port of each PE in PE1 and PE2. The direct port is assigned to a specified VPN for L3VPN access. The direct route is added to the longest mask matching table (Table 1) and the shortest mask matching table (Table 2) on the forwarding plane.
[0080] In the second step, PE1 and PE2 configure their own direct routes and import them into BGP. They publish direct routes to each other. The direct ports of PE1 and PE2 respectively enable FRR function to form a hybrid route. The main path is the local direct port, and the backup path is another PE.
[0081] Step 3: PE1 and PE2 learn the user ARP table and automatically generate host routes. The host routes on the forwarding plane are added to the longest mask matching table and the shortest mask matching table respectively.
[0082] Among them, the user ARP table can be statically configured or dynamically learned. During dynamic learning, CE1 can copy an ARP message from the user device, send one copy to PE1 and the other copy to PE2, and then PE1 and PE2 can learn the ARP table respectively; PE1 can learn the ARP table based on the ARP message from the user device and synchronize the ARP table to PE2; PE2 can also learn the ARP table based on the ARP message from the user device and synchronize the ARP table to PE1.
[0083] Step 4: When a link failure occurs between CE1 and PE1, PE1 sets hybrid routing for active / standby switching, sets the active path to invalid, sets the standby path to valid, and increases the priority of hybrid routing. When the hybrid routing corresponds to the subnet, the routing table is searched according to the shortest mask matching principle.
[0084] Here, PE1 only sets the priority of the hybrid route corresponding to the directly connected port connected to CE1, and has no effect on other routes.
[0085] Step 5: PE1 receives traffic from users at other sites accessing the local site. It searches the route shortest mask matching table according to the shortest mask matching rule. At this time, it matches the hybrid route. With the hybrid route FRR active-standby switching (the standby path takes effect), the traffic is forwarded to PE2 through L3VPN.
[0086] Step 6: After PE2 receives the traffic, it searches the longest mask match table according to the longest mask match rule. At this time, it matches a host route and forwards the traffic to CE1 through the local direct connection port. CE1 then sends the traffic to the user.
[0087] Step 7. When the link failure between CE1 and PE1 is restored, PE1 sets the hybrid route priority to be restored, making the priority of the hybrid route lower than that of each host route, and sets the hybrid route FRR active / standby switchback, with the active path set to valid and the standby path set to invalid.
[0088] Step 8: PE1 receives traffic from users at other sites accessing the local site. It searches the longest mask match table according to the longest mask match rule and matches a host route. It then forwards the traffic to CE1 through the local direct connection port, and CE1 sends the traffic to the user.
[0089] The solution provided in the embodiment of the present application is illustrated by L3VPN dual-gateway networking. The main principle is to use the hybrid routing of the direct routing group between PE1 and each user device (the backup path is the VPN routing between PE1 and each user device), and to quickly reroute by increasing the priority of the hybrid routing in case of failure. Regardless of the number of users, millisecond-level convergence of user service failures can be achieved, ensuring the high reliability of user services. In addition, the backup path of the direct routing group FRR is not necessarily limited to VPN routing, but can also be various types of routing such as EVPN routing and ordinary IP routing. That is, the solution of the embodiment of the present application is also applicable to scenarios such as EVPN dual-gateway networking and IP network dual-gateway networking.
[0090] The link failure processing proposed in this application is described below with reference to a specific embodiment.
[0091] Figure 3 A flowchart of a link failure processing method provided in an embodiment of the present application, in which a CE accesses a first PE and a second PE, and the method includes the following steps.
[0092] In step 301, when the first PE uses each host route to forward data to each user device connected to the CE, if it is determined that the link between the first PE and the CE fails, the priority of the hybrid route is higher than that of the host routes, and the backup route in the hybrid route is enabled, wherein the hybrid route includes the local direct route between the first PE and each user device and the backup route.
[0093] Generally, after a link failure, the host route will be slowly removed, but removal takes time. By default, the priority of the hybrid route is lower than that of each host route, so the first PE will still match the host route that has not been removed first, and will not directly match the hybrid route. This will inevitably increase the switching time. In order to skip the host route that has not been removed and directly match the hybrid route, in addition to fast rerouting to enable the backup route in the hybrid route when a failure occurs, the priority of the hybrid route is also increased to make the hybrid route higher than that of each host route, so as to achieve rapid convergence to the greatest extent.
[0094] At present, the routing algorithm is provided by hardware, but the hardware does not provide parameters for changing the priority. Therefore, to increase the priority of the hybrid route so that the priority of the hybrid route is higher than that of each host route, it can be indicated on the control plane to change the route matching rule from the longest mask match to the shortest mask match. In addition, although the hardware currently does not provide parameters for changing the priority, it is not ruled out that this permission may be opened in the future. Therefore, in some embodiments, to increase the priority of the hybrid route, it can also be to directly set the priority of the route query in the routing algorithm, that is, to directly set the priority of the hybrid route to the highest by setting the parameters.
[0095] In step 302, according to the rule that the priority of the hybrid route is higher than that of each host route, route matching is performed on the received first data to match the backup route.
[0096] That is, on the data plane, according to the rule that the priority of the hybrid route is higher than that of each host route, the received first data is matched by route. In this way, even if there are host routes that have not been removed, these host routes can be skipped and the hybrid route can be directly matched, so the convergence time after the failure of the first PE can be shortened to within 50 milliseconds.
[0097] In specific implementation, the routing prefix corresponding to the first data may be queried from the first routing prefix table (ie, the above-mentioned Table 2) according to the shortest mask matching rule, and then the backup route may be found through the routing prefix corresponding to the first data.
[0098] In step 303, the first data is forwarded based on the backup route.
[0099] That is, the first data is forwarded to the corresponding user equipment accessing the CE through the backup route.
[0100] In step 304, each user ARP entry corresponding to the CE is deleted to remove each host route.
[0101] In step 305, if it is determined that the link failure with the CE is recovered, the priority of the hybrid route is lower than that of each host route, and the backup route is abandoned.
[0102] In actual applications, after the fault is restored, if the priority of the hybrid route is not lowered on the control plane, the first PE will still match the hybrid route first. This will not trigger the learning of user ARP table entries, generate host routes, and then forward data with the help of host routes. Therefore, the priority of the hybrid route is reduced in time after the fault is restored.
[0103] Similarly, currently, the routing algorithm is provided by hardware, but the hardware does not provide parameters for changing the priority, so lowering the priority of the hybrid route so that the priority of the hybrid route is lower than that of each host route can be done by instructing the control plane to modify the route matching rule from the shortest mask match to the longest mask match. In addition, although the hardware currently does not provide parameters for changing the priority, it is not ruled out that this permission may be opened in the future, so in some embodiments, lowering the priority of the hybrid route can also be done by directly setting the priority of the route query in the routing algorithm, that is, directly setting the priority of the hybrid route to the lowest by setting parameters.
[0104] In step 306, the user ARP table entry corresponding to the CE is relearned to generate each host route.
[0105] For example, learn user ARP entries in any of the following ways:
[0106] The user statically configures ARP entries on the first PE and the second PE, and the egress is the local direct connection port of each.
[0107] The first PE learns the user ARP table entry and synchronizes the user ARP table entry to the second PE;
[0108] The second PE learns the user ARP table entry and synchronizes the user ARP table entry to the first PE;
[0109] The CE identifies the ARP message of each user, and forwards the identified ARP message to the first PE and the second PE, and the first PE and the second PE learn the user ARP table entry respectively.
[0110] In step 307, route matching is performed on the received second data according to the rule that the priority of the hybrid route is lower than that of each host route.
[0111] In specific implementation, the route prefix corresponding to the second data can be queried from the second route prefix table (ie, Table 1 above) according to the longest mask matching rule, and then the host route corresponding to the second data is found through the route prefix corresponding to the second data.
[0112] In other words, two routing prefix tables are pre-built, and different routing matching rules correspond to different routing prefix tables. When the link is normal, the longest mask matching rule is used by default, and prefix matching is performed in Table 1, and then traffic is forwarded based on the matching result. When the link fails, the matching rule is changed to the shortest mask matching rule, and prefix matching is performed in Table 2, and then traffic is forwarded based on the matching result. Under the premise that the existing hardware of the first PE does not support the modification of the routing calculation method, the adjustment of routing priority is realized.
[0113] In step 308, the second data is forwarded based on the matched host route.
[0114] That is, the second data is forwarded to the corresponding user equipment accessing the CE through the host routing.
[0115] In the embodiment of the present application, only one FRR table entry is occupied. Even if the user capacity exceeds the maximum FRR capacity of the first PE, the link can be quickly switched when a link fails. Moreover, after the link fails, the priority of the hybrid route is higher than that of each host route. It is not necessary to wait until the host route is deleted and the hybrid route can be quickly switched to. Therefore, even if the user capacity is large, millisecond-level convergence can be achieved.
[0116] Based on the same technical concept, an embodiment of the present application also provides a link fault processing device. The principle of solving the problem by the link fault processing device is similar to that of the above-mentioned link fault processing method. Therefore, the implementation of the link fault processing device can refer to the implementation of the link fault processing method, and the repeated parts will not be repeated.
[0117] Figure 4 A schematic diagram of the structure of a link fault processing device provided in an embodiment of the present application includes a switching module 401, a matching module 402, and a forwarding module 403.
[0118] The switching module 401 is used for, in the process of forwarding data to each user equipment connected to the CE by using each host route, if it is determined that the link between the CE and the CE fails, making the priority of the hybrid route higher than that of each host route, and enabling the backup route in the hybrid route, wherein the hybrid route includes the local direct route between the first PE and each user equipment and the backup route;
[0119] A matching module 402, configured to perform route matching on the received first data to match the backup route according to the rule that the priority of the hybrid route is higher than that of each host route;
[0120] The forwarding module 403 is configured to forward the first data based on the backup route.
[0121] In some embodiments, the switching module 401 is specifically used to modify the route matching rule from the longest mask match to the shortest mask match;
[0122] The matching module 402 is specifically configured to query the routing prefix corresponding to the first data from the first routing prefix table according to the shortest mask matching rule; and find the backup route through the routing prefix corresponding to the first data.
[0123] In some embodiments, it also includes:
[0124] A deleting module 404, configured to delete each user address resolution protocol ARP table entry corresponding to the CE after determining that the link with the CE fails, so as to remove each host route;
[0125] The switching module 401 is further configured to make the priority of the hybrid route lower than that of each host route and abandon the backup route if it is determined that the link failure with the CE is recovered;
[0126] A generating module 405, configured to relearn the user ARP table entry corresponding to the CE and generate each host route;
[0127] The matching module 402 is further configured to perform route matching on the received second data according to a rule that the priority of the hybrid route is lower than that of each host route;
[0128] The forwarding module 403 is further configured to forward the second data based on the matched host route.
[0129] In some embodiments, the switching module 401 is specifically used to modify the route matching rule from the shortest mask match to the longest mask match;
[0130] The matching module 402 is specifically configured to query the routing prefix corresponding to the second data from the second routing prefix table according to the longest mask matching rule; and find the host route corresponding to the second data through the routing prefix corresponding to the second data.
[0131] In some embodiments, the user ARP entry is learned by any of the following methods:
[0132] The user statically configures ARP entries on the first PE and the second PE, and the egress is the respective local direct connection port;
[0133] The first PE learns the user ARP entry and synchronizes the user ARP entry to the second PE;
[0134] The second PE learns the user ARP entry and synchronizes the user ARP entry to the first PE;
[0135] The CE identifies the ARP message of each user, and forwards the identified ARP message to the first PE and the second PE, and the first PE and the second PE learn the user ARP table entry respectively.
[0136] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated in a processor, or may exist physically separately, or two or more modules may be integrated in one module. The coupling between the modules may be achieved through some interfaces, which are usually electrical communication interfaces, but it is not excluded that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0137] After introducing the link failure processing method and device according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0138] Refer to the following Figure 5 The electronic device 130 implemented according to this embodiment of the present application is described. Figure 5 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0139] like Figure 5 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).
[0140] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
[0141] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .
[0142] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0143] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0144] In an exemplary embodiment, a storage medium is also provided, and when a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can perform the above-mentioned link failure processing method. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0145] In an exemplary embodiment, the electronic device of the present application may include at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor may execute the steps of any link failure handling method provided in the embodiments of the present application.
[0146] In an exemplary embodiment, a computer program product is also provided. When the computer program product is executed by an electronic device, the electronic device can implement any exemplary method provided in the present application.
[0147] Furthermore, the computer program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0148] The program product for link fault processing in the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
[0149] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0150] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0151] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network such as a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0152] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0153] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0154] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0155] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0158] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0159] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also includes these modifications and variations.
Claims
1. A link failure processing method, characterized in that: The user network edge device CE accesses the first operator backbone network edge device PE and the second PE, and the method includes: When the first PE uses each host route to forward data to each user equipment connected to the CE, if it is determined that the link between the first PE and the CE fails, the priority of the hybrid route is higher than that of each host route, and a backup route in the hybrid route is enabled, wherein the hybrid route includes a local direct route between the first PE and each user equipment and the backup route; According to the rule that the priority of the hybrid route is higher than that of each host route, route matching is performed on the received first data to match the backup route; The first data is forwarded based on the alternate route.
2. The method according to claim 1, characterized in that Make the hybrid route take precedence over individual host routes, including: Change the route matching rule from longest mask match to shortest mask match; According to a rule that the priority of the hybrid route is higher than that of each host route, route matching is performed on the received first data to match the backup route, including: According to the shortest mask matching rule, query the routing prefix corresponding to the first data from the first routing prefix table; The backup route is found through the route prefix corresponding to the first data.
3. The method according to claim 1 or 2, characterized in that After determining that the link with the CE fails, the method further includes: Deleting each user address resolution protocol ARP table entry corresponding to the CE to remove each host route; If it is determined that the link failure with the CE is recovered, the priority of the hybrid route is lower than that of each host route, and the backup route is abandoned; Relearn the user ARP table entry corresponding to the CE and generate each host route; According to the rule that the priority of the hybrid route is lower than that of each host route, performing route matching on the received second data; The second data is forwarded based on the matched host route.
4. The method according to claim 3, characterized in that The priority of the hybrid route is made lower than that of each host route, including: Change the route matching rule from shortest mask matching to longest mask matching; According to the rule that the priority of the hybrid route is lower than that of each host route, route matching is performed on the received second data, including: According to the longest mask matching rule, query the routing prefix corresponding to the second data from the second routing prefix table; The host route corresponding to the second data is found through the routing prefix corresponding to the second data.
5. The method according to claim 3, characterized in that Learn the user ARP entry in any of the following ways: The user statically configures ARP entries on the first PE and the second PE, and the egress is the respective local direct connection port; The first PE learns the user ARP entry and synchronizes the user ARP entry to the second PE; The second PE learns the user ARP entry and synchronizes the user ARP entry to the first PE; The CE identifies the ARP message of each user, and forwards the identified ARP message to the first PE and the second PE, and the first PE and the second PE learn the user ARP table entry respectively.
6. A link failure processing device, characterized in that: A user network edge device CE is connected to a first operator backbone network edge device PE and a second PE, and the device is applied to the first PE, including: a switching module, configured to, in the process of forwarding data to each user equipment connected to the CE by using each host route, if it is determined that the link with the CE fails, make the priority of the hybrid route higher than that of each host route, and enable the backup route in the hybrid route, wherein the hybrid route includes the local direct route between the first PE and each user equipment and the backup route; A matching module, configured to perform route matching on the received first data to match the backup route according to a rule that the priority of the hybrid route is higher than that of each host route; A forwarding module is used to forward the first data based on the backup route.
7. The device according to claim 6, characterized in that The switching module is specifically used to modify the routing matching rule from the longest mask match to the shortest mask match; The matching module is specifically configured to query the routing prefix corresponding to the first data from the first routing prefix table according to the shortest mask matching rule; and find the backup route through the routing prefix corresponding to the first data.
8. The device according to claim 6 or 7, characterized in that Also includes: A deletion module, used to delete each user address resolution protocol ARP table entry corresponding to the CE after determining that the link with the CE fails, so as to remove each host route; The switching module is further configured to make the priority of the hybrid route lower than that of each host route and abandon the backup route if it is determined that the link failure with the CE is recovered; A generating module, used for relearning the user ARP table entry corresponding to the CE and generating each host route; The matching module is further used to perform route matching on the received second data according to the rule that the priority of the hybrid route is lower than that of each host route; The forwarding module is further used to forward the second data based on the matched host route.
9. The device according to claim 8, characterized in that The switching module is specifically used to modify the routing matching rule from the shortest mask match to the longest mask match; The matching module is specifically used to query the routing prefix corresponding to the second data from the second routing prefix table according to the longest mask matching rule; and find the host route corresponding to the second data through the routing prefix corresponding to the second data.
10. The device according to claim 8, characterized in that Learn the user ARP entry in any of the following ways: The user statically configures ARP entries on the first PE and the second PE, and the egress is the respective local direct connection port; The first PE learns the user ARP entry and synchronizes the user ARP entry to the second PE; The second PE learns the user ARP entry and synchronizes the user ARP entry to the first PE; The CE identifies the ARP message of each user, and forwards the identified ARP message to the first PE and the second PE, and the first PE and the second PE learn the user ARP table entry respectively.
11. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 5.
12. A storage medium, characterized in that: When the computer program in the storage medium is executed by a processor of an electronic device, the electronic device can execute the method according to any one of claims 1 to 5.