Bandwidth measurement method and apparatus

By sending detection packets carrying detection identifiers on the network, the remaining available bandwidth of the forwarding path is collected hop-by-hop, which solves the problem that the remaining available bandwidth of the forwarding path cannot be obtained in the prior art, and achieves efficient load sharing and balance improvement.

WO2025180193A1PCT designated stage Publication Date: 2025-09-04HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/076416
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-26
Filing Date
2025-02-08
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

When load sharing is carried out in the prior art, the remaining available bandwidth of the forwarding path cannot be effectively obtained, resulting in poor load balancing. Especially when the data transmission amount of different forwarding paths is unbalanced, load sharing based on the remaining available bandwidth cannot be achieved.

Method used

By sending a detection message carrying a detection identifier on the head node, the forwarding node is triggered to automatically collect and transmit the remaining available bandwidth, reducing the complexity of obtaining the remaining available bandwidth of the forwarding path, and using the carrying path and service type identifier in the detection message to hop-by-hop acquisition path and the remaining available bandwidth of the service.

Benefits of technology

It realizes efficient acquisition of the remaining available bandwidth of the forwarding path, reduces transmission and computing resource overhead, improves the precision and balance of load sharing, and improves network resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025076416_04092025_PF_FP_ABST
    Figure CN2025076416_04092025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a bandwidth measurement method and apparatus. A head node obtains a measurement packet, the measurement packet comprising a measurement identifier and the remaining available bandwidth of a first interface of the head node, and the measurement identifier being used for instructing to measure the remaining available bandwidth of a first forwarding path; and the head node sends the measurement packet by means of the first interface corresponding to the first forwarding path. A protocol packet is extended, and the protocol packet carries the identifier for instructing to measure the remaining available bandwidth, so that a forwarding node is triggered to automatically collect the remaining available bandwidth of a local interface, thereby reducing the implementation complexity of obtaining the remaining available bandwidth of the forwarding path.
Need to check novelty before this filing date? Find Prior Art

Description

Bandwidth detection method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 26, 2024, with application number 202410212840.8 and invention name “Bandwidth Detection Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of network technology, and in particular to a bandwidth detection method and device. Background Art

[0003] When a network node forwards traffic, if there are multiple reachable forwarding paths to the same destination address, the network node can more effectively utilize network resources by sharing the traffic among different forwarding paths. Unequal-Cost Multiple Path (UCMP) is a method of load balancing traffic according to the ratio of the total bandwidth of each forwarding path. However, when using UCMP for load balancing, if different forwarding paths transmit traffic with a large amount of data and traffic with a small amount of data flow respectively, it will result in poor load balancing. If load balancing is performed based on the remaining available bandwidth of the forwarding path, it is currently impossible to obtain the remaining available bandwidth of the forwarding path, resulting in technical difficulties in the solution of load balancing based on the remaining available bandwidth of the forwarding path. Summary of the Invention

[0004] The present application provides a bandwidth detection method and apparatus that can reduce the implementation complexity of obtaining the remaining available bandwidth of a forwarding path. The technical solution is as follows.

[0005] In a first aspect, a bandwidth detection method is provided, which is applied to a head node of a first forwarding path. The method includes: the head node obtaining a detection message, the detection message including a detection identifier and the remaining available bandwidth of a first interface of the head node, the detection identifier being used to indicate the remaining available bandwidth of the first forwarding path; and the head node sending the detection message through the first interface corresponding to the first forwarding path.

[0006] Based on the method provided in the first aspect, the head node sends a probe message through the interface corresponding to the forwarding path of the remaining available bandwidth to be detected. The probe message carries an identifier indicating the remaining available bandwidth to be detected, thereby triggering the forwarding node to automatically collect the remaining available bandwidth of the local interface, reducing the implementation complexity of obtaining the remaining available bandwidth of the forwarding path, and thus facilitating load balancing based on the remaining available bandwidth of the forwarding path.

[0007] In addition, since the nodes that the forwarding path does not pass through do not need to perceive and announce the remaining available bandwidth of the forwarding path, compared with the method of flooding the remaining available bandwidth of the forwarding path across the entire network, the scope of announcing the remaining available bandwidth is smaller. The scope of announcing the remaining available bandwidth can be narrowed from the entire network to a single forwarding path. The forwarding nodes that this forwarding path passes through can obtain the remaining available bandwidth of the forwarding path by transmitting a probe message, without having to flood a large number of messages carrying the remaining available bandwidth to the network outside the forwarding path. Therefore, the overhead of obtaining the remaining available bandwidth of the forwarding path is smaller, saving the transmission resources and computing resources required to obtain the remaining available bandwidth of the forwarding path.

[0008] In some embodiments, the method also includes: the head node obtains the remaining available bandwidth of the first interface based on the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface, and the remaining available bandwidth of the first interface is the difference between the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface.

[0009] The above method supports detecting the total remaining available bandwidth of the forwarding path and supports load balancing based on the total remaining available bandwidth of the forwarding path.

[0010] In some embodiments, the method further includes: the head node obtains the remaining available bandwidth of the first interface based on the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service, and the remaining available bandwidth of the first interface is the difference between the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service.

[0011] The above method supports detecting the remaining available bandwidth of a specific service, supports providing a load balancing method for the service in combination with the remaining available bandwidth of the specific service, and improves the precision of load balancing.

[0012] In some implementations, the detection message further includes a service type identifier, and the service type identifier is used to identify the target service.

[0013] Because the probe message carries the service type identifier, the receiver of the probe message can clearly identify the service for which the remaining available bandwidth is being detected based on the service type identifier. In particular, in scenarios where a single forwarding path carries multiple services simultaneously, different service type identifiers can help distinguish the different services for which remaining available bandwidth needs to be detected. This allows the detection of the remaining available bandwidth of multiple services using a single probe message, further improving the efficiency of remaining available bandwidth detection.

[0014] In some implementations, the detection message further includes a path identifier, where the path identifier is used to identify the first forwarding path.

[0015] Since the detection message carries a path identifier, it is possible to clearly detect the remaining available bandwidth of a forwarding path.

[0016] In some embodiments, the probe message includes an application layer protocol header, a destination option header DOH, and a segment routing header SRH, the application layer protocol header includes a Two-Way Active Measurement Protocol (TWAMP) message header or a Bidirectional Forwarding Detection (BFD) message header, the DOH carries the probe identifier and the remaining available bandwidth of the first interface, the SRH carries the segment list of the first forwarding path, the DOH is encapsulated in the outer layer of the application layer protocol header, and the SRH is encapsulated in the outer layer of the DOH.

[0017] In a second aspect, a bandwidth detection method is provided, which is applied to an intermediate node of a first forwarding path, the intermediate node including a second interface, the method comprising:

[0018] The intermediate node receives a first probe message, where the first probe message carries a probe identifier and a first remaining available bandwidth, where the probe identifier is used to indicate the remaining available bandwidth of the first forwarding path, the forwarding path of the probe message is the first forwarding path, the first forwarding path passes through the second interface, and the first remaining available bandwidth is used to indicate the remaining available bandwidth of a first subpath in the forwarding path, where the first subpath includes a previous hop node from the head node of the forwarding path to the intermediate node in the forwarding path;

[0019] The intermediate node obtains a second probe message based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the second interface, where the second probe message includes a second remaining available bandwidth, where the second remaining available bandwidth is used to indicate the remaining available bandwidth of a second subpath in the first forwarding path, where the second subpath includes the first subpath and the intermediate node;

[0020] The intermediate node sends the second detection message through the second interface.

[0021] Based on the method provided in the second aspect, the intermediate node collects the remaining available bandwidth of the local interface, combines the remaining available bandwidth carried in the detection message and the remaining available bandwidth of the local interface to determine the remaining available bandwidth of the subpath from the head node to the local node in the forwarding path, and passes the remaining available bandwidth to the next forwarding node, thereby being able to collect the remaining available bandwidth hop by hop, which helps to achieve end-to-end detection of the remaining available bandwidth.

[0022] In some embodiments, the first remaining available bandwidth is a minimum value of the remaining available bandwidth of each outbound interface that the probe message has passed through in the first forwarding path, and the intermediate node obtains the second probe message based on the probe identifier, the first remaining available bandwidth, and the remaining available bandwidth of the second interface, including:

[0023] In response to identifying the detection identifier, the intermediate node determines a minimum value between the first remaining available bandwidth and the remaining available bandwidth of the second interface as the second remaining available bandwidth;

[0024] The intermediate node updates the first remaining available bandwidth carried in the first detection message to the second remaining available bandwidth to obtain the second detection message.

[0025] In some embodiments, the first remaining available bandwidth includes a bandwidth value set consisting of the remaining available bandwidth of each outbound interface that the probe message has passed through in the first forwarding path, the second remaining available bandwidth includes the first remaining available bandwidth and the remaining available bandwidth of the second interface, and the intermediate node obtains the second probe message based on the probe identifier, the first remaining available bandwidth, and the remaining available bandwidth of the second interface, including:

[0026] In response to identifying the detection identifier, the intermediate node adds the remaining available bandwidth of the second interface to the bandwidth value set to obtain a second detection message.

[0027] In some implementations, the remaining available bandwidth of the second interface includes the total remaining available bandwidth of the second interface, and the method further includes:

[0028] The intermediate node obtains the total remaining available bandwidth of the second interface based on the total physical bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface, where the total remaining available bandwidth of the second interface is the difference between the total physical bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface.

[0029] In some implementations, the remaining available bandwidth of the second interface includes the remaining available bandwidth of the target service, and the method further includes:

[0030] The intermediate node obtains the remaining available bandwidth of the target service based on the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service, where the remaining available bandwidth of the target service is the difference between the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service.

[0031] In some implementations, both the first detection message and the second detection message further carry a service type identifier, where the service type identifier is used to identify the target service.

[0032] In some implementations, both the first detection message and the second detection message further carry a path identifier, where the path identifier is used to identify the first forwarding path.

[0033] In a third aspect, a bandwidth detection method is provided, which is applied to an egress node of a first forwarding path. The method includes:

[0034] The tail node receives a probe message, where the probe message carries a probe identifier and a first remaining available bandwidth, where the probe identifier is used to indicate the remaining available bandwidth of the first forwarding path, the first forwarding path is used to forward the probe message, and the first remaining available bandwidth is used to indicate the remaining available bandwidth of a first subpath in the first forwarding path, where the first subpath includes a path between a head node of the first forwarding path and a previous hop node of the tail node in the first forwarding path;

[0035] The tail node determines the remaining available bandwidth of the first forwarding path based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface of the tail node;

[0036] The tail node sends the remaining available bandwidth of the first forwarding path to the head node of the first forwarding path.

[0037] Based on the method provided in the third aspect, the tail node determines the remaining available bandwidth of the forwarding path by combining the remaining available bandwidth carried in the detection message and the remaining available bandwidth of the local interface, and feeds back the remaining available bandwidth of the forwarding path to the head node, so that the head node can automatically obtain the remaining available bandwidth of the forwarding path, reducing the technical complexity of the head node in obtaining the remaining available bandwidth of the forwarding path, and thus helping the head node to perform load balancing based on the remaining available bandwidth of the forwarding path.

[0038] In some embodiments, the first remaining available bandwidth is a minimum value of the remaining available bandwidths of the outbound interfaces on the first forwarding path through which the detection message passes, or the first remaining available bandwidth includes the remaining available bandwidth of each outbound interface of the first forwarding path through which the detection message passes, and the egress node determines the remaining available bandwidth of the first forwarding path based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface of the egress node, including:

[0039] In response to identifying the detection identifier, the tail node uses the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the third interface as the remaining available bandwidth of the first forwarding path.

[0040] In some embodiments, the method further comprises:

[0041] The tail node obtains the remaining available bandwidth of the third interface based on the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface, where the remaining available bandwidth of the third interface is the difference between the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface.

[0042] In some embodiments, the method further comprises:

[0043] The tail node obtains a remaining available bandwidth of the third interface based on the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service, where the remaining available bandwidth of the third interface is a difference between the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service.

[0044] In some implementations, the tail node sending the remaining available bandwidth of the first forwarding path to the head node includes:

[0045] The tail node obtains and sends a response message corresponding to the probe message to the head node, where the response message carries the remaining available bandwidth of the first forwarding path.

[0046] In some embodiments, the response message includes an application layer protocol header and a destination option header DOH, the application layer protocol header includes a Bidirectional Active Measurement Protocol TWAMP message header or a Bidirectional Forwarding Detection BFD message header, the DOH carries the remaining available bandwidth of the first forwarding path, and the DOH is encapsulated in the outer layer of the application layer protocol header.

[0047] In some implementations, both the probe message and the response message further carry a service type identifier, and the service type identifier is used to identify a target service.

[0048] In some implementations, both the probe message and the response message further carry a path identifier, where the path identifier is used to identify the first forwarding path.

[0049] In a fourth aspect, a message processing device is provided, which is provided at a head node of a first forwarding path, and includes:

[0050] an obtaining unit, configured to obtain a detection message, wherein the detection message includes a detection identifier and a remaining available bandwidth of the first interface of the head node, wherein the detection identifier is used to indicate the remaining available bandwidth of the first forwarding path;

[0051] A sending unit is configured to send the detection message through the first interface corresponding to the first forwarding path.

[0052] In some embodiments, the obtaining unit is further used to obtain the remaining available bandwidth of the first interface based on the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface, where the remaining available bandwidth of the first interface is the difference between the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface.

[0053] In some embodiments, the obtaining unit is further used to obtain the remaining available bandwidth of the first interface based on the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service, where the remaining available bandwidth of the first interface is the difference between the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service.

[0054] In some implementations, the detection message further includes a service type identifier, and the service type identifier is used to identify the target service.

[0055] In some implementations, the detection message further includes a path identifier, where the path identifier is used to identify the first forwarding path.

[0056] In some embodiments, the detection message includes an application layer protocol header, a destination option header DOH, and a segment routing header SRH, the application layer protocol header includes a bidirectional active measurement protocol TWAMP message header or a bidirectional forwarding detection BFD message header, the DOH carries the detection identifier and the remaining available bandwidth of the first interface, the SRH carries the segment list of the first forwarding path, the DOH is encapsulated in the outer layer of the application layer protocol header, and the SRH is encapsulated in the outer layer of the DOH.

[0057] In a fifth aspect, a message processing device is provided, which is provided at an intermediate node of a first forwarding path, the intermediate node including a second interface, and the device including:

[0058] a receiving unit, configured to receive a first probe message, where the first probe message carries a probe identifier and a first remaining available bandwidth, where the probe identifier is used to indicate the remaining available bandwidth of the first forwarding path, where the forwarding path of the probe message is the first forwarding path, where the first forwarding path passes through the second interface, and where the first remaining available bandwidth is used to indicate the remaining available bandwidth of a first subpath in the forwarding path, where the first subpath includes a previous hop node from a head node of the forwarding path to the intermediate node in the forwarding path;

[0059] an obtaining unit, configured to obtain a second detection message based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the second interface, wherein the second detection message includes a second remaining available bandwidth, and the second remaining available bandwidth is used to indicate the remaining available bandwidth of a second subpath in the first forwarding path, where the second subpath includes the first subpath and the intermediate node;

[0060] A sending unit, configured to send the second detection message through the second interface.

[0061] In some embodiments, the first remaining available bandwidth is a minimum value of the remaining available bandwidths of each outbound interface that the probe message has passed through in the first forwarding path. The obtaining unit is configured to, in response to identifying the probe identifier, determine the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the second interface as the second remaining available bandwidth; and update the first remaining available bandwidth carried in the first probe message to the second remaining available bandwidth to obtain the second probe message.

[0062] In some embodiments, the first remaining available bandwidth includes a bandwidth value set consisting of the remaining available bandwidth of each outbound interface that the probe message has passed through in the first forwarding path, and the second remaining available bandwidth includes the first remaining available bandwidth and the remaining available bandwidth of the second interface. The obtaining unit is configured to, in response to identifying the probe identifier, add the remaining available bandwidth of the second interface to the bandwidth value set to obtain the second probe message.

[0063] In some embodiments, the remaining available bandwidth of the second interface includes the total remaining available bandwidth of the second interface, and the obtaining unit is further used to obtain the total remaining available bandwidth of the second interface based on the physical total bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface, where the total remaining available bandwidth of the second interface is the difference between the physical total bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface.

[0064] In some embodiments, the remaining available bandwidth of the second interface includes the remaining available bandwidth of the target service. The obtaining unit is further used to obtain the remaining available bandwidth of the target service based on the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service. The remaining available bandwidth of the target service is the difference between the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service.

[0065] In some implementations, both the first detection message and the second detection message further carry a service type identifier, where the service type identifier is used to identify the target service.

[0066] In some implementations, both the first detection message and the second detection message further carry a path identifier, where the path identifier is used to identify the first forwarding path.

[0067] In a sixth aspect, a message processing device is provided, which is provided at an egress node of a first forwarding path, the device comprising:

[0068] a receiving unit, configured to receive a probe message, the probe message carrying a probe identifier and a first remaining available bandwidth, the probe identifier being used to indicate the remaining available bandwidth of the first forwarding path, the first forwarding path being used to forward the probe message, the first remaining available bandwidth being used to indicate the remaining available bandwidth of a first subpath in the first forwarding path, the first subpath comprising a path between a head node of the first forwarding path and a previous hop node of the tail node in the first forwarding path;

[0069] a determining unit, configured to determine the remaining available bandwidth of the first forwarding path based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface of the tail node;

[0070] A sending unit is configured to send the remaining available bandwidth of the first forwarding path to the head node of the first forwarding path.

[0071] In some embodiments, the first remaining available bandwidth is a minimum value of the remaining available bandwidths of the outbound interfaces on the first forwarding path through which the probe message passes, or the first remaining available bandwidth includes the remaining available bandwidth of each outbound interface on the first forwarding path through which the probe message passes, and the determining unit is configured to, in response to identifying the probe identifier, use the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the third interface as the remaining available bandwidth of the first forwarding path.

[0072] In some embodiments, the determination unit is further used to obtain the remaining available bandwidth of the third interface based on the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface, where the remaining available bandwidth of the third interface is the difference between the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface.

[0073] In some embodiments, the determination unit is further used to obtain the remaining available bandwidth of the third interface based on the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service, where the remaining available bandwidth of the third interface is the difference between the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service.

[0074] In some implementations, the sending unit is configured to obtain and send a response message corresponding to the probe message to the head node, where the response message carries the remaining available bandwidth of the first forwarding path.

[0075] In some embodiments, the response message includes an application layer protocol header and a destination option header DOH, the application layer protocol header includes a Bidirectional Active Measurement Protocol TWAMP message header or a Bidirectional Forwarding Detection BFD message header, the DOH carries the remaining available bandwidth of the first forwarding path, and the DOH is encapsulated in the outer layer of the application layer protocol header.

[0076] In some implementations, both the probe message and the response message further carry a service type identifier, and the service type identifier is used to identify a target service.

[0077] In some implementations, both the probe message and the response message further carry a path identifier, where the path identifier is used to identify the first forwarding path.

[0078] In a seventh aspect, a forwarding device is provided, comprising a processor and a network interface. The processor is configured to execute instructions so that the forwarding device performs the method provided in the first aspect or any optional embodiment of the first aspect, and the network interface is configured to receive or send messages. Specific details of the forwarding device provided in the seventh aspect can be found in the first aspect or any optional embodiment of the first aspect, and are not further described here.

[0079] In an eighth aspect, a forwarding device is provided, comprising a processor and a network interface. The processor is configured to execute instructions so that the forwarding device performs the method provided in the second aspect or any optional embodiment of the second aspect, and the network interface is configured to receive or send messages. Specific details of the forwarding device provided in the eighth aspect can be found in the second aspect or any optional embodiment of the second aspect, and are not further described here.

[0080] In a ninth aspect, a forwarding device is provided, comprising a processor and a network interface. The processor is configured to execute instructions so that the forwarding device performs the method provided in the third aspect or any optional embodiment of the third aspect, and the network interface is configured to receive or send messages. Specific details of the forwarding device provided in the ninth aspect can be found in the third aspect or any optional embodiment of the third aspect and are not further described here.

[0081] In the tenth aspect, a computer-readable storage medium is provided, which stores at least one instruction. When the instruction is executed on a computer, the computer executes the method provided by the first aspect or any optional method of the first aspect.

[0082] In the eleventh aspect, a computer-readable storage medium is provided, which stores at least one instruction. When the instruction is executed on a computer, the computer executes the method provided by the second aspect or any optional method of the second aspect.

[0083] In the twelfth aspect, a computer-readable storage medium is provided, which stores at least one instruction. When the instruction is executed on a computer, the computer executes the method provided by the third aspect or any optional method of the third aspect.

[0084] In the thirteenth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and executed by a computer, the computer executes the method provided by the first aspect or any optional method of the first aspect.

[0085] In the fourteenth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and run by a computer, the computer executes the method provided by the above-mentioned second aspect or any optional method of the second aspect.

[0086] In the fifteenth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and run by a computer, the computer executes the method provided by the third aspect or any optional method of the third aspect.

[0087] In the sixteenth aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned first aspect and any possible implementation of the first aspect.

[0088] In the seventeenth aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned second aspect and any possible implementation of the second aspect.

[0089] In the eighteenth aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned third aspect and any possible implementation of the third aspect.

[0090] In a nineteenth aspect, a network system is provided, comprising the apparatus described in the fourth aspect or any optional manner of the fourth aspect, the apparatus described in the fifth aspect or any optional manner of the fifth aspect, and the apparatus described in the sixth aspect or any optional manner of the sixth aspect; or,

[0091] The network system includes the device described in the seventh aspect or any optional embodiment of the seventh aspect, the device described in the eighth aspect or any optional embodiment of the eighth aspect, and the device described in the ninth aspect or any optional embodiment of the ninth aspect.

[0092] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] FIG1 is a schematic diagram of the architecture of a network system provided in an embodiment of the present application;

[0094] FIG2 is a flow chart of a bandwidth detection method provided by an embodiment of the present application;

[0095] FIG3 is a schematic diagram of a probe message sent by a forwarding node according to an embodiment of the present application;

[0096] FIG4 is a schematic diagram of a probe message sent by a forwarding node according to an embodiment of the present application;

[0097] FIG5 is a schematic diagram of a probe message sent by a forwarding node according to an embodiment of the present application;

[0098] FIG6 is a schematic diagram of a probe message sent by a forwarding node according to an embodiment of the present application;

[0099] FIG7 is a schematic diagram of a load sharing scenario provided by an embodiment of the present application;

[0100] FIG8A is a schematic diagram of the format of a detection message provided in an embodiment of the present application;

[0101] FIG8B is a schematic diagram of the format of a detection message provided in an embodiment of the present application;

[0102] FIG9 is a schematic structural diagram of a message processing device provided in an embodiment of the present application;

[0103] FIG10 is a schematic structural diagram of a message processing device provided in an embodiment of the present application;

[0104] FIG11 is a schematic structural diagram of a message processing device provided in an embodiment of the present application;

[0105] FIG12 is a schematic structural diagram of a forwarding device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0106] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0107] The following is an explanation of some terminology concepts involved in the embodiments of this application.

[0108] (1) Load Balancing

[0109] Load balancing means that when a network node forwards traffic, it distributes the load (traffic) across multiple equal-cost forwarding paths. For example, equal-cost paths are forwarding paths (links) with equal costs to reach the destination.

[0110] (2) Remaining available bandwidth

[0111] The remaining available bandwidth can also be simply referred to as the remaining bandwidth or available bandwidth. The remaining available bandwidth of an interface is, for example, the difference between the total physical bandwidth of the interface and the bandwidth used by the interface during traffic transmission. The total physical bandwidth can also be called the maximum bandwidth, which refers to the maximum rate or maximum bandwidth that the interface (or link) can carry. For example, if the total physical bandwidth of an interface is 100Gbps and the interface uses 20Gbps of bandwidth during traffic transmission, the remaining available bandwidth of the interface is 100Gbps-20Gbps=80Gbps.

[0112] (3) Elephant Flow

[0113] An elephant flow refers to a data flow with a huge amount of data (or a huge flow transmission rate).

[0114] (4) Traffic scheduling ratio

[0115] The traffic scheduling ratio, also known as the traffic allocation ratio, indicates the proportion of data flows scheduled on different forwarding paths to the same destination. The traffic scheduling ratio can be a ratio of the number of flows or a ratio of the data volume.

[0116] The flow number ratio refers to the ratio of the number of data flows transmitted on different forwarding paths. For example, the flow number ratio between forwarding path A and forwarding path B is the ratio between the number of data flows transmitted on forwarding path A and the number of data flows transmitted on forwarding path B. Optionally, the remaining available bandwidth ratio between forwarding paths is equal to the flow number ratio between forwarding paths. For example, the head node determines that the remaining available bandwidth ratio between forwarding path A and forwarding path B is 1:1. When the head node receives 10 data flows, and these 10 data flows can reach the destination through forwarding path A and forwarding path B, the head node transmits 5 data flows through forwarding path A and transmits another 5 data flows through forwarding path B.

[0117] The data volume ratio refers to the ratio of the total data volume contained in the data streams transmitted on different forwarding paths. For example, the data volume ratio between forwarding path A and forwarding path B is the ratio between the total data volume of at least one data stream transmitted on forwarding path A and the total data volume of at least one data stream transmitted on forwarding path B. Optionally, the remaining available bandwidth ratio between forwarding paths is equal to the data volume ratio between forwarding paths. For example, the head node determines that the remaining available bandwidth ratio between forwarding path A and forwarding path B is 1:1. When the head node receives data stream A and data stream B, these two data streams can reach the destination through forwarding path A and forwarding path B. The bandwidth required for data stream A is 3Gbps, and the bandwidth required for data stream B is 1Gbps. Then, the head node transmits 2Gbps of data from the two data streams through forwarding path A, and transmits the other 2Gbps of data from the two data streams through forwarding path B.

[0118] (5) Head node, middle node and tail node

[0119] The head node, the intermediate node and the tail node are three roles of the device. The head node is the first forwarding node in the forwarding path (also called the first hop node of the forwarding path). The head node can also be called the entry node of the forwarding path or the source end of the forwarding path. The tail node is the last node in the forwarding path (also called the last hop node of the forwarding path). The tail node can also be called the exit node of the forwarding path or the destination end of the forwarding path. The head node and the tail node are also called the endpoints of the forwarding path. The intermediate node is located between the head node and the tail node in the forwarding path. The intermediate node is used to forward messages between the head node and the tail node. The head node is the upstream node of the intermediate node, and the intermediate node is the upstream node of the tail node. In some embodiments, the head node is deployed at the network entrance, for example, the head node is the entrance service provider side edge (provider edge, PE) device; the intermediate node is deployed inside the network, for example, the intermediate node is the service provider (provider, P) device; the tail node is deployed at the network exit, for example, the tail node is the exit PE.

[0120] (6) Return path

[0121] The return path is also called the reverse path. The return path of a forwarding path is a path that runs in the opposite direction of the forwarding path and passes through the same forwarding nodes as the forwarding path. For example, if the forwarding path passes through forwarding node A, forwarding node B, and then forwarding node C, the return path of the forwarding path passes through forwarding node C, forwarding node B, and then forwarding node A.

[0122] The following is an example of an application scenario of the embodiment of the present application.

[0123] The embodiments of the present application can be applied to scenarios where load balancing is performed in a network.

[0124] Load balancing mainly includes equal-cost load balancing (ECMP) and unequal-cost load balancing (UCMP).

[0125] ECMP distributes traffic evenly across multiple equal-cost paths to the same destination. ECMP does not account for bandwidth differences between forwarding paths; it assumes that all forwarding paths have the same bandwidth and schedules traffic at a 1:1 ratio. Specifically, ECMP allocates traffic to each forwarding path at a 1:1 ratio. For example, a network device connects forwarding path A and forwarding path B, which are equal-cost paths. If the network device uses ECMP for load balancing, the traffic allocated between forwarding path A and forwarding path B will always be in a fixed 1:1 ratio. The traffic scheduling ratio between the forwarding paths is independent of the forwarding path bandwidth, resulting in a situation where one forwarding path A or forwarding path B is overloaded while the other is relatively idle, resulting in poor load balancing.

[0126] UCMP refers to the process of scheduling traffic among multiple equal-cost paths to the same destination based on the ratio of their total physical bandwidth. For example, a network device connects forwarding path A, which has a total physical bandwidth of 10 Gbps, and forwarding path B, which has a total physical bandwidth of 100 Gbps. Forwarding path A and forwarding path B are equal-cost paths. If the network device uses UCMP for load balancing, the traffic allocated to forwarding path A and forwarding path B will be distributed in a ratio of 1:10. The traffic scheduling ratio in UCMP refers to the ratio between the number of data flows transmitted on different forwarding paths.

[0127] However, when using UCMP, load balancing is performed based on the total physical bandwidth of the forwarding paths, rather than the actual remaining available bandwidth of the forwarding paths. The ratio of remaining available bandwidth to the total physical bandwidth of different forwarding paths is not necessarily equal, thus affecting load balancing. For example, when hash polarization occurs, the traffic distribution process may cause some hash values ​​to become redundant, resulting in some traffic being concentrated on certain paths while other paths receive less traffic. This can cause some forwarding paths to have a larger total physical bandwidth but less remaining available bandwidth due to a high concentration of traffic, while other forwarding paths may have a smaller total physical bandwidth but a larger remaining available bandwidth due to almost no traffic being allocated. For another example, in the case of large flows, a forwarding path may be assigned a large flow, resulting in a larger total physical bandwidth and less remaining available bandwidth.

[0128] Based on this, some embodiments of the present application provide a method for load balancing based on the remaining available bandwidth of the forwarding path. For example, a network device is connected to a forwarding path A with a remaining available bandwidth of 10 Gbps and a forwarding path B with a remaining available bandwidth of 100 Gbps. Based on the fact that forwarding path A and forwarding path B are equal-cost paths and the ratio of the remaining available bandwidth between forwarding path A and forwarding path B is 1:10, the network device determines that the traffic scheduling ratio between forwarding path A and forwarding path B is 1:10. The network device will distribute the received traffic to forwarding path A or forwarding path B at a ratio of 1:10 for forwarding. Since the traffic scheduling ratio between forwarding paths during load balancing is not a fixed value, but is related to the bandwidth of the forwarding path and the remaining available bandwidth of the forwarding path, for example, the traffic scheduling ratio between forwarding paths is the ratio of the remaining available bandwidth between the forwarding paths. Therefore, the load balancing between forwarding paths is improved, which helps to schedule more service data to the forwarding path with a larger remaining available bandwidth and schedule less service data to the forwarding path with a smaller remaining available bandwidth, thereby making the load of different forwarding paths in the network more balanced and improving network utilization. Furthermore, it helps to make fuller use of the remaining available bandwidth to carry services on forwarding paths, and reduce the ineffective expansion and cost increase caused by the fact that there are forwarding paths with sufficient remaining available bandwidth in the network but they are not scheduled to carry services and new forwarding paths are continued to be expanded.

[0129] However, it is currently impossible to obtain the remaining available bandwidth of the forwarding path, resulting in technical difficulties in load balancing based on the remaining available bandwidth.

[0130] In some implementations of obtaining the remaining available bandwidth of a forwarding path, a network device determines the bandwidth used by traffic transmitted by an interface based on the rate of real-time traffic transmitted by the interface at the local end, calculates the remaining available bandwidth of the forwarding path based on the bandwidth used by traffic transmitted by the interface, and then announces the remaining available bandwidth by flooding the entire network through a control plane routing protocol, so that forwarding nodes in the network can obtain the remaining available bandwidth of the forwarding path.

[0131] However, when the remaining available bandwidth is announced by flooding the control plane routing protocol, on the one hand, when the remaining available bandwidth is announced by flooding the control plane protocol, each device in the entire network needs to perceive and synchronize the remaining available bandwidth of the forwarding path, and the remaining available bandwidth needs to be sent to each device in the entire network. A network may contain hundreds or thousands of devices, resulting in a huge overhead for announcing the remaining available bandwidth. However, the devices that need to use the remaining available bandwidth of the forwarding path for load sharing usually only involve the devices that the forwarding path passes through. The devices that the forwarding path does not pass through usually do not need to perceive and use the remaining available bandwidth of the forwarding path. Announcing the remaining available bandwidth to the devices that the forwarding path does not pass through results in a lot of invalid information announcements. A large number of messages carrying the remaining available bandwidth need to be spread in the network, resulting in a significant waste of transmission resources and computing resources. On the other hand, the forwarding path usually passes through multiple interfaces of multiple forwarding nodes. It is difficult to accurately determine the remaining available bandwidth of the entire path based only on the remaining available bandwidth of the interface of a single node. Furthermore, communicating the remaining available bandwidth via routing protocol messages can lead to instability in Interior Gateway Protocol (IGP) or Border Gateway Protocol (BGP) routing. Furthermore, using a controller to communicate the remaining available bandwidth of a forwarding path creates a dependency on the controller. Furthermore, complex logic is required to correlate the remaining available bandwidth with the forwarding path to clearly identify the forwarding path for which the remaining available bandwidth is being communicated.

[0132] Based on this, some embodiments of the present application provide a mechanism for detecting the remaining available bandwidth of a forwarding path, thereby supporting load sharing based on the detected remaining available bandwidth of the forwarding path. In one possible implementation, a probe message is sent along the forwarding path for which the remaining available bandwidth needs to be detected, thereby triggering the node receiving the probe message to collect the remaining available bandwidth of the interface through which the forwarding path passes at its own end. The remaining available bandwidth of the forwarding path can be determined based on the remaining available bandwidth of the interface through which the forwarding path passes at each node. On the one hand, nodes that the forwarding path does not pass through do not need to perceive and announce the remaining available bandwidth of the forwarding path. Compared with the method of flooding the remaining available bandwidth of the forwarding path across the entire network, the scope of announcing the remaining available bandwidth is smaller. The scope of announcing the remaining available bandwidth can be narrowed from the entire network to a single forwarding path. The forwarding nodes along this forwarding path can obtain the remaining available bandwidth of the forwarding path by transmitting a probe message, without having to flood a large number of messages carrying the remaining available bandwidth to the network outside the forwarding path. Therefore, the overhead of obtaining the remaining available bandwidth of the forwarding path is reduced, saving the transmission resources and computing resources required to obtain the remaining available bandwidth of the forwarding path.

[0133] In some embodiments of detecting the remaining available bandwidth, the remaining available bandwidth of the forwarding path is determined based on the remaining available bandwidth of each interface of each hop node passed through in the forwarding path. For example, the remaining available bandwidth of each interface of each hop node passed through in the forwarding path is compared, and the minimum value of the remaining available bandwidth of each interface of each hop node passed through in the forwarding path is determined as the remaining available bandwidth of the forwarding path.

[0134] Specifically, considering that the remaining available bandwidth of different interfaces along a forwarding path may vary, for example, the interface along a forwarding path passing through node A may have a large remaining available bandwidth, while the interface along a forwarding path passing through node B may have a small remaining available bandwidth, the remaining available bandwidth of a forwarding path is generally the minimum remaining available bandwidth of each interface along the forwarding path. For example, even if an interface on a node along the forwarding path has a large remaining available bandwidth, if the remaining available bandwidth of the interface downstream of that node is small, then due to the bottleneck effect, the remaining available bandwidth of the forwarding path will be limited by the interface with the smaller remaining available bandwidth. Therefore, data flows should be allocated to the forwarding path based on the remaining available bandwidth of the interface with the smallest remaining available bandwidth along the forwarding path. Otherwise, problems such as packet loss, increased latency, or network congestion may occur. This is like a pipe (forwarding path) with some segments (links or interfaces) thicker and others thinner. No matter how much traffic is input at one end, the final throughput is still limited by the thinnest segment (the interface with the smallest remaining available bandwidth).

[0135] Therefore, by taking the minimum remaining available bandwidth of each interface of each hop node passed through in the forwarding path as the remaining available bandwidth of the forwarding path, load balancing is performed according to the remaining available bandwidth of the interface with the smallest remaining available bandwidth passed through different forwarding paths. This reduces the risks of packet loss, increased latency, or network congestion caused by load balancing based only on the remaining available bandwidth of a single node passed through in the forwarding path without considering the remaining available bandwidth of other nodes, thereby improving the service SLA.

[0136] In addition, since forwarding nodes obtain the remaining available bandwidth of the forwarding path by transmitting detection messages, it is equivalent to detecting the remaining available bandwidth through the data plane without relying on the controller to transmit the remaining available bandwidth. Therefore, the process of obtaining the remaining available bandwidth of the forwarding path is less dependent on the controller.

[0137] In some embodiments, considering that it is often difficult for a head node to know the remaining available bandwidth of the interfaces of the intermediate nodes and the remaining available bandwidth of the interfaces of the tail node along the forwarding path, it is difficult for the head node to obtain the remaining available bandwidth of the forwarding path. Based on this, during the probe message forwarding process, each time the probe message passes through an interface of a forwarding node, the forwarding node collects the remaining available bandwidth of the interface that the probe message passes through within its own node and adds the collected remaining available bandwidth to the probe message. Since the forwarding path that the probe message passes through during forwarding is exactly the forwarding path for which the remaining available bandwidth needs to be detected, the forwarding node that the probe message passes through is exactly the forwarding node that the forwarding path for which the remaining available bandwidth needs to be detected passes through, and the outbound interface that the probe message passes through within the forwarding node is exactly the outbound interface that the forwarding path for which the remaining available bandwidth needs to be detected passes through within the forwarding node, when the probe message reaches the tail node, the probe message received by the tail node will carry the remaining available bandwidth of each interface that the forwarding path to be detected passes through. Therefore, based on the received probe message, the tail node can determine the minimum remaining available bandwidth of each interface that the forwarding path to be detected passes through, thereby determining the remaining available bandwidth of the forwarding path to be detected. After the tail node feeds back the remaining available bandwidth of the forwarding path to be detected to the head node, the head node can obtain the remaining available bandwidth of the forwarding path, and then the head node can perform load balancing based on the remaining available bandwidth of the forwarding path. The head node does not need to determine the remaining available bandwidth corresponding to the forwarding path based on the association relationship between the forwarding path to be detected, the nodes passed by the forwarding path, and the interfaces, thereby reducing the overhead generated by maintaining the association relationship.

[0138] The following is an example of the system architecture of the embodiment of the present application.

[0139] Referring to Figure 1 , a schematic diagram of the architecture of a network system 10 provided in an embodiment of the present application is shown. Network system 10 includes multiple network devices. Network devices may also be referred to as forwarding nodes, network elements, forwarding devices, or switching devices. As shown in Figure 1 , network system 10 includes a head node, an intermediate node A, and an egress node. Optionally, network system 10 also includes an intermediate node B.

[0140] In some embodiments, any two neighboring network devices among the plurality of network devices are communicatively connected via their respective interfaces. For example, referring to FIG1 , a head node includes interface 1. An intermediate node includes interfaces 2 and 3. An egress node includes interfaces 4 and 5. The head node is communicatively connected to interface 2 of the intermediate node via interface 1. The intermediate node is communicatively connected to interface 4 of the egress node via interface 3.

[0141] In some embodiments, the forwarding paths of the head node, intermediate nodes, and tail node in network system 10 are tunnels. For example, the forwarding paths of the head node, intermediate nodes, and tail node are paths indicated by a segment list. For example, the forwarding nodes traversed in the forwarding path are identified by SIDs in the segment list, and the order of the forwarding nodes traversed in the forwarding path is identified by the order of the SIDs in the segment list. The scenario shown in Figure 1 is illustrated using forwarding path A traversing intermediate node A as an example. Forwarding path A may also traverse two, three, or more intermediate nodes.

[0142] In some embodiments, multiple forwarding paths exist between the head node and the tail node in network system 10. For example, as shown in Figure 1, there are two forwarding paths between the head node and the tail node: forwarding path A passes through the head node → intermediate node A → the tail node, and forwarding path B passes through the head node → intermediate node B → the tail node. The head node can select a forwarding path for forwarding data packets from either forwarding path A or forwarding path B. The scenario shown in Figure 1 uses forwarding path A passing through a single intermediate node as an example; however, forwarding path A can also pass through two, three, or more intermediate nodes.

[0143] The following is an example of the method flow of the embodiment of the present application.

[0144] FIG2 is a flowchart of a bandwidth detection method provided in an embodiment of the present application. Exemplarily, the method shown in FIG2 is interactively executed by a head node, an intermediate node, and an end node of forwarding path A in the system shown in FIG1 . The method shown in FIG2 includes steps S210 to S270.

[0145] In step S210, the head node obtains detection message A.

[0146] Probe message A carries the probe identifier and the remaining available bandwidth of interface 1.

[0147] The detection identifier is used to indicate the remaining available bandwidth of the detection forwarding path A. For example, the detection identifier is the message type of the detection message. For another example, the detection identifier is a predetermined operation code (opcode). For example, the detection identifier is the operation code in the microcode instruction for collecting the remaining available bandwidth. Since the detection message sent by the head node carries the detection identifier, the intermediate node downstream of the head node can know that the received message is a detection message for detecting the remaining available bandwidth based on the detection identifier, and then trigger the intermediate node to automatically execute the action of collecting the remaining available bandwidth. It is also convenient for the intermediate node to distinguish between the detection message and the data message based on whether the message carries the detection identifier.

[0148] The forwarding path of probe packet A is forwarding path A, which passes through interface 1.

[0149] In some embodiments of determining the remaining available bandwidth, the head node obtains the remaining available bandwidth of interface 1 based on the total physical bandwidth of interface 1 and the bandwidth used by the traffic transmitted by interface 1. Interface 1 is the interface through which probe message A passes within the head node. In other words, the probe message sent by the head node carries the remaining available bandwidth of the interface used by the head node when sending the probe message. The remaining available bandwidth of interface 1 is the difference between the total physical bandwidth of interface 1 and the bandwidth used by the traffic transmitted by interface 1.

[0150] A method for determining the bandwidth used by the traffic transmitted by interface 1 for the head node, for example, the head node collects the real-time transmission rate of the traffic transmitted by interface 1, and determines the bandwidth used by the traffic transmitted by interface 1 within a unit time period based on the real-time transmission rate of the traffic transmitted by interface 1 within the unit time period and the length of the unit time period.

[0151] In other embodiments of determining the remaining available bandwidth, the remaining available bandwidth of interface 1 includes the remaining available bandwidth of the target service. The head node obtains the remaining available bandwidth of the target service based on the total available bandwidth of the target service and the bandwidth used by interface 1 to transmit the target service. The remaining available bandwidth of the target service is the difference between the total available bandwidth of the target service and the bandwidth used by interface 1 to transmit the target service. For example, the target services include gold and silver services. The total available bandwidth configured for the gold service is 10G, and the total available bandwidth configured for the silver service is 20G. Interface 1 uses 2G of bandwidth to transmit the gold service, and interface 1 uses 3G of bandwidth to transmit the gold service. The remaining available bandwidth of the gold service is 10G - 2G = 8G, and the remaining available bandwidth of the silver service is 20G - 3G = 17G. By calculating the remaining available bandwidth by service, it is possible to calculate the remaining available bandwidth of each service, which provides greater flexibility. In particular, in scenarios where a forwarding path carries multiple services simultaneously, and the remaining available bandwidth of different services varies, it is helpful to detect the remaining available bandwidth of each service, thereby providing different load balancing methods for different services, matching a wider range of service scenarios.

[0152] In some embodiments, the head node obtains the remaining available bandwidth of interface 1 based on the total available bandwidth configured for interface 1 and the transmission rate of the traffic transmitted by interface 1. For example, the head node is configured with a Committed Access Rate (CAR), which is used to limit bandwidth usage on a specific network interface. The CAR configuration includes a maximum allowed transmission rate to control bandwidth usage. For example, the head node obtains the remaining available bandwidth of interface 1 based on the transmission rate of interface 1 configured for CAR and the transmission rate of the traffic transmitted by interface 1. For another example, the head node obtains the remaining available bandwidth of interface 1 based on the maximum available bandwidth of interface 1 in the CAR configuration and the bandwidth used by the traffic transmitted by interface 1. The remaining available bandwidth of interface 1 is the difference between the total available bandwidth configured for interface 1 and the bandwidth used by the traffic transmitted by interface 1. For example, if the total available bandwidth configured for interface 1 is 100G, the maximum available bandwidth of interface 1 in the CAR configuration is 50G, and the transmission rate of the traffic transmitted by interface 1 is 30G, the head node determines that the remaining available bandwidth of interface 1 is 50G - 30G = 20G.

[0153] In some embodiments, the probe message A also carries a service type identifier. The service type identifier is used to identify the service (target service) whose remaining available bandwidth is to be detected. For example, the service type identifier is the name, number, or type value of the target service. For example, if the probe message A is used to detect the remaining available bandwidth of a premium service, the probe message A also carries the type identifier of the premium service.

[0154] In some embodiments, the detection message A further carries a path identifier. The path identifier is used to identify the forwarding path A. For example, the forwarding path A is represented by a segment list, and the path identifier of the forwarding path A is the list ID of the segment list.

[0155] Because the probe message carries not only the remaining available bandwidth but also the path identifier of forwarding path A, it implicitly indicates the correspondence between the remaining available bandwidth and forwarding path A. This allows the forwarding node that receives the probe message to determine, based on the path identifier carried in the message, that the remaining available bandwidth is the remaining available bandwidth of forwarding path A. In particular, for the tail node, since in some implementations the tail node needs to return the remaining available bandwidth to the head node, carrying the path identifier in the probe message facilitates the tail node forwarding the remaining available bandwidth to the head node along the return path corresponding to forwarding path A based on the path identifier.

[0156] Step S220 : The head node sends a detection message A through interface 1 .

[0157] Regarding the timing of the head node obtaining and sending a probe message, in some embodiments, the head node performs the steps of obtaining and sending a probe message once every predetermined time period, so that the remaining available bandwidth of the forwarding path can be periodically detected, so that the obtained remaining available bandwidth is more timely, which helps the head node to promptly perceive the newer remaining available bandwidth of the forwarding path. For example, the head node initiates a probe message in time period A and detects that the remaining available bandwidth of the forwarding path is remaining available bandwidth A. Thereafter, due to changes in the number of data streams or the amount of data transmitted in the forwarding path, the remaining available bandwidth of the forwarding path is updated from remaining available bandwidth A to remaining available bandwidth B. The head node initiates a probe message again in time period B and can detect that the remaining available bandwidth of the forwarding path is remaining available bandwidth B, thereby promptly perceiving the update of the remaining available bandwidth.

[0158] The predetermined time period is, for example, several seconds or several minutes. The predetermined time period is determined based on, for example, a real-time requirement for the remaining available bandwidth of the forwarding path. Optionally, the predetermined time period is several seconds. The head node obtains and sends probe messages at the predetermined time period of seconds, thereby enabling detection of the remaining available bandwidth at the second level, which is equivalent to real-time detection of the remaining available bandwidth.

[0159] Exemplarily, the controller or network administrator sends a detection configuration to the head node, and the detection configuration is used to indicate the remaining available bandwidth of the detection forwarding path. For example, the detection configuration includes a predetermined time period based on which the detection message is sent. The head node receives the detection configuration and enables the detection process of the remaining available bandwidth according to the detection configuration. For another example, the detection configuration includes a path identifier of the forwarding path A to be detected, the head node obtains the path identifier of the forwarding path A from the detection configuration, and the head node determines interface 1 based on the path identifier of the forwarding path A. For example, the head node determines the next node of the head node in the forwarding path A based on the path identifier and obtains the identifier of the intermediate node. The head node searches the routing forwarding table for the outgoing interface corresponding to the intermediate node based on the identifier of the intermediate node to obtain interface 1. For another example, the head node determines the outgoing interface of the head node in the forwarding path A based on the path identifier to obtain interface 1.

[0160] In some embodiments, the probe message A includes a segment list of the forwarding path A to be detected. For example, the segment list of the probe message A includes the segment ID (SID) of the head node, the SID of the intermediate node, and the SID of the tail node. In some embodiments, the segment list in the probe message A includes the SID corresponding to each outgoing interface passed through in the forwarding path A. For example, the segment list in the probe message A includes the SID corresponding to outgoing interface 1, the SID corresponding to outgoing interface 3, and the SID corresponding to outgoing interface 5 passed through in the forwarding path A. Since the probe message carries the segment list, it is equivalent to indicating each node that the probe message needs to pass through or each interface that the probe message needs to pass through. Based on the segment list carried in the received probe message, each forwarding node can clearly collect the remaining available bandwidth of which outgoing interface and through which outgoing interface to send the probe message. For example, since the probe message A includes the SID corresponding to interface 1 of the head node, the head node searches the routing table based on the SID corresponding to interface 1 to determine outgoing interface 1, and then sends the probe message A through outgoing interface 1.

[0161] In some embodiments, applied to a scenario where bandwidth detection is performed on a segment list in a segment routing over IPv6 (SRv6) policy based on Internet Protocol version 6 (IPv6), the head node sends a probe message to each segment list in the SR policy to detect the remaining available bandwidth of each segment list in the SR policy. For example, the SR policy includes m segment lists, and the head node generates the i-th probe message for the i-th segment list among the m segment lists. The i-th probe message includes the remaining available bandwidth of the outbound interface of the head node corresponding to the i-th segment list and the i-th segment list. The i-th probe message is forwarded to the tail node through the forwarding path corresponding to the i-th segment list, thereby being able to detect the remaining available bandwidth of the i-th segment list in the SR policy.

[0162] In step S230, the intermediate node receives a detection message A. The detection message A carries a detection identifier and a first remaining available bandwidth. The detection identifier is used to indicate the remaining available bandwidth of the detection forwarding path A. The forwarding path of the detection message A is forwarding path A, and forwarding path A passes through the second interface.

[0163] The first remaining available bandwidth indicates the remaining available bandwidth of the first subpath in the forwarding path to be detected. The first subpath is the subpath in the forwarding path that the probe message has traversed before the intermediate node. The first subpath includes the previous hop node from the head node to the intermediate node. For example, the remaining available bandwidth in the probe message received by the i-th forwarding node is the remaining available bandwidth from the head node, the second forwarding node, to the i-th forwarding node.

[0164] Step S240: The intermediate node obtains a detection message B based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the second interface, where the detection message B includes the second remaining available bandwidth.

[0165] The second remaining available bandwidth is used to indicate the remaining available bandwidth of a second sub-path in the forwarding path to be detected. The second sub-path includes a path from the head node to the intermediate node.

[0166] In some implementations of detecting the remaining available bandwidth, each forwarding node that the probe message passes through obtains the remaining available bandwidth carried in the received probe message, compares the remaining available bandwidth carried in the probe message with the remaining available bandwidth of the interface used by the local end to transmit the probe message (the local end's outbound interface used to send the probe message and / or the local end's inbound interface used to receive the probe message), and updates the remaining available bandwidth carried in the probe message based on the minimum value of the comparison results.

[0167] In some embodiments, the intermediate node stores a correspondence between a detection identifier and an instruction for collecting the remaining available bandwidth. The intermediate node recognizes that the received detection message B includes the detection identifier and, based on the detection identifier, executes the instruction for collecting the remaining available bandwidth, thereby executing step S240. In some embodiments, the detection identifier is an opcode in a microcode instruction for collecting the remaining available bandwidth. The intermediate node matches the detection identifier with the instruction set and, upon finding the microcode instruction for collecting the remaining available bandwidth, executes the microcode instruction for collecting the remaining available bandwidth, thereby executing step S240. Because the action of collecting the remaining available bandwidth is executed via a microcode instruction, implementation complexity is reduced.

[0168] Exemplarily, if the remaining available bandwidth carried in a probe message received by an intermediate node is less than or equal to the remaining available bandwidth of the interface of the intermediate node used to transmit the probe message, indicating that the remaining available bandwidth of the interface of the intermediate node's upstream node used to transmit the probe message is less than the remaining available bandwidth of the interface of the intermediate node used to transmit the probe message, then the intermediate node does not need to update the remaining available bandwidth carried in the received probe message, and the remaining available bandwidth carried in the probe message sent by the intermediate node remains unchanged compared to the remaining available bandwidth carried in the probe message received by the intermediate node. If the remaining available bandwidth carried in a probe message received by an intermediate node is greater than the remaining available bandwidth of the interface of the intermediate node used to transmit the probe message, indicating that the remaining available bandwidth of the interface of the intermediate node used to transmit the probe message is less than the remaining available bandwidth of the interface of the intermediate node's upstream node used to transmit the probe message, then the intermediate node updates the remaining available bandwidth carried in the received probe message to the remaining available bandwidth of the interface of the intermediate node used to transmit the probe message.

[0169] Exemplarily, the first remaining available bandwidth carried in probe message A received by the intermediate node is the minimum of the remaining available bandwidths of each outbound interface that probe message A has passed through in forwarding path A. In response to identifying the probe identifier, the intermediate node determines the minimum of the first remaining available bandwidth and the remaining available bandwidth of the second interface as the second remaining available bandwidth. The intermediate node then updates the first remaining available bandwidth carried in probe message A to the second remaining available bandwidth to obtain probe message B. The second remaining available bandwidth carried in probe message B is the minimum of the first remaining available bandwidth carried in probe message A and the remaining available bandwidth of the second interface.

[0170] For example, referring to Figure 3, Figure 3 shows the remaining available bandwidth carried in the detection message sent by each forwarding node. The detection message A received by the intermediate node through interface 2 carries the remaining available bandwidth of interface 1 of the head node. Before the intermediate node forwards the detection message A through interface 3, the intermediate node determines the minimum value of the remaining available bandwidth of interface 1, the remaining available bandwidth of interface 2, and the remaining available bandwidth of interface 3, that is, min (available bandwidth of interface 1 / 2 / 3) in Figure 3. The intermediate node updates the remaining available bandwidth of interface 1 carried in the detection message A to the minimum value of the remaining available bandwidth of interface 1, the remaining available bandwidth of interface 2, and the remaining available bandwidth of interface 3.

[0171] In other embodiments, considering that the remaining available bandwidth of the input interface of each intermediate node passed through in the forwarding path is equal to the remaining available bandwidth of the output interface of the upstream node of the intermediate node, the intermediate node compares the remaining available bandwidth carried in the probe message with the remaining available bandwidth of the output interface of the local end used to send the probe message, and updates the remaining available bandwidth carried in the probe message based on the minimum value in the comparison result. In other words, the remaining available bandwidth of the input interface of the intermediate node does not need to be involved in the comparison process, thereby avoiding the unnecessary increase in the amount of calculation caused by repeatedly comparing the remaining available bandwidth of two interfaces with equal bandwidth. While still being able to obtain the remaining available bandwidth of the forwarding path, the amount of calculation required to perform the comparison operation to obtain the remaining available bandwidth is reduced.

[0172] Exemplarily, referring to FIG4 , in the scenario of FIG4 , before the intermediate node forwards the detection message A through interface 3, the intermediate node determines the minimum value of the remaining available bandwidth of interface 1 and the remaining available bandwidth of interface 3, i.e., min (interface 1 / 3 available bandwidth) in FIG4 , and the intermediate node updates the remaining available bandwidth of interface 1 carried in the detection message A to the minimum value of the remaining available bandwidth of interface 1 and the remaining available bandwidth of interface 3. In the above example, since the remaining available bandwidth of interface 1 of the head node is the same as the remaining available bandwidth of interface 2 of the intermediate node, and the remaining available bandwidth of interface 1 has been used to determine the remaining available bandwidth carried in the detection message sent by the head node, the remaining available bandwidth of interface 2 does not need to participate in the comparison process of the minimum value of the remaining available bandwidth.

[0173] Similarly, if there are more than two intermediate nodes in the forwarding path to be detected, when the probe message is forwarded to the second forwarding node, the second forwarding node updates the remaining available bandwidth carried in the probe message to the minimum value of the remaining available bandwidth of each interface that the probe message passes through at the first and second forwarding nodes. When the probe message is forwarded to the third forwarding node, the third forwarding node updates the remaining available bandwidth carried in the probe message to the minimum value of the remaining available bandwidth of each interface that the probe message passes through at the first, second, and third forwarding nodes. When the probe message is forwarded to the fourth forwarding node, the fourth forwarding node updates the remaining available bandwidth carried in the probe message to the minimum value of the remaining available bandwidth of each interface that the probe message passes through at the first, second, third, and fourth forwarding nodes. By analogy, each intermediate node compares the remaining available bandwidth carried in the probe message with the remaining available bandwidth of the interface used by the node to forward the probe message, thereby determining the minimum value of the two remaining available bandwidths.

[0174] Since the forwarding node uses the minimum of the remaining available bandwidth of the node's outbound interface and the remaining available bandwidth carried in the probe message to update the remaining available bandwidth carried in the probe message, on the one hand, since the remaining available bandwidth carried in the probe message is the minimum value determined based on the remaining available bandwidth of each interface that the probe message has passed through in the forwarding path, it is equivalent to the probe message carrying the remaining available bandwidth of the entire first half of the sub-path that the probe message has passed through in the forwarding path. When the probe message is forwarded to the tail node, the tail node determines the minimum of the remaining available bandwidth carried in the probe message and the remaining available bandwidth of the interface used by the node to forward the probe message. The bandwidth obtained is the minimum of the remaining available bandwidth of each interface of each hop node passed in the forwarding path, thereby being able to more accurately determine the remaining available bandwidth of the entire forwarding path. On the other hand, the probe message does not need to carry the bandwidth of multiple forwarding nodes. For example, the probe message only needs to carry the minimum value of the remaining available bandwidth. The overhead of the probe message is relatively small, and the data volume of the probe message will hardly increase linearly with the number of forwarding nodes passed through. Therefore, the risk of probe message expansion is reduced and the resource overhead of transmitting the probe message is saved.

[0175] In other embodiments of detecting the remaining available bandwidth, each intermediate node that the detection message passes through along the way adds the remaining available bandwidth of the interface used by the local end to transmit the detection message (the output interface used by the local end to send the detection message or / and the input interface used by the local end to receive the detection message) to the message, so that the tail node determines the remaining available bandwidth of the forwarding path based on the remaining available bandwidth of each interface carried in the detection message. For example, the first remaining available bandwidth carried by the detection message A received by the intermediate node includes a bandwidth value set consisting of the remaining available bandwidth of each output interface that the detection message A has passed in the forwarding path A. In response to identifying the detection identifier, the intermediate node adds the remaining available bandwidth of the second interface to the bandwidth value set to obtain the detection message B. The second remaining available bandwidth carried by the detection message B includes the first remaining available bandwidth and the remaining available bandwidth of the second interface. In other words, the detection message B includes the remaining available bandwidth of each output interface that the detection message B passes in the forwarding path A.

[0176] For example, referring to Figure 5, Figure 5 shows the remaining available bandwidth carried in the probe messages sent by each forwarding node. The probe message A received by the intermediate node through interface 2 carries the remaining available bandwidth of interface 1 of the head node. Before the intermediate node forwards the probe message A through interface 3, the intermediate node determines the remaining available bandwidth of interface 2 and the remaining available bandwidth of interface 3, and adds the remaining available bandwidth of interface 2 and the remaining available bandwidth of interface 3 to the received probe message A. The resulting probe message B carries the remaining available bandwidth of interface 1, the remaining available bandwidth of interface 2, and the remaining available bandwidth of interface 3.

[0177] By analogy, when there are more intermediate nodes in the forwarding path that needs to be detected, when the detection message is forwarded to the second forwarding node, the second forwarding node adds the remaining available bandwidth of the input interface or / and output interface used by the second forwarding node when transmitting the detection message to the detection message, and the third forwarding node adds the remaining available bandwidth of the input interface or / and output interface used by the third forwarding node when transmitting the detection message to the detection message. And so on, each intermediate node adds the remaining available bandwidth of the input interface or / and output interface used by the local node when transmitting the detection message to the detection message, so that the detection message can carry the remaining available bandwidth of the input interface or / and output interface used by each node through which the detection message passes when transmitting the detection message.

[0178] Because the forwarding node adds the remaining available bandwidth of its outbound interface to the probe message, the probe message carries more comprehensive information. For example, the probe message transmitted to the egress node can carry the remaining available bandwidth of each interface in the forwarding path, improving the scalability of the solution.

[0179] In some embodiments, considering that the remaining available bandwidth of the input interface of each intermediate node passed through in the forwarding path is equal to the remaining available bandwidth of the output interface of the upstream node of the intermediate node, the intermediate node adds the remaining available bandwidth of the output interface of the local end used to send the probe message to the probe message, so that the probe message sent by the local end not only carries the remaining available bandwidth in the received probe message, but also further carries the remaining available bandwidth of the output interface of the local end used to send the probe message. In other words, the remaining available bandwidth of the input interface of the intermediate node does not need to be added to the probe message, thereby reducing the data volume of the probe message as much as possible and saving the overhead of transmitting the probe message.

[0180] Exemplarily, referring to Figure 6, Figure 6 shows the remaining available bandwidth carried in the probe messages sent by each forwarding node. The probe message A received by the intermediate node through interface 2 carries the remaining available bandwidth of interface 1 of the head node. Before the intermediate node forwards the probe message A through interface 3, the intermediate node determines the remaining available bandwidth of interface 3 and adds the remaining available bandwidth of interface 3 to the received probe message A. The resulting probe message B carries the remaining available bandwidth of interface 1 and the remaining available bandwidth of interface 3. In the above example, since the remaining available bandwidth of interface 1 of the head node is the same as the remaining available bandwidth of interface 2 of the intermediate node, and the remaining available bandwidth of interface 1 has been used to determine the remaining available bandwidth carried in the probe message sent by the head node, the remaining available bandwidth of interface 2 does not need to be added to the probe message.

[0181] In some embodiments, the remaining available bandwidth of the second interface includes the total remaining available bandwidth of the second interface. The intermediate node obtains the total remaining available bandwidth of the second interface based on the physical total bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface. The total remaining available bandwidth of the second interface is the difference between the physical total bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface.

[0182] In some embodiments, the remaining available bandwidth of the second interface includes the remaining available bandwidth of the target service. The intermediate node obtains the remaining available bandwidth of the target service based on the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service. The remaining available bandwidth of the target service is the difference between the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service.

[0183] Step S250: The intermediate node sends a detection message B.

[0184] In some implementations, the intermediate node determines an outbound interface through which the forwarding path to be detected passes in the intermediate node, and sends the detection message B through the outbound interface.

[0185] In some implementations, the probe message received by the intermediate node includes the segment list of forwarding path A to be detected. For example, the segment list in probe message A includes the SID corresponding to outbound interface 3. The intermediate node searches the routing table based on the SID corresponding to outbound interface 3 to determine outbound interface 3, and then sends probe message B through outbound interface 3.

[0186] Step S260: The tail node receives the detection message B.

[0187] The detection message B carries a detection identifier and a first remaining available bandwidth. The detection identifier is used to indicate the remaining available bandwidth of the detection forwarding path A. The forwarding path of the detection message B is the forwarding path A, and the forwarding path A passes through the third interface.

[0188] Step S270: The egress node determines the remaining available bandwidth of the forwarding path A based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface.

[0189] In some embodiments of detecting the remaining available bandwidth, the tail node obtains the remaining available bandwidth carried in the received detection message, and the tail node compares the remaining available bandwidth carried in the detection message with the remaining available bandwidth of the interface used to transmit the detection message at the local end. The minimum value in the comparison result is the minimum value of the remaining available bandwidth of each interface passed by the entire forwarding path, and the tail node can use the minimum value in the comparison result as the remaining available bandwidth of the entire forwarding path. For example, in the case where the intermediate node adopts a method of updating the remaining available bandwidth carried in the detection message based on the minimum value in the comparison result, the first remaining available bandwidth carried in the detection message received by the tail node is the minimum value of the remaining available bandwidth of each outbound interface that the detection message B has passed in the forwarding path A. In response to identifying the detection identifier carried in the detection message, the tail node determines the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the third interface as the remaining available bandwidth of the forwarding path A. Exemplarily, referring to Figure 3, the tail node receives the min(available bandwidth of interface 1 / 2 / 3) carried in the detection message, and the tail node determines the minimum value of min(available bandwidth of interface 1 / 2 / 3), the remaining available bandwidth of interface 4, and the remaining available bandwidth of interface 5, that is, calculates min(available bandwidth of interface 1 / 2 / 3 / 4 / 5) as the remaining available bandwidth of forwarding path A.

[0190] Optionally, considering that the remaining available bandwidth of the interface of the second-to-last hop node used for communicating with the tail node is equal to the remaining available bandwidth of the inbound interface of the tail node, if the remaining available bandwidth of the interface of the second-to-last hop node used for communicating with the tail node has already participated in the comparison process of the second-to-last hop node or has been added to the probe message, the remaining available bandwidth of the inbound interface of the tail node does not need to participate in the comparison process, thereby avoiding the unnecessary increase in the computational complexity caused by repeatedly comparing the remaining available bandwidths of two interfaces with equal bandwidths. While still being able to obtain the remaining available bandwidth of the forwarding path, the computational complexity of the comparison operation required to obtain the remaining available bandwidth is reduced. For example, referring to Figure 4, the tail node receives the min(interface 1 / 3 available bandwidth) carried in the probe message, and the tail node determines the minimum of min(interface 1 / 3 available bandwidth) and the remaining available bandwidth of interface 5, that is, calculates min(interface 1 / 3 / 5 available bandwidth), as the remaining available bandwidth of forwarding path A. In the above example, since the remaining available bandwidth of interface 3 of the intermediate node is the same as the remaining available bandwidth of interface 4 of the tail node, and the remaining available bandwidth of interface 3 of the intermediate node has been used to determine the remaining available bandwidth carried in the detection message sent by the intermediate node, the remaining available bandwidth of interface 4 of the tail node does not need to participate in the comparison process of the minimum value of the remaining available bandwidth.

[0191] For another example, when the intermediate node adds the remaining available bandwidth of the interface used to transmit the probe message at the local end to the message, the first remaining available bandwidth carried in the probe message received by the tail node is the remaining available bandwidth of each outbound interface that the probe message B has passed through in forwarding path A. In response to identifying the probe identifier carried in the probe message, the tail node determines the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the third interface as the remaining available bandwidth of forwarding path A. For example, referring to Figure 5, the probe message received by the tail node carries the remaining available bandwidth of interface 1, interface 2, and interface 3. The tail node determines the remaining available bandwidth of interface 1, interface 2, interface 3, interface 4, and interface 5, that is, calculates min(available bandwidth of interface 1 / 2 / 3 / 4 / 5) as the remaining available bandwidth of forwarding path A.

[0192] Alternatively, the remaining available bandwidth of the inbound interface of the intermediate node and the remaining available bandwidth of the inbound interface of the tail node may not need to participate in the comparison process. For example, referring to Figure 6, the probe message received by the tail node carries the remaining available bandwidth of interface 1 and interface 3. The tail node determines the remaining available bandwidth of interface 1, interface 3 and interface 5, that is, calculates min(available bandwidth of interface 1 / 3 / 5) as the remaining available bandwidth of forwarding path A.

[0193] Optionally, the method shown in FIG2 further includes the following steps S280 to S292.

[0194] Step S280: The tail node sends the remaining available bandwidth of forwarding path A to the head node of forwarding path A.

[0195] The tail node feeds back the remaining available bandwidth to the head node by sending the remaining available bandwidth of forwarding path A to the head node. In some implementations of the tail node feeding back the remaining available bandwidth, the tail node generates a response message corresponding to the probe message B. The tail node sends the response message to the head node.

[0196] The response message is used to announce the remaining available bandwidth of the detected forwarding path A. The response message carries the remaining available bandwidth of forwarding path A. The probe message can also be called a forward message, and the response message can also be called a reverse message. The forwarding path of the response message is, for example, the return path corresponding to the detected forwarding path A. For example, the forwarding path of the probe message passes through interface 1 → interface 2 → interface 3 → interface 4, while the forwarding path of the response message passes through interface 4 → interface 3 → interface 2 → interface 1.

[0197] In some embodiments, the tail node modifies the probe message B to obtain a response message. For example, after the tail node determines the remaining available bandwidth of forwarding path A, the tail node updates the remaining available bandwidth carried in the probe message B to the remaining available bandwidth of forwarding path A, and the tail node swaps the source IP address and the destination IP address in the probe message B, thereby obtaining a response message. For example, the source IP address in the probe message B received by the tail node carries the IP address of the head node, and the destination IP address in the probe message B received by the tail node carries the IP address of the tail node. After the tail node swaps the source IP address and the destination IP address in the probe message B, the source IP address in the response message carries the IP address of the tail node, and the destination IP address in the response message carries the IP address of the head node.

[0198] In some embodiments, the tail node sends the remaining available bandwidth of forwarding path A to the head node along the return path corresponding to forwarding path A. For example, the tail node obtains the path identifier carried in the probe message and determines the return path corresponding to forwarding path A based on the path identifier. In one possible implementation, the tail node uses the IP address of the head node as the destination IP address to search the routing table for the corresponding outbound interface to obtain interface 4. The tail node then sends the remaining available bandwidth of forwarding path A through interface 4.

[0199] In some embodiments, the remaining available bandwidth of the third interface includes the total remaining available bandwidth of the third interface, the tail node based on the physical total bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface, and the total remaining available bandwidth of the third interface, where the total remaining available bandwidth of the third interface is the difference between the physical total bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface.

[0200] In some embodiments, the remaining available bandwidth of the third interface includes the remaining available bandwidth of the target service. The egress node obtains the remaining available bandwidth of the target service based on the total available bandwidth of the target service and the bandwidth used to transmit the target service via the third interface. The remaining available bandwidth of the target service is the difference between the total available bandwidth of the target service and the bandwidth used to transmit the target service via the third interface. The process by which the egress node obtains the remaining available bandwidth of the third interface is similar to the process by which the intermediate node obtains the remaining available bandwidth of the second interface. For details, refer to the above description of the process by which the intermediate node obtains the remaining available bandwidth of the second interface.

[0201] In step S290 , the head node receives the remaining available bandwidth of forwarding path A from the tail node of forwarding path A.

[0202] In step S292 , the head node performs load balancing based on the remaining available bandwidth of forwarding path A.

[0203] For example, the head node determines a forwarding path for each data flow received after obtaining the remaining available bandwidth based on the remaining available bandwidth of the forwarding path. This means that the remaining available bandwidth of the forwarding path is used to guide the load sharing of new flows. Another example is that the head node adjusts the forwarding paths of all currently forwarded data flows based on the remaining available bandwidth of the forwarding path. This means that the head node uses the remaining available bandwidth of the forwarding path to perform global rerouting. For example, a data flow originally forwarded via a path with a small remaining available bandwidth (equivalent to a congested path) can be rerouted to a path with a large remaining available bandwidth (equivalent to a lightly loaded path).

[0204] Because the head node is aware of the remaining available bandwidth of the forwarding path, it can use different scheduling methods for forwarding paths with different remaining available bandwidth, achieving more differentiated scheduling for different forwarding paths. For example, the head node can schedule more data flows or data flows with larger data volumes to forwarding paths with greater remaining available bandwidth, thereby providing more balanced load sharing.

[0205] In some implementations of load balancing, the head node determines the ratio between the remaining available bandwidth of forwarding path A and the remaining available bandwidth of forwarding path B; the head node schedules data packets transmitted on forwarding path A and data packets transmitted on forwarding path B based on the ratio, thereby achieving route selection and optimization according to the remaining available bandwidth of the forwarding path.

[0206] For the sake of simplicity, the ratio between the remaining available bandwidths of different forwarding paths will be referred to as the remaining available bandwidth ratio below. The remaining available bandwidth ratio can serve as the basis for load sharing in this embodiment. For example, the head node determines the traffic scheduling ratio between forwarding path A and forwarding path B based on the remaining available bandwidth ratio between forwarding path A and forwarding path B. The head node schedules the data packets transmitted on forwarding path A and the data packets transmitted on forwarding path B based on the traffic scheduling ratio between forwarding path A and forwarding path B. For example, the remaining available bandwidth of forwarding path A is 20 Gbps and the remaining available bandwidth of forwarding path B is 50 Gbps, then the head node determines that the traffic scheduling ratio between forwarding path A and forwarding path B is 2:5. Among them, forwarding path B and forwarding path A have the same destination.

[0207] For example, please refer to Figure 7, which shows a load balancing scenario. In Figure 7, AS IS represents a load balancing method based on the total physical bandwidth in a UCMP manner, and TO BE represents a load balancing method based on the remaining available bandwidth.

[0208] As shown in Figure 7(a), the total physical bandwidth of path list 1 is 100GE, and the total physical bandwidth of path list 2 is 50GE. The remaining available bandwidth of path list 1 is 30GE, and the remaining available bandwidth of path list 2 is 30GE. When load balancing is performed using UCMP based on the total physical bandwidth, the ratio of the total physical bandwidth between path list 1 and path list 2 is 100GE:50GE = 2:1. Therefore, the head node performs load balancing between path list 1 and path list 2 at a fixed ratio of 2:1, resulting in a load ratio of 66%:33% = 2:1 between path list 1 and path list 2. Clearly, there is a load imbalance between path list 1 and path list 2. For example, when new 30GE traffic enters, the head node schedules 20GE traffic to path list 1 and 10GE traffic to path list 2 based on the ratio of the total physical bandwidth between path list 1 and path list 2. As a result, the remaining available bandwidth of path list 1 changes to 10GE, and the remaining available bandwidth of path list 2 changes to 25GE. After the new traffic is scheduled, the remaining available bandwidth of path list 1 and path list 2 is unbalanced.

[0209] As shown in Figure 7(b), the total physical bandwidth of path list 1 is 100GE, and the total physical bandwidth of path list 2 is 50GE. The remaining available bandwidth of path list 1 is 20GE, and the remaining available bandwidth of path list 2 is 20GE. When load balancing is performed based on the remaining available bandwidth using UCMP, the ratio of the remaining available bandwidth between path list 1 and path list 2 is 20GE:20GE = 1:1. Therefore, the head node performs load balancing between path list 1 and path list 2 at a fixed ratio of 1:1, resulting in a load ratio of 50%:50% = 2:1 between path list 1 and path list 2. Obviously, the loads of path list 1 and path list 2 are relatively balanced. For example, when new 30GE traffic arrives, the headnode schedules 15GE traffic to path list 1 and 15GE traffic to path list 2 based on the ratio of the remaining available bandwidth between path list 1 and path list 2. This causes the remaining available bandwidth of path list 1 to change to 5GE, and the remaining available bandwidth of path list 2 to change to 5GE. After scheduling the new traffic, the ratio of the remaining available bandwidth of path list 1 to path list 2 remains 1:1, and the remaining available bandwidth of path list 1 and path list 2 remains balanced.

[0210] As shown in Figure 7(c), the total physical bandwidth of path list 1 is 100GE, and the total physical bandwidth of path list 2 is also 100GE. The remaining available bandwidth of path list 1 is 40GE, and the remaining available bandwidth of path list 2 is 20GE. When load balancing is performed based on the total physical bandwidth using UCMP, the ratio of the total physical bandwidth between path list 1 and path list 2 is 100GE:100GE = 1:1. Therefore, the head node performs load balancing between path list 1 and path list 2 at a fixed ratio of 1:1. When new 30GE traffic enters, the head node schedules 15GE of the traffic to path list 1 for transmission, and 15GE of the traffic to path list 2 for transmission based on the ratio of the total physical bandwidth between path list 1 and path list 2. As a result, the remaining available bandwidth of path list 1 changes to 25GE, and the remaining available bandwidth of path list 2 changes to 5GE.

[0211] As shown in Figure 7(d), the total physical bandwidth of path list 1 is 100GE, and the total physical bandwidth of path list 2 is also 100GE. The remaining available bandwidth of path list 1 is 40GE, and the remaining available bandwidth of path list 2 is 20GE. When load balancing is performed using UCMP based on the remaining available bandwidth, the ratio of the remaining available bandwidth between path list 1 and path list 2 is 40GE:20GE = 2:1. Therefore, the head node load balances the traffic between path list 1 and path list 2 at a ratio of 2:1. When new 30GE traffic enters, the head node schedules the 20GE traffic to path list 1 and the 10GE traffic to path list 2 based on the ratio of the remaining available bandwidth between path list 1 and path list 2. As a result, the remaining available bandwidth of path list 1 changes to 30GE, and the remaining available bandwidth of path list 2 changes to 10GE.

[0212] As shown in FIG7 , traffic scheduling based on the remaining available bandwidth is more reasonable than scheduling traffic based on the total physical bandwidth, resulting in a healthier network in the future.

[0213] In other embodiments of load balancing, the head node is not scheduled according to the ratio of the remaining available bandwidth, but forwards based on the path with the smallest remaining available bandwidth. In one possible implementation, the head node forwards in a round-robin manner. For example, when the head node selects a forwarding path for a data message, the head node traverses each candidate forwarding path in the candidate forwarding path set of the data message to determine each candidate forwarding path in the candidate forwarding path set. For example, if forwarding path A is the path with the largest remaining available bandwidth in the candidate forwarding path set of the data message, the head node schedules the data message to be forwarded to forwarding path A. For example, when scheduling a target data flow (also known as an elephant flow) with a data volume exceeding a threshold, the head node determines the path with the largest remaining available bandwidth from the candidate forwarding path set. The head node uses the path with the largest remaining available bandwidth to forward the target data flow, so that the data flow with a huge data volume can utilize the most remaining available bandwidth for forwarding, thereby achieving route selection and optimization according to the remaining available bandwidth of the forwarding path. In addition, the speed of achieving load balancing is also relatively fast.

[0214] For example, forwarding path A and forwarding path B exist between the head node and the tail node. The head node determines a forwarding path from forwarding path A and forwarding path B to use for forwarding the data packet based on the remaining available bandwidth of forwarding path A and the remaining available bandwidth of forwarding path B. For example, if forwarding path A has a greater remaining available bandwidth than forwarding path B, the head node forwards the data packet through forwarding path A. If forwarding path B has a greater remaining available bandwidth than forwarding path A, the head node forwards the data packet through forwarding path B.

[0215] In other implementations, an algorithm is used to predict the traffic volume transmitted in a future time period, and the remaining available bandwidth is calculated based on the predicted traffic volume, thereby further improving the load balancing of the network.

[0216] The above embodiments focus on describing the process of transferring the remaining available bandwidth and the application of the remaining available bandwidth. In some implementations of the present application, the format of the protocol message is extended to support the transfer of the remaining available bandwidth in the above embodiments.

[0217] Protocol message extension

[0218] 8A shows a schematic diagram of the format of a probe message provided in an embodiment of the present application. The probe message includes an Internet Protocol version 6 (IPv6) header, a DOH, an SRH, and an application layer protocol header.

[0219] The application layer protocol header is used to carry the parameters required by the application running inside the forwarding node to detect the remaining available bandwidth. For example, the application layer protocol header includes the header of the TWAMP request message in the Two-Way Active Measurement Protocol (TWAMP) message. The DOH is used to carry the detection identifier and the remaining available bandwidth. The SRH is used to carry the segment list of the forwarding path (such as the first forwarding path and / or the second forwarding path) of the bandwidth to be detected. The DOH is encapsulated in the outer layer of the application layer protocol header, and the SRH is encapsulated in the outer layer of the DOH. The IPv6 header is encapsulated in the outer layer of the SRH.

[0220] The IPv6 header includes a source address field and a destination address field. The source address field in the IPv6 header is used to carry the address of the head node of the forwarding path, such as the IP address of the ingress PE. The destination address field in the IPv6 header is used to carry the address of the next-hop node that the probe message needs to pass through. Optionally, the destination address field in the IPv6 header is updated hop by hop. For example, the destination address field in the IPv6 header of the probe message sent by the head node includes the IP address of the second forwarding node. The second forwarding node obtains the IP address of the third forwarding node from the segment list in the SRH of the received probe message, and updates the content of the destination address field in the IPv6 header of the probe message to the IP address of the third forwarding node, and so on.

[0221] Optionally, the DOH is further used to carry a path identifier of a forwarding path to be detected.

[0222] Optionally, the DOH is further used to carry a service type identifier, which is used to identify a target service of the bandwidth to be detected.

[0223] Regarding the carrying position of the detection identifier and the remaining available bandwidth in the DOH, in some embodiments, one or more type-length-value (TLV) fields are extended in the DOH, and the one or more TLVs include a first TLV. The type field of the first TLV includes a type value that identifies the bandwidth. The value field of the first TLV includes the remaining available bandwidth. In one possible implementation, the type value carried in the type field of the first TLV is used as the detection identifier. In another possible implementation, the detection identifier is an operation code in digital form, and the operation code indicates the action of detecting the remaining available bandwidth. Optionally, the DOH also includes a second TLV, and the second TLV carries a path identifier.

[0224] Optionally, the first TLV carrying the detection identifier and the remaining available bandwidth is a sub-option in the OAM option. For example, referring to FIG. X, DOH includes an OAM option, and the OAM option includes a first sub-TLV and a second sub-TLV.

[0225] The OAM option is an IPv6 option defined in RFC9486 for in-situ operations, administration, and maintenance (IOAM). When a forwarding device encounters an unrecognizable action in an OAM option, it can skip subsequent processing. Furthermore, the OAM option supports the modification of fields during forwarding. This means that during the forwarding of a probe message, the OAM option can change the values ​​of fields contained in the OAM option. This allows intermediate nodes to add the detected remaining available bandwidth to the OAM option or update the remaining available bandwidth already contained in the OAM option.

[0226] The first sub-TLV is used to carry the total remaining available bandwidth of the forwarding path and the remaining available bandwidth of various services in the forwarding path. The first sub-TLV includes a subtype field, a sublength field, the remaining available bandwidth of the gold service, the remaining available bandwidth of the silver service, and the remaining available bandwidth of the bronze service. The type value carried in the subtype field is used to identify the bandwidth. The type value carried in the subtype field is, for example, a detection identifier, and the type value carried in the subtype field is, for example, 0x00.

[0227] The second sub-TLV is used to carry a path identifier. The second sub-TLV includes a subtype field, a sublength field, and a path identifier. The type value carried in the subtype field is used to identify the path. The type value carried in the subtype field is, for example, 0x01.

[0228] Optionally, the first TLV carrying the probe identifier and the remaining available bandwidth is an option in the DOH. The option field includes an option type field, an option data length (opt data len) field, and an option data field. The option type field is the type field in the TLV. The option data field is the value field in the TLV.

[0229] In some embodiments, a Two-Way Active Measurement Protocol (TWAMP) is used to detect the remaining available bandwidth of the forwarding path. For example, in the embodiment shown in FIG2 , both the probe message A and the probe message B include TWAMP messages. Exemplarily, the probe message A sent by the head node and the probe message B sent by the intermediate node both include TWAMP request messages, and the response message corresponding to the probe message fed back by the tail node is a TWAMP response message. Since the purpose of the TWAMP protocol message defined in standards such as RFC is to detect network performance parameters such as the delay, delay jitter, and packet loss rate of messages between any two forwarding nodes in the network, the use of the TWAMP protocol message to detect the remaining available bandwidth of the forwarding path has good compatibility with the standards related to the TWAMP protocol.

[0230] In some embodiments, the Bidirectional Forwarding Detection (BFD) protocol is used to detect the remaining available bandwidth of the forwarding path. For example, in the embodiment shown in FIG2 , both probe message A and probe message B include BFD protocol messages. Exemplarily, probe message A sent by the head node and probe message B sent by the intermediate node both include BFD request messages, and the response message corresponding to the probe message fed back by the egress node includes a BFD response message.

[0231] In some implementations, the in-situ Flow Information Telemetry (iFIT) protocol is used to detect the remaining available bandwidth of the forwarding path. For example, in the embodiment shown in FIG2 , both the detection message A and the detection message B include iFIT protocol messages.

[0232] In some implementations, a Network Quality Analysis (NQA) protocol is used to detect the remaining available bandwidth of the forwarding path. For example, in the embodiment shown in FIG2 , both detection message A and detection message B include NQA protocol messages.

[0233] In some embodiments, the remaining available bandwidth of the forwarding path is carried by extending a new TLV. For example, the probe message includes a type-length-value (TLV). The type field of the TLV identifies the remaining available bandwidth, and the value field of the TLV carries the remaining available bandwidth of the forwarding path. For example, in the embodiment shown in Figure 2, probe message A includes TLV A, and TLV A includes the remaining available bandwidth of interface 1. Probe message B includes TLV B, and TLV B includes a second remaining available bandwidth. The response message corresponding to the probe message includes TLV C, and TLV C includes the remaining available bandwidth of the forwarding path.

[0234] The format of the response message corresponding to the probe message is similar to that of the probe message. The response message may also include an IPv6 header, a DOH, and an application layer protocol header. The DOH in the response message carries the remaining available bandwidth of the forwarding path. Optionally, the DOH in the response message carries the remaining available bandwidth of each type of service. For example, as shown in FIG8A , the DOH includes an OAM option, and the OAM option includes a sub-TLV. The type field of the sub-TLV identifies the bandwidth, and the value field of the sub-TLV carries the total remaining available bandwidth of the forwarding path and the remaining available bandwidth of each type of service. The IPv6 header in the response message includes a source address field and a destination address field. The source address field in the IPv6 header is used to carry the address of the tail node of the forwarding path. The destination address field in the IPv6 header in the response message is used to carry the address of the head node of the forwarding path.

[0235] Referring to Figure 8B, Figure 8B shows a schematic diagram of the format of another probe message provided by an embodiment of the present application. The bandwidth measurement TLV included in the probe message in Figure 8B is a specific example of a TLV carrying the remaining available bandwidth.

[0236] As shown in Figure 8B, the path bandwidth measurement TLV includes a path list ID field, a list bandwidth field, a length field, a total bandwidth field, a total remaining bandwidth field, a gold service field, a silver service available bandwidth field, and a bronze service available bandwidth field. The path list ID field carries the list ID (path identifier) ​​of the segment list whose bandwidth is to be detected. The list bandwidth field is equivalent to the type field of the path bandwidth measurement TLV, and the list bandwidth field carries the detection identifier. The length field is used to carry the length of the path bandwidth measurement TLV, and the total bandwidth field carries the remaining available bandwidth of the entire forwarding path. The gold service field carries the remaining available bandwidth of the gold service. The silver service available bandwidth field carries the remaining available bandwidth of the silver service. The bronze service available bandwidth field carries the remaining available bandwidth of the bronze service.

[0237] Gold, Silver, and Bronze are three different types of services, and the remaining available bandwidth for each service can be the same or different. The total remaining bandwidth is the sum of the remaining available bandwidth for Gold, Silver, and Bronze.

[0238] In some implementations, the detection identifier is carried in the type field of the TLV. In other words, the task of calculating the remaining available bandwidth of the forwarding path based on the remaining available bandwidth of the local outbound interface using the type identifier of the TLV is performed. After the intermediate node or the tail node parses the TLV, it performs the task of calculating the remaining available bandwidth of the forwarding path based on the type identifier of the TLV.

[0239] In some embodiments, an Internet Protocol version 6 (IPv6) extension header is used to carry a detection identifier. The IPv6 extension header is, for example, encapsulated in the outer layer of a TWAMP message header, or in the outer layer of a BFD message header. For example, in the embodiment shown in FIG2 , both detection message A and detection message B include an IPv6 extension header, and the IPv6 extension headers in detection message A and detection message B carry a detection identifier. Among them, the IPv6 extension header carrying the detection identifier is, for example, a destination options header (DOH), and carrying the detection identifier through the DOH has good compatibility. For another example, the IPv6 extension header carrying the detection identifier is, for example, a hop-by-hop options header (HBH).

[0240] For example, please refer to Figure 8B. The TWAMP request message in Figure 8B is a specific example of a detection message sent by the head node, the TWAMP response message is a specific example of a message on which the tail node feeds back the remaining available bandwidth, DOH is a specific example of an IPv6 extension header, the operation code carried by DOH is a specific example of a detection identifier, DOH is encapsulated in the inner layer of the TWAMP request header, and the TWAMP request header is encapsulated in the outer layer of the path bandwidth measurement TLV. The path bandwidth measurement TLV carries the identifier of the forwarding path to be detected, the total remaining available bandwidth of the forwarding path, the remaining available bandwidth of the gold service, and the remaining available bandwidth of the silver service.

[0241] In some embodiments, the probe message also carries an upload mark, and the upload mark is used to indicate that the probe message is uploaded to the control plane (such as the service processor of the device itself) so that the control plane adds the collected remaining available bandwidth to the probe message. Exemplarily, the upload mark is a route alert mark or a predetermined operation code. After receiving the probe message, when the intermediate node recognizes that the probe message carries the upload mark, it uploads the probe message to the central processing unit (CPU). The CPU determines the remaining available bandwidth based on the upload mark and adds the remaining available bandwidth to the probe message. After receiving the probe message, when the intermediate node recognizes that the probe message does not carry the upload mark, there is no need to further process the probe message locally, but the probe message is forwarded to the next hop node.

[0242] For example, as shown in FIG8B , the probe message includes a DOH, and the DOH includes an operation code (opcode), which is used to identify the action of executing the acquisition of the remaining available bandwidth. The opcode that identifies the execution of the acquisition of the remaining available bandwidth is a specific example of a probe identifier. After receiving the probe message, when the intermediate node identifies the opcode carried in the DOH of the probe message, the intermediate node sends the probe message to the CPU, and the CPU adds the remaining available bandwidth to the probe message. After receiving the probe message, when the tail node identifies the opcode carried in the DOH of the probe message, the tail node copies the source address, destination address, path identifier, and the detected remaining available bandwidth from the probe message, and fills the copied source address, destination address, path identifier, and the detected remaining available bandwidth into the response message, thereby generating a response message.

[0243] Figure 9 is a structural diagram of a message processing device 510 provided in an embodiment of the present application. The device 510 shown in Figure 9 is arranged at the head node of the first forwarding path. The device 510 includes: an obtaining unit 512 for executing S210; and a sending unit 514 for executing S220.

[0244] In some embodiments, the obtaining unit 512 is further used to obtain the remaining available bandwidth of the first interface based on the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface, where the remaining available bandwidth of the first interface is the difference between the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface.

[0245] In some embodiments, the obtaining unit 512 is further used to obtain the remaining available bandwidth of the first interface based on the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service, where the remaining available bandwidth of the first interface is the difference between the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service.

[0246] The device embodiment described in FIG9 is merely illustrative. For example, the division of the above units is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units in the various embodiments of the present application may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0247] Each unit in the device 510 is implemented entirely or partially by software, hardware, firmware, or any combination thereof.

[0248] In conjunction with the forwarding device 900 described below, some possible implementations of the various functional units in the apparatus 510 using hardware or software are described below.

[0249] In the case of software implementation, for example, the obtaining unit 512 and the sending unit 514 are implemented by software functional units generated by at least one processor 901 in FIG. 12 after reading the program code stored in the memory 902 .

[0250] In the case of hardware implementation, the aforementioned units in FIG9 are implemented by different hardware components in the forwarding device. For example, the obtaining unit 512 is implemented by a portion of the processing resources of at least one processor 901 in FIG12 (e.g., one or two cores in a multi-core processor), or is implemented by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. The sending unit 514 is implemented by the network interface 903 in FIG12.

[0251] Figure 10 is a structural schematic diagram of a message processing device 520 provided in an embodiment of the present application. The device 520 shown in Figure 10 is arranged at an intermediate node of the first forwarding path. The intermediate node includes a second interface. The device 520 includes: a receiving unit 522 for executing S230; an obtaining unit 524 for executing S240; and a sending unit 526 for executing S250.

[0252] In some embodiments, the first remaining available bandwidth is the minimum value of the remaining available bandwidth of each outbound interface that the probe message has passed through in the first forwarding path. The obtaining unit 524 is configured to, in response to identifying the probe identifier, determine the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the second interface as the second remaining available bandwidth; and update the first remaining available bandwidth carried by the first probe message to the second remaining available bandwidth to obtain the second probe message.

[0253] In some embodiments, the first remaining available bandwidth includes a bandwidth value set consisting of the remaining available bandwidth of each outbound interface that the probe message has passed through in the first forwarding path, and the second remaining available bandwidth includes the first remaining available bandwidth and the remaining available bandwidth of the second interface. The obtaining unit 524 is used to add the remaining available bandwidth of the second interface to the bandwidth value set in response to identifying the detection identifier to obtain the second probe message.

[0254] In some embodiments, the remaining available bandwidth of the second interface includes the total remaining available bandwidth of the second interface. The obtaining unit 524 is further used to obtain the total remaining available bandwidth of the second interface based on the physical total bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface. The total remaining available bandwidth of the second interface is the difference between the physical total bandwidth of the second interface and the bandwidth used by the traffic transmitted by the second interface.

[0255] In some embodiments, the remaining available bandwidth of the second interface includes the remaining available bandwidth of the target service. The obtaining unit 524 is further used to obtain the remaining available bandwidth of the target service based on the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service. The remaining available bandwidth of the target service is the difference between the total available bandwidth of the target service and the bandwidth used by the second interface to transmit the target service.

[0256] In some implementations, both the first detection message and the second detection message further carry a service type identifier, and the service type identifier is used to identify the target service.

[0257] In some implementations, both the first detection message and the second detection message further carry a path identifier, where the path identifier is used to identify the first forwarding path.

[0258] The device embodiment described in FIG10 is merely illustrative. For example, the division of the above units is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0259] Each unit in the device 520 is implemented in whole or in part by software, hardware, firmware, or any combination thereof.

[0260] In conjunction with the forwarding device 900 described below, some possible implementations of the various functional units in the apparatus 520 using hardware or software are described below.

[0261] In the case of software implementation, for example, the obtaining unit 524 is implemented by a software functional unit generated by at least one processor 901 in FIG. 12 after reading the program code stored in the memory 902 .

[0262] In the case of hardware implementation, for example, each of the above units in FIG10 is implemented by different hardware in the forwarding device. For example, the obtaining unit 524 is implemented by a portion of the processing resources of at least one processor 901 in FIG12 (such as one or two cores in a multi-core processor), or is implemented by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. The receiving unit 522 and the sending unit 526 are implemented by the network interface 903 in FIG12.

[0263] FIG11 is a schematic diagram of the structure of a message processing device 540 provided in an embodiment of the present application. The device 540 shown in FIG10 is provided at the egress node of the first forwarding path. The device 540 includes:

[0264] A receiving unit 542 is configured to receive a probe message, where the probe message carries a probe identifier and a first remaining available bandwidth, where the probe identifier is used to indicate the remaining available bandwidth of a first forwarding path, where the first forwarding path is used to forward the probe message, and where the first remaining available bandwidth is used to indicate the remaining available bandwidth of a first subpath in the first forwarding path, where the first subpath includes a path between a head node of the first forwarding path and a previous hop node of a tail node in the first forwarding path;

[0265] A determining unit 544 is configured to determine the remaining available bandwidth of the first forwarding path based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface of the tail node;

[0266] The sending unit 546 is configured to send the remaining available bandwidth of the first forwarding path to the head node of the first forwarding path.

[0267] In some embodiments, the first remaining available bandwidth is the minimum value of the remaining available bandwidths of the outbound interfaces on the first forwarding path through which the detection message passes, or the first remaining available bandwidth includes the remaining available bandwidth of each outbound interface of the first forwarding path through which the detection message passes, and the determination unit 544 is configured to, in response to identifying the detection identifier, use the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the third interface as the remaining available bandwidth of the first forwarding path.

[0268] In some embodiments, the determination unit 544 is further used to obtain the remaining available bandwidth of the third interface based on the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface, where the remaining available bandwidth of the third interface is the difference between the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface.

[0269] In some embodiments, the determination unit 544 is further used to obtain the remaining available bandwidth of the third interface based on the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service, where the remaining available bandwidth of the third interface is the difference between the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service.

[0270] In some implementations, the sending unit 546 is configured to obtain and send a response message corresponding to the probe message to the head node, where the response message carries the remaining available bandwidth of the first forwarding path.

[0271] In some embodiments, the response message includes an application layer protocol header and a destination option header DOH, the application layer protocol header includes a Bidirectional Active Measurement Protocol TWAMP message header or a Bidirectional Forwarding Detection BFD message header, the DOH carries the remaining available bandwidth of the first forwarding path, and the DOH is encapsulated in the outer layer of the application layer protocol header.

[0272] In some implementations, both the probe message and the response message further carry a service type identifier, and the service type identifier is used to identify the target service.

[0273] In some implementations, both the probe message and the response message further carry a path identifier, and the path identifier is used to identify the first forwarding path.

[0274] The device embodiment described in FIG11 is merely illustrative. For example, the division of the above units is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units in the various embodiments of the present application may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0275] Each unit in the device 540 is implemented in whole or in part by software, hardware, firmware, or any combination thereof.

[0276] In conjunction with the forwarding device 900 described below, some possible implementations of the various functional units in the apparatus 540 using hardware or software are described below.

[0277] In the case of software implementation, for example, the above-mentioned determination unit 544 is implemented by a software functional unit generated by at least one processor 901 in FIG. 12 after reading the program code stored in the memory 902 .

[0278] In the case of hardware implementation, for example, the above-mentioned units in FIG11 are respectively implemented by different hardware in the forwarding device. For example, the determination unit 544 is implemented by a portion of the processing resources of at least one processor 901 in FIG12 (such as one or two cores in a multi-core processor), or is implemented by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. The receiving unit 542 and the sending unit 546 are implemented by the network interface 903 in FIG12.

[0279] FIG12 is a schematic diagram of the structure of a forwarding device 900 provided in an embodiment of the present application. The forwarding device 900 includes at least one processor 901 , a memory 902 , and at least one network interface 903 .

[0280] The processor 901 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 901 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0281] The memory 902 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 902 exists independently and is connected to the processor 901 via an internal connection 904. Alternatively, the memory 902 and the processor 901 are optionally integrated together.

[0282] The network interface 903 uses any transceiver-like device for communicating with other devices or communication networks. For example, the network interface 903 includes at least one of a wired network interface and a wireless network interface. For example, the wired network interface is an Ethernet interface. For example, the Ethernet interface is an optical interface, an electrical interface, or a combination thereof. For example, the wireless network interface is a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.

[0283] In some embodiments, the processor 901 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG. 12 .

[0284] In some embodiments, forwarding device 900 may optionally include multiple processors, such as processor 901 and processor 905 shown in FIG12 . Each of these processors may be, for example, a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may optionally refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0285] In some embodiments, forwarding device 900 further includes internal connections 904. Processor 901, memory 902, and at least one network interface 903 are connected via internal connections 904. Internal connections 904 comprise pathways that transmit information between these components. Optionally, internal connections 904 are boards or buses. Optionally, internal connections 904 are divided into address buses, data buses, control buses, and the like.

[0286] In some embodiments, the forwarding device 900 further includes an input / output interface 906 . The input / output interface 906 is connected to the internal connection 904 .

[0287] Optionally, the processor 901 implements the method in the above embodiment by reading the program code stored in the memory 902, or the processor 901 implements the method in the above embodiment by internally stored program code. In the case where the processor 901 implements the method in the above embodiment by reading the program code stored in the memory 902, the memory 902 stores program code 910 that implements the method provided in the embodiment of the present application.

[0288] For more details on how the processor 901 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.

[0289] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0290] A refers to B, which means that A is the same as B or A is a simple variant of B.

[0291] The terms "first" and "second" in the description and claims of the embodiments of this application are used to distinguish different objects, not to describe a specific order of objects, and should not be understood to indicate or imply relative importance. For example, the terms "first forwarding path" and "second forwarding path" are used to distinguish different forwarding paths, not to describe a specific order of forwarding paths, and should not be understood to mean that the first forwarding path is more important than the second forwarding path.

[0292] In the embodiments of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality" means two or more. For example, "a plurality of forwarding paths" means two or more forwarding paths.

[0293] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0294] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A bandwidth detection method, characterized in that: Applied to a head node of a first forwarding path, the method includes: The head node obtains a detection message, where the detection message includes a detection identifier and a remaining available bandwidth of the first interface of the head node, where the detection identifier is used to indicate the remaining available bandwidth of the first forwarding path; The head node sends the detection message through the first interface corresponding to the first forwarding path.

2. The method according to claim 1, characterized in that The method further comprises: The head node obtains the remaining available bandwidth of the first interface based on the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface. The remaining available bandwidth of the first interface is the difference between the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface.

3. The method according to claim 1, characterized in that The method further comprises: The head node obtains the remaining available bandwidth of the first interface based on the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service, where the remaining available bandwidth of the first interface is the difference between the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service.

4. The method according to claim 3, characterized in that The detection message also includes a service type identifier, and the service type identifier is used to identify the target service.

5. The method according to any one of claims 1 to 4, characterized in that: The detection message further includes a path identifier, and the path identifier is used to identify the first forwarding path.

6. The method according to any one of claims 1 to 5, characterized in that: The detection message includes an application layer protocol header, a destination option header DOH and a segment routing header SRH. The application layer protocol header includes a bidirectional active measurement protocol TWAMP message header or a bidirectional forwarding detection BFD message header. The DOH includes a type-length value TLV. The TLV includes the detection identifier and the remaining available bandwidth of the first interface. The SRH includes a segment list segmentlist of the first forwarding path. The DOH is encapsulated in the outer layer of the application layer protocol header, and the SRH is encapsulated in the outer layer of the DOH.

7. A bandwidth detection method, characterized in that: Applied to an egress node of a first forwarding path, the method includes: The tail node receives a probe message, where the probe message carries a probe identifier and a first remaining available bandwidth, where the probe identifier is used to indicate the remaining available bandwidth of the first forwarding path, the first forwarding path is used to forward the probe message, and the first remaining available bandwidth is used to indicate the remaining available bandwidth of a first subpath in the first forwarding path, where the first subpath includes a path between a head node of the first forwarding path and a previous hop node of the tail node in the first forwarding path; The tail node determines the remaining available bandwidth of the first forwarding path based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface of the tail node; The tail node sends the remaining available bandwidth of the first forwarding path to the head node of the first forwarding path.

8. The method according to claim 7, characterized in that The first remaining available bandwidth is a minimum value of the remaining available bandwidths of the outbound interfaces on the first forwarding path through which the detection message passes, or the first remaining available bandwidth includes the remaining available bandwidth of each outbound interface of the first forwarding path through which the detection message passes, and the tail node determines the remaining available bandwidth of the first forwarding path based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface of the tail node, including: In response to identifying the detection identifier, the tail node uses the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the third interface as the remaining available bandwidth of the first forwarding path.

9. The method according to claim 7, characterized in that The method further comprises: The tail node obtains the remaining available bandwidth of the third interface based on the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface, where the remaining available bandwidth of the third interface is the difference between the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface.

10. The method according to claim 7, characterized in that The method further comprises: The tail node obtains a remaining available bandwidth of the third interface based on the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service, where the remaining available bandwidth of the third interface is a difference between the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service.

11. The method according to claim 7, characterized in that The tail node sending the remaining available bandwidth of the first forwarding path to the head node includes: The tail node obtains and sends a response message corresponding to the probe message to the head node, where the response message carries the remaining available bandwidth of the first forwarding path.

12. The method according to claim 11, characterized in that The response message includes an application layer protocol header and a destination option header DOH, the application layer protocol header includes a Bidirectional Active Measurement Protocol TWAMP message header or a Bidirectional Forwarding Detection BFD message header, the DOH includes a type-length-value TLV, the TLV includes the remaining available bandwidth of the first forwarding path, and the DOH is encapsulated in the outer layer of the application layer protocol header.

13. A message processing device, characterized in that: The device is provided at a head node of a first forwarding path, and includes: an obtaining unit, configured to obtain a detection message, wherein the detection message includes a detection identifier and a remaining available bandwidth of the first interface of the head node, wherein the detection identifier is used to indicate the remaining available bandwidth of the first forwarding path; A sending unit is configured to send the detection message through the first interface corresponding to the first forwarding path.

14. The device according to claim 13, characterized in that The obtaining unit is further used to obtain the remaining available bandwidth of the first interface based on the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface, where the remaining available bandwidth of the first interface is the difference between the total physical bandwidth of the first interface and the bandwidth used by the traffic transmitted by the first interface.

15. The device according to claim 13, characterized in that The obtaining unit is further used to obtain the remaining available bandwidth of the first interface based on the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service, where the remaining available bandwidth of the first interface is the difference between the total available bandwidth of the target service and the bandwidth used by the first interface to transmit the target service.

16. The device according to claim 15, characterized in that The detection message also includes a service type identifier, and the service type identifier is used to identify the target service.

17. The device according to any one of claims 13 to 16, characterized in that The detection message further includes a path identifier, and the path identifier is used to identify the first forwarding path.

18. The device according to any one of claims 13 to 17, characterized in that The detection message includes an application layer protocol header, a destination option header DOH and a segment routing header SRH. The application layer protocol header includes a bidirectional active measurement protocol TWAMP message header or a bidirectional forwarding detection BFD message header. The DOH includes a type-length value TLV. The TLV includes the detection identifier and the remaining available bandwidth of the first interface. The SRH includes a segment list segmentlist of the first forwarding path. The DOH is encapsulated in the outer layer of the application layer protocol header, and the SRH is encapsulated in the outer layer of the DOH.

19. A message processing device, characterized in that: Applied to an egress node of a first forwarding path, the apparatus includes: a receiving unit, configured to receive a probe message, the probe message carrying a probe identifier and a first remaining available bandwidth, the probe identifier being used to indicate the remaining available bandwidth of the first forwarding path, the first forwarding path being used to forward the probe message, the first remaining available bandwidth being used to indicate the remaining available bandwidth of a first subpath in the first forwarding path, the first subpath comprising a path between a head node of the first forwarding path and a previous hop node of the tail node in the first forwarding path; a determining unit, configured to determine the remaining available bandwidth of the first forwarding path based on the detection identifier, the first remaining available bandwidth, and the remaining available bandwidth of the third interface of the tail node; A sending unit is configured to send the remaining available bandwidth of the first forwarding path to the head node of the first forwarding path.

20. The device according to claim 19, characterized in that The first remaining available bandwidth is a minimum value of the remaining available bandwidths of the outbound interfaces on the first forwarding path through which the detection message passes, or the first remaining available bandwidth includes the remaining available bandwidth of each outbound interface of the first forwarding path through which the detection message passes, and the determining unit is configured to, in response to identifying the detection identifier, use the minimum value of the first remaining available bandwidth and the remaining available bandwidth of the third interface as the remaining available bandwidth of the first forwarding path.

21. The device according to claim 19, characterized in that The determination unit is further used to obtain the remaining available bandwidth of the third interface based on the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface, where the remaining available bandwidth of the third interface is the difference between the total physical bandwidth of the third interface and the bandwidth used by the traffic transmitted by the third interface.

22. The device according to claim 19, characterized in that The determination unit is further used to obtain the remaining available bandwidth of the third interface based on the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service, where the remaining available bandwidth of the third interface is the difference between the total available bandwidth of the target service and the bandwidth used by the third interface to transmit the target service.

23. The device according to claim 19, characterized in that The sending unit is configured to obtain and send a response message corresponding to the probe message to the head node, where the response message carries the remaining available bandwidth of the first forwarding path.

24. The device according to claim 23, characterized in that The response message includes an application layer protocol header and a destination option header DOH, the application layer protocol header includes a Bidirectional Active Measurement Protocol TWAMP message header or a Bidirectional Forwarding Detection BFD message header, the DOH includes a type-length-value TLV, the TLV includes the remaining available bandwidth of the first forwarding path, and the DOH is encapsulated in the outer layer of the application layer protocol header.

Citation Information

Patent Citations

  • Method, apparatus and device for detection of available bandwidth of network link

    CN108011771A

  • Link quality detection method and device, and path selection method and device

    CN111835589A

  • Traffic scheduling method and device

    CN116319503A

  • Load balancing method and device, electronic equipment and storage medium

    CN116915709A

  • Advertising internet connection quality

    US20200213910A1