Multi-WAN port shunting method based on VPP

Through the introduction of global stream meters, diversion strategies, and VRF mechanisms in VPP technology, the problem of lack of Duo WAN port distribution scheme in VPP technology has been solved, and the load balancing and traffic management of the multi -WAN port have been realized. The network is abnormal.

CN119363669AActive Publication Date: 2025-01-24JIANGSU FUTURE NETWORKS INNOVATION
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411580279.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-01-24
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

The existing VPP technology does not provide a multi-WAN port shunt solution, and cannot guarantee that all messages of the same stream will be forwarded by the same WAN port, and the interface type is not distinguished, the processing logic is the same, and it depends on the ACL module and cannot be used alone.

Method used

Through the global stream meter, diversion strategy, and VRF mechanism, the same stream packets are processed on the same WAN interface to achieve the load balancing and traffic management of the multi -WAN port, and preventing the network abnormalities caused by inconsistent flow.

Benefits of technology

It realizes the normal operation of the multi-WAN port distribution function, improves the packet processing performance of the distribution function, ensures that all messages of the same flow are forwarded on the same WAN port, and avoids network abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363669A_ABST
    Figure CN119363669A_ABST
Patent Text Reader

Abstract

The invention relates to a method for realizing multi-WAN (wide area network) port shunting based on VPP (Vector Packet Processing), and aims to improve the processing performance of network traffic. The flow distribution strategy is searched on the first message of the flow, and the flow table is directly searched for the follow-up message, so that the resource consumption is reduced, and the processing speed is increased. The invention designs a method for using different processing logics for different interface types (WAN / LAN ports), and ensures the normal operation of a multi-WAN port shunting function. In addition, a shunting strategy and a shunting function are integrated in one module, dependence on other modules is not needed, and the system structure and the operation process are simplified. Through a global flow table, a shunting strategy and a VRF mechanism, it is ensured that messages of the same flow from an LAN port to a WAN port and from the WAN port to the LAN port are processed on the same WAN port, load balancing and flow management of multiple WAN ports are achieved, and network anomalies caused by inconsistent flow directions are effectively prevented. Compared with the prior art, the method has the remarkable advantages that the message processing performance is improved, the structure is simple, and the operation is stable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a multi-WAN port traffic distribution method based on VPP. Background Art

[0002] A multi-WAN router refers to a router with multiple WAN interfaces. Multiple WAN ports can bring advantages such as bandwidth superposition, line hot standby, and traffic optimization. Currently, routers with multiple WAN ports are widely deployed in home and enterprise network environments. Due to the rich functions, production-level quality, and excellent framework design of VPP, more and more routers developed based on VPP are used in existing network environments (physical networks and virtual networks). However, VPP currently does not provide a multi-WAN port diversion solution. Although the ABF (ACL Based Forwarding) provided by VPP can implement policy routing, it has three defects for the multi-WAN port diversion function: 1. It cannot ensure that all packets of the same flow (bidirectional) are forwarded through the same WAN port; 2. It does not distinguish between interface types (LAN / WAN), and the processing logic of all interfaces is the same; 3. It relies on the ACL module and cannot be used alone. Summary of the invention

[0003] The purpose of the present invention is to realize the multi-WAN port diversion function based on VPP, and only the first message of each flow needs to look up the diversion strategy (subsequent messages can directly look up the flow table), so as to improve the message processing performance of the diversion function. Different processing logics are used for messages received by different types of (WAN / LAN port) interfaces to ensure the normal diversion function of multiple WAN ports, and the diversion strategy and diversion implementation are implemented in one module without relying on other modules.

[0004] The principle of the present invention is: mainly through the global flow table, diversion strategy and VRF mechanism, to ensure that the same flow LAN port to WAN port and WAN port to LAN port direction of the message is processed on the same WAN interface, to achieve multiple WAN port load balancing and traffic management, and to prevent the flow of inconsistent caused by the network abnormality.

[0005] A multi-WAN port traffic distribution method based on VPP specifically comprises the following steps: (1) When the LAN interface receives a message, the following steps are performed: Query the global flow table according to the five-tuple information of the message received by the LAN interface; the five-tuple information of the message includes the source IP address, the destination IP address, the source port number, the destination port number and the protocol number; (1.1) If the flow information corresponding to the above message is queried, the VRFID of the WAN interface in the flow information is obtained, and the VRF ID is marked in the message, and then the LAN port diversion processing flow is ended, and the message is sent to the routing module of the VPP for processing; (1.2) If the flow information corresponding to the above message is not found, query the routing table according to the destination IP address of the message: (1.2.1) If there is no corresponding default route, the LAN port traffic diversion process ends and the message is sent to the VPP routing module for processing; (1.2.2) If there is a corresponding default route, continue to search for the predefined diversion strategy: (1.2.2.1) If there is no diversion strategy, the LAN port diversion process ends and the message is sent to the routing module of the VPP for processing; (1.2.2.2) If there is a diversion policy, the flow information of the message is generated and added to the global flow table. The VRF ID corresponding to the WAN interface in the matching diversion policy is updated to the flow information, and the VRF ID is marked in the message. Then the LAN port diversion processing flow is ended and the message is sent to the routing module of the VPP for processing; (1.3) In the routing module of VPP, the virtual routing table corresponding to the WAN port or the default virtual routing table with VRF 0 will be queried according to the VRF ID in the message to complete the routing and forwarding of the message; (2) When the WAN interface receives a message, the following steps are performed: Query the global flow table based on the five-tuple information of the message received by the WAN interface; 2.1. If the flow information of the above message is found, the WAN port diversion process ends and the message is sent to the routing module of VPP for processing; 2.2. If the flow information of the above message is not found, the flow information of the message is generated, and the VRF ID corresponding to the WAN interface receiving the message is updated to the flow information, and then the WAN port diversion processing process is ended, and the message is sent to the routing module of the VPP for processing; 2.3. In the routing module of VPP, since the VRF ID is not marked in the message, the virtual routing table with VRF ID 0 is queried to complete the routing and forwarding of the message.

[0006] Furthermore, the method also includes initialization, which includes initializing the interface type, initializing the diversion strategy set, initializing and starting the timing detection thread, detecting the connection status and default route of the WAN interface in real time, and updating the diversion strategy and the VRF table of each WAN interface according to the detection result.

[0007] Furthermore, the VRF ID of the WAN interface is recorded in the flow information to ensure that all messages of the same flow are forwarded on the same WAN interface.

[0008] Furthermore, after querying the global flow table, if no flow information is found for the message received by the WAN interface, new flow information is automatically generated, and the WAN interface receiving the message is used as the outbound interface of the flow to ensure that the subsequent flow messages are forwarded from the WAN interface.

[0009] The present invention also provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform the method as described above.

[0010] The present invention also provides an electronic device, comprising one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method as described above.

[0011] Compared with the prior art, the present invention has the following significant advantages: 1. Realize multi-WAN port traffic distribution based on VPP; 2. Implement multi-WAN port traffic diversion based on VPP, and use different processing logic for different types of (WAN / LAN) interfaces to ensure the normal multi-WAN port traffic diversion function; 3. Multi-WAN port traffic diversion is implemented based on VPP, and the diversion strategy and diversion implementation are implemented in one module and do not depend on other modules. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is the initialization process.

[0013] Figure 2 It is to detect the thread execution process.

[0014] Figure 3 This is the process of receiving messages on the LAN port.

[0015] Figure 4 This is the process of processing messages received by the WAN port. DETAILED DESCRIPTION

[0016] The following describes the embodiments of the present invention in detail with reference to the accompanying drawings.

[0017] NAT (Network Address Translation) is a conversion technology that converts private (reserved) IP addresses into public IP addresses. It is widely used in various types of Internet access methods and various types of networks. NAT functions by modifying the IP (and port) in the message according to the specified rules.

[0018] VPP (Vector Packet Processing) is an open source version of Cisco's vector packet processing technology, providing a high-performance packet processing stack that can run on commodity CPUs and provide production-quality switch / router functions.

[0019] ABF (ACL Based Forwarding) is a functional module in VPP that provides the function of forwarding packets based on certain policies. Policy routing is a more flexible routing mechanism than destination routing.

[0020] ‌VRF (Virtual Routing and Forwarding) is a network virtualization technology that allows multiple virtual routing tables to be created on the same physical network device, and each virtual routing table is independent of each other.

[0021] A multi-WAN router refers to a router with multiple WAN interfaces. Multiple WAN ports can bring advantages such as bandwidth superposition, line hot standby, and traffic optimization. Currently, routers with multiple WAN ports are widely deployed in home and enterprise network environments. Due to the rich functions, production-level quality, and excellent framework design of VPP, more and more routers developed based on VPP are used in existing network environments (physical networks and virtual networks). However, VPP currently does not provide a multi-WAN port diversion solution. To achieve the multi-WAN port diversion function, two requirements must be met: 1. All messages of the same flow (bidirectional) must be forwarded through the same WAN port, that is, the forwarding interface of the message is determined by the first packet of a flow, and the subsequent messages of the flow are forwarded according to the forwarding interface of the first packet of the flow; 2. It is necessary to distinguish the type of interface (WAN / LAN) and perform different message processing processes according to the interface type (WAN / LAN port). The messages received by the WAN port do not need to look up the multi-WAN port diversion strategy, but directly look up the device routing table (VRF 0) to complete the message forwarding. The messages received by the LAN port need to look up the multi-WAN port diversion strategy and select a WAN port to complete the message forwarding. Although ABF (ACL Based Forwarding) provided by VPP can implement policy routing functions and forward messages according to certain policies, it cannot meet the two requirements of multi-WAN port traffic diversion, and its work depends on the ACL module.

[0022] This application provides a multi-WAN port diversion method based on VPP. By recording the flow table and marking the VRF ID corresponding to the WAN port on the flow information, it ensures that all messages of the same flow (bidirectional) are forwarded through the same WAN port. Different processing logic is used for different types of (WAN / LAN) interfaces to ensure the normal function of multi-WAN port diversion. The diversion strategy and diversion implementation are implemented in one module and do not depend on other modules. Through this method, the multi-WAN port diversion function can be realized, and only the first message of each flow needs to look up the diversion strategy (subsequent messages can directly look up the flow table), which improves the message processing performance of the diversion function.

[0023] The specific process of the present invention consists of two parts: initialization and message processing.

[0024] Initialization process, first initialize the interface type (WAN / LAN), and create independent VRF tables for all WAN interfaces; then initialize the diversion strategy, which can support multiple types (MAC, five-tuple, application, etc.); finally initialize and start the detection thread. The specific process is as follows Figure 1 shown.

[0025] Among them, the detection thread is mainly used to periodically detect the connection status of the WAN port and the routing table (VRF 0), and to promptly update the diversion strategy and the VRF table corresponding to each WAN port when the connection status and routing table of the WAN port change. First, check whether the connection status of the WAN port has changed. If it has changed, the diversion strategy needs to be updated to ensure that only the diversion strategy of all WAN ports with a connection status of UP takes effect; then check the routing table. If the default route of the WAN port has changed, update the VRF table corresponding to the WAN port in time to ensure that the content in the VRF table is the latest default route of the corresponding WAN port (if the default route of the corresponding WAN port does not exist, the corresponding VRF table is empty); finally, the thread sleeps (wait) for a few seconds and then re-executes the following steps: Figure 2 The detection process shown.

[0026] The message processing flow is divided into two cases: messages received by the LAN port and messages received by the WAN port.

[0027] Case 1 (messages received by the LAN port): First, after the LAN port network card receives the message, it obtains the five-tuple information of the message and uses the five-tuple information of the message as the key to query the global flow table. If the corresponding flow information is found, the VRF ID in the flow information is obtained and the VRFID is marked in the message. Then the LAN port diversion processing flow is ended and the message is sent to the routing module of the VPP for processing.

[0028] Secondly, for the packets for which no flow information is found, the routing table (VRF 0) is queried according to the destination IP of the packet. If the routing table entry exists and is the default route, the next processing flow is executed. Otherwise, the LAN port diversion processing flow is terminated and the packet is sent to the routing module of the VPP for processing. This step is mainly to prevent the multi-WAN port diversion strategy from affecting the forwarding of LAN-to-LAN traffic. Among them, the diversion strategy indicates what kind of rules are used for diversion, for example: selecting the corresponding WAN port for the packet according to the source address, protocol, application type, etc. of the packet.

[0029] The predefined multi-WAN port diversion strategy set is queried again. If the corresponding diversion strategy does not exist, the LAN port diversion processing flow is terminated and the message is sent to the routing module of VPP for processing; if the diversion strategy exists, the flow information of this message is generated, and the flow information is added to the global flow table, and the VRF ID corresponding to the WAN port is updated to the flow information; finally, the VRF ID obtained from the flow information corresponding to the message is marked in the message, the LAN port diversion processing flow is terminated, and the message is sent to the routing module of VPP for processing.

[0030] After the message enters the routing module of VPP, the VRF table of the corresponding WAN port will be queried in the routing module of VPP according to the VRF ID in the message. The VRF table of the corresponding WAN port only contains the default route corresponding to the current WAN port (or the default virtual routing table with VRF 0), ensuring that the message is sent from the corresponding WAN port according to this default route. The specific process is as follows: Figure 3 shown.

[0031] Case 2 (messages received by the WAN port): First, after receiving the message, the WAN port network card obtains the five-tuple information of the message and uses the five-tuple information of the message as the index (key) to query the global flow table. If the corresponding flow information is found, the WAN port diversion process ends and the message is sent to the routing module of the VPP for processing; Then, for the message for which no flow information is found, the flow information of this message is generated and added to the global flow table. At the same time, the VRF ID corresponding to the WAN port that receives the message is updated to the flow information. Then the WAN port diversion processing flow is ended and the message is sent to the routing module of the VPP for processing. This step is mainly to ensure that the outgoing direction (LAN to WAN) message corresponding to the flow to which this message belongs will not search for multiple WAN port diversion strategies, but directly use the receiving interface (WAN port) of the incoming message of this flow as the outgoing interface to prevent the outgoing and incoming messages of this flow from using different WAN ports, resulting in network abnormalities.

[0032] After the message enters the routing module of VPP, since VRFID is not marked in the message, the routing table (VRF 0) will be queried to complete the routing and forwarding of the message. The specific process is as follows: Figure 4 shown.

[0033] Based on the same technical solution, the present invention also discloses a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes the above-mentioned VPP-based multi-WAN port traffic diversion method.

[0034] Based on the same technical solution, the present invention also discloses a computing device, including one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing the above-mentioned VPP-based multi-WAN port traffic diversion method.

[0035] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0036] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce 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.

[0037] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0038] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0039] The above embodiments are only for illustrating the technical idea of ​​the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.

Claims

1. A multi-WAN port traffic distribution method based on VPP, characterized in that: The method comprises the following steps: (1) When the LAN interface receives a message, the following steps are performed: Query the global flow table according to the five-tuple information of the message received by the LAN interface; the five-tuple information of the message includes the source IP address, the destination IP address, the source port number, the destination port number and the protocol number; (1.1) If the flow information corresponding to the above message is queried, the VRF ID of the WAN interface in the flow information is obtained, and the VRF ID is marked in the message, and then the LAN port diversion processing flow is ended, and the message is sent to the routing module of the VPP for processing; (1.2) If the flow information corresponding to the above message is not found, query the routing table according to the destination IP address of the message: (1.2.1) If there is no corresponding default route, the LAN port traffic diversion process ends and the message is sent to the VPP routing module for processing; (1.2.2) If there is a corresponding default route, search for the predefined diversion policy set; (1.2.2.1) If there is no diversion strategy, the LAN port diversion process ends and the message is sent to the routing module of the VPP for processing; (1.2.2.2) If there is a diversion policy, the flow information of the message is generated and added to the global flow table. The VRF ID corresponding to the WAN interface in the matching diversion policy is updated to the flow information, and the VRF ID is marked in the message. Then the LAN port diversion processing flow is ended and the message is sent to the routing module of the VPP for processing; (1.3) In the routing module of VPP, the virtual routing table corresponding to the WAN port is queried according to the VRF ID in the message, or the default virtual routing table with VRF 0, to complete the routing and forwarding of the message; (2) When the WAN interface receives a message, the following steps are performed: Query the global flow table based on the five-tuple information of the message received by the WAN interface; (3.1) If the flow information of the above message is found, the multi-WAN port traffic diversion process ends and the message is sent to the routing module of VPP for processing; (3.2) If the flow information of the above message is not found, the flow information of the message is generated, and the VRF ID corresponding to the WAN interface receiving the message is updated to the flow information, and then the WAN port diversion processing process is ended, and the message is sent to the routing module of the VPP for processing; In the routing module of VPP, the virtual routing table with VRF ID 0 is queried to complete the routing and forwarding of the message.

2. The method according to claim 1, characterized in that The method further includes initialization, and the initialization process includes: Initialize the interface type; Initialize the diversion strategy set; Initialize and start the detection thread.

3. The method according to claim 2, characterized in that The initialization interface types include: Initialize the interface to be a WAN port type or a LAN port type, and create independent VRF tables for all WAN interfaces.

4. The method according to claim 2, characterized in that: Start a periodic detection thread to detect the connection status and default route of the WAN interface in real time, and update the diversion policy set and the VRF table corresponding to each WAN interface based on the detection results.

5. The method according to claim 1, characterized in that The flow information records the VRF ID of the WAN interface, ensuring that all messages of the same flow are forwarded on the same WAN interface.

6. The method according to claim 1, characterized in that After querying the global flow table, if no flow information is found for the message received by the WAN interface, new flow information is automatically generated, and the WAN interface receiving the message is used as the outbound interface of the flow to ensure that the subsequent flow messages are forwarded from this WAN interface.

7. A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, characterized in that: When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 6.

8. An electronic device, characterized in that: The method comprises one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Message forwarding method and gateway

    CN111614565A

  • Multi-link intelligent scheduling method and device based on VPP router

    CN112491702A

  • Data forwarding method and device and storage medium

    CN112511483A

  • Message processing method and device

    CN113079097A

  • Message forwarding method and device, gateway equipment and storage medium

    CN115334045A