Fault processing method and device, electronic equipment and storage medium
By configuring the primary and backup equivalent routing groups in the network device and switching to the backup routing group when the primary routing group is unavailable, the traffic packet loss problem caused by port failure in the layer three network is solved, and network stability is improved.
Patent Information
- Application Number
- CN202411832562.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-12
AI Technical Summary
In a Layer 3 networking, when there is an interconnect port failure or a replacement connection on the switch, the traffic switching to the normal path may lead to packet loss.
By configuring the primary equivalent routing group and the backup equivalent routing group for each destination address in the network device, the available status of the primary equivalent routing group is monitored, and if it is not available, it will turn to the backup equivalent routing group for traffic forwarding.
It effectively avoids traffic packet loss in port failure and improves the service stability and reliability of network equipment.
Smart Images

Figure CN119814650A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a fault handling method, device, electronic device and storage medium. Background Art
[0002] In a typical three-layer network, it consists of multiple Leaf switches connected to servers and multiple Spine switches and Border switches. Leaf switches are fully connected to Spine switches, and Spine switches are fully connected to Border switches. Routes are announced to all devices.
[0003] The switch is configured with some protocols (such as OSPF / OSPFv3, BGP / IPv6 BGP, and IS-IS / IPv6 IS-IS), and the Layer 3 forwarding egress is configured as equal-cost multi-path to evenly distribute traffic to each path.
[0004] When there is a fault in the interconnection port on the switch, or when the connection is replaced, the traffic needs to be switched to the normal path, resulting in packet loss. Summary of the invention
[0005] The present application provides a fault handling method, device, electronic device and storage medium.
[0006] In a first aspect, the present application provides a fault handling method, which is applied to a network device, wherein a primary equal-cost routing group and a backup equal-cost routing group are respectively configured for each destination address on the network device; after receiving first traffic whose destination address is a target address, the network device forwards the first traffic based on each equal-cost route included in the primary equal-cost routing group corresponding to the target address; the method comprises:
[0007] Monitoring the availability status of each equal-cost route included in the primary equal-cost route group corresponding to the target address;
[0008] If it is detected that the target equal-cost route is unavailable, determining that the second traffic needs to be forwarded using the target equal-cost route;
[0009] The second traffic is forwarded using each equal-cost route included in the backup equal-cost route group corresponding to the target address.
[0010] Optionally, the network device is a Leaf device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group respectively configured for each destination address on the Leaf device are the same as the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address;
[0011] If it is detected that the target equal-cost route is unavailable, the step of determining the second traffic to be forwarded using the target equal-cost route includes:
[0012] If it is monitored that the target equal-cost route is unavailable, the second traffic forwarded by hashing to the target equal-cost route is determined after the first hash processing.
[0013] Optionally, the step of forwarding the second traffic using each equal-cost route included in the backup equal-cost route group corresponding to the target address includes:
[0014] A second hash process is performed on the second traffic, and the second traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
[0015] Optionally, based on each available equal-cost route included in the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address forming a logical equal-cost routing group, the method further includes:
[0016] Based on the second hash processing, determine the third flow in the second flow that needs to be forwarded using the target equal-cost route included in the backup equal-cost route group;
[0017] A third hash process is performed on the third traffic, and the third traffic load is shared to each equal-cost route included in the logical equal-cost routing group corresponding to the target address for forwarding.
[0018] Optionally, the network device is a Spine device in a Spine-Leaf network, the equal-cost routes included in the primary equal-cost routing group configured for each destination address on the Spine device are first-priority routes, and the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address are second-priority routes; the method includes:
[0019] If it is detected that the primary equal-cost routing group corresponding to the target address is unavailable, after performing a first hash process on the first traffic, determining to hash the first traffic to the backup equal-cost routing for forwarding;
[0020] A second hash process is performed on the first traffic, and the first traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
[0021] Optionally, the network device monitors the availability status of each directly connected link, and when determining that any link is unavailable, determines that an equivalent-cost route corresponding to the link is unavailable; the method further includes:
[0022] At the software level, recalculate the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address based on the failed link;
[0023] The first traffic is forwarded based on the recalculated primary equal-cost routing group and the backup equal-cost routing group.
[0024] In a second aspect, an embodiment of the present application provides a fault handling device, which is applied to a network device, wherein a primary equivalent-cost routing group and a backup equivalent-cost routing group are respectively configured for each destination address on the network device; after receiving first traffic whose destination address is a target address, the network device forwards the first traffic based on each equivalent-cost route included in the primary equivalent-cost routing group corresponding to the target address; the device comprises:
[0025] A monitoring unit, used to monitor the availability status of each equal-cost route included in the primary equal-cost route group corresponding to the target address;
[0026] A determination unit, wherein if the monitoring unit detects that the target equivalent-cost route is unavailable, the determination unit is used to determine the second traffic to be forwarded using the target equivalent-cost route;
[0027] The forwarding unit is used to forward the second traffic by using each equal-cost route included in the backup equal-cost route group corresponding to the target address.
[0028] Optionally, the network device is a Leaf device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group respectively configured for each destination address on the Leaf device are the same as the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address;
[0029] If the monitoring unit detects that the target equal-cost route is unavailable, the determining unit is specifically configured to determine the second traffic that is hashed to the target equal-cost route for forwarding after the first hashing process.
[0030] Optionally, when the second traffic is forwarded using each equal-cost route included in the backup equal-cost route group corresponding to the target address, the forwarding unit is specifically configured to:
[0031] A second hash process is performed on the second traffic, and the second traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
[0032] Optionally, based on the available equal-cost routes included in the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address forming a logical equal-cost routing group, the device forwarding unit is further used to:
[0033] Based on the second hash processing, determine the third flow in the second flow that needs to be forwarded using the target equal-cost route included in the backup equal-cost route group;
[0034] A third hash process is performed on the third traffic, and the third traffic load is shared to each equal-cost route included in the logical equal-cost routing group corresponding to the target address for forwarding.
[0035] Optionally, the network device is a Spine device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group configured for each destination address on the Spine device are first-priority routes, and the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address are second-priority routes;
[0036] If the monitoring unit detects that the primary equal-cost routing group corresponding to the target address is unavailable, then after performing the first hashing process on the first traffic, the determining unit is used to determine to hash the first traffic to the backup equal-cost routing for forwarding;
[0037] The forwarding unit is used to perform a second hash process on the first traffic, and share the load of the first traffic to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
[0038] Optionally, the network device monitors the availability status of each directly connected link, and when determining that any link is unavailable, determines that an equivalent-cost route corresponding to the link is unavailable; the device further includes a calculation unit:
[0039] The calculation unit is used to recalculate the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address based on the failed link at the software level;
[0040] The forwarding unit is further configured to forward the first traffic based on the recalculated primary equal-cost routing group and the backup equal-cost routing group.
[0041] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0042] A memory for storing program instructions;
[0043] The processor is used to call the program instructions stored in the memory, and execute the steps of the method as described in any one of the first aspects above according to the obtained program instructions.
[0044] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method described in any one of the first aspects above.
[0045] In summary, the fault handling method provided in the embodiment of the present application is applied to a network device, on which a main equivalent-cost routing group and a backup equivalent-cost routing group are respectively configured for each destination address; after receiving the first traffic whose destination address is the target address, the network device forwards the first traffic based on the equivalent-cost routes included in the main equivalent-cost routing group corresponding to the target address; the method includes: monitoring the available status of each equivalent-cost route included in the main equivalent-cost routing group corresponding to the target address; if it is monitored that the target equivalent-cost route is unavailable, determining the second traffic to be forwarded using the target equivalent-cost route; and forwarding the second traffic using each equivalent-cost route included in the backup equivalent-cost routing group corresponding to the target address.
[0046] By adopting the fault handling method provided in the embodiment of the present application, the chip forwarding logic is adjusted to form mutual backup between equal-cost routes of equal priority, or a low-priority equal-cost route group is used as a backup route group for a high-priority equal-cost route group. When the forwarding chip determines that any equal-cost route group has a fault, the faulty equivalent route is directly hashed to the backup equivalent-cost route group for forwarding, thereby avoiding traffic packet loss during the route recalculation process at the software level and improving business stability and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0048] Figure 1 A detailed flowchart of a fault handling method provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of traffic forwarding in a three-layer network provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of a hardware equivalent routing group created on a Leaf provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of an updated hardware equivalent routing group on a Leaf provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of traffic forwarding in another three-layer network provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of a hardware equivalent routing group created on the Spine provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of the updated hardware equivalent routing group on the Spine provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of the structure of a fault handling device provided in an embodiment of the present application;
[0056] Fig. 9 A schematic diagram of the hardware architecture of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0058] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".
[0059] Currently, in the Spine-Leaf network, the traffic forwarded by Server2 to Server1 is evenly distributed to three paths on the Leaf2 device, and then forwarded to Leaf1 through three Spine nodes, and finally to Server1. When the port P21 on Leaf2 that is connected to Spine1 fails or the connection is unplugged, the traffic forwarded from the HASH to this port will be affected. The processing flow in the relevant technology is as follows:
[0060] A port failure is detected; the switching chip is interrupted or sensed by scanning; the driver notifies the platform; after the platform obtains the port DOWN event, it notifies the route and deletes the ADJ, and at the same time notifies the remote end of the route withdrawal; then the route is recalculated and a new VN is created; the driver is notified to switch the table entry to the new VN; the message is forwarded from the remaining two normal paths.
[0061] Furthermore, when the port P12 connecting Spine1 and Leaf2 fails or is unplugged, the traffic forwarded from HASH to this port will be affected. The processing flow in the related technology is as follows:
[0062] A port failure is detected; the switching chip is interrupted or sensed by scanning; the driver notifies the platform; after the platform obtains the port DOWN event, it notifies the route and deletes the ADJ, and at the same time notifies the remote end of the route withdrawal. It is found that the route has no exit, and the DUMMY table entry is issued; then the route is recalculated and a new VN is created; the driver is notified to switch the table entry to the new VN; the message is forwarded from the original four low-priority equal-cost paths.
[0063] However, during the period from the port failure to the software switching the traffic to the normal path, the packets will be discarded all the time. The longer the switching time is, the longer the packet loss will be. The switching time is affected by the CPU, software-level processing flow and the processing performance of the switching chip. The minimum is ten milliseconds. In other words, the existing packet forwarding model and processing flow will result in a large number of packet losses in the case of port failure.
[0064] In the embodiment of the present application, by using the inherent functions of the switching chip and a new processing method, it is possible to achieve ultra-small packet loss of traffic in the event of a port failure or disconnection related to the forwarding path.
[0065] For example, see Figure 1 As shown, it is a detailed flow chart of a fault detection method provided by an embodiment of the present application, the method is applied to a network device, and a main equal-cost routing group and a backup equal-cost routing group are respectively configured for each destination address on the network device; after receiving the first traffic whose destination address is the target address, the network device forwards the first traffic based on each equal-cost route included in the main equal-cost routing group corresponding to the target address; the method comprises the following steps:
[0066] Step 100: Monitor the availability status of each equal-cost route included in the primary equal-cost route group corresponding to the target address.
[0067] In the embodiment of the present application, a three-layer network consisting of multiple Leaf switches connected to servers, multiple Spine switches and Border switches is used as an example for description. Figure 2 As shown, it is a schematic diagram of a three-layer network provided in an embodiment of the present application; Leaf and Spine are fully connected, Spine and Border are fully connected, Leaf1 is connected to Server1, Leaf2 is connected to Server2, Leaf3 is connected to Server3, and Leaf4 is connected to Server4.
[0068] For example, see Figure 2As shown in the figure, taking the traffic from server Server2->Server1 as an example, Server2 sends the traffic to Leaf2. Leaf2 has three paths for the traffic to Server1: forwarding to Leaf1 through Spine1, forwarding to Leaf1 through Spine2, or forwarding to Leaf1 through Spine3. That is, the three equivalent paths are: NH_21 from Leaf1 to Spine1, NH_22 from Leaf1 to Spine2, and NH_23 from Leaf1 to Spine3.
[0069] In an embodiment of the present application, the network device is a Leaf device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group configured for each destination address on the Leaf device are the same as the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address.
[0070] That is to say, if the network device executing the method is a Leaf device (such as Leaf2), then on Leaf2, for the traffic from Server2 to Server1, there are three equal-cost paths (three equal-cost routes). At this time, a hardware equal-cost routing group (Equal-cost multi-path routing, ECMP) can be created on the forwarding chip of Leaf2. For example, see Figure 3 As shown, the created hardware equal-cost routing group may include a primary ECMP (e.g., ECMP_m) and a backup ECMP (e.g., ECMP_s). ECMP_m includes equal-cost routing NH_21 (corresponding to port P21), NH_22 (corresponding to port P22), and NH_23 (corresponding to port P23); ECMP_s also includes equal-cost routing NH_21, NH_22, and NH_23.
[0071] After receiving traffic with the destination address being the IP address of Server1, the forwarding chip of Leaf2 uses the equal-cost routing group corresponding to the IP address of Server1 for hash forwarding. Specifically, the traffic is hashed for the first time to share the traffic load among the three equal-cost paths included in ECMP_m.
[0072] At the same time, the forwarding chip of Leaf2 can also monitor the availability status of each equal-cost path. Specifically, if the forwarding chip of Leaf2 determines that the port status of the port corresponding to each equal-cost path is normal, then the equal-cost path (equal-cost route) is determined to be available, and the corresponding forwarding logic is executed. If the port status corresponding to any equal-cost path is detected to be abnormal (such as port failure, abnormal connection between the port and the opposite end), the equal-cost path (equal-cost route) corresponding to the port is determined to be unavailable, and the corresponding forwarding logic is executed.
[0073] Step 110: If it is detected that the target equal-cost route is unavailable, determine the second traffic to be forwarded using the target equal-cost route.
[0074] Taking the network device executing the method as a Leaf device as an example, if it is detected that the target equal-cost route is unavailable, when determining that the second traffic needs to be forwarded using the target equal-cost route, a preferred implementation method is:
[0075] If it is monitored that the target equal-cost route is unavailable, the second traffic forwarded by hashing to the target equal-cost route is determined after the first hash processing.
[0076] That is to say, assuming that NH_21 is unavailable, at this time, the forwarding chip of Leaf2 performs the first hash processing on the first flow, and hashes the first flow to NH_21, NH_22 and NH_23. At this time, the first flow with hash value NH_21 is the determined second flow.
[0077] Step 120: Forward the second traffic using each equal-cost route included in the backup equal-cost route group corresponding to the target address.
[0078] Taking the network device executing the method as a Leaf device as an example, when each equal-cost route included in the backup equal-cost route group corresponding to the target address is used to forward the second traffic, a preferred implementation method is:
[0079] A second hash process is performed on the second traffic, and the second traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
[0080] That is to say, when the forwarding chip of Leaf2 determines that NH_21 is unavailable, it hashes the determined second traffic to ECMP_s and forwards it through ECMP_s. Specifically, it performs a second hash process on the second traffic and shares the load of the second traffic to NH_21, NH_22 and NH_23 included in ECMP_s for forwarding.
[0081] In actual applications, NH_21 included in ECMP_s is also unavailable. Further, in order to avoid traffic loss, in an embodiment of the present application, each available equivalent-cost route included in the primary equivalent-cost routing group and the backup equivalent-cost routing group corresponding to the target address constitutes a logical equivalent-cost routing group, and the method further includes:
[0082] Based on the second hash processing, determine the third traffic in the second traffic that needs to be forwarded using the target equivalent-cost route included in the backup equivalent-cost routing group; perform a third hash processing on the third traffic, and share the load of the third traffic to the equivalent-cost routes included in the logical equivalent-cost routing group corresponding to the target address for forwarding.
[0083] In actual applications, a logical ECMP is constructed based on the currently available equivalent routes (NH_22 and NH_23) included in ECMP_m and ECMP_s, and the second traffic forwarded by hashing to NH_21 included in ECMP_s is determined as the third traffic, and the third traffic is forwarded using the logical ECMP constructed above. Specifically, the third traffic is hashed for the third time, and the third traffic is load-shared to the equivalent routes included in the logical ECMP for forwarding. Since the equivalent routes included in the logical ECMP are all available equivalent routes, traffic loss is avoided.
[0084] Further, in an embodiment of the present application, the network device monitors the availability status of each directly connected link, and when it is determined that any link is unavailable, determines that the equivalent route corresponding to the link is unavailable; the above fault handling method may also include the following steps:
[0085] At the software level, a primary equal-cost routing group and a backup equal-cost routing group corresponding to the target address are recalculated based on the failed link; and the first traffic is forwarded based on the recalculated primary equal-cost routing group and the backup equal-cost routing group.
[0086] Specifically, the port failure is sensed by the software layer as a forwarding path failure, and the forwarding path is recalculated to finally obtain the remaining NH_22 and NH_23. Figure 4 As shown, NH_22 and NH_23 create new equal-cost routing groups (primary equal-cost routing group (ECMP_m) and backup equal-cost routing group (ECMP_s)). When Leaf2 subsequently forwards traffic from Server2 to Server1, it performs hash forwarding based on the new equal-cost routing group.
[0087] The following is an example of the traffic forwarded from Server1 to Server2. Figure 4 As shown in the figure, the traffic on Leaf1 is evenly distributed among three paths, then forwarded to Leaf2 through three Spine nodes, and finally to Server2.
[0088] In an embodiment of the present application, if the network device is a Spine device in a Spine-Leaf network, the equal-cost routes included in the main equal-cost routing group configured for each destination address on the Spine device are first-priority routes, and the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address are second-priority routes.
[0089] That is, if the network device executing the method is a Spine device (eg, Spine1), then, for example, refer to Figure 5 As shown, on Spine1, for the traffic from Server2 to Server1, there is a high-priority path NH_12 (the path from Spine1 to Leaf2), and four suboptimal paths NH_11 (the path from Spine1 to Leaf1), NH_13 (the path from Spine1 to Leaf3), NH_14 (the path from Spine1 to Leaf4), and NH_1b (the path from Spine1 to Border).
[0090] In the embodiment of the present application, a hardware ECMP is created on the forwarding chip of Spine1. For example, see Figure 6 As shown, the created ECMP includes the main ECMP, namely ECMP_m, and the backup ECMP, namely ECMP_s. ECMP_m includes the high-priority path NH_12, and ECMP_s includes the low-priority paths NH_11, NH_13, NH_14, and NH_1b. Figure 6 The path is indicated by the dashed arrow.
[0091] In an embodiment of the present application, if it is monitored that the main equivalent-cost routing group corresponding to the target address is unavailable, then after performing the first hash processing on the first traffic, it is determined to hash the first traffic to the backup equivalent-cost routing for forwarding; a second hash processing is performed on the first traffic, and the first traffic load is shared to each equivalent-cost routing included in the backup equivalent-cost routing group corresponding to the target address for forwarding.
[0092] That is, when the interconnected port P12 on Spine1 and Leaf2 fails or is unplugged, that is, the P12 port is DOWN, the hardware logic is triggered to re-forward the traffic from HASH to NH_12 through HASH in the normal egress NH_11NH_13NH_14 and NH_1b of ECMP_s, preventing the traffic from being forwarded to the failed path.
[0093] The port failure is sensed by the software layer as a forwarding path failure. Since all currently calculated paths are faulty, the export at the routing layer is DUMMY, but it is not updated to the switch chip, so that the switch chip still uses the original ECMP logic. When the router recalculates the forwarding path, NH_11NH_13NH_14 and NH_1b are finally obtained, and the switch chip is updated to have only the main ECMP and HASH forwarding.
[0094] For example, see Figure 8As shown, it is a structural schematic diagram of a fault handling device provided by an embodiment of the present application, the device is applied to a network device, and a main equal-cost routing group and a backup equal-cost routing group are respectively configured for each destination address on the network device; after receiving the first traffic whose destination address is the target address, the network device forwards the first traffic based on each equal-cost route included in the main equal-cost routing group corresponding to the target address; the device includes:
[0095] A monitoring unit 80, configured to monitor the availability status of each equal-cost route included in the primary equal-cost route group corresponding to the target address;
[0096] The determining unit 81 is used to determine the second traffic to be forwarded using the target equivalent-cost route if the monitoring unit 80 detects that the target equivalent-cost route is unavailable;
[0097] The forwarding unit 82 is configured to forward the second traffic by using each equal-cost route included in the backup equal-cost route group corresponding to the target address.
[0098] Optionally, the network device is a Leaf device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group respectively configured for each destination address on the Leaf device are the same as the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address;
[0099] If the monitoring unit 80 detects that the target equal-cost route is unavailable, the determining unit 81 is specifically configured to determine the second traffic that is hashed to the target equal-cost route for forwarding after the first hashing process.
[0100] Optionally, when the second traffic is forwarded using each equal-cost route included in the backup equal-cost route group corresponding to the target address, the forwarding unit 82 is specifically configured to:
[0101] A second hash process is performed on the second traffic, and the second traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
[0102] Optionally, based on the available equal-cost routes included in the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address forming a logical equal-cost routing group, the device forwarding unit 82 is further used to:
[0103] Based on the second hash processing, determine the third flow in the second flow that needs to be forwarded using the target equal-cost route included in the backup equal-cost route group;
[0104] A third hash process is performed on the third traffic, and the third traffic load is shared to each equal-cost route included in the logical equal-cost routing group corresponding to the target address for forwarding.
[0105] Optionally, the network device is a Spine device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group configured for each destination address on the Spine device are first-priority routes, and the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address are second-priority routes;
[0106] If the monitoring unit 80 detects that the primary equal-cost routing group corresponding to the target address is unavailable, then after performing the first hashing process on the first traffic, the determining unit 81 is used to determine to hash the first traffic to the backup equal-cost routing for forwarding;
[0107] The forwarding unit 82 is used to perform a second hash process on the first traffic, and load-share the first traffic to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
[0108] Optionally, the network device monitors the availability status of each directly connected link, and when determining that any link is unavailable, determines that an equivalent-cost route corresponding to the link is unavailable; the device further includes a calculation unit:
[0109] The calculation unit is used to recalculate the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address based on the failed link at the software level;
[0110] The forwarding unit 82 is further configured to forward the first traffic based on the recalculated primary equal-cost routing group and the backup equal-cost routing group.
[0111] The above units may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a certain unit is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0112] Furthermore, the network device provided in the embodiment of the present application, from the hardware level, the hardware architecture diagram of the network device can be seen in Fig. 9 As shown, the network device may include: a memory 90 and a processor 91,
[0113] The memory 90 is used to store program instructions; the processor 91 calls the program instructions stored in the memory 90 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar and will not be repeated here.
[0114] Optionally, the present application also provides a network device, comprising at least one processing element (or chip) for executing the above method embodiment.
[0115] Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above method embodiments.
[0116] Here, the machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0117] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0118] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0119] 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 embodiments of 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 contain computer-usable program code.
[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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.
[0121] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0122] 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 executing on the computer or other programmable device to implement 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.
[0123] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A fault handling method, characterized in that: Applied to a network device, wherein a primary equal-cost routing group and a backup equal-cost routing group are respectively configured for each destination address on the network device; after receiving first traffic whose destination address is a target address, the network device forwards the first traffic based on each equal-cost route included in the primary equal-cost routing group corresponding to the target address; the method comprises: Monitoring the availability status of each equal-cost route included in the primary equal-cost route group corresponding to the target address; If it is detected that the target equal-cost route is unavailable, determining that the second traffic needs to be forwarded using the target equal-cost route; The second traffic is forwarded using each equal-cost route included in the backup equal-cost route group corresponding to the target address.
2. The method according to claim 1, characterized in that The network device is a Leaf device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group respectively configured for each destination address on the Leaf device are the same as the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address; If it is detected that the target equal-cost route is unavailable, the step of determining the second traffic to be forwarded using the target equal-cost route includes: If it is monitored that the target equal-cost route is unavailable, the second traffic forwarded by hashing to the target equal-cost route is determined after the first hash processing.
3. The method according to claim 2, characterized in that The step of forwarding the second traffic by using each equal-cost route included in the backup equal-cost route group corresponding to the target address includes: A second hash process is performed on the second traffic, and the second traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
4. The method according to claim 3, characterized in that The method further comprises: forming a logical equal-cost routing group based on each available equal-cost routing included in the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address; Based on the second hash processing, determine the third flow in the second flow that needs to be forwarded using the target equal-cost route included in the backup equal-cost route group; A third hash process is performed on the third traffic, and the third traffic load is shared to each equal-cost route included in the logical equal-cost routing group corresponding to the target address for forwarding.
5. The method according to claim 1, characterized in that The network device is a Spine device in a Spine-Leaf network, the equal-cost routes included in the primary equal-cost routing group configured for each destination address on the Spine device are first-priority routes, and the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address are second-priority routes; the method comprises: If it is detected that the primary equal-cost routing group corresponding to the target address is unavailable, after performing a first hash process on the first traffic, determining to hash the first traffic to the backup equal-cost routing for forwarding; A second hash process is performed on the first traffic, and the first traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
6. The method according to any one of claims 1 to 5, characterized in that: The network device monitors the availability status of each directly connected link, and when determining that any link is unavailable, determines that an equivalent-cost route corresponding to the link is unavailable; The method further comprises: At the software level, recalculate the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address based on the failed link; The first traffic is forwarded based on the recalculated primary equal-cost routing group and the backup equal-cost routing group.
7. A fault handling device, characterized in that: Applied to a network device, wherein a primary equal-cost routing group and a backup equal-cost routing group are respectively configured for each destination address on the network device; after receiving first traffic whose destination address is a target address, the network device forwards the first traffic based on each equal-cost route included in the primary equal-cost routing group corresponding to the target address; the device comprises: A monitoring unit, used to monitor the availability status of each equal-cost route included in the primary equal-cost route group corresponding to the target address; A determination unit, wherein if the monitoring unit detects that the target equivalent-cost route is unavailable, the determination unit is used to determine the second traffic to be forwarded using the target equivalent-cost route; The forwarding unit is used to forward the second traffic by using each equal-cost route included in the backup equal-cost route group corresponding to the target address.
8. The device according to claim 7, characterized in that The network device is a Leaf device in a Spine-Leaf network, and the equal-cost routes included in the primary equal-cost routing group respectively configured for each destination address on the Leaf device are the same as the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address; If the monitoring unit detects that the target equal-cost route is unavailable, the determining unit is specifically configured to determine the second traffic that is hashed to the target equal-cost route for forwarding after the first hashing process.
9. The device according to claim 8, characterized in that When the second traffic is forwarded using each equal-cost route included in the backup equal-cost route group corresponding to the target address, the forwarding unit is specifically used to: A second hash process is performed on the second traffic, and the second traffic load is shared to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
10. The device according to claim 9, characterized in that Based on the available equal-cost routes included in the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address, the device forwarding unit is further used to: Based on the second hash processing, determine the third flow in the second flow that needs to be forwarded using the target equal-cost route included in the backup equal-cost route group; A third hash process is performed on the third traffic, and the third traffic load is shared to each equal-cost route included in the logical equal-cost routing group corresponding to the target address for forwarding.
11. The device according to claim 7, characterized in that The network device is a Spine device in a Spine-Leaf network, the equal-cost routes included in the primary equal-cost routing group configured for each destination address on the Spine device are first-priority routes, and the equal-cost routes included in the backup equal-cost routing group corresponding to the destination address are second-priority routes; If the monitoring unit detects that the primary equal-cost routing group corresponding to the target address is unavailable, then after performing the first hashing process on the first traffic, the determining unit is used to determine to hash the first traffic to the backup equal-cost routing for forwarding; The forwarding unit is used to perform a second hash process on the first traffic, and share the load of the first traffic to each equal-cost route included in the backup equal-cost route group corresponding to the target address for forwarding.
12. The device according to any one of claims 7 to 11, characterized in that: The network device monitors the availability status of each directly connected link, and when determining that any link is unavailable, determines that the equivalent route corresponding to the link is unavailable; the device also includes a calculation unit: The calculation unit is used to recalculate the primary equal-cost routing group and the backup equal-cost routing group corresponding to the target address based on the failed link at the software level; The forwarding unit is further configured to forward the first traffic based on the recalculated primary equal-cost routing group and the backup equal-cost routing group.
13. An electronic device, characterized in that: The electronic device comprises: A memory for storing program instructions; The processor is used to call the program instructions stored in the memory, and execute the steps of the method according to any one of claims 1 to 6 according to the obtained program instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Protection switching method, device and system
CN110383766A
Network link fault processing method and tunnel endpoint equipment
CN110417569A
Protection switching method and device and network equipment
CN111130871A
Path switching method and related device
CN112825509A
Data forwarding method and system
CN114070774A