Fast ecmp group switching method and device, forwarding chip and storage medium
Patent Information
- Application Number
- CN202311458150.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-11-02
AI Technical Summary
[0009]转发芯片的常规实现中,等价多路径技术采用专门的ECMP组实现,主备保护技术采用专门的主备用通路和切换机制实现,需要占用较多的转发芯片资源,而在芯片的实现中,转发芯片的片上资源较为紧缺
[0033]上述一个实施例中,采用转发芯片的等价多路径组资源,可实现快速网络多活保护的快速切换以及网络单活保护的快速切换,有效利用转发芯片的硬件资源。
Smart Images

Figure CN117499303B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of networking, and more specifically, to a fast ECMP group switching method, apparatus, forwarding chip, and storage medium. Background Technology
[0002] When multiple paths exist to the same destination, ECMP (Equal Cost Multiple Path) can be used to increase network bandwidth, balance load, and protect each other between paths. When a device supports ECMP, Layer 2 or Layer 3 traffic destined for the destination device can be carried through different paths, achieving load balancing of network links; and enabling rapid network switching when a path member link fails.
[0003] Traffic carried on ECMP groups is evenly distributed across these equal-cost links, regardless of differences in link bandwidth. The ECMP algorithm is supported by various routing protocols, such as OSPF, ISIS, EIGRP, and BGP. In data center network architectures, ECMP is also widely used as a load balancing algorithm for the services it carries.
[0004] like Figure 1 As shown, based on the network's bearer layer, ECMP can be categorized into interface-level ECMP, tunnel-level ECMP, and service-level ECMP. Interface-level ECMP is similar to LAG, with each link spanning multiple devices. Tunnel-level ECMP allows its path member tunnels to be of types such as VxLAN, GRE, MPLS, and SRv6. Service-level ECMP can be further subdivided based on service type, including L2VPN ECMP, L3VPN ECMP, and flexible traffic redirection ECMP.
[0005] To achieve higher reliability, network bearer networks such as Ethernet, MPLS-TP, MPLS, VXLAN, GRE, SR, and SRv6 typically employ various primary and backup protection technologies during service deployment. These technologies can be categorized based on specific use cases, including linear protection, multi-homing protection, and ring network protection. Different network bearer technologies require different primary and backup protection schemes, each corresponding to different draft standards or standards.
[0006] Primary / backup protection technology assigns a dedicated high-priority protection link to each working link. When a working link fails, network resources are switched over in a predictable manner. This makes it easier for network administrators to effectively plan the network and monitor its activity status, achieving a protection switching capability of less than 50ms (sub50ms) for the bearer network. For network applications with high requirements for network communication quality, such as large customer leased lines, dedicated primary / backup protection groups are typically pre-deployed during network commissioning to ensure the SLA quality of network services and achieve carrier-grade operation and high reliability.
[0007] With the rapid development of big data, cloud computing, mobile internet, artificial intelligence, and other applications, the traffic carried by networks is increasing daily, placing higher demands on network reliability. The high reliability of carrier-grade networks is mainly reflected in the fact that after a communication link or network equipment fails, the network system can quickly recover from the fault, with service recovery time meeting the primary and backup protection performance indicators of 50ms or even higher.
[0008] like Figure 2 As shown, a fault-to-connection mechanism is established between Device A and Device C. The primary path is Device A–Device B–Device C, and the backup path is Device A–Device H–Device G–Device F–Device E–Device D–Device C. Both the primary and backup paths are configured with fault detection mechanisms. If the primary path fails, the pre-set backup path can be used to transmit services from Device A to Device C, achieving rapid primary / backup protection.
[0009] In the conventional implementation of forwarding chips, equivalent multipath technology is implemented using a dedicated ECMP group, and primary and backup protection technology is implemented using dedicated primary and backup paths and switching mechanisms, which requires a lot of forwarding chip resources. However, in the implementation of chips, the on-chip resources of forwarding chips are relatively scarce. Summary of the Invention
[0010] In view of this, the purpose of the present invention is to provide a fast ECMP group switching method, apparatus, forwarding chip and storage medium to improve the above-mentioned problems.
[0011] This invention provides a fast ECMP group handover method, comprising:
[0012] For an ECMP group with N+1 path members, when a failure is detected in the j-th path member path_j, the active bit of the path_j entry is cleared; where N is an integer greater than 1, 0 <= j <= N;
[0013] Update the number of active path members in the ECMP group from N+1 to N;
[0014] Swap the path pointer ID pointed to by the path member path_j with the path pointer ID pointed to by path_N.
[0015] Preferably, it further includes:
[0016] The updated number of path members is sent to the path selection module, which then selects path members based on the updated number of path members.
[0017] Preferably, the path pointer module is used to point to a path member of an ECMP group; if the active bit of a path member is set, it means that the path member can be used for ECMP forwarding, otherwise the path member cannot be used for packet forwarding.
[0018] This invention also provides a fast ECMP group handover method, which includes:
[0019] Read an ECMP group with two path members; wherein the two path members of the ECMP group are path_0 and path_1, path_0 is the primary path and path_1 is the backup path, and the active bit of both paths is set;
[0020] When the primary path path_0 fails, the backup path path_1 is selected to carry the load.
[0021] Preferably, the active_path_count of the ECMP group is fixed at 1; when working on the primary path, the first path pointer of the ECMP group points to path_0, and the second path pointer points to path_1.
[0022] Preferably, when the primary path path_0 fails, selecting the backup path path_1 for carrying the load specifically includes:
[0023] When a fault is detected in the primary path_0 according to the fault detection method of the primary path_0, the first path pointer is triggered to point to path_1 and the second path pointer is triggered to point to path_0, so that the services of the ECMP group are always forwarded from the backup path.
[0024] This invention also provides a fast ECMP group switching device, comprising:
[0025] The set-clear unit is used to clear the active bit of the path_j entry when a fault is detected in the j-th path_j of an ECMP group with N+1 path members; where N is an integer greater than 1, and 0 <= j <= N.
[0026] The update unit is used to update the number of path members in the ECMP group from N+1 to N;
[0027] The substitution unit is used to swap the path pointer ID pointed to by the path member path_j with the path pointer ID pointed to by path_N.
[0028] This invention also provides a fast ECMP group switching device, comprising:
[0029] The reading unit is used to read an ECMP group with two path members; wherein the two path members of the ECMP group are path_0 and path_1, path_0 is the primary path and path_1 is the backup path, and the active bit of both paths is set.
[0030] The selection unit is used to select the backup path path_1 to carry the load when the primary path path_0 fails.
[0031] This invention also provides a forwarding chip, which includes a memory and a processor. The memory stores a computer program, which can be pointed to by the processor to implement the fast ECMP group handover method described above.
[0032] This invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the fast ECMP group switching method described above.
[0033] In one of the above embodiments, the equivalent multipath group resources of the forwarding chip are used to achieve fast switching of network multi-active protection and network single-active protection, effectively utilizing the hardware resources of the forwarding chip. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a diagram of the ECMP network hierarchy.
[0036] Figure 2 Network diagram for network protection switching technology.
[0037] Figure 3This is a flowchart illustrating the fast ECMP group switching method provided in the first embodiment of the present invention.
[0038] Figure 4 This is a schematic diagram of the ECMP group's load-bearing capacity.
[0039] Figure 5 This is a schematic diagram illustrating the implementation of multi-active fast switching in an ECMP group according to the first embodiment of the present invention.
[0040] Figure 6 This is a flowchart illustrating the fast ECMP group switching method provided in the second embodiment of the present invention.
[0041] Figure 7 A schematic diagram illustrating single-active protection for the ECMP group.
[0042] Figure 8 This is a schematic diagram illustrating the implementation of fast single-active switching in an ECMP group according to the second embodiment of the present invention.
[0043] Figure 9 This is a schematic diagram of the structure of the fast ECMP group switching device provided in the third embodiment of the present invention.
[0044] Figure 10 This is a schematic diagram of the structure of the fast ECMP group switching device provided in the fourth embodiment of the present invention. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0047] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0048] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0049] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0050] Please see Figure 3 The first embodiment of the present invention provides a fast ECMP group handover method, which is applied to a forwarding chip and includes:
[0051] S101, for an ECMP group with N+1 path members, when a fault is detected in the j-th path member path_j, the active bit of the path_j entry is cleared; where N is an integer greater than 1, and 0 <= j <= N.
[0052] In this embodiment, as Figure 4 As shown, the basic bearer scheme of the ECMP group is that the hash engine calculates the hash_value using the hash_key of the packet, and then obtains the forwarding path select_path for the packet through the operation of the path selection module (path_selection module) corresponding to the ECMP group.
[0053] In this embodiment, a path_pointer is designed in the ECMP group member structure to point to the ECMP group's path_x. Simultaneously, an active status flag is added to the path_x entry of each ECMP member. If the active flag of path_x is set, it indicates that the path can be used for ECMP forwarding; otherwise, the path is not used for packet forwarding.
[0054] S102, update the number of active path members in the ECMP group from N+1 to N.
[0055] Specifically, the updated active path member count (active_path_count) is sent to the path selection module, which then finds the corresponding path_x from the path_pointer array and uses the path corresponding to path_x for packet forwarding.
[0056] S103, swap the path pointer ID pointed to by the path member path_j with the path pointer ID pointed to by path_N.
[0057] like Figure 5As shown, a fast handover scheme for a 4-member (N=3) ECMP group in case of failure is presented. If path_1 fails, the fault detection method of path_1 detects the fault and clears the active bit of path_1; the number of ECMP group members is updated from 4 to 3 for path selection calculation by the path_selection module; at the same time, the path pointer module swaps the path pointer ID pointed to by path member path_1 with the path pointer ID pointed to by path_3. Since the active bit of path_1 is cleared at this time, path_1 is not used for actual packet forwarding, thus completing the fast handover of the ECMP group.
[0058] This embodiment uses an ECMP implementation scheme based on a forwarding chip, which can achieve rapid switching of multi-active network protection and effectively utilize the hardware resources of the forwarding chip.
[0059] Please see Figure 6 The second embodiment of the present invention also provides a fast ECMP group handover method, which is applied to a forwarding chip and includes:
[0060] S201, Read the ECMP group with two path members; wherein, the two path members of the ECMP group are path_0 and path_1, path_0 is the primary path and path_1 is the backup path, and the active bit of both paths is set.
[0061] In this embodiment, the active_path_count of the ECMP group is fixed at 1; when working on the primary path, the first path pointer of the ECMP group points to path_0, and the second path pointer points to path_1, as shown below. Figure 7 As shown.
[0062] S202, when the primary path path_0 fails, the backup path path_1 is selected to carry the load.
[0063] In this embodiment, when a failure is detected in the primary path path_0 according to the fault detection method, the first path pointer is triggered to point to path_1, and the second path pointer is triggered to point to path_0, so that the services of the ECMP group are always forwarded from the backup path, such as... Figure 8 As shown.
[0064] This embodiment uses an ECMP implementation scheme based on a forwarding chip, which can achieve rapid switching of network single-active protection and effectively utilize the hardware resources of the forwarding chip.
[0065] Please see Figure 9 The third embodiment of the present invention also provides a fast ECMP group switching device, which includes:
[0066] The set-clear unit 310 is used to clear the active bit of the path_j entry when a fault is detected in the j-th path_j of an ECMP group with N+1 path members; where N is an integer greater than 1, 0 <= j <= N;
[0067] Update unit 320 is used to update the number of path members in the ECMP group from N+1 to N;
[0068] The substitution unit 330 is used to swap the path pointer ID pointed to by the path member path_j with the path pointer ID pointed to by path_N.
[0069] Please see Figure 10 The fourth embodiment of the present invention also provides a fast ECMP group switching device, which includes:
[0070] The reading unit 410 is used to read an ECMP group with two path members; wherein the two path members of the ECMP group are path_0 and path_1, path_0 is the primary path and path_1 is the backup path, and the active bit of both paths is set.
[0071] Selection unit 420 is used to select backup path path_1 to carry the load when the primary path path_0 fails.
[0072] The fifth embodiment of the present invention also provides a forwarding chip, which includes a memory and a processor. The memory stores a computer program, which can be pointed to by the processor to implement the fast ECMP group handover method as described in any of the above embodiments.
[0073] The sixth embodiment of the present invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, so as to implement the fast ECMP group switching method as described in any of the above embodiments.
[0074] In the several embodiments provided in this invention, it should be understood that the disclosed methods can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0075] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0076] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0077] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A fast ECMP group switching method, characterized in that, include: For an ECMP group with N+1 path members, when a failure is detected in the j-th path member path_j, the active bit of the path_j entry is cleared; where N is an integer greater than 1, 0 <= j <= N; if the active bit of a path member is set, it means that the path member can be used for ECMP forwarding, otherwise the path member cannot be used for packet forwarding. Update the number of active path members in the ECMP group from N+1 to N; Swap the path pointer ID pointed to by the path member path_j with the path pointer ID pointed to by path_N; The updated number of path members is sent to the path selection module, which then selects path members based on the updated number of path members.
2. A fast ECMP group switching device, characterized in that, include: The set / clear unit is used to clear the active bit of the path_j entry when a failure is detected in the j-th path_j of an ECMP group with N+1 path members; where N is an integer greater than 1, 0 <= j <= N; if the active bit of a path member is set, it means that the path member can be used for ECMP forwarding, otherwise the path member cannot be used for packet forwarding. The update unit is used to update the number of active path members in the ECMP group from N+1 to N; The substitution unit is used to swap the path pointer ID pointed to by the path member path_j with the path pointer ID pointed to by path_N. The updated number of path members is sent to the path selection module, which then selects path members based on the updated number of path members.
3. A repeater chip, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be pointed to by the processor to implement the fast ECMP group switching method as described in claim 1.
4. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the fast ECMP group switching method as described in claim 1.
Citation Information
Patent Citations
Network device and method of routing traffic
US20130142034A1
ECMP fast convergence on path failure using objects in a switching circuit
US20210392034A1