Equivalent multipath forwarding method, device and equipment based on flow classification
By assigning unique flow classification encoding to service flows and pointing to NEXTHOP table entries using ACL rules, the problem that traffic cannot be forwarded according to SLA requirements in ECMP is solved, and more efficient network resource utilization and flexible service flow classification are achieved.
Patent Information
- Application Number
- CN202510436896.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-08
AI Technical Summary
When using ECMP, the prior art fails to effectively consider link bandwidth differences, resulting in the inability to flexibly forward traffic according to different service quality requirements, and the ACL resource consumption is too much.
By dividing business flows with the same forwarding behavior into the same stream classification and assigning unique encodings to each stream classification, using ACL rules to match the stream classification encoding to point to specific NEXTHOP table entries, saving ACL rules and achieving more granular stream classification and forwarding.
It realizes flexible service flow classification across VRF, VLAN, L2VPN, and L3VPN, saving ACL rules and hardware table entries, and improving the flexibility and efficiency of network forwarding.
Smart Images

Figure CN120281696A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of networks, and in particular, to an equal-cost multi-path forwarding method, apparatus, and device based on flow classification. Background Art
[0002] There are multiple paths to reach the same destination. Applying ECMP (Equal Cost Multiple Path Routing) can achieve functions such as network bandwidth increase, load balancing, and mutual protection between paths. When a device supports ECMP, the layer-2 or layer-3 traffic sent to the destination device can be carried through different paths to achieve network link load balancing; and when a member link fails, rapid network switching can be achieved.
[0003] Such as Figure 1 shown, the traffic carried on the ECMP group is evenly distributed among these equal-cost links without considering the difference in link bandwidth. The ECMP algorithm is supported by multiple routing protocols, such as OSPF, ISIS, EIGRP, BGP, etc. In the network architecture of a data center, the services it carries also widely use ECMP as a load balancing algorithm.
[0004] As a load balancing strategy, ECMP has been widely applied in actual data center networks due to its simple deployment. An important assumption of ECMP is that the network topology is balanced, regular, and fault-free, which are ideal situations. In practice, different member paths of ECMP have different indicators of network service level agreement (SLA), and specific network services also require forwarding with a specific SLA. At this time, it is necessary to introduce ECMP technology based on flow classification.
[0005] Inside a network service, different traffic classes can coexist, and each traffic class has different requirements for network service quality indicators such as bandwidth, delay, jitter, and packet loss. Through the forwarding technology based on flow classification, data streams with different forwarding classes can be forwarded to network paths with different service level agreement (SLA) levels.
[0006] The forwarding technology based on flow classification is used in conjunction with the equal-cost multi-path (ECMP) technology. Data streams with different forwarding classes can flexibly select different member paths of the ECMP group for forwarding. The forwarding technology based on flow classification gives network users more operation flexibility, and they can select different forwarding paths according to specific service quality requirements to achieve flexible and efficient bearing of network forwarding services. For example, real-time service traffic sensitive to delay can select a path with small delay for forwarding, traffic insensitive to delay can be forwarded through a path with larger delay, and services requiring large bandwidth select a path with large bandwidth for forwarding.
[0007] The category of the traffic flow is usually determined at the entrance of the network service. According to the forwarding technology based on flow classification, it is forwarded to the specific member path of ECMP. The network traffic without explicitly configured traffic flow category is carried by a default forwarding path of ECMP.
[0008] As Figure 3 shown, for the conventional implementation scheme of ECMP based on flow classification, it is necessary to use ACL rules to precisely match the routing table or the FDB table to achieve specific forwarding. The number of ACL resources is positively correlated with the number of the routing table and the FDB table, and a large number of ACL table entries are required. Summary of the Invention
[0009] Aiming at the above problems, the purpose of the embodiments of the present invention is to provide an equal-cost multi-path forwarding method, device and equipment based on flow classification to improve the above problems.
[0010] The embodiments of the present invention provide an equal-cost multi-path forwarding method based on flow classification, which includes the following steps:
[0011] Classify the traffic flows with the same forwarding behavior into the same flow classification, and assign a unique flow classification code to each flow classification;
[0012] During the generation process of the traffic flow, determine the corresponding flow classification code according to the forwarding behavior and quality of service requirements of the traffic flow, and write the flow classification code into the relevant table entries;
[0013] During the forwarding process, read the flow classification code of the traffic flow to be forwarded from the relevant table entries, and redirect the traffic flow with successful matching to a specific NEXTHOP table entry according to the pre-created ACL rules.
[0014] Preferably, the relevant table entries are routing table or FDB table entries.
[0015] Preferably, the flow classification code is stored through a user-defined field in the routing table or the FDB table and directly matched by the ACL rules.
[0016] Preferably, it further includes:
[0017] Add conditions for matching other fields of the packet in the ACL rules to achieve more refined flow classification.
[0018] Preferably, it further includes:
[0019] The traffic not matched by the ACL rules is forwarded through the default forwarding path, and the default forwarding path is the NEXTHOP table default pointed to by the routing table or the FDB table.
[0020] Preferably, the same traffic classification has the same service forwarding behavior and SLA service level; traffic flows with the same routing table or FDB table flow characteristics use the same traffic classification code.
[0021] Preferably, the ACL rule matching traffic classification code points to a specific NEXTHOP entry.
[0022] An embodiment of the present invention also provides an equal-cost multi-path forwarding device based on traffic classification, which includes:
[0023] A classification unit, configured to divide traffic flows with the same forwarding behavior into the same traffic classification, and assign a unique traffic classification code to each traffic classification;
[0024] An encoding determination and writing unit, configured to determine the corresponding traffic classification code according to the forwarding behavior and quality of service requirements of the traffic flow during the generation process of the traffic flow, and write the traffic classification code into the relevant entry;
[0025] A matching unit, configured to read the traffic classification code of the traffic flow to be forwarded from the relevant entry during the forwarding process, and redirect the traffic flow that matches successfully to a specific NEXTHOP entry according to the pre-created ACL rule.
[0026] An embodiment of the present invention also provides an equal-cost multi-path forwarding device based on traffic classification, which includes a memory and a processor, and a computer program is stored in the memory, and the computer program can be executed by the processor to implement the equal-cost multi-path forwarding method based on traffic classification as described above.
[0027] Compared with the prior art, the present invention has at least the following advantages:
[0028] The present invention has higher flexibility, which is reflected in that it can implement specific traffic classification across VRF (Virtual Routing and Forwarding), across VLAN, across L2VPN, and across L3VPN.
[0029] The present invention can save ACL rules, which is reflected in that the matching traffic classification code replaces the matching of the specific routing table or FDB table.
[0030] Compared with Figure 3 the comparison, the present invention can save the hardware entries of the ECMP group, which is reflected in that the entry points to the default NEXTHOP entry, and the traffic that is not matched by the ACL rule is forwarded through the default forwarding path. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] To more clearly illustrate the technical solution of the present invention, the accompanying drawings required for the implementation will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0032] Figure 1 is a schematic diagram of the existing ECMP network architecture.
[0033] Figure 2 is an ECMP network architecture diagram based on flow classification.
[0034] Figure 3 is a diagram of the conventional implementation scheme of ECMP based on flow classification.
[0035] Figure 4 is a schematic flowchart of the equal-cost multi-path forwarding method based on flow classification provided by the first embodiment of the present invention.
[0036] Figure 5 is an implementation architecture diagram of the equal-cost multi-path forwarding method based on flow classification provided by the first embodiment of the present invention.
[0037] Figure 6 is a schematic structural diagram of the equal-cost multi-path forwarding device based on flow classification provided by the second embodiment of the present invention. Specific Embodiments
[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0039] For the convenience of understanding the present invention, the following explains the commonly used technical terms, related standards and protocols that the present invention may involve:
[0040] Common Technical Terms
[0041] ECMP - Equal Cost Multiple Path, equal-cost multi-path
[0042] SLA - Service Level Agreement, that is, the service level agreement, which refers to the agreement signed between the customer and the service provider, stipulating the service level and quality standards that the service provider should provide.
[0043] VRF - Virtual Routing and Forwarding, a virtual routing and forwarding instance. It is an important concept in network technology, used to create multiple logically isolated routing instances on a single physical router. Each VRF can have its own routing table and forwarding policy, thus achieving isolation and independent management of different network traffic.
[0044] L2VPN - Layer 2 Virtual Private Network, a layer 2 virtual private network, used to create a virtual private network in a public network (such as a service provider's network) to achieve point-to-point or point-to-multipoint layer 2 connections. The main goal of L2VPN is to simulate the connection of a local area network (LAN) in a wide area network (WAN), enabling devices in different geographical locations to communicate directly as if they were in the same local area network.
[0045] L3VPN - Layer 3 Virtual Private Network, a layer 3 virtual private network. L3VPN is a network service that provides layer 3 isolation and reachability in a service provider network. L3VPN interconnects multiple groups of hosts and routers based on layer 3 addresses (such as IP addresses), and by establishing a virtual private network on the public network, it allows secure and efficient communication between different sites of customers.
[0046] Related Standards and Protocols
[0047] RFC 2991 - Multipath Issues in Unicast and Multicast Next-Hop Selection
[0048] RFC 2992 - Analysis of an Equal-Cost Multi-Path Algorithm
[0049] RFC 4928 - Avoiding Equal Cost Multipath Treatment in MPLS Networks
[0050] RFC 6438 - Using the IPv6 Flow Label for Equal Cost Multipath Routing and Link Aggregation in Tunnels
[0051] RFC 6754——Protocol Independent Multicast Equal-Cost Multipath(ECMP)Redirect
[0052] RFC 7190——Use of Multipath with MPLS and MPLS Transport Profile(MPLS-TP)
[0053] RFC 7226——Requirements for Advanced Multipath in MPLS Networks
[0054] RFC 7325——MPLS Forwarding Compliance and Performance Requirements
[0055] RFC 7424——Mechanisms for Optimizing Link Aggregation Group(LAG)and Equal-Cost Multipath(ECMP)Component Link Utilization in Networks
[0056] The following will provide a clearer description of the specific implementation manners of the embodiments of the present invention in conjunction with the accompanying drawings.
[0057] Please refer to Figure 4 , the first embodiment of the present invention provides an equal-cost multipath forwarding method based on flow classification, which can be executed by an equal-cost multipath forwarding device based on flow classification (hereinafter referred to as the forwarding device), and particularly, executed by one or more processors in the test device to implement the following method:
[0058] S101, classify traffic flows with the same forwarding behavior into the same flow classification, and assign a unique flow classification code to each flow classification.
[0059] In this embodiment, through flexible service planning, traffic flows with the same forwarding behavior can be classified into the same flow classification. The same flow classification has the same traffic forwarding behavior and SLA service level. And a unique flow classification code is assigned to each flow classification.
[0060] S102, during the generation process of the traffic flow, determine the corresponding flow classification code according to the forwarding behavior and quality of service requirements of the traffic flow, and write the flow classification code into the relevant table entries.
[0061] In this embodiment, according to the forwarding behavior of the service flow and the quality of service requirements, for example, according to the flow characteristics of the routing table or the FDB table, the flow classification code corresponding to the service flow can be determined, and then the flow classification code is written into the relevant table entry.
[0062] Specifically, the relevant table entry is a routing table or an FDB table entry. However, it should be understood that the present invention is applicable to both the source and destination FDB tables and the source and destination routing tables for matching packets, and the present invention will not be elaborated herein.
[0063] In this embodiment, taking the relevant table entry as a routing table or an FDB table entry as an example, the flow classification code can be written into the user-defined field of the routing table or the FDB table entry.
[0064] S103, during the forwarding process, read the flow classification code of the service flow to be forwarded from the relevant table entry, and redirect the service flow that matches successfully to a specific NEXTHOP table entry according to the pre-created ACL rules.
[0065] In this embodiment, the ACL rules are used to match the flow classification code to point to a specific NEXTHOP table entry, so as to realize specific forwarding of the matching service flow.
[0066] During the forwarding process, the forwarding device first reads the flow classification code from the user-defined field of the routing table or the FDB table entry, then determines the NEXTHOP table entry pointed to by the flow classification code according to the matching relationship of the ACL rules, and then forwards the service flow according to the pointed NEXTHOP table entry.
[0067] Specifically, in this embodiment, during the establishment of the service forwarding path, the routing table or the FDB table points to the default NEXTHOP table. Thus, for the service flow that fails to match successfully, its routing table or FDB table points to the default NEXTHOP table. In Figure 5 assuming that nexthop_i is the default NEXTHOP table entry, in this way, the hardware table entries of an ECMP group can be saved.
[0068] Compared with the prior art, the present invention has at least the following advantages:
[0069] The present invention has higher flexibility, which is reflected in that it can implement specific service flow classification across VRF (Virtual Routing and Forwarding), across VLAN, across L2VPN, and across L3VPN.
[0070] The present invention can save ACL rules, which is reflected in that the matching flow classification code replaces the matching of the specific routing table or FDB table.
[0071] Compared with Figure 3In contrast, the present invention can save the hardware entries of the ECMP group, which is reflected in that the entries point to the default NEXTHOP entries, and the services not matched by the ACL rules are all forwarded through the default forwarding path.
[0072] For the convenience of understanding the present invention, some preferred embodiments of the present invention will be further described below.
[0073] In this preferred embodiment, specifically, it further includes:
[0074] Adding conditions for matching other fields of the packet in the ACL rule to achieve more refined flow classification.
[0075] Specifically, if, in addition to the routing table or FDB table, certain fields in the packet are additionally matched during data flow classification, such as matching dscp, dot1p, TCP / UDP src / dst port, etc., then in the corresponding ACL rule, the corresponding matching attributes can be additionally added. The user-defined fields in the routing table and FDB table store the encoding of the flow classification set at this time. The ACL rule matches the flow classification set encoding and other attributes of the packet, and the specific flow classification encoding is served by the ACL entry ID.
[0076] Please refer to Figure 6 , the second embodiment of the present invention further provides an equal-cost multi-path forwarding device based on flow classification, which includes:
[0077] A classification unit 210, configured to divide traffic flows with the same forwarding behavior into the same flow classification and assign a unique flow classification encoding to each flow classification;
[0078] An encoding determination and writing unit 220, configured to determine the corresponding flow classification encoding according to the forwarding behavior and quality of service requirements of the traffic flow during the generation process of the traffic flow, and write the flow classification encoding into the relevant entries;
[0079] A matching unit 230, configured to read the flow classification encoding of the traffic flow to be forwarded from the relevant entries during the forwarding process, and redirect the traffic flow with successful matching to a specific NEXTHOP entry according to the pre-created ACL rule.
[0080] The third embodiment of the present invention further provides an equal-cost multi-path forwarding device based on flow classification, which includes a memory and a processor, and a computer program is stored in the memory, and the computer program can be executed by the processor to implement the equal-cost multi-path forwarding method based on flow classification as described above.
[0081] In several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the 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 that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0082] In addition, in each embodiment of the present invention, the various functional modules may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0083] If the described functions are implemented in the form of 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, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which may be a personal computer, an electronic device, or a 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 such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes. It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or device. Without further limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including the said element.
[0084] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0085] It should be understood that the term "and / or" used herein is merely a description of the relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.
[0086] Depending on the context, the word "if" as used herein can be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detected (stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (stated condition or event)" or "in response to detecting (stated condition or event)".
[0087] The "first / second" mentioned in the embodiments is only to distinguish similar objects and does not represent a specific order for the objects. It can be understood that the "first / second" can be interchanged in a specific order or sequence when permitted. It should be understood that the objects distinguished by "first / second" can be interchanged appropriately so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.
[0088] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. An equivalent multi-path forwarding method based on flow classification, characterized in that Including the following steps: Dividing traffic flows with the same forwarding behavior into the same traffic classification, and assigning a unique traffic classification code to each traffic classification; During the generation process of the traffic flow, determining the corresponding traffic classification code according to the forwarding behavior and quality of service requirements of the traffic flow, and writing the traffic classification code into the relevant entry; During the forwarding process, reading the traffic classification code of the traffic flow to be forwarded from the relevant entry, and redirecting the traffic flow that matches successfully to a specific NEXT HOP entry according to the pre-created ACL rule.
2. The equivalent multi-path forwarding method based on flow classification according to claim 1, characterized in that The relevant entry is a routing table or an FDB entry.
3. The equivalent multi-path forwarding method based on flow classification according to claim 2, characterized in that The traffic classification code is stored through a user-defined field in the routing table or the FDB table and is directly matched by the ACL rule.
4. The equivalent multi-path forwarding method based on flow classification according to claim 2, wherein It also includes: Adding conditions for matching other fields of the packet in the ACL rule to achieve more refined traffic classification.
5. The equivalent multi-path forwarding method based on flow classification according to claim 2, wherein It also includes: The traffic not matched by the ACL rule is forwarded through the default forwarding path, and the default forwarding path is the NEXT HOP table default pointed to by the routing table or the FDB table.
6. The equivalent multi-path forwarding method based on flow classification according to claim 2, characterized in that The same traffic classification has the same traffic forwarding behavior and SLA service level; traffic flows with the same routing table or FDB table traffic characteristics use the same traffic classification code.
7. The equivalent multi-path forwarding method based on flow classification according to claim 1, wherein The ACL rule matches the traffic classification code and points to a specific NEXT HOP entry.
8. An equivalent multi-path forwarding device based on flow classification, characterized in that, Including: A classification unit, configured to divide traffic flows with the same forwarding behavior into the same traffic classification, and assign a unique traffic classification code to each traffic classification; An encoding determination and writing unit, configured to determine the corresponding traffic classification code according to the forwarding behavior and quality of service requirements of the traffic flow during the generation process of the traffic flow, and write the traffic classification code into the relevant entry; A matching unit, configured to read the traffic classification code of the traffic flow to be forwarded from the relevant entry during the forwarding process, and redirect the traffic flow that matches successfully to a specific NEXT HOP entry according to the pre-created ACL rule.
9. An equivalent multi-path forwarding device based on flow classification, characterized in that, Including a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the traffic classification-based equivalent multi-path forwarding method according to any one of claims 1 to 7.