Multi-link automatic switching method based on VPP
By using the DPDK plug-in to take over the physical network card and create virtual network tunnels in VPP, combining path tags and real-time link quality monitoring, automatic multi-link switching is achieved, solving the shortcomings of link quality monitoring and fast switching in the existing technology. Improve network stability and data transmission efficiency.
Patent Information
- Application Number
- CN202411572932.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The existing multi-link technology has shortcomings in real-time monitoring and rapid handover of link quality, resulting in the risk of network congestion, delay and data loss, reducing the reliability and data transmission efficiency of the network.
Using VPP-based multi-link automatic switching method, the DPDK plug-in in VPP directly takes over the physical network card, realizes high-performance packet processing, and creates a virtual network tunnel for each communication link, assigns independent path tags, and real-time monitoring chains The quality of the circuit is automatically switched to the optimal link.
It improves the flexibility and efficiency of link handover, realizes more stable network connections and more efficient data transmission, reduces network congestion and delays, and improves the flexibility and manageability of the overall network.
Smart Images

Figure CN119402419A_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, the network topology of enterprises and data centers has become 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 structures, communication links usually rely on a single link or manually configured multi-link strategies, which lack flexibility and dynamic adaptability. This not only increases the risk of network congestion, delays, and data loss, but also reduces the 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 best 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, although the existing multi-link technologies have improved the link utilization and network load balancing capabilities to a certain extent, they still have deficiencies in real-time monitoring of link quality and rapid switching. In view of these problems, the present invention proposes a multi-link automatic switching method based on VPP to improve the flexibility and efficiency of link switching, and achieve more stable network connection 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: Use the DPDK plugin in VPP to directly take over N physical network cards on the routing device, 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 the data forwarding policy according to the access control list (ACL) and path labels, and bind this 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 a combination tunnel 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 allocated 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 controllability of the network.
[0014] Furthermore, 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 unique identifiers of 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 strategy is configured based on ACL rules and path labels. Specifically, the data forwarding strategy uses the ACL index to match the data packet class and determines the corresponding forwarding path in combination with the path label. When the match is successful, the system automatically selects the link according to the data forwarding strategy, thereby ensuring the intelligent scheduling of the data packet during link selection, improving transmission efficiency, and reducing the possibility of network congestion and delay.
[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 for automatic link switching.
[0017] Furthermore, the selection of the optimal link is based on the normalization of link quality performance indicators and weighted scoring based on preset weights. Specifically, after normalizing the link's bandwidth, latency, packet loss rate, and jitter, weights are assigned according to the importance of each indicator, and finally the optimal link is selected for data transmission by calculating the comprehensive score. The link quality scoring rule satisfies the following formula:
[0018]
[0019] Where 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 maxrepresents the maximum link packet loss rate in the current system, J represents 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 the link quality are pre-set with default values according to the importance of indicators such as bandwidth, latency, packet loss rate, jitter, etc. 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 the VPP, thereby bypassing the data processing flow of the traditional operating system kernel; compared with the prior art, 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) The present invention uses VPP to create multiple virtual network tunnels, assigns independent path labels to each tunnel, and formulates data forwarding strategies in combination with ACL rules. Compared with the single link or traditional multi-link load balancing methods in the prior art, the present invention achieves more accurate link selection and traffic scheduling through the combination of flexible path label management and data forwarding strategies, greatly improving the flexibility and scalability of network management.
[0024] (3) The composite tunnel (GRE+IPsec+VXLAN Tunnel) created by the VPP plug-in provides encryption, encapsulation and virtual network extension functions 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 a more flexible network topology management function to adapt to different application scenarios.
[0025] (4) The present invention uses key indicators such as bandwidth, latency, packet loss rate and jitter, combined with normalization and weighted scoring algorithms, to comprehensively evaluate link quality and ensure the selection of the best link for data transmission. Compared with the single indicator evaluation or preset path selection mechanism in traditional technologies, the link quality scoring method of the present invention is more accurate and dynamic, can better adapt to complex and changing network environments, and reduce network congestion and delays. 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 The present invention provides a flow chart of a multi-link automatic switching method based on VPP.
[0028] Figure 2 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 flow chart of multi-link automatic switching provided by the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used 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 it does not support DPDK, 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 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 the 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 improving 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 vppctl command lines. The specific instructions are shown in Table 1 below.
[0039] Table 1
[0040]
[0041] This embodiment successfully realizes the efficient takeover of physical network cards and the management of communication links in the user space by combining VPP and DPDK. By creating independent virtual network tunnels for each link, the separation of services and communication links is achieved, 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, the NTABF link object is used to assign a unique path label to each link and bind it to the link's routing information. During data forwarding, the FIB will search for the DPO (Data Path Object) and match it with the labeled tunnel DPO. If the FIB returns multiple DPOs, the first successfully matched DPO will be selected to ensure the consistency of the policy label.
[0045] In addition, the NTABF link object also saves the tunnel status information (such as online and offline status) and link quality data, including packet loss rate, latency and jitter, which will help to route data packets through path labels later. The vppctl command of the NTABF link object is shown in Table 2 below:
[0046] Table 2
[0047]
[0048] Next, generate a data forwarding policy through the NTABF policy object. The main steps include creating ACL rules and adding data forwarding paths. ACL rules are used to classify data packets, and their IDs will be used as input for API or vppctl commands when creating policies. If a data packet matches an ACL rule, it will become the processing object of the policy.
[0049] Then, the path label saved in the NTABF link object is added to the policy object as needed to form a specific packet forwarding path. The policy DPO is generated by intersecting the DPO found by the FIB with the label DPO in the policy to ensure that the packet is forwarded along the defined path. The vppctl instructions of 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] In this embodiment, the NTABF plug-in in the VPP creates a path label for the virtual network tunnel, generates a data forwarding policy, and binds the service interface. The path label is used to route the data packet to ensure that the data packet is transmitted along the optimal path, thereby improving the reliability and transmission efficiency of the network.
[0056] Example 3
[0057] In this embodiment, the system realizes the functions of real-time monitoring of link quality of virtual network tunnels and automatic switching mechanism through the link_monitor plug-in independently developed in the VPP framework. Figure 4 As shown in the figure, the system will read the parameter configuration related to link quality from the local configuration file when it starts up. These parameters include the normal thresholds and corresponding weights of all link quality indicators. The main indicators of link quality cover performance parameters such as bandwidth, delay, packet loss rate, jitter, etc. These data are collected in real time and used to dynamically evaluate the transmission performance and stability of each tunnel, thus providing a basis for automatic switching of links.
[0058] In addition, the threshold and weight information in the configuration file are flexibly configured according to the actual application scenario. For example, in scenarios with high real-time requirements (such as video conferencing, real-time audio and video transmission, etc.), the system will give priority to the impact of latency and jitter to ensure low latency and high stability. In scenarios with large data transmission, bandwidth may be given a higher weight to ensure efficient transmission of data traffic. Therefore, through the flexible adjustment of these configurations, the system can adapt to different application requirements and implement an efficient and intelligent link automatic switching mechanism. Then monitor its link quality in real time. When the link performance changes, the system will automatically switch to the optimal link according to the current link quality status to ensure that data traffic is always transmitted through the path with the best performance, thereby improving the stability, reliability and transmission efficiency of the network, which is especially important in high concurrency and multi-link scenarios.
[0059] The system uses the link_monitor plug-in in VPP to monitor the link quality of the virtual network tunnel in real time. The fping tool is used to collect key performance indicators such as the online status, packet loss rate, latency, and jitter of the link. fping can quickly and accurately detect the health of the link and obtain these performance data through periodic ICMP requests to ensure the real-time and stability of the network. In addition, the bandwidth monitoring adopts the packet pair method. By sending two adjacent detection data packets, the packet pair technology can effectively evaluate the available bandwidth of the link. This method has high accuracy and is particularly suitable for scenarios where network resources are dynamically adjusted. Combining these two monitoring methods, the system can fully obtain various performance data of the link, and accurately evaluate and adjust the transmission efficiency of the tunnel based on these data, realize automatic switching and optimization of the link, and ensure the efficiency and stability of the virtual network tunnel 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 there are performance indicators that exceed 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, we assign weights to each indicator based on its importance, and finally select the best link for data transmission by calculating the comprehensive score. The link quality scoring rule satisfies the following formula:
[0062]
[0063] Where 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 represents the maximum link packet loss rate in the current system, J represents 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 quality score of each link at the current moment, the system automatically selects the link with the highest score as the optimal path. Subsequently, the system quickly switches the data packet to the optimal link based on the pre-configured path label information, thereby ensuring that data transmission is carried out under the best conditions. This switching process can not only respond to changes in network status in real time and ensure efficient traffic distribution, but also minimize delays and data loss during the switching process, ensuring the stability and continuity of the application. Through this dynamic link selection and switching mechanism, the system can effectively improve the overall performance of the network, especially in complex and changing network environments, significantly enhancing the reliability and adaptability of data transmission.
[0065] In summary, this embodiment uses the DPDK plug-in in VPP to achieve high-performance data packet processing for the physical network card, combines virtual network tunnels and path labels, ensures efficient data transmission and flexible network topology management, and realizes automatic switching to the optimal link using path labels by real-time monitoring of link quality. This embodiment can effectively improve transmission efficiency and the overall reliability of the network, thereby meeting the requirements 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 principle of the present invention should be included in the protection scope 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; S02: Connect 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 the data forwarding policy according to the access control list ACL and path labels, and bind this policy to the corresponding service interface; 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 label to direct the data traffic to this optimal link.
2. The VPP-based multi-link automatic switching method according to claim 1, characterized in that: In the step S01, 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.
3. 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 the VPP plugin, including a combined tunnel of GRE (Generic Routing Encapsulation), IPsec (Internet Protocol Security), and VXLAN (Virtual eXtensible Local Area Network) protocols, which are used to provide functions such as encryption, encapsulation, and virtual network extension for data transmission.
4. 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 in the corresponding routing table to ensure independent routing management of each link.
5. 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.
6. 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, thus ensuring intelligent scheduling during link selection, improving transmission efficiency, and reducing the possibility of network congestion and latency.
7. 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.
8. 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 the normalization of the link quality performance indicators, and weighted scoring is performed in combination with preset weights. After the bandwidth, delay, packet loss rate and jitter indicators of the link are normalized, weights are allocated according to the importance of each indicator, and finally the optimal link is selected for data transmission by calculating the comprehensive score. The link quality scoring rule satisfies the following formula: Where 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 represents the maximum link packet loss rate in the current system, J represents 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.
9. The VPP-based multi-link automatic switching method according to claim 7, characterized in that: The weights of various performance indicators of the link quality information are pre-set with default values according to the importance of bandwidth, delay, 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
Realization method for virtual Ethernet card and device
CN109450651A
Intelligent routing switching method and device and electronic equipment
CN109831328A
SSLVPN implementation method based on DPDK and VPP
CN114095251A
Cited By
Gateway data processing system and method based on artificial intelligence
CN121098785A