Traffic data packet distribution method, storage medium and device based on BGP active-active architecture

By configuring the SDN controller and hash function in the BGP dual-active architecture, dynamically adjusting the path weight and selecting the path, the loss and out of order of data packets during network switching is solved, and high reliability and high performance network communication is achieved.

CN117118895BActive Publication Date: 2025-08-15CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311104038.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-08-15
Estimated Expiration
2043-08-30

AI Technical Summary

Technical Problem

In the BGP dual-active architecture, network failure or link switching may lead to packet loss or out of order, affecting user experience and network reliability.

Method used

By configuring the SDN controller to monitor network traffic in real time, using Prometheus to collect key information, dynamically adjust path weights, and distribute traffic packets to different paths using hash functions and modulo operations. Combining the path weight and hash value to calculate the weight hash, and preferring paths with smaller weights to send packets.

Benefits of technology

It realizes the balanced distribution and continuity of traffic packets, reduces packet loss and out of order during the switching process, and improves network performance and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117118895B_ABST
    Figure CN117118895B_ABST
Patent Text Reader

Abstract

The present invention discloses a flow data packet distribution method, storage medium and device based on BGP active-active architecture. The flow data packet distribution method comprises: configuring an SDN controller in the BGP active-active architecture to monitor network traffic in real time, collecting key network traffic information through Prometheus, and adjusting the weight of each path according to the traffic resource usage and network status on each path; for flow data packets to be distributed in the BGP active-active architecture, calculating hash values through a hash function according to the source IP addresses of the flow data packets, and clustering flow data packets with equal hash values; performing a modulo operation on the clustered flow data packets to obtain distribution paths of such flow data packets; combining the path weight corresponding to the distribution path with the hash value of the flow data packet to obtain a weight hash of the flow data packet, and the flow data packet with a smaller weight hash is preferentially sent from the corresponding distribution path. The present invention improves network performance and response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data packet distribution, and in particular relates to a flow data packet distribution method, storage medium and device based on BGP active-active architecture. Background Art

[0002] As networks continue to expand and become more interdependent, the failure of a single network link or device can lead to severe data outages and business losses. To address this issue, researchers are exploring multipath forwarding and automatic failover, leading to the development of BGP active-active architecture. In the modern internet environment, network reliability and connectivity are crucial to the normal operation of organizations. BGP (Border Gateway Protocol) active-active architecture is a key solution for achieving high availability and fault tolerance.

[0003] The core concept of BGP active-active architecture technology is to achieve redundant paths and load balancing by connecting multiple autonomous systems (ASs). An AS is a collection of network devices with the same routing policies and administrative domain, such as an enterprise's internal network or an internet service provider's network. By establishing BGP neighbor relationships between multiple ASes, network administrators can exchange routing information through BGP and select the optimal path for each destination. These paths can be adjusted according to predefined policies to achieve load balancing and fault recovery. If the primary path fails, BGP can automatically detect the failure and switch to the backup path, ensuring data continuity and availability.

[0004] BGP active-active architecture technology is suitable for a wide range of scenarios, including large enterprises, financial institutions, and internet service providers. These organizations often have critical business requirements and need to ensure their networks are always available and highly fault-tolerant. By implementing an active-active architecture, they can reduce the impact of single points of failure on the network and improve overall availability and performance.

[0005] However, despite the numerous advantages offered by BGP active-active architecture, there are also some challenges and limitations. During the switchover process, packet loss or out-of-order delivery may occur. When a network failure or link switchover occurs, BGP needs to recalculate the optimal path and notify other routers to make forwarding adjustments, which takes time. This can lead to packet loss or out-of-order delivery during the switchover. For applications that require extremely high data continuity, such as real-time voice or video transmission, this can result in a degraded user experience or service interruption. Summary of the Invention

[0006] In response to the problems existing in the prior art, the present invention provides a traffic data packet distribution method, storage medium and device based on the BGP active-active architecture. The BGP active-active architecture can connect multiple autonomous systems at the same time and achieve load balancing of traffic data packet distribution through multi-path forwarding, ensuring the continuous availability of the forwarding path, thereby achieving highly reliable network communication.

[0007] To achieve the above technical objectives, the present invention adopts the following technical solution: a traffic data packet distribution method based on BGP active-active architecture, specifically comprising the following steps:

[0008] Step 1: Configure an SDN controller in the BGP active-active architecture to monitor network traffic in real time. Use Prometheus to collect key network traffic information and adjust the weight of each path based on traffic resource usage and network conditions.

[0009] Step 2: For traffic data packets to be distributed in the BGP active-active architecture, a hash value is calculated using a hash function based on the source IP address of the traffic data packet, and traffic data packets with equal hash values are clustered;

[0010] Step 3: Perform a modulo operation on the clustered traffic data packets to obtain the distribution path of the traffic data packets of this type;

[0011] Step 4: Combine the path weight corresponding to the distribution path with the hash value of the traffic data packet to obtain the weight hash of the traffic data packet. The traffic data packet with a smaller weight hash is sent preferentially from the corresponding distribution path.

[0012] Furthermore, step 1 includes the following sub-steps:

[0013] Step 101: Initialize the path weight according to the importance of the paths between routes in the BGP active-active architecture: if it is not important, set the path weight to 10%; if it is moderately important, set the path weight to 20%; if it is relatively important, set the path weight to 30%; if it is very important, set the path weight to 40%;

[0014] Step 102: Configure an SDN controller in the BGP active-active architecture to monitor network traffic in real time and collect key network traffic information through Prometheus. If the traffic on a certain path is less than the traffic lower limit, reduce the path weight by 5%; if the traffic on a certain path is greater than the traffic upper limit, increase the path weight by 5%; if the load on a certain path is less than the load lower limit, reduce the path weight by 5%; if the load on a certain path is greater than the load upper limit, increase the path weight by 5%; if there is a performance anomaly on a certain path, reduce the path weight by 5%; if a new path is required based on key business needs, set the new path weight to 35%.

[0015] Furthermore, the process of the modulo operation in step 3 is specifically as follows:

[0016] i=H(SIP)%N

[0017] Where i represents the distribution path of the traffic data packet, H(SIP) represents the hash value of the traffic data packet, and N represents the total number of paths between two routers in the BGP active-active architecture.

[0018] Furthermore, the calculation process of the weighted hash of the traffic data packet in step 4 is:

[0019] L i =W i *H(SIP)

[0020] Among them, W i represents the adjustment weight of the i-th distribution path, H(SIP) represents the hash value of the traffic data packet, L i Represents the weighted hash of the traffic data packet on the i-th distribution path.

[0021] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the traffic data packet distribution method based on the BGP active-active architecture.

[0022] Furthermore, the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the traffic data packet distribution method is implemented.

[0023] Compared with the existing technology, the present invention has the following beneficial effects: the traffic data packet distribution method based on the BGP active-active architecture of the present invention disperses the source IP addresses of the traffic data packets to different paths through a hash function, thereby achieving a balanced distribution of traffic data packets, thereby reducing the packet loss and disorder that may occur during the switching process; by introducing persistent hashing technology, it ensures that the traffic with the same source IP address is always allocated to the same path, thereby ensuring the continuity of the data; even in the event of a link failure or switching, the traffic can be seamlessly switched between different paths, minimizing the interruption perceived by the user. At the same time, the present invention configures an SDN controller to monitor real-time network traffic, dynamically adjust path weights, ensure balanced traffic distribution, and distribute traffic data packets in order based on the size of the traffic data packet weight hash, further improving network performance and response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a flow chart of the traffic data packet distribution method based on the BGP active-active architecture of the present invention. DETAILED DESCRIPTION

[0025] The technical solution of the present invention will be further explained below with reference to the accompanying drawings.

[0026] like Figure 1 The flow chart of the traffic data packet distribution method based on the BGP active-active architecture of the present invention specifically includes the following steps:

[0027] Step 1: Configure an SDN controller in the BGP active-active architecture to monitor network traffic in real time. Prometheus collects critical network traffic information. Eastbound APIs enable SDN controllers to share network status information and coordinate policies to achieve multi-controller collaboration. Path weights are adjusted based on traffic resource usage and network conditions, optimizing traffic distribution along the paths. This includes the following sub-steps:

[0028] Step 101: Initialize the path weight according to the importance of the paths between routes in the BGP active-active architecture: if it is not important, set the path weight to 10%; if it is moderately important, set the path weight to 20%; if it is relatively important, set the path weight to 30%; if it is very important, set the path weight to 40%;

[0029] Step 102: Configure an SDN controller in the BGP active-active architecture to monitor network traffic in real time. Prometheus collects critical network traffic information. If traffic on a path falls below a lower limit, the path weight is reduced by 5%. If traffic on a path exceeds an upper limit, the path weight is increased by 5%. Path weights are dynamically adjusted based on traffic analysis to ensure more balanced traffic across all paths. If the load on a path falls below a lower limit, the path weight is reduced by 5%. If the load on a path exceeds an upper limit, the path weight is increased by 5%. This prevents overloading of any path and improves the overall performance of the BGP active-active architecture. If performance anomalies occur on a path, the path weight is reduced by 5% to reduce traffic load and optimize path performance. If a new path is required based on critical business needs, the new path weight is set to 35% to ensure low latency requirements for critical services are met. This present invention achieves the goal of optimizing path selection strategies by dynamically adjusting path weights based on factors such as traffic analysis, load conditions, link performance, and business needs. These adjustments, to a certain extent, reflect quantitative improvements in path performance and traffic distribution to adapt to network traffic and business needs in SDN scenarios under different circumstances, optimizing the security of data traffic transmission while ensuring performance.

[0030] Step 2: For traffic data packets to be distributed in the BGP active-active architecture, a hash value is calculated using a hash function based on the source IP address of the traffic data packet, and traffic data packets with equal hash values are clustered. Traffic data packets are clustered based on the source IP address of the traffic data packet, thereby achieving fine control and balanced distribution of traffic, which can greatly improve network performance and load balancing capabilities.

[0031] Step 3: The clustered traffic data packets are subjected to a modulo operation to obtain the distribution path of the traffic data packets of this type. In the context of path selection, the modulo operation is used to map the calculated hash value to the range of the path to determine which path should be selected.

[0032] The process of the modulo operation in the present invention is specifically as follows:

[0033] i=H(SIP)%N

[0034] Where i represents the distribution path of the traffic data packet, H(SIP) represents the hash value of the traffic data packet, and N represents the total number of paths between two routers in the BGP active-active architecture.

[0035] Step 4: Combine the path weight corresponding to the distribution path with the hash value of the traffic data packet to obtain the weight hash of the traffic data packet. The traffic data packet with a smaller weight hash is sent preferentially from the corresponding distribution path.

[0036] The calculation process of the weighted hash of the traffic data packet in the present invention is:

[0037] L i =W i *H(SIP)

[0038] Among them, W i represents the adjustment weight of the i-th distribution path, H(SIP) represents the hash value of the traffic data packet, L i Represents the weighted hash of the traffic data packet on the i-th distribution path.

[0039] The traffic data packet distribution method based on the BGP active-active architecture of the present invention distributes traffic data packets in sequence according to the size of the weight hash of the traffic data packets, intelligently distributes traffic according to the real-time network status and load conditions, improves the flexibility, scalability and performance of the network, and realizes dynamic path selection while ensuring balanced load and taking weight into consideration, so that network traffic can be more evenly distributed to different paths, thereby improving the throughput and response speed of the network.

[0040] In a technical solution of the present invention, a computer-readable storage medium is further provided, storing a computer program, wherein the computer program enables a computer to execute the traffic data packet distribution method based on the BGP active-active architecture.

[0041] In another technical solution of the present invention, an electronic device is also provided, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the traffic data packet distribution method is implemented.

[0042] In the embodiments disclosed herein, computer storage media can be tangible media that can contain or store programs for use by or in conjunction with an instruction execution system, device, or apparatus. Computer storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0043] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0044] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions based on the principles of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A method for distributing traffic data packets based on a BGP active-active architecture, characterized in that: The specific steps include: Step 1: Configure an SDN controller in the BGP active-active architecture to monitor network traffic in real time. Use Prometheus to collect key network traffic information and adjust the weight of each path based on traffic resource usage and network conditions. This includes the following sub-steps: Step 101: Initialize the path weight according to the importance of the paths between routes in the BGP active-active architecture: if it is not important, set the path weight to 10%; if it is moderately important, set the path weight to 20%; if it is relatively important, set the path weight to 30%; if it is very important, set the path weight to 40%; Step 102: Configure an SDN controller in the BGP active-active architecture to monitor network traffic in real time. Prometheus is used to collect key network traffic information. If the traffic on a path is less than the lower limit, the weight of the path is reduced by 5%. If the flow on a certain path is greater than the flow upper limit, the weight of the path will be increased by 5%; if the load on a certain path is less than the load lower limit, the weight of the path will be reduced by 5%; If the load on a path exceeds the upper limit, the path weight is increased by 5%. If there is a performance anomaly on a path, the path weight is reduced by 5%. If a new path is required based on critical business needs, the new path weight is set to 35%. Step 2: For traffic data packets to be distributed in the BGP active-active architecture, a hash value is calculated using a hash function based on the source IP address of the traffic data packet, and traffic data packets with equal hash values are clustered; Step 3: Perform a modulo operation on the clustered traffic data packets to obtain the distribution path of the traffic data packets of this type; Step 4: Combine the path weight corresponding to the distribution path with the hash value of the traffic data packet to obtain the weight hash of the traffic data packet. The traffic data packet with a smaller weight hash is preferentially sent from the corresponding distribution path; The calculation process of the weighted hash of the traffic data packet is: L i =W i *H(SIP) Among them, W i represents the adjustment weight of the i-th distribution path, H(SIP) represents the hash value of the traffic data packet, L i Represents the weighted hash of the traffic data packet on the i-th distribution path.

2. A method for distributing traffic data packets based on a BGP active-active architecture according to claim 1, characterized in that: The specific process of the modulo operation in step 3 is: i=H(SIP)%N Where i represents the distribution path of the traffic data packet, H(SIP) represents the hash value of the traffic data packet, and N represents the total number of paths between two routers in the BGP active-active architecture.

3. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables a computer to execute the traffic data packet distribution method based on the BGP active-active architecture as described in any one of claims 1-2.

4. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for distributing traffic data packets according to any one of claims 1 to 2 is implemented.

Citation Information

Patent Citations

  • Method for forwarding messages based on equal cost multi-path routing and network devices

    CN106559324A

  • Network security dynamic route hopping method and system

    CN113992539A