A multi-link automatic switching method based on VPP
Through the DPDK plug-in and path tag technology in VPP, the physical network card is directly taken over and the virtual network tunnel is created, which solves the problem of insufficient link quality monitoring and handover in the existing technology, and realizes efficient and flexible network management and data transmission, improving the reliability and adaptability of the network.
Patent Information
- Application Number
- CN202411572932.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The existing multi-link technology has shortcomings in real-time monitoring and fast handover of link quality, resulting in reduced network congestion, delay and reliability, and cannot meet the flexibility and efficient management needs of modern network communications.
Directly take over the physical network card through the DPDK plug-in in VPP, create virtual network tunnels and assign path tags, implement data forwarding strategies in combination with ACL rules, and monitor link quality in real time to automatically switch to the optimal link, bypass the operating system kernel processing process, and improve packet processing efficiency and link selection flexibility.
It realizes efficient and flexible network topology management and data transmission, reduces network congestion and delay, improves network reliability and transmission efficiency, and adapts to complex and changeable network environments.
Smart Images

Figure CN119402419B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field, and in particular to a multi-link automatic switching method based on VPP. Background Art
[0002] With the rapid development of network technology, enterprise and data center network topologies are becoming increasingly complex. The diversification of communication links and the increase in data traffic have made efficient data transmission and network management particularly important. In traditional network architectures, communication links typically rely on single links or manually configured multi-link strategies, lacking flexibility and dynamic adaptability. This not only increases the risk of network congestion, latency, and data loss, but also reduces overall network reliability and data transmission efficiency.
[0003] In order to solve the above problems, the Chinese invention patent (CN202011285103.9) "A multi-link intelligent scheduling method and device based on VPP router" introduces a technology that monitors link information (such as bandwidth, delay, jitter and packet loss rate) by polling each WAN port and sending heartbeat packets. It can intelligently schedule traffic to multiple export links, thereby alleviating network pressure. However, this method mainly focuses on the load balancing of the link and does not involve real-time monitoring of link quality and automatic switching to the optimal link. Another Chinese invention patent (CN202310619741.7) "Multi-link switching method, switching device, electronic device and storage medium" describes an automatic switching technology based on real-time network signal quality monitoring, but this method needs to operate at the system routing level and interact with the operating system kernel, which may cause delays when switching links, thereby affecting network response speed and efficiency.
[0004] In summary, while existing multi-link technologies have improved link utilization and network load balancing capabilities to a certain extent, they still lack real-time monitoring of link quality and rapid switching. To address these issues, this paper proposes a multi-link automatic switching method based on VPP to improve the flexibility and efficiency of link switching, achieving more stable network connections and more efficient data transmission. Summary of the Invention
[0005] The object of the present invention is to provide a multi-link automatic switching method based on VPP. By directly taking over physical network cards using the DPDK plugin in VPP, high-performance packet processing independent of the operating system kernel space is achieved. At the same time, virtual network tunnels are created for multiple access communication links, and independent path labels are assigned to achieve efficient data transmission and flexible network topology management. In addition, the present invention monitors the link quality in real time and quickly switches to the optimal link through path labels to ensure the stability of the data stream and high-quality services. Through these technologies, the present invention can achieve automatic and rapid switching of multiple links, reduce network congestion and latency, improve the flexibility and manageability of the overall network, and meet the diverse needs of modern network communication.
[0006] In order to achieve the above object of the invention, the technical solution adopted by the present invention is specifically as follows: A multi-link automatic switching method based on VPP, comprising the following steps:
[0007] S01: Directly take over N physical network cards on the routing device using the DPDK plugin in VPP, making it independent of the kernel space of the operating system, so as to achieve high-performance packet processing.
[0008] S02: Access M different communication links (M < N), and use VPP to create corresponding virtual network tunnels for each communication link to achieve efficient data transmission and flexible network topology management.
[0009] S03: Assign independent path labels (label) to all virtual network tunnels, and configure data forwarding policies according to the access control list (ACL) and path labels, and bind the policy to the corresponding service interface, thereby improving the flexibility of the network and the accuracy of data forwarding, reducing latency and network congestion.
[0010] S04: Monitor the link quality of all virtual network tunnels in real time, calculate the currently optimal link in the system based on the monitoring results, and perform automatic switching according to the path label to direct the data traffic to the optimal link, thereby improving the reliability and transmission efficiency of the network, and ensuring the stability of the data stream and high-quality services.
[0011] Further, among the N physical network cards, one network card is configured as a service interface for connecting to a service device, and its IP address is configured according to actual service requirements; the remaining N - 1 network cards are configured as communication interconnection interfaces for accessing different communication links, and the IP and gateway of the communication interface are configured according to the corresponding link information, thereby achieving independent optimization of services and links, and improving the flexibility and manageability of the overall network.
[0012] Furthermore, the M virtual network tunnels are composite tunnels created by the VPP plug-in, specifically including combined tunnels of GRE (Generic Routing Encapsulation), IPsec (Internet Protocol Security), and VXLAN (Virtual Extended Local Area Network) protocols, which are used to provide encryption, encapsulation and virtual network extension functions for data transmission to achieve efficient and secure multi-link communication.
[0013] Furthermore, the N-1 communication interconnection interfaces are respectively assigned to different routing tables, and the virtual network tunnel created by each communication interconnection interface is also configured into the corresponding routing table, thereby ensuring independent routing management of each link and flexible and controllable network.
[0014] Furthermore, the path labels are configured based on the routing information of each virtual network tunnel and remain independent of each other. These path labels represent unique identifiers for different virtual network tunnels and are used to accurately match and manage their respective links during data forwarding, thereby achieving flexible and efficient data traffic scheduling and link selection.
[0015] Furthermore, the data forwarding policy is configured based on ACL rules and path labels. Specifically, the data forwarding policy uses the ACL index to match packet classes and, combined with the path label, determines the corresponding forwarding path. When a match is found, the system automatically selects a link based on the data forwarding policy. This ensures intelligent scheduling of data packets during link selection, improves transmission efficiency, and reduces the likelihood of network congestion and latency.
[0016] Furthermore, the link quality information includes key performance indicators such as bandwidth, latency, packet loss rate and jitter of the virtual network tunnel. This information is used to evaluate the transmission efficiency and stability of each tunnel in real time, thereby providing an accurate reference basis for automatic link switching.
[0017] Furthermore, the optimal link is selected based on the normalization of link quality performance indicators and a weighted score based on preset weights. Specifically, after normalizing link bandwidth, latency, packet loss rate, and jitter, weights are assigned based on the importance of each indicator. Ultimately, the optimal link for data transmission is selected by calculating the overall score. The link quality scoring rule satisfies the following formula:
[0018]
[0019] Among them, B represents the current link real-time bandwidth, B max represents the maximum link bandwidth in the current system, D represents the real-time delay of the current link, and D max Indicates the maximum link delay in the current system, L indicates the real-time packet loss rate of the current link, and L maxIndicates the maximum link packet loss rate in the current system, J indicates the real-time jitter of the current link, and J max Indicates the maximum link jitter in the current system, W b , W d , W l , W j Represents the weight values of bandwidth, delay, packet loss rate and jitter respectively.
[0020] Furthermore, the weights of various performance indicators of link quality are pre-set with default values based on the importance of indicators such as bandwidth, latency, packet loss rate, and jitter in different application scenarios; at the same time, the system also supports manual adjustment of weights according to actual needs to adapt to specific network environments and business requirements.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] (1) The present invention directly takes over the physical network card through the DPDK plug-in in VPP, thereby bypassing the data processing flow of the traditional operating system kernel. Compared with the existing technology, the present invention greatly improves the processing efficiency of data packets, especially in high-traffic and multi-link environments, and can significantly reduce the delay of data packet processing and improve the overall network throughput.
[0023] (2) This invention uses VPP to create multiple virtual network tunnels, assigns independent path labels to each tunnel, and formulates data forwarding strategies in conjunction with ACL rules. Compared to existing single-link or traditional multi-link load balancing methods, this invention achieves more precise link selection and traffic scheduling by combining flexible path label management with data forwarding strategies, significantly improving the flexibility and scalability of network management.
[0024] (3) The present invention uses a composite tunnel (GRE+IPsec+VXLAN Tunnel) created through the VPP plug-in to provide encryption, encapsulation, and virtual network extension capabilities for data transmission. In the prior art, there is often a trade-off between link security and flexibility. While ensuring link security, the present invention provides more flexible network topology management capabilities to adapt to different application scenarios.
[0025] (4) This invention uses key metrics such as bandwidth, latency, packet loss rate, and jitter, combined with normalization and weighted scoring algorithms, to comprehensively evaluate link quality, ensuring the selection of the optimal link for data transmission. Compared to traditional single-metric evaluation or pre-set path selection mechanisms, the link quality scoring method of this invention is more accurate and dynamic, better adapting to complex and changing network environments and reducing network congestion and latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0027] Figure 1 This is a flow chart of a multi-link automatic switching method based on VPP provided by the present invention.
[0028] Figure 2 This is a schematic diagram of the network card takeover and virtual network tunnel creation provided by the present invention.
[0029] Figure 3 This is a schematic diagram of the NTABF policy routing provided by the present invention.
[0030] Figure 4 This is a flowchart of the multi-link automatic switching provided by the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0032] Example 1
[0033] In this embodiment, if Figure 1 As shown in the figure, first use the DPDK plug-in in VPP to directly take over the N physical network cards on the routing device and separate them from the kernel space of the operating system. The specific steps are as follows:
[0034] (1) Use the system command "lshw-class network-businfo" to obtain the basic information of the network card, including bus information and network card description, and determine whether it supports DPDK based on the network card description. If not, replace the incompatible network card as required.
[0035] (2) Modify the dpdk structure in the startup.conf file of VPP and write the obtained network card information and its corresponding bus information into the specified location of the configuration file.
[0036] (3) Write a startup script to disable the kernel functions of the relevant physical network cards on the device and start the VPP service to take over these network cards to the DPDK user space to prepare for subsequent operations.
[0037] like Figure 2As shown, after completing the above steps, virtual interfaces such as ethvpp0, ethvpp1, ethvpp2, etc. are generated in the user space. Among them, ethvpp0 is used to connect to the service device, and its IP address is configured according to actual service requirements; the remaining N - 1 network cards are configured as communication interconnection interfaces, which are used to access different communication links, and the IP addresses and gateways of the communication interfaces are configured according to the link information. In this way, the independent optimization of services and links is achieved, thereby enhancing the flexibility and manageability of the overall network. In addition, the N - 1 communication interconnection interfaces are respectively assigned to different routing tables, and the virtual network tunnels created by each communication interconnection interface are also configured into the corresponding routing tables to ensure the independent routing management of each link and the flexible controllability of the network.
[0038] After the physical network cards are connected to the user space, manually connect M different communication links (M < N), and use VPP to create corresponding virtual network tunnels for each communication link. This tunnel is a composite tunnel composed of GRE, IPsec, and VXLAN, which is used to provide functions such as encryption, encapsulation, and virtual network extension for data transmission to achieve efficient and secure multi - link communication. The creation of the virtual network tunnel can be completed through API functions or the vppctl command line. The specific instructions are shown in Table 1 below.
[0039] Table 1
[0040]
[0041] In this embodiment, by combining VPP and DPDK, the efficient takeover of physical network cards and the management of communication links in the user space are successfully achieved. By creating independent virtual network tunnels for each link, the separation of services and communication links is realized, making the management and optimization of the network more flexible. At the same time, the tunnel encryption and encapsulation mechanisms ensure the security and stability of data transmission. Overall, this solution significantly improves the performance and scalability of the network and can better meet the requirements of complex and changing network environments.
[0042] Embodiment 2
[0043] In this embodiment, the NTABF plugin in VPP is used to create path labels, generate data forwarding policies, and bind service interfaces for the virtual network tunnels created above. It is an extension based on the ABF plugin in VPP, focusing on the management of multi - link policies and path labels, and is used to optimize the traffic forwarding of tunnels and WAN interfaces.
[0044] As Figure 3As shown in the figure, after the virtual network tunnel is created, a unique path label is assigned to each link using the NTABF link object and bound to the link's routing information. During data forwarding, the FIB searches for the Data Path Object (DPO) and matches it with the labeled tunnel DPO. If the FIB returns multiple DPOs, the first one that successfully matches is selected to ensure policy label consistency.
[0045] In addition, the NTABF link object also stores tunnel status information (such as online and offline status) and link quality data, including packet loss rate, latency, and jitter. This information will help with subsequent packet routing using path labels. The vppctl commands for the NTABF link object are shown in Table 2 below:
[0046] Table 2
[0047]
[0048] Next, a data forwarding policy is generated using the NTABF policy object. This involves creating ACL rules and adding data forwarding paths. ACL rules are used to classify packets, and their IDs are used as input to the API or vppctl command when creating the policy. If a packet matches an ACL rule, it becomes subject to the policy.
[0049] The path labels stored in the NTABF link object are then added to the policy object as needed to form a specific packet forwarding path. The policy DPO is generated by intersecting the DPO found in the FIB with the label DPO in the policy, ensuring that packets are forwarded along the defined path. The vppctl commands for the NTABF policy object are shown in Table 3 below:
[0050] Table 3
[0051]
[0052] Finally, bind the data forwarding policy created above to the service interface through the NTABF attach object to activate it. The vppctl command of the NTABF attach object is shown in Table 4 below:
[0053] Table 4
[0054]
[0055] This embodiment uses the NTABF plug-in in VPP to create path labels for virtual network tunnels, generate data forwarding policies, and bind service interfaces. Path labels are used to route data packets, ensuring that they are transmitted along the optimal path, thereby improving network reliability and transmission efficiency.
[0056] Example 3
[0057] In this embodiment, the system realizes the function of real-time monitoring of link quality of virtual network tunnel and automatic switching mechanism through the link_monitor plug-in independently developed in the VPP framework. Figure 4 As shown in the figure, upon startup, the system reads link quality-related parameters from a local configuration file. These parameters include thresholds and weights for all link quality indicators. Key link quality indicators include bandwidth, latency, packet loss rate, jitter, and other performance parameters. This data is collected in real time and used to dynamically evaluate the transmission performance and stability of each tunnel, providing a basis for automatic link switching.
[0058] Furthermore, the thresholds and weights in the configuration file are flexibly configured based on actual application scenarios. For example, in scenarios with high real-time requirements (such as video conferencing and real-time audio and video transmission), the system prioritizes the impact of latency and jitter to ensure low latency and high stability. In scenarios involving large amounts of data transmission, bandwidth may be given a higher priority to ensure efficient data transmission. Therefore, through flexible adjustment of these configurations, the system can adapt to different application needs and implement an efficient and intelligent automatic link switching mechanism. Link quality is then monitored in real time. When link performance changes, the system automatically switches to the optimal link based on the current link quality status, ensuring that data traffic is always transmitted along the path with the best performance. This improves network stability, reliability, and transmission efficiency, which is particularly important in high-concurrency, multi-link scenarios.
[0059] The system uses the link_monitor plugin in VPP to monitor the link quality of virtual network tunnels in real time. Key performance indicators, such as link status, packet loss rate, latency, and jitter, are collected using the fping tool. fping quickly and accurately detects link health and obtains this performance data through periodic ICMP requests, ensuring real-time network stability. Bandwidth monitoring also uses a packet pair method. By sending two adjacent probe packets, packet pair technology effectively assesses available link bandwidth. This highly accurate method is particularly suitable for scenarios requiring dynamic network resource adjustments. Combining these two monitoring methods enables the system to comprehensively capture link performance data. Based on this data, the system accurately assesses and adjusts tunnel transmission efficiency, enabling automatic link switching and optimization, ensuring efficient and stable virtual network tunnels in various application environments.
[0060] After obtaining the real-time status of link quality, a preliminary evaluation of the link is performed based on the threshold information. If any performance indicator exceeds the threshold, the link is marked as abnormal and does not participate in the score calculation. If all performance indicators are within the threshold range, the link quality performance indicators are normalized and weighted scores are performed based on the preset weights.
[0061] Specifically, after normalizing the link's bandwidth, latency, packet loss rate, and jitter, weights are assigned according to the importance of each indicator. Finally, the optimal link for data transmission is selected by calculating the comprehensive score. The link quality scoring rule satisfies the following formula:
[0062]
[0063] Among them, B represents the current link real-time bandwidth, B max represents the maximum link bandwidth in the current system, D represents the real-time delay of the current link, and D max Indicates the maximum link delay in the current system, L indicates the real-time packet loss rate of the current link, and L max Indicates the maximum link packet loss rate in the current system, J indicates the real-time jitter of the current link, and J max Indicates the maximum link jitter in the current system, W b , W d , W l , W j Represents the weight values of bandwidth, delay, packet loss rate and jitter respectively.
[0064] After calculating the current quality score of each link, the system automatically selects the link with the highest score as the optimal path. Subsequently, based on pre-configured path label information, the system rapidly switches data packets to the optimal link, ensuring optimal data transmission. This switching process not only responds to changes in network status in real time, ensuring efficient traffic distribution, but also minimizes delays and data loss during the switching process, ensuring application stability and continuity. Through this dynamic link selection and switching mechanism, the system can effectively improve overall network performance, significantly enhancing the reliability and adaptability of data transmission, especially in complex and changing network environments.
[0065] In summary, this embodiment leverages the DPDK plug-in in VPP to achieve high-performance packet processing for physical network cards. Combined with virtual network tunnels and path labels, this ensures efficient data transmission and flexible network topology management. Furthermore, by monitoring link quality in real time, it uses path labels to automatically switch to the optimal link. This embodiment effectively improves transmission efficiency and overall network reliability, thus meeting the demands for flexibility, stability, and efficient management in modern network communications.
[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-link automatic switching method based on VPP, characterized in that: It includes the following steps: S01: Use the DPDK plugin in VPP to directly take over N physical network cards on the routing device, making them independent of the kernel space of the operating system to achieve packet processing; In the step S01, among the N physical network cards, one network card is configured as a service interface for connecting to service devices, and its IP address is configured according to actual service requirements; The remaining N - 1 network cards are configured as communication interconnection interfaces for accessing different communication links, and the IP and gateway of the communication interfaces are configured according to the corresponding link information; S02: Access M different communication links (M < N), and use VPP to create corresponding virtual network tunnels for each communication link to achieve efficient data transmission and flexible network topology management; S03: Assign independent path labels label to all virtual network tunnels, and configure data forwarding policies according to the access control list ACL and path labels, and bind the policies to the corresponding service interfaces; S04: Real-time monitor the link quality information of all virtual network tunnels, calculate the currently optimal link in the system based on the monitoring results, and automatically switch according to the path labels to guide the data traffic to the optimal link.
2. The VPP-based multi-link automatic switching method according to claim 1, characterized in that: In the step S02, the M virtual network tunnels are composite tunnels created through VPP plugins, including a combined tunnel of GRE Generic Routing Encapsulation, IPsec Internet Protocol Security, and VXLAN Virtual Extensible LAN Protocol, which is used to provide functions such as encryption, encapsulation, and virtual network extension for data transmission.
3. The VPP-based multi-link automatic switching method according to claim 2, characterized in that: The N - 1 communication interconnection interfaces are respectively assigned to different routing tables, and the virtual network tunnels created by each communication interconnection interface are also configured into the corresponding routing tables to ensure independent routing management of each link.
4. The VPP-based multi-link automatic switching method according to claim 1, characterized in that: In the step S03, the path labels are configured according to the routing information of each virtual network tunnel and remain independent of each other. These path labels represent the unique identifiers of different virtual network tunnels, which are used to accurately match and manage their respective links during the data forwarding process to achieve flexible and efficient data traffic scheduling and link selection.
5. The VPP-based multi-link automatic switching method according to claim 1, characterized in that: In the step S03, the data forwarding policy is configured based on ACL rules and path labels. The data forwarding policy uses the ACL index to match packet classes and combines path labels to determine the corresponding forwarding path. When the match is successful, the system automatically selects a link according to the data forwarding policy, thereby ensuring intelligent scheduling during link selection, improving transmission efficiency, and reducing the possibility of network congestion and latency.
6. The VPP-based multi-link automatic switching method according to claim 1, characterized in that: In the step S04, the link quality information includes key performance indicators such as the bandwidth, delay, packet loss rate, and jitter of the virtual network tunnel. These information are used to evaluate the transmission efficiency and stability of each tunnel in real time, providing an accurate reference basis for automatic link switching.
7. The VPP-based multi-link automatic switching method according to claim 1, characterized in that: In step S04, the selection of the optimal link is based on normalizing the link quality performance indicators and performing weighted scoring in combination with preset weights. After normalizing the link bandwidth, latency, packet loss rate, and jitter indicators, weights are assigned according to the importance of each indicator. Finally, the optimal link for data transmission is selected by calculating the comprehensive score. The link quality scoring rule satisfies the following formula: Among them, B represents the current link real-time bandwidth, B max represents the maximum link bandwidth in the current system, D represents the real-time delay of the current link, and D max Indicates the maximum link delay in the current system, L indicates the real-time packet loss rate of the current link, and L max Indicates the maximum link packet loss rate in the current system, J indicates the real-time jitter of the current link, and J max Indicates the maximum link jitter in the current system, W b , W d , W l , W j Represents the weight values of bandwidth, delay, packet loss rate and jitter respectively.
8. The VPP-based multi-link automatic switching method according to claim 6, characterized in that: The weights of the various performance indicators of the link quality information are pre-set with default values based on the importance of bandwidth, latency, packet loss rate, and jitter indicators in different application scenarios; at the same time, the system also supports manual adjustment of weights according to actual needs to adapt to specific network environments and business requirements.
Citation Information
Patent Citations
Multi-link intelligent scheduling method and device based on VPP router
CN112491702A
Multi-link switching method, switching device, electronic equipment and storage medium
CN116489728A
Network link determination method and device and storage medium
CN118487995A