Tunnel selection method, apparatus, network device, and program product
By receiving link detection result messages in the SRv6 network to calculate tunnel bandwidth utilization and selecting new preferred tunnels, the problems of high pressure on the SD-WAN centralized controller and network congestion are solved, and balanced utilization of network bandwidth and service stability are achieved.
Patent Information
- Application Number
- CN202411973280.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In SD-WAN centralized control solutions, the controller faces heavy processing pressure, and the scheduling real-time performance and effectiveness are poor, leading to network congestion risks and affecting service stability.
In an SRv6 network, the bandwidth utilization of each link in the tunnel is calculated by receiving link detection result messages sent by non-head nodes. If the bandwidth utilization exceeds a preset threshold, a new preferred tunnel is selected to achieve balanced utilization of network bandwidth.
It avoids network congestion, improves service stability, and achieves flexible selection of tunnel paths and balanced utilization of bandwidth through distributed traffic scheduling.
Smart Images

Figure CN119835115B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data communication, in particular to a tunnel selection method and device, network equipment and program product. BACKGROUND
[0002] With the development of network technology, the wide area network scenario gradually evolves towards the direction of SD-WAN (Software Defined Wide Area Network) and SRv6 (Segment Routing IPv6). SD-WAN uses SDN (Software Defined Network) principles to manage and optimize the performance of the wide area network. SRv6, as an innovative technology application based on IPv6, has the advantages of high programmability and strong scalability. The combination of SD-WAN and SRv6 can provide enterprises with more flexible and efficient wide area network solutions.
[0003] The centralized control scheme is a typical SD-WAN SRv6 implementation scheme. The controller collects information such as link quality (such as packet loss, delay, jitter) and link bandwidth utilization of the entire network through technologies such as In-situ Flow Information Telemetry (IFIT) and Telemetry, and dynamically adjusts the tunnel path of the business traffic by centralized and unified calculation of the controller. This scheme requires the controller to detect and control all devices in real time, resulting in high dependence of the entire network on the controller, high processing pressure of the controller, and high resource requirements for the controller. Moreover, some network nodes are far away from the controller, and the scheduling real-time performance and effectiveness are poor, which makes the network have a risk of congestion and affects the stability of the business. SUMMARY
[0004] The present application aims to provide a tunnel selection method, device, network equipment and program product, which can balance the utilization of network bandwidth, avoid the risk of network congestion, and improve the stability of the business.
[0005] Embodiments of the present application can be implemented as follows:
[0006] In a first aspect, the present application provides a tunnel selection method applied to a head node in an SRv6 network, the method comprising:
[0007] receiving a link detection result packet sent by the non-head node;
[0008] According to the link detection information in the link detection result packet, bandwidth utilization of each link in the preferred tunnel of the service is calculated, and if the bandwidth utilization of any link in the preferred tunnel is greater than a preset scheduling threshold, a new preferred tunnel is selected from the preset available tunnels.
[0009] In an optional implementation, the link detection information includes interface bandwidth and interface rate, and the step of calculating the bandwidth utilization of each link in the preferred tunnel of the service according to the link detection information in the link detection result packet includes:
[0010] According to the interface bandwidth of each link in the preferred tunnel, link bandwidth of each link in the preferred tunnel is determined;
[0011] According to the interface rate of each link in the preferred tunnel, transmission rate of each link in the preferred tunnel is determined;
[0012] The ratio of the transmission rate and the link bandwidth of each link in the preferred tunnel is calculated to obtain the bandwidth utilization of each link in the preferred tunnel.
[0013] In an optional implementation, the preset available tunnels are multiple, and the step of selecting a new preferred tunnel from the preset available tunnels includes:
[0014] Link transmission information of each preset available tunnel is obtained, and the link transmission information represents transmission capacity of the preset available tunnel;
[0015] According to the link transmission information of each preset available tunnel and preset service demand, a new preferred tunnel is selected from the preset available tunnels.
[0016] In an optional implementation, the preset service demand includes service demand bandwidth, and the step of selecting a new preferred tunnel from the preset available tunnels according to the link transmission information of each preset available tunnel and preset service demand includes:
[0017] The candidate tunnels are determined from the preset available tunnels in order of priority from high to low, residual bandwidth of all links in the candidate tunnels is calculated according to the link transmission information of the candidate tunnels, and if the residual bandwidth of all links in the candidate tunnels is greater than or equal to the service demand bandwidth, the candidate tunnel is taken as the new preferred tunnel of the service.
[0018] The step of calculating the residual bandwidth of all links in the candidate tunnels according to the link transmission information of the candidate tunnels includes:
[0019] The residual bandwidth of all links in the candidate tunnels is calculated according to the link bandwidth and the transmission rate of all links in the candidate tunnels.
[0020] In an optional implementation, before the step of receiving the link detection result message sent by the non-head node, the method further comprises:
[0021] sending an SRv6 message to the non-head node, the SRv6 message carrying a flag bit for enabling link detection, so that the non-head node obtains link detection information based on the flag bit.
[0022] In a second aspect, the present application provides a tunnel selection method applied to a non-head node in an SRv6 network, the method comprising:
[0023] receiving an SRv6 message sent by a head node, the SRv6 message carrying a flag bit for enabling link detection, creating a flow-based detection instance based on the flag bit for enabling link detection, and sending a link detection result message to the head node based on the flow-based detection instance, wherein the link detection result message comprises link detection information; or
[0024] pre-configuring a link detection enabling function, and when detecting that the bandwidth utilization rate variation amplitude of the non-head node exceeds a preset amplitude threshold, sending a link detection result message to the head node, wherein the link detection result message comprises link detection information; or
[0025] sending a link detection result message to the head node according to a preset period, wherein the link detection result message comprises link detection information.
[0026] In a third aspect, the present application provides a tunnel selection device applied to a head node in an SRv6 network, the device comprising:
[0027] a receiving module for receiving a link detection result message sent by the non-head node;
[0028] a selecting module for calculating the bandwidth utilization rate of each link in the preferred tunnel of the service according to the link detection information in the link detection result message, and selecting a new preferred tunnel from the preset available tunnels if the bandwidth utilization rate of any link in the preferred tunnel is greater than a preset scheduling threshold.
[0029] In a fourth aspect, the present application provides a tunnel selection device applied to a non-head node in an SRv6 network, the device comprising:
[0030] a detecting module for receiving an SRv6 message sent by a head node, the SRv6 message carrying a flag bit for enabling link detection and creating a flow-based detection instance based on the flag bit for enabling link detection, and sending a link detection result message to the head node based on the flow-based detection instance, wherein the link detection result message comprises link detection information; or
[0031] a detection module, configured to pre-configure an enabling link detection function, and send a link detection result packet to the head node when detecting that a bandwidth utilization change amplitude of the network device exceeds a preset amplitude threshold, wherein the link detection result packet comprises link detection information.
[0032] a detection module, configured to send a link detection result packet to the head node according to a preset period, wherein the link detection result packet comprises link detection information.
[0033] In a fifth aspect, the present application provides a network device, comprising a processor and a memory, wherein the memory is configured to store a program, and the processor is configured to implement the tunnel selection method according to the first aspect or the tunnel selection method according to the second aspect when executing the program.
[0034] In a sixth aspect, the present application provides a program product, which is configured to implement the tunnel selection method according to the first aspect or the tunnel selection method according to the second aspect when executed by a processor.
[0035] Compared with the prior art, the present application calculates the bandwidth utilization of each link in the preferred tunnel of the service based on the link detection information in the link detection result packet sent by the non-head node, and selects a new preferred tunnel from the preset available tunnels if the bandwidth utilization of any link in the preferred tunnel is greater than a preset scheduling threshold, thereby realizing tunnel selection based on bandwidth utilization, achieving balanced utilization of network bandwidth, avoiding congestion risk of the network, and improving service stability. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0037] Figure 1 An example diagram of an application scenario provided for the present embodiment.
[0038] Figure 2 A block diagram of a network device provided for the present embodiment.
[0039] Figure 3 A flowchart of a tunnel selection method provided for the present embodiment.
[0040] Figure 4 A flowchart of a tunnel selection method provided for the present embodiment.
[0041] Figure 5 A block diagram of a tunnel selection device provided for the embodiment.
[0042] Figure 6 A block diagram of a tunnel selection device provided for the embodiment.
[0043] Figure: 10 - network device; 11 - processor; 12 - memory; 13 - bus; 100 - tunnel selection device; 110 - receiving module; 120 - selection module; 130 - notification module; 200 - tunnel selection device; 210 - detection module. DETAILED DESCRIPTION
[0044] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0045] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.
[0046] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0047] In the description of the present application, it should be noted that if the terms "upper", "lower", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship when the product of the present application is used, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, therefore, it cannot be understood as a limitation on the present application.
[0048] In addition, if the terms "first", "second" and the like appear, they are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0049] It should be noted that the features in the embodiments of the present application can be combined with each other without conflict.
[0050] To address the issue of high controller load in centralized SD-WAN control schemes, a distributed traffic scheduling approach can be adopted. One implementation of this approach is based on Smart Policy Route (SPR). In this scheme, the controller distributes service-related requests to the devices, which then autonomously select paths based on service requirements and network conditions. Tunnel head nodes can collect link quality information, including packet loss rate, latency, and jitter, through flow detection, selecting tunnels that meet service quality requirements. While this approach can alleviate controller load to some extent, it cannot schedule tunnel paths based on bandwidth utilization and cannot prevent network congestion.
[0051] In view of this, this embodiment provides a tunnel selection method, apparatus, network device, and program product, which can select tunnel paths based on bandwidth utilization, thereby achieving balanced utilization of network bandwidth, avoiding network congestion, and improving service stability. It will be described in detail below.
[0052] Please refer to Figure 1 , Figure 1 This is an example diagram illustrating an application scenario provided in this embodiment. Figure 1 In this context, the CE (Customer Edge) and PE (Provider Edge) communicate with each other. The two PEs communicate with each other through the provider (P) device. The controller communicates with the PE. Figure 1 (The communication relationship between the two is not shown in the figure). CE1 is connected to both PE1 and PE2, and CE2 is connected to both PE3 and PE4. PE1 and PE3 communicate through device P1, and PE2 and PE4 communicate through device P2.
[0053] Figure 1 In the example, there are two tunnels between PE1 and PE3: Tunnel 1 and Tunnel 2. When PE1 is forwarding a message from CE1, it receives the flow detection results sent by P1, P2, PE2, PE3 and PE4. The detection results include, but are not limited to, packet loss, latency, interface bandwidth (i.e., the maximum bandwidth of the interface), interface rate, etc. Based on its own detection results and the detection results sent by other devices, it determines whether the bandwidth utilization of Tunnel 1, which is currently forwarding the message, exceeds the preset scheduling threshold. If the bandwidth utilization of Tunnel 1 exceeds the preset scheduling threshold, and Tunnel 2 can meet the service requirements of the message to be forwarded, then the message to be forwarded will be scheduled from Tunnel 1 to Tunnel 2.
[0054] Figure 1In the context of SRv6, CE devices are located at the edge of PE devices, close to the boundary of user networks. CE devices are usually part of user networks and can be routers, switches, or other network devices, etc., responsible for connecting user traffic to operator networks. PE devices are devices in operator networks that directly connect to CE devices or user networks. PE devices are usually responsible for implementing operator routing policies, QoS (Quality of Service) guarantees, security controls, etc. PE devices can be routers, multi-layer switches (L2 / L3 Switches), or specialized edge routers, etc. P devices refer to devices located in operator networks. P devices are responsible for forwarding traffic within the network and usually have high capacity and high performance characteristics to ensure efficient network operation. P devices can be high-speed routers, core switches, or label switching routers (LSRs), etc.
[0055] In an SRv6 network, PE devices are responsible for applying SRv6 encapsulation to traffic entering and exiting user networks, while P devices are responsible for processing SRv6 paths and forwarding traffic within operator networks. CE devices usually do not directly participate in the processing of SRv6, but they may be configured with some SRv6-compatible parameters to ensure compatibility with operator networks and correct traffic forwarding.
[0056] According to the direction of packet transmission, the packet is sent from one user edge device and passes through at least one operator edge device before reaching another user edge device. When passing through multiple operator edge devices, it may also pass through operator devices connecting multiple operator edge devices. In this embodiment, the first operator edge device through which the packet passes is referred to as the head node, the last operator edge device through which the packet passes is referred to as the tail node, and the devices between the head node and the tail node are referred to as intermediate nodes, and the head node, the tail node, and the intermediate nodes are collectively referred to as network devices. Figure 1 After the packet is sent from CE1, PE1 is the head node, PE3 is the tail node, and PE2, P1, P2, and PE4 are intermediate nodes.
[0057] It should be noted that the above head node, tail node, and intermediate node are only an exemplary description. In fact, PE2 can also be a head node, PE4 can also be a tail node, and the remaining nodes are intermediate nodes.
[0058] The controller plans multiple SRv6 tunnels for each service based on user service requirements and the overall network topology, issues SRv6 tunnels to the head node, and sets the preferred order (e.g., sets the priority) between the multiple tunnels for the target service. The controller also needs to set a preset scheduling threshold at the head node. Optionally, the controller can also issue service requirement bandwidth to the head node for the target service.
[0059] Based on the application scenario of Figure 1 , this embodiment also provides a block diagram of a network device, which can beFigure 1 The device as the head node, implementing the tunnel selection method applied to the head node in this embodiment, can also be Figure 1 The device as the non-head node, implementing the tunnel selection method applied to the non-head node in this embodiment, includes the intermediate node and the tail node.
[0060] Please refer to Figure 2 , Figure 2 The block schematic diagram of the network device 10 provided in this embodiment, the network device 10 includes a processor 11, a memory 12 and a bus 13, the processor 11 and the memory 12 are connected through the bus 13.
[0061] The processor 11 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the tunnel selection method of this embodiment can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the processor 11. The processor 11 described above can be a general processor, including CPU (Central Processing Unit, central processor), NP (Network Processor, network processor) and the like; it can also be DSP (Digital Signal Processor, digital signal processor), ASIC (Application Specific Integrated Circuit, application specific integrated circuit), FPGA (Field Programmable Logic Gate Array, field programmable logic gate array) or other programmable logic devices, discrete gate or transistor logic device, discrete hardware component and the like.
[0062] The memory 12 is used to store the program for implementing the tunnel selection method, which can be a software or firmware (Firmware) form stored in the memory 12 or a software function module solidified in the OS (Operating System, operating system) of the network device 10.
[0063] The processor 11 executes the program to implement the tunnel selection method of this embodiment after receiving the execution instruction.
[0064] This embodiment first introduces the tunnel selection method applied to the head node in the SRv6 network in combination with the application scenario of Figure 1 and the block example diagram of the network device 10 of Figure 2 Please refer to Figure 3 , Figure 3 The flow example diagram of the tunnel selection method provided in this embodiment, the method includes the following steps:
[0065] Step S101, receiving a link detection result packet sent by a non-head node.
[0066] In the embodiment, the non-head node includes an intermediate node and a tail node. In some network structures, the non-head node only has a tail node without an intermediate node, and in other network structures, the non-head node can include at least one intermediate node and one tail node.
[0067] Step S102, calculating the bandwidth utilization of each link in the preferred tunnel of the service according to the link detection information in the link detection result packet, and selecting a new preferred tunnel from the preset available tunnels if the bandwidth utilization of any link in the preferred tunnel is greater than a preset scheduling threshold.
[0068] In the embodiment, the link detection information includes, but is not limited to, packet loss, delay, interface bandwidth, and interface rate. The non-head node can send the link detection information based on the notification of the head node, periodically send the link detection information, or send the link detection information when a preset condition is met, so as to avoid occupying bandwidth for sending the link detection information and affecting the normal sending of service packets.
[0069] In the embodiment, in addition to that the non-head node collects its own link detection information, the head node also collects its own link detection information. Whether the bandwidth utilization of each link in the preferred tunnel is greater than the preset scheduling threshold can be determined based on the link detection information of the non-head node or based on the link detection information of the head node and the non-head node.
[0070] In the embodiment, the bandwidth utilization represents the use of bandwidth, and the higher the bandwidth utilization is, the greater the bandwidth pressure is. The preset scheduling threshold can be set according to the service demand, so as to select the tunnel according to the service demand and realize the flexibility of tunnel selection.
[0071] The above method provided by the embodiment can select the tunnel based on the bandwidth utilization, so as to realize the balanced use of network bandwidth, avoid network congestion, and improve the service stability.
[0072] In an optional implementation, a way of calculating the bandwidth utilization of each link in the preferred tunnel of the service is as follows:
[0073] (1) determining the link bandwidth of each link in the preferred tunnel according to the interface bandwidth of each link in the preferred tunnel;
[0074] In the embodiment, the interface bandwidth includes the out-interface bandwidth and / or the in-interface bandwidth. The out-interface bandwidth can be used as the link bandwidth, the in-interface bandwidth can be used as the link bandwidth, or the average of the out-interface bandwidth and the in-interface bandwidth can be used as the link bandwidth.
[0075] (2) According to the interface rate of each link in the preferred tunnel, the transmission rate of each link in the preferred tunnel is determined;
[0076] In the embodiment, the interface rate includes an out interface rate and / or an in interface rate. The out interface rate can be used as the transmission rate, the in interface rate can be used as the transmission rate, or the average of the out interface rate and the in interface rate can be used as the transmission rate.
[0077] (3) The ratio of the transmission rate and the link bandwidth of each link in the preferred tunnel is calculated to obtain the bandwidth utilization of each link in the preferred tunnel.
[0078] In the embodiment, the controller plans a preset available tunnel and a preferred tunnel for each service according to the topology of the SRv6 network and delivers them to the head node. When the bandwidth utilization of the preferred tunnel is greater than a preset scheduling threshold, the head node can select a new preferred tunnel from the preset available tunnels. One implementation is as follows:
[0079] The link transmission information of each preset available tunnel is obtained, and the link transmission information represents the transmission capacity of a preset available tunnel.
[0080] According to the link transmission information of each preset available tunnel and a preset service requirement, a new preferred tunnel is selected from the preset available tunnels.
[0081] In the embodiment, the new preferred tunnel is a tunnel whose transmission capacity can meet the preset service requirement. The preset service requirement can be a requirement for the service delivered by the controller to the head node, and the preset service requirement includes, but is not limited to, a service requirement bandwidth, a latency requirement, a preset scheduling threshold, and a preset utilization threshold of the service, and can be at least one of them, for example, the requirement bandwidth is 20 Mbps, the latency requirement is 10 milliseconds, and the preset scheduling threshold and the preset utilization threshold are both set to 80%.
[0082] In the embodiment, the controller can also set the priority of each available tunnel, so as to select a new preferred tunnel from the preset available tunnels according to the priority order. When the preset service requirement includes the service requirement bandwidth, one implementation of selecting a new preferred tunnel from the preset available tunnels according to the priority is as follows:
[0083] (1) The candidate tunnels are determined from the preset available tunnels in the order from high to low priority, and the residual bandwidths of all segment links in the candidate tunnels are calculated according to the link transmission information of the candidate tunnels.
[0084] In the embodiment, the link transmission information includes link bandwidth and transmission rate, and the remaining bandwidth of all segment links in each preset available tunnel is calculated according to the link transmission information of each preset available tunnel. The calculation manner of the remaining bandwidth of all segment links in each preset available tunnel can be: the remaining bandwidth of all segment links in each preset available tunnel is calculated according to the link bandwidth and transmission rate of all segment links in each preset available tunnel.
[0085] Specifically, the remaining bandwidth of each segment link can be calculated according to the difference between the link bandwidth and the transmission rate of each segment link. Alternatively, the link effective bandwidth of each segment link can be calculated according to the link bandwidth and the preset utilization threshold of each segment link, and the remaining bandwidth of each segment link can be calculated according to the difference between the link effective bandwidth and the transmission rate of each segment link. The calculation manner of the transmission rate has been described in the foregoing embodiments, which will not be repeated here. The embodiment provides two implementation manners of calculating the remaining bandwidth of any segment link: manner one: remaining bandwidth = link bandwidth - transmission rate; and manner two: remaining bandwidth = link bandwidth * preset utilization threshold - transmission rate. The preset utilization threshold can be set by the controller according to the demand of the service in advance, and can be set to be the same as the preset scheduling threshold, for example, the preset utilization threshold can be set to 80%.
[0086] (2) If the remaining bandwidth of all segment links in the selected tunnel is greater than or equal to the service demand bandwidth, the selected tunnel is taken as the new preferred tunnel of the service.
[0087] In the embodiment, a tunnel is selected as the selected tunnel from the preset available tunnels in the order from high to low priority, and the remaining bandwidth of all segment links in the selected tunnel is calculated. When the remaining bandwidth of all segment links in the selected tunnel is greater than or equal to the service demand bandwidth, the calculation is stopped, and the selected tunnel is taken as the new preferred tunnel of the service. In this way, the new preferred tunnel meeting the priority requirement can be quickly determined. For example, the available tunnels and their priorities are shown in Table 1:
[0088] Table 1
[0089] Pre-set available tunnels Priority Tunnel 1 3 Tunnel 2 2 Tunnel 3 4 Tunnel 4 1 Tunnel 5 5
[0090] First, the tunnel 5 with the highest priority (priority 5) is taken as the selected tunnel, and the remaining bandwidth of all segment links in the tunnel 5 is calculated. If the remaining bandwidth of any segment link in the tunnel 5 does not meet the service demand bandwidth, the tunnel 3 with the priority 4 is taken as the selected tunnel, and the remaining bandwidth of all segment links in the tunnel 3 is continued to be calculated. If the remaining bandwidth of any segment link in the tunnel 3 does not meet the service demand bandwidth, the tunnel 1 with the priority 3 is taken as the selected tunnel, and the remaining bandwidth of all segment links in the tunnel 1 is continued to be calculated. If the remaining bandwidth of all segment links in the tunnel 1 meets the service demand bandwidth, the calculation is stopped, and the tunnel 1 is taken as the new preferred tunnel of the service.
[0091] In an optional embodiment, in order to enable the non-head node to send the link detection information to the head node, so that the head node can make correct tunnel selection according to the link detection information of all nodes to determine the preferred tunnel that best matches the current service, the embodiment also provides an implementation for notifying the non-head node to send the link detection information:
[0092] The SRv6 packet is sent to the non-head node, and the SRv6 packet carries a flag bit for enabling link detection, so that the non-head node obtains the link detection information based on the flag bit.
[0093] In the embodiment, the SRv6 packet is a packet with SRv6 encapsulation, which can be a data packet or a probe packet actively sent by the head node.
[0094] In the embodiment, when the head node sends a packet through an SRv6 tunnel, the head node inserts a flow detection packet header in the SRH (Segment Routing Header) or DOH (Destination Options Header) when performing SRv6 tunnel encapsulation, and then sends the packet out according to the SRv6 tunnel path. The purpose of inserting the flow detection packet header is to collect packet loss and delay information. The SRv6 tunnel encapsulation takes the head node IPv6 address as the destination address of the outer IPv6 packet header.
[0095] The embodiment is extended based on the above manner, and a flag bit for enabling bandwidth rate detection is carried in the flow detection packet header added in the packet. The non-head node receives the SRv6 packet with SRv6 tunnel encapsulation, the non-head node parses the SRv6 packet, and when it is identified that the SRv6 packet carries the IFIT packet header and the flag bit for enabling bandwidth rate detection, the non-head node creates a flow detection instance, and takes the source address of the outer IPv6 header of the SRv6 packet as the tunnel head node address of the flow detection instance. In this way, the non-head node can encapsulate the link detection information detected by itself in the link detection result packet, and send the link detection result packet to the head node.
[0096] In the embodiment, in order to send the link detection information to the head node, the embodiment also provides a tunnel selection method applied to the non-head node, please refer to Figure 4 , Figure 4 The tunnel selection method provided in the embodiment is shown in the flowchart, and the method comprises the following steps:
[0097] Step S201, receiving the SRv6 packet sent by the head node, and the SRv6 packet carries a flag bit for enabling link detection.
[0098] In the embodiment, the SRv6 packet is a packet with SRv6 encapsulation, which can be a data packet or a probe packet actively sent by the head node.
[0099] In step S202, a flow-based detection instance is created based on the flag enabling link detection, and a link detection result packet is sent to the head node based on the flow-based detection instance; wherein the link detection information is included in the link detection result packet.
[0100] In the embodiment, the way in which the non-head node sends the link detection result packet to the head node based on the flow-based detection instance has been described in the foregoing, and will not be described here.
[0101] In addition to passively sending the link detection result packet to the head node based on the SRv6 packet sent by the head node, the non-head node sends the link detection result packet in at least two active ways, as follows:
[0102] In the embodiment, a way in which the non-head node actively sends the link detection result packet is provided:
[0103] The link detection function is pre-configured, and when it is detected that the bandwidth utilization rate change amplitude of the non-head node exceeds a preset amplitude threshold, the link detection result packet is sent to the head node. The link detection information is included in the link detection result packet.
[0104] In the embodiment, in order to avoid the bandwidth occupied by the non-head node sending the link detection information affecting the sending of service packets, the non-head node sends the link detection result packet to the head node only when it is detected that the bandwidth utilization rate change amplitude of the non-head node exceeds a preset amplitude threshold.
[0105] In the embodiment, the preset amplitude threshold can be set according to actual scene needs. The non-head node can periodically collect link detection information, calculate the bandwidth utilization rate of the link related to the non-head node in the current period according to the collected link detection information, and the calculation method of the bandwidth utilization rate has been described in the foregoing and will not be described here. According to the bandwidth utilization rates in the current period and the last period, the bandwidth utilization rate change amplitude is calculated, and then the bandwidth utilization rate change amplitude is compared with the preset amplitude threshold to determine whether to send the link detection result packet. For example, when the bandwidth utilization rate of the link changes from 50% to 51% (change amplitude 1%), the link detection result packet is sent. Or when the bandwidth utilization rate of the link changes from 65% to 60% (change amplitude 5%), the link detection result packet is sent; and the link detection result packet is not sent at other times. When the bandwidth utilization rate of the link is relatively stable, the link detection information does not need to be sent, thereby reducing the network overhead caused by sending the link detection information.
[0106] In the embodiment, another manner of non-head node actively sending a link detection result packet is provided: sending a link detection result packet to the head node according to a preset period. The link detection result packet includes link detection information.
[0107] In order to exemplarily illustrate the tunnel selection method provided in the embodiment from the whole process, the application scenario of Figure 1 is taken as an example, PE1 in Figure 1 is taken as the head node, PE3 is taken as the tail node, and the remaining PE devices and P devices are taken as intermediate nodes, and the whole process is introduced.
[0108] (1) The controller deploys in-stream detection in all nodes in the SRv6 network, and sets the maximum bandwidth of each interface (corresponding to the interface bandwidth in the above embodiment). For example, the maximum bandwidth of PE1-P1, P1-PE3, PE2-P2, and P2-PE4 is set to 100 Mbps.
[0109] (2) The controller first issues a service requirement to the head node device, including: a preset scheduling threshold, a preset utilization threshold, a service requirement bandwidth, and in addition, network quality requirements such as delay, jitter, and packet loss. For example, for a certain service, the service requirement bandwidth is set to 20 Mbps, and the delay threshold is 10 milliseconds. The preset scheduling threshold is 80%.
[0110] (3) The controller plans multiple SRv6 tunnel paths according to the network topology and user service requirements, and creates an SRv6 tunnel to the head node. At the same time, for the target service, the controller issues a preset available tunnel and its preferred order to the head node. For example, the controller creates two SRv6 tunnels on the head node PE1: tunnel 1 and tunnel 2. For a certain service, the preset available tunnels include tunnel 1 and tunnel 2, and the preferred tunnel is tunnel 1.
[0111] (4) When the head node sends a packet through the SRv6 tunnel, a in-stream detection packet header is added to the packet, and the in-stream detection packet header carries a flag bit for enabling bandwidth rate detection. Therefore, when PE1 sends a packet through tunnel 1 and tunnel 2, the in-stream detection packet header and the flag bit for enabling bandwidth rate detection are carried. The source address of the outer IPv6 header of the SRv6 tunnel-encapsulated packet is the address of PE1.
[0112] (5) The intermediate nodes and the tail node receive the packet with SRv6 tunnel encapsulation. The intermediate nodes and the tail node analyze the packet, and when it is identified that the packet carries the in-stream detection packet header and the flag bit for enabling bandwidth rate detection, a in-stream detection instance is created, and the source address of the outer IPv6 header of the packet is taken as the tunnel head node address of the in-stream detection instance. The in-stream detection instances created by the intermediate nodes and the tail node are shown in Table 2:
[0113] Table 2
[0114]
[0115] (6) The intermediate node and the tail node perform bandwidth rate detection and network quality detection for the flow trace instance. Then, a link detection result packet containing bandwidth and rate information is sent to the head node. The link detection result packet is sent with the tunnel head node address, i.e. PE1, as the destination address, and carries the link detection information.
[0116] In this embodiment, the link detection result packet is sent once every fixed measurement period, and the bandwidth rate detection and the time delay measurement are performed once every 30 seconds, and the link detection result packet is sent to the head node once.
[0117] For the bandwidth rate detection, the receiving rate and the sending rate of the interface are combined in this embodiment.
[0118] The specific action of the bandwidth rate detection of the intermediate node is to obtain the maximum bandwidth and the current receiving rate of the ingress interface of the flow trace instance, and the maximum bandwidth and the current sending rate of the egress interface of the flow trace instance.
[0119] The specific action of the bandwidth rate detection of the tail node is to obtain the maximum bandwidth and the current receiving rate of the ingress interface of the flow trace instance.
[0120] (7) The head node receives the link detection result packet containing the link detection information such as bandwidth rate sent by the intermediate node and the tail node, and calculates the link bandwidth, the transmission rate, and the bandwidth utilization of each link of the SRv6 tunnel. The calculation method is as follows:
[0121] (7.1) The maximum bandwidth of the egress interface, the current sending rate of the egress interface, the maximum bandwidth of the ingress interface, and the current receiving rate of the ingress interface of each link of the tunnel are obtained from the link detection result packet sent by the intermediate node and the tail node.
[0122] (7.2) The head node obtains the maximum bandwidth and the current sending rate of the egress interface of the first link from the directly connected egress interface of the flow trace instance of the device.
[0123] (7.3) The average value of the maximum bandwidth of the egress interface and the maximum bandwidth of the ingress interface of each link is calculated as the link bandwidth of the link; the average value of the current sending rate of the egress interface and the current receiving rate of the ingress interface of each link is calculated as the transmission rate of the link.
[0124] (7.4) The ratio of the transmission rate to the link bandwidth of each link is calculated as the bandwidth utilization of the link.
[0125] (8) When the bandwidth utilization of any link of the tunnel exceeds the preset scheduling threshold, a tunnel scheduling action is performed to attempt to select another tunnel that satisfies the bandwidth requirement of the target service for the target service.
[0126] In this embodiment, the selected tunnel should satisfy that the bandwidth utilization of each link does not exceed the preset scheduling threshold, and the residual bandwidth of each link is greater than or equal to the bandwidth requirement of the service.
[0127] In the initial state, the head node PE1 selects tunnel 1 as the SRv6 forwarding tunnel of the target service according to the set preferred order.
[0128] Suppose there is still other service traffic in the network, the bandwidth utilization of the link in tunnel 1 may exceed the preset scheduling threshold. For example, at a certain moment, the head node calculates the link transmission information and network quality of the two tunnels as shown in Table 3:
[0129] Table 3
[0130]
[0131]
[0132] In this case, the bandwidth utilization of the P1-PE3 link of tunnel 1 is 85%, which exceeds the preset scheduling threshold, so the tunnel scheduling action is triggered to attempt to select another tunnel that satisfies the bandwidth requirement of the target service for the target service. Since there is another available tunnel, tunnel 2, for the target service, the bandwidth utilization of each link is less than the preset scheduling threshold, and the residual bandwidth of each link is greater than or equal to the bandwidth requirement of the service. In the case of having a delay requirement, tunnel 2 also satisfies the delay requirement of the service, i.e., the delay is less than 10 ms. Therefore, tunnel 2 is selected as the new SRv6 forwarding tunnel for the target service.
[0133] Through the above steps, when the bandwidth utilization of any link of the preferred tunnel exceeds the preset scheduling threshold, the target service can be automatically switched to another tunnel, avoiding network congestion and ensuring the reliability of the service.
[0134] As another implementation manner, (4)-(6) in the above process can also be implemented in the following manner:
[0135] The intermediate node and the tail node determine by configuration that the bandwidth rate detection needs to be performed on the flow detection instance. For the timing of sending the link detection result message containing the interface bandwidth and the interface rate from the intermediate node and the tail node to the head node, the link detection result message is sent only when the change amplitude of the current bandwidth utilization of the link compared with the bandwidth utilization when the link detection result message is sent last time exceeds a preset change amplitude threshold.
[0136] As a further implementation manner, in the above procedure (8), when attempting to select another tunnel satisfying the service bandwidth requirement for the target service, in addition to the remaining bandwidth satisfying the requirement, the selection can also be made according to the priority order of the multiple available tunnels of the target service defined on the head node, in a manner that the lower the bandwidth utilization is, the higher the priority is. If the bandwidth utilization of a certain link of the current forwarding tunnel of the target service exceeds a preset scheduling threshold, a tunnel with the lowest bandwidth utilization and satisfying the remaining bandwidth condition is selected from the preset available tunnels as the target tunnel.
[0137] In order to perform the corresponding steps in the above embodiments and various possible implementation manners, the following gives an implementation manner of a tunnel selection device applied to a head node. Please refer to Figure 5 , Figure 5 A block schematic diagram of a tunnel selection device provided for the present embodiment is given. It is to be noted that the tunnel selection device 100 provided by the present application has the same basic principle and technical effects as the above embodiments, and for brief description, part of the present embodiment is not mentioned.
[0138] The tunnel selection device 100 comprises a receiving module 110 and a selection module 120.
[0139] The receiving module 110 is configured to receive link detection information sent by a non-head node.
[0140] The selection module 120 is configured to calculate the bandwidth utilization of each link in the preferred tunnel of the service according to the link detection information in the link detection result packet. If the bandwidth utilization of any link in the preferred tunnel is greater than a preset scheduling threshold, a new preferred tunnel is selected from the preset available tunnels.
[0141] In an optional implementation manner, the link detection information comprises interface bandwidth and interface rate, and the selection module 120 is specifically configured to:
[0142] determine the link bandwidth of each link in the preferred tunnel according to the interface bandwidth of each link in the preferred tunnel;
[0143] determine the transmission rate of each link in the preferred tunnel according to the interface rate of each link in the preferred tunnel;
[0144] calculate the ratio of the transmission rate and the link bandwidth of each link in the preferred tunnel to obtain the bandwidth utilization of each link in the preferred tunnel.
[0145] In an optional implementation manner, the preset available tunnels have multiple tunnels,
[0146] The selection module 120 is specifically further configured to:
[0147] obtain link transmission information of each of the preset available tunnels, the link transmission information representing transmission capability of the preset available tunnels;
[0148] select a new preferred tunnel from the preset available tunnels according to the link transmission information of each of the preset available tunnels and the preset service requirement.
[0149] In an optional implementation, the preset service requirement comprises a service requirement bandwidth, and the selection module 120 is specifically further configured to:
[0150] determine candidate tunnels from the preset available tunnels in order of priority from high to low, calculate residual bandwidths of all segment links in the candidate tunnels according to the link transmission information of the candidate tunnels, and if the residual bandwidths of all segment links in the candidate tunnels are all greater than or equal to the service requirement bandwidth, take the candidate tunnels as the new preferred tunnels of the service.
[0151] In an optional implementation, the link transmission information comprises link bandwidth and transmission rate, and the selection module 120 is specifically further configured to calculate the residual bandwidths of all segment links in the candidate tunnels according to the link bandwidth and the transmission rate of all segment links in the candidate tunnels.
[0152] In an optional implementation, the tunnel selection apparatus 100 further comprises a notification module 130, which is configured to send an SRv6 packet to a non-head node, the SRv6 packet carrying a flag bit for enabling link detection, so that the non-head node obtains link detection information based on the flag bit.
[0153] In order to perform the corresponding steps in the above embodiments and various possible implementations, another implementation of a tunnel selection apparatus applied to a non-head node is given below. Please refer to Figure 6 , Figure 6 Another block schematic diagram of a tunnel selection apparatus provided for this embodiment is given, and it should be noted that the tunnel selection apparatus 200 provided by the present application has the same basic principle and technical effects as the corresponding above-mentioned embodiments, and for brief description, part of this embodiment is not mentioned.
[0154] In a possible implementation, the tunnel selection apparatus 200 comprises a detection module 210.
[0155] The detection module 210 is configured to receive an SRv6 packet sent by a head node, the SRv6 packet carrying a flag bit for enabling link detection, create a flow detection instance based on the flag bit for enabling link detection, and send a link detection result packet to the head node based on the flow detection instance. The link detection result packet comprises link detection information.
[0156] In a possible implementation, the tunnel selection apparatus 200 comprises a detection module 210 configured to pre-configure a link detection function, and send a link detection result packet to the head node when detecting that the bandwidth utilization change amplitude of the tunnel is greater than a preset amplitude threshold.
[0157] In a possible implementation, the tunnel selection apparatus 200 comprises a detection module 210 configured to send a link detection result packet to the head node according to a preset period. The link detection result packet comprises link detection information.
[0158] The embodiment provides a program product, which implements the tunnel selection method applied to the head node in the above embodiment, or implements the tunnel selection method applied to the non-head node in the above embodiment.
[0159] The embodiment provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the tunnel selection method in the above embodiment is implemented.
[0160] In summary, the embodiment of the present application provides a tunnel selection method, apparatus, network device and program product. The method comprises: receiving a link detection result packet sent by a non-head node; calculating the bandwidth utilization of each link in a preferred tunnel according to link detection information in the link detection result packet; and selecting a new preferred tunnel from preset available tunnels if the bandwidth utilization of any link in the preferred tunnel is greater than a preset scheduling threshold. Compared with the prior art, the embodiment has at least the following advantages: (1) when the bandwidth utilization of any link in the preferred tunnel is greater than the preset scheduling threshold based on the link detection information sent by the non-head node, a new preferred tunnel is selected from the preset available tunnels to realize bandwidth utilization-based tunnel scheduling, so that the network bandwidth is balanced, the risk of network congestion is avoided, and the service stability is improved; (2) the dependence on the controller is reduced, the network reliability is improved, and the scheduling real-time performance is improved; (3) the preferred tunnel is selected in the manner that the lower the bandwidth utilization, the higher the priority, so that the probability of the selected preferred tunnel being scheduled again in a short time is reduced; and (4) when the change amplitude of the current bandwidth utilization of the link compared with the bandwidth utilization when the link detection result packet was last sent exceeds a preset change amplitude threshold, the link detection result packet is sent, and when the bandwidth utilization of the link is relatively stable, the link detection result packet is not sent, so that the network overhead caused by sending the link detection result packet is reduced.
[0161] The above merely describes various embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A tunnel selection method, characterized in that, The method, applied to head nodes in an SRv6 network, includes: Receive link detection result messages sent by non-header nodes; Based on the link detection information in the link detection result message, the bandwidth utilization rate of each link in the preferred tunnel of the service is calculated. If the bandwidth utilization rate of any link in the preferred tunnel is greater than a preset scheduling threshold, a new preferred tunnel is selected from the preset available tunnels. The method of selecting a new preferred tunnel from the preset available tunnels includes: determining candidate tunnels from the preset available tunnels in descending order of priority; calculating the remaining bandwidth of all links in the candidate tunnels based on the link transmission information of the candidate tunnels; if the remaining bandwidth of all links in the candidate tunnels is greater than or equal to the service requirement bandwidth, the candidate tunnel is taken as the new preferred tunnel for the service.
2. The tunnel selection method according to claim 1, characterized in that, The link detection information includes interface bandwidth and interface rate. The step of calculating the bandwidth utilization of each link in the preferred tunnel of the service based on the link detection information in the link detection result message includes: The link bandwidth of each link in the preferred tunnel is determined based on the interface bandwidth of each link in the preferred tunnel. The transmission rate of each link in the preferred tunnel is determined based on the interface rate of each link in the preferred tunnel. Calculate the ratio of transmission rate to link bandwidth for each link segment in the preferred tunnel to obtain the bandwidth utilization rate of each link segment in the preferred tunnel.
3. The tunnel selection method according to claim 2, characterized in that, There are multiple preset available tunnels, and the step of selecting a new preferred tunnel from the preset available tunnels includes: Obtain the link transmission information for each preset available tunnel, wherein the link transmission information characterizes the transmission capacity of the preset available tunnel; Based on the link transmission information of each preset available tunnel and the preset service requirements, a new preferred tunnel is selected from the preset available tunnels.
4. The tunnel selection method according to claim 1, characterized in that, The link transmission information includes link bandwidth and transmission rate. The step of calculating the remaining bandwidth of all link segments in the candidate tunnel based on the link transmission information of the candidate tunnel includes: Calculate the remaining bandwidth of all links in the candidate tunnel based on the link bandwidth and transmission rate of all links in the candidate tunnel.
5. The tunnel selection method according to any one of claims 1-4, characterized in that, Before the step of receiving the link detection result message sent by the non-header node, the method further includes: An SRv6 message is sent to a non-header node. The SRv6 message carries a flag bit for enabling link detection, so that the non-header node can obtain link detection information based on the flag bit.
6. A tunnel selection method, characterized in that, The method, applied to non-head nodes in an SRv6 network, includes: The system receives an SRv6 message sent by the head node, the SRv6 message carrying a flag for enabling link detection. Based on the enabled link detection flag, a flow-following detection instance is created, and based on the flow-following detection instance, a link detection result message is sent to the head node, wherein the link detection result message includes link detection information; or The link detection function is pre-configured and enabled. When the change in its own bandwidth utilization exceeds a preset threshold, a link detection result message is sent to the head node, wherein the link detection result message includes link detection information; or According to a preset period, a link detection result message is sent to the head node, wherein the link detection result message includes link detection information; The head node calculates the bandwidth utilization of each link in the preferred tunnel based on the link detection information in the link detection result message sent by the non-head node. If the bandwidth utilization of any link in the preferred tunnel is greater than the preset scheduling threshold, a new preferred tunnel is selected from the preset available tunnels.
7. A tunnel selection device, characterized in that, The device, used as a head node in an SRv6 network, comprises: The receiving module is used to receive link detection result messages sent by non-head nodes; The selection module is used to calculate the bandwidth utilization of each link in the preferred tunnel of the service based on the link detection information in the link detection result message. If the bandwidth utilization of any link in the preferred tunnel is greater than a preset scheduling threshold, a new preferred tunnel is selected from the preset available tunnels. The method of selecting a new preferred tunnel from the preset available tunnels includes: determining candidate tunnels from the preset available tunnels in descending order of priority; calculating the remaining bandwidth of all links in the candidate tunnels based on the link transmission information of the candidate tunnels; if the remaining bandwidth of all links in the candidate tunnels is greater than or equal to the service requirement bandwidth, the candidate tunnel is selected as the new preferred tunnel for the service.
8. A tunnel selection device, characterized in that, The device, applied to non-head nodes in an SRv6 network, comprises: The detection module is used to receive SRv6 messages sent by the head node, the SRv6 messages carrying a flag for enabling link detection, create a follow-up detection instance based on the flag, and send a link detection result message to the head node based on the follow-up detection instance, wherein the link detection result message includes link detection information; or The detection module is used to pre-configure and enable link detection functionality. When it detects that the change in its own bandwidth utilization exceeds a preset threshold, it sends a link detection result message to the head node, wherein the link detection result message includes link detection information; or The detection module is used to send a link detection result message to the head node according to a preset period, wherein the link detection result message includes link detection information; The head node calculates the bandwidth utilization of each link in the preferred tunnel based on the link detection information in the link detection result message sent by the non-head node. If the bandwidth utilization of any link in the preferred tunnel is greater than the preset scheduling threshold, a new preferred tunnel is selected from the preset available tunnels.
9. A network device, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, and the processor being used to implement the tunnel selection method of any one of claims 1-5, or the tunnel selection method of claim 6, when executing the computer program.
10. A program product, characterized in that, When the program product is executed by the processor, it implements the tunnel selection method as described in any one of claims 1-5, or implements the tunnel selection method as described in claim 6.
Citation Information
Patent Citations
Message forwarding method and device, storage medium and electronic equipment
CN116266822A
Message processing method and related equipment
CN117527666A