Traffic limitation method and related apparatus

By acquiring and adjusting the bandwidth information of the member ports of the link aggregation group through the network processor, and utilizing communication and microcode broadcasting between multiple network processors, the problem of insufficient throughput of the member ports in the link aggregation group is solved, and the data transmission quality is improved.

WO2026061087A1PCT designated stage Publication Date: 2026-03-26HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2026-03-26

AI Technical Summary

Technical Problem

In Ethernet link aggregation, the actual maximum throughput of multiple member ports cannot reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group, resulting in a decrease in data transmission quality.

Method used

By acquiring bandwidth information of multiple member ports within the link aggregation group through the network processor of the network device, the traffic of the member ports can be dynamically limited. Millisecond-level adjustments are made using communication between multiple network processors and microcode broadcasting to ensure that the maximum throughput of each member port reaches the bandwidth of the Eth-Trunk interface.

Benefits of technology

It enables fast and flexible bandwidth adjustment of the member ports of the link aggregation group, improves data transmission quality, and ensures that the maximum throughput of each member port reaches the bandwidth of the Eth-Trunk interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025106354_26032026_PF_FP_ABST
    Figure CN2025106354_26032026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a traffic limitation method and a related apparatus. The method is applied to a network device, the network device comprises at least two network processors, the network device communicates with another network device by means of a link aggregation group, and the link aggregation group comprises a plurality of member ports. One network processor generates first information, the first information comprising bandwidth information of a member port controlled by the network processor; and then the network processor sends the first information to the other network processor. Each network processor of the network device may receive first information sent by another network processor, so that each network processor may acquire bandwidth information of each member port in the link aggregation group. Then, on the basis of the acquired bandwidth information of the member port, the network processor determines a limited bandwidth of the member port controlled by the network processor, realizing dynamic adjustment of traffic of the member port in the link aggregation group, so that the maximum throughput of the plurality of member ports can reach the bandwidth of an Eth-Trunk interface corresponding to the link aggregation group.
Need to check novelty before this filing date? Find Prior Art

Description

Traffic limiting method and related apparatus

[0001] The present application claims priority to the Chinese patent application No. 202411329303.8, filed on September 23, 2024, and entitled "Traffic limiting method and related apparatus", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of communication technology, in particular to a traffic limiting method and related apparatus. BACKGROUND

[0003] Ethernet-Trunk, referred to as link aggregation, can achieve the purpose of increasing link bandwidth without hardware upgrade by bundling multiple physical interfaces into one logical port. A Link Aggregation Group (LAG) is a logical link formed by bundling several Ethernet links together, also known as an Eth-Trunk link. Each aggregation group can include multiple member ports. If the data bandwidth of one of the member ports exceeds the allowed data bandwidth of the member port, the member port will occupy the bandwidth of the member port in the aggregation group, which may result in other member ports not being able to get normal bandwidth service. In order to ensure the normal operation of the communication network, the bandwidth of the multiple member ports of the aggregation group needs to be limited.

[0004] The multiple member ports of each aggregation group can be controlled by multiple physical modules (such as network processors) of a network device (such as a switch). In actual application, in order to facilitate management, the bandwidth of the member ports controlled by the multiple physical modules is usually uniformly set, but the actual data amount transmitted by the multiple member ports is not completely uniform, which results in that the actual maximum throughput of the multiple member ports cannot reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group. SUMMARY

[0005] The present application provides a traffic limiting method and related apparatus. The bandwidth information of the multiple member ports in the link aggregation group is obtained by the network processor of the network device, the limited bandwidth of the multiple member ports of the link aggregation group is dynamically adjusted, the traffic of the member ports is dynamically limited, and the actual maximum throughput of the multiple member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group.

[0006] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0007] In a first aspect, a traffic limiting method is provided, which is applied to a first network device including a first network processor and a second network processor. The method comprises: generating, by the first network processor, first information, the first network device communicating with a second network device through a link aggregation group, the link aggregation group including a first member port and a second member port, the first member port being controlled by the first network processor, the second member port being controlled by the second network processor, the first information including bandwidth information of the first member port; and sending, by the first network processor, the first information to the second network processor.

[0008] In this way, the network device communicates with other network devices through a link aggregation group including a plurality of member ports. The network device includes at least two network processors, each network processor controlling at least one member port of the link aggregation group, each network processor being capable of generating first information carrying bandwidth information of the member port controlled by the network processor, and each network processor sending the first information generated thereby to other network processors of the network device. Each network processor of the network device receives the first information sent by other network processors, so that each network processor can obtain the bandwidth information of each member port of the link aggregation group, and the network processor determines the limiting bandwidth of the member port controlled thereby according to the bandwidth information of each member port of the link aggregation group, thereby achieving dynamic limiting of the traffic of the member ports of the link aggregation group, so that the maximum throughput of the plurality of member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group.

[0009] The application obtains the bandwidth information of each member port in the link aggregation group by controlling the plurality of network processors of the link aggregation group to communicate. Each network processor determines the limiting bandwidth of the member port controlled thereby according to the obtained bandwidth information of the member port, which is faster than controlling through the processor of the network device. For example, the plurality of network processors can transmit the first information through a microcode broadcast mode, so that the limiting bandwidth of the member port can be adjusted at a millisecond level, which is faster and more flexible.

[0010] In some implementations of the first aspect, the first network processor generates the first information, comprising: in response to a target event, the first network processor generates the first information, the target event being used to trigger adjustment of the limiting bandwidth of the first member port. In this way, by setting the target event triggering the generation of the first information, the network controller generates the first information according to the detected target event, i.e., adjusts the limiting bandwidth of the member port according to the target.

[0011] In some implementations of the first aspect, if the target event includes that the first member port satisfies a packet loss condition, the first information further includes packet loss information of the first member port; and / or if the target event includes that the first member port satisfies a time delay condition, the first information further includes time delay information of the first member port. In this way, if data transmitted by at least one of the plurality of member ports of the link aggregation group satisfies the packet loss condition or the time delay condition, the network processor sends the first information carrying the packet loss information and / or the time delay information to another network processor, so that the network processor adjusts the limit bandwidth of the member port according to the bandwidth information, the packet loss information and / or the time delay information, so as to reduce the packet loss of the member port. That is, the packet loss information and / or the time delay information is used in combination with the bandwidth information to assist in adjusting the limit bandwidth of the member port, so that the adjusted limit bandwidth can reduce or eliminate the packet loss of the data packet transmitted via the member port or reduce the time delay of the data transmitted via the member port.

[0012] In some implementations of the first aspect, the method further includes: receiving, by the first network processor, second information sent by the second network processor, the second information being generated by the second network processor based on the first information, the second information including bandwidth information of the second member port, and the second information further including packet loss information and / or time delay information of the second member port. In this way, the plurality of member ports of the link aggregation group of the network device are controlled by a plurality of network processors, and if one of the member ports satisfies the packet loss condition and / or the time delay condition, a first network processor controlling the member port generates first information including bandwidth information, packet loss information and / or time delay information of the member port, and sends the first information to other network processors. Then, after receiving the first information, a network processor corresponding to a member port not satisfying the packet loss condition or the time delay condition can generate second information and send the second information to other network processors, so that the network processor can obtain the bandwidth information, the packet loss information and / or the time delay information of each member port of the link aggregation group.

[0013] In some implementations of the first aspect, the target event includes at least one of a change in the number of member ports of the link aggregation group, a change in the bandwidth of the link aggregation interface corresponding to the link aggregation group, and reaching of a limit bandwidth adjustment period of the first member port.

[0014] In a second aspect, a traffic limiting method is provided, which is applied to a first network device including a first network processor and a second network processor. The method comprises: receiving, by the second network processor, first information sent by the first network processor, wherein the first network device communicates with a second network device through a link aggregation group, the link aggregation group includes a first member port and a second member port, the first member port is controlled by the first network processor, the second member port is controlled by the second network processor, and the first information includes bandwidth information of the first member port; and determining, by the second network processor, a limited bandwidth of the second member port according to the first information and bandwidth information of the second member port.

[0015] In some implementations of the second aspect, if the first information further includes packet loss information of the first member port and / or latency information of the first member port, the method further comprises:

[0016] sending, by the second network processor, second information to the first network processor, wherein the second information includes bandwidth information of the second member port, and the second information further includes packet loss information of the second member port and / or latency information of the second member port.

[0017] In some implementations of the second aspect, the first information further includes packet loss information of the first member port and / or latency information of the first member port, and determining, by the second network processor, the limited bandwidth of the second member port according to the first information and the bandwidth information of the second member port comprises: determining, by the second network processor, the limited bandwidth of the second member port according to the first information, the bandwidth information of the second member port, the packet loss information of the second member port, and / or the latency information of the second member port.

[0018] In a third aspect, a traffic limiting method is provided, which is applied to a first network device including a first network processor and a second network processor. The method comprises: generating, by the first network processor, first information, wherein the first network device communicates with a second network device through a link aggregation group, the link aggregation group includes a first member port and a second member port, the first member port is controlled by the first network processor, the second member port is controlled by the second network processor, and the first information includes bandwidth information of the first member port; sending, by the first network processor, the first information to the second network processor; receiving, by the second network processor, the first information sent by the first network processor; and determining, by the second network processor, a limited bandwidth of the second member port according to the first information and bandwidth information of the second member port.

[0019] In some implementations of the third aspect, the first network processor generates the first information in response to a target event, the target event being used to trigger the adjustment of the limited bandwidth of the first member port.

[0020] In some implementations of the third aspect, if the target event includes that the first member port satisfies a packet loss condition, the first information further includes packet loss information of the first member port; and / or if the target event includes that the first member port satisfies a latency condition, the first information further includes latency information of the first member port.

[0021] In some implementations of the third aspect, if the first information further includes packet loss information of the first member port and / or latency information of the first member port, the method further includes: the second network processor sending second information to the first network processor, the second information including bandwidth information of the second member port, the second information further including packet loss information of the second member port and / or latency information of the second member port; and the first network processor receiving the second information sent by the second network processor.

[0022] In some implementations of the third aspect, if the first information further includes packet loss information and / or latency information of the first member port, the second network processor determines the limited bandwidth of the second member port according to the first information and the bandwidth information of the second member port, including: the second network processor determines the limited bandwidth of the second member port according to the first information, the bandwidth information of the second member port, the packet loss information and / or the latency information of the second member port.

[0023] In a fourth aspect, a network device is provided, including: a memory including computer readable instructions; a processor in communication with the memory, the processor configured to execute the computer readable instructions to cause the network device to perform the traffic limiting method of any one of the first aspect.

[0024] In a fifth aspect, a computer readable storage medium is provided, including a program or instructions, when executed by a processor, to implement the traffic limiting method of any one of the first aspect.

[0025] In a sixth aspect, a chip is provided, including a processor configured to call and run instructions stored in a memory, so that a network device installed with the chip performs the traffic limiting method of any one of the first aspect.

[0026] In a seventh aspect, a computer program product is provided, including instructions, when executed by a computer, to implement the method of any one of the first aspect.

[0027] The beneficial effects brought by each possible implementation manner of the traffic limiting method provided in the second aspect, the traffic limiting method provided in the third aspect, the network device provided in the fourth aspect, the computer readable storage medium provided in the fifth aspect, the chip provided in the sixth aspect, and the computer program product provided in the seventh aspect can refer to the description in the various possible implementation manners in the first aspect, and will not be described one by one here. BRIEF DESCRIPTION OF DRAWINGS

[0028] FIG. 1 is a schematic diagram of a scenario;

[0029] FIG. 2 is a flow diagram of a traffic limiting method provided in an embodiment of the present application;

[0030] FIG. 3 is a schematic diagram of interaction of first information provided in an embodiment of the present application;

[0031] FIG. 4 is a schematic diagram of a scenario provided in an embodiment of the present application;

[0032] FIG. 5 is a structural schematic diagram of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The technical solutions in the present application will be described below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present specification, not all.

[0034] Please refer to FIG. 1, which is a schematic diagram of a scenario. In FIG. 1, a first network device communicates with a second network device through a link aggregation group.

[0035] The link aggregation group in FIG. 1 includes three member ports: member port 1, member port 2, and member port 3. The first network device includes network processor (NP) 1, network processor 2, and network processor 3. The network processor 1 is configured to control the member port 1, the network processor 2 is configured to control the member port 2, and the network processor 3 is configured to control the member port 3.

[0036] Each link aggregation group corresponds to a link aggregation interface (Eth-Trunk interface). In order to avoid the bandwidth of each member port exceeding the allocated bandwidth, the bandwidth of the three member ports can be limited. For example, if the bandwidth of the Eth-Trunk interface is configured as 300 Mbps, the limited bandwidth of the three member ports is 100 Mbps; if the bandwidth of the Eth-Trunk interface is 150 Mbps, after load balancing of the three member ports corresponding to the Eth-Trunk interface, the bandwidth of the member port 1 is 50 Mbps, the bandwidth of the member port 2 is 50 Mbps, and the bandwidth of the member port 3 is 50 Mbps, the actual bandwidth of the three member ports is less than the limited bandwidth of the member port, that is, the three member ports can normally transmit data; if the traffic between the first network device and the second network device changes suddenly, the real-time bandwidth of the Eth-Trunk interface changes to 280 Mbps, after load balancing of the three member ports corresponding to the Eth-Trunk interface, the bandwidth of the member port 1 is 80 Mbps, the bandwidth of the member port 2 is 80 Mbps, and the bandwidth of the member port 3 is 120 Mbps, since the bandwidth of the member port 3 is greater than the limited bandwidth of the member port, the data transmitted by the member port 3 is lost (for example, the amount of lost data is 20 Mbps).

[0037] In actual application, the multiple member ports of the link aggregation group are often controlled by at least two network processors, and the limited bandwidth of the multiple member ports is uniformly set. However, since the amount of data transmitted by the Eth-Trunk interface of the network device dynamically changes, the actual amount of data transmitted by each member port in the link aggregation group also dynamically changes, the load of the multiple member ports is not uniform, and the actual maximum throughput of the multiple member ports cannot reach the bandwidth of the Eth-Trunk interface, thereby affecting the data transmission quality.

[0038] Based on the above problems, the embodiment of the present application provides a traffic limiting method applied to a network device, the network device communicates with other network devices through a link aggregation group, the network device includes at least two network processors, the link aggregation group includes multiple member ports, each network processor controls at least one member port, and each network processor sends the bandwidth information of the member port controlled by the network processor to other network processors, so that each network processor determines the limited bandwidth of the member port controlled by the network processor according to the obtained bandwidth information of the member port, thereby dynamically adjusting the limited bandwidth of the member port of the link aggregation group, so that the maximum throughput of each member port can reach the limited bandwidth, and the maximum throughput of the multiple member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group, thereby improving the data transmission quality.

[0039] It is appreciated that in other embodiments, the network device can include two, four or more than four network processors, each of which is configured to control at least one member port of the link aggregation group.

[0040] In FIG. 1, the link aggregation group includes three member ports. It is appreciated that in other embodiments, the link aggregation group can include two, four or more than four member ports.

[0041] In FIG. 1, each network processor controls one member port of the link aggregation group. It is appreciated that in other embodiments, each network processor can control two or more than two member ports of the link aggregation group, and a plurality of member ports of the link aggregation group are controlled by at least two network processors, for example, the link aggregation group has five member ports, network processor 1 controls four member ports, and network processor 2 controls one member port.

[0042] In some embodiments, the network device includes at least one single board, and at least two network processors configured to control a plurality of member ports of the link aggregation group can be located in one single board or at least two single boards.

[0043] Optionally, the network processor has a traffic limiting function configured to control the traffic of the corresponding member port. Of course, the network processor can also have other functions, such as implementing high-speed packet processing, protocol analysis, route lookup, data aggregation, firewall, quality of service (QoS) and the like.

[0044] Optionally, the network device in the present application can be a hub, a switch, a bridge, a router, a gateway, a network interface card and a wireless access point and the like.

[0045] Referring to FIG. 2, FIG. 2 is a flow diagram of a traffic limiting method according to an embodiment of the present application. The traffic limiting method of FIG. 2 is applied to a first network device, the first network device communicates with a second network device through a link aggregation group, the first network device includes a first network processor and a second network processor, and the link aggregation group includes a first member port and a second member port, the first member port is controlled by the first network processor, and the second member port is controlled by the second network processor.

[0046] The traffic limiting method of FIG. 2 includes S201-S203.

[0047] In S201, the first network processor generates first information, and the first information includes bandwidth information of the first member port.

[0048] Optionally, if the first network processor is configured to control a plurality of member ports of the link aggregation group, the first information includes bandwidth information of the plurality of member ports controlled by the first network processor.

[0049] Optionally, if the first information comprises bandwidth information of a plurality of member ports controlled by the first network processor, the bandwidth information of the plurality of member ports comprises bandwidth information of each member port controlled by the first network processor and / or a sum of bandwidths of the plurality of member ports. For example, the first network processor controls member port A and member port B of a link aggregation group, the bandwidth of member port A is 50 Mbps, and the bandwidth of member port B is 60 Mbps, then the first information comprises 110 Mbps, i.e., the first information comprises a sum of the bandwidth of member port A and the bandwidth of member port B.

[0050] Optionally, the bandwidth information can be an amount of data transmitted via the first member port in a unit of time or a throughput of the member port.

[0051] Optionally, if the first network processor is configured to control a plurality of member ports of a link aggregation group, the first network processor can generate corresponding first information for each member port, and each first information comprises bandwidth information of the member port.

[0052] S202, the first network processor sends the first information to the second network processor.

[0053] Optionally, a plurality of network processors of the same network device can implement mutual transmission of the first information in a plurality of manners, for example, through a dedicated communication interface or a communication protocol, such as a high-speed first network processor.

[0054] Optionally, the first network processor can send the first information to other network processors of the network device through microcode (Microcode) broadcast. The microcode is a low-level control code running on the network processor and is configured to implement a specific function. The first information can be sent through the microcode broadcast, and the microcode can be written or modified to contain specific broadcast instructions or functions. Other network processors can receive the broadcast by configuring a broadcast address or identifier to receive the first information sent by the first network processor.

[0055] S203, the second network processor receives the first information sent by the first network processor, and determines a limited bandwidth of the second member port according to the first information and bandwidth information of the second member port.

[0056] The limited bandwidth is a bandwidth allowed to be used by the second member port, and by determining the limited bandwidth, the member port of the aggregation link is limited in traffic.

[0057] Exemplarily, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 300 Mbps, the limiting bandwidth of the first member port and the second member port is 150 Mbps respectively, if the bandwidth of the first member port is 140 Mbps and the bandwidth of the second member port is 70 Mbps, then the second network processor obtains the bandwidth of the first member port and the second member port of the link aggregation group, and then calculates the limiting bandwidth of the first member port: 70 / (140+70)*300 Mbps=75 Mbps.

[0058] Optionally, the second network processor determines the limiting bandwidth of the second member port according to the total bandwidth, the first information and the bandwidth information of the second member port, wherein the total bandwidth is the bandwidth configured for the Eth-Trunk interface corresponding to the link aggregation group. Optionally, the total bandwidth can be pre-stored in each network processor, or pre-configured in the network processor by a user or a processor of the network device.

[0059] Optionally, the second network processor is configured to control a plurality of member ports of the aggregation link group, and the limiting bandwidth can be the total limiting bandwidth of the plurality of member ports. After determining the total limiting bandwidth, the second network processor can perform load sharing on the plurality of member ports to determine the limiting bandwidth of each member port controlled by the second network processor.

[0060] Exemplarily, the second network processor is configured to control the first member port and the second member port of the link aggregation group, and the limiting bandwidth determined by the second network processor is 100 Mbps, then the second network processor performs load sharing on the first member port and the second member port, and the limiting bandwidth of the first member port is 60 Mbps and the limiting bandwidth of the second member port is 40 Mbps.

[0061] It is easy to understand that the first network processor and the second network processor in the method shown in FIG. 2 can be any processor of the network device. Thus, the network device communicates with other network devices through a link aggregation group, and the link aggregation group includes a plurality of member ports. The network device includes at least two network processors, each network processor is configured to control at least one member port of the link aggregation group, and each network processor can generate first information carrying the bandwidth information of the member port controlled by the network processor, and each network processor sends the first information generated by the network processor to other network processors of the network device. Each network processor of the network device receives the first information sent by other network processors, so that the network processor can obtain the bandwidth information of each member port of the link aggregation group, and the network processor determines the limiting bandwidth of the member port controlled by the network processor according to the bandwidth information of each member port of the link aggregation group, thereby realizing dynamic flow limiting of the member port of the link aggregation group, so that the maximum throughput of the plurality of member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group, thereby improving the data transmission quality.

[0062] The plurality of network processors of the link aggregation group are controlled to communicate to obtain the bandwidth information of each member port in the link aggregation group. Each network processor determines the limited bandwidth of the member port controlled by it according to the obtained bandwidth information of the member port, and the traffic limiting method is faster than the control by the processor of the network device. For example, the plurality of network processors transmit the first information by the microcode broadcast mode, and the limited bandwidth of the member port can be adjusted in milliseconds, which is faster and more flexible. Please refer to FIG. 3, which is a schematic diagram of the network processor interaction of the first information provided by an embodiment of the present application. In FIG. 3, the network device includes network processor 1, network processor 2 and network processor 3; the network device of FIG. 3 communicates with other network devices through a link aggregation group, and the link aggregation group includes a plurality of member ports. Each of the network processor 1, the network processor 2 and the network processor 3 controls at least one member port, each network processor generates first information, and the first information includes the bandwidth information of the member port controlled by the network processor. The network processor 1, the network processor 2 and the network processor 3 transmit the first information to each other in pairs, so that each network processor can obtain the bandwidth information of each member port in the link aggregation group. The network processor can determine the limited bandwidth of the member port controlled by it according to the obtained bandwidth information, thereby dynamically adjusting the limited traffic of the member port of the link aggregation group, and the maximum throughput of the plurality of member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group.

[0063] In this way, if the network device includes at least two network processors, the network device communicates with other network devices through a link aggregation group. The link aggregation group includes a plurality of member ports, and each network processor is used to control at least one member port in the link aggregation group. Then each network processor can generate first information. The first information includes the bandwidth information of the member port controlled by the network processor; then each network processor sends the first information to other network processors of the network device, that is, the plurality of network processors transmit the first information to each other in pairs. In this way, each network processor of the network device can receive the first information sent by other network processors, so that each network processor can obtain the bandwidth information of each member port of the link aggregation group; then each network processor determines the limited bandwidth of the member port controlled by it according to the obtained bandwidth information of each member port, thereby dynamically adjusting the bandwidth of the member port of the link aggregation group.

[0064] Optionally, if the plurality of member ports of the link aggregation group are controlled by a plurality of network processors, the plurality of network processors can form a multicast group, and the plurality of network processors can transmit the first information to each other in pairs in the multicast group, so that each network processor can obtain the bandwidth information of each member port of the link aggregation group.

[0065] Optionally, the first information further comprises identification information, the identification information being used to indicate the first member port, for example, an identification of the first member port, so that the network processor receiving the plurality of first information can determine the bandwidth information in the first information as the bandwidth information of the first member port according to the identification information in the first information.

[0066] Optionally, since the bandwidth of each member port is in dynamic change during data transmission, the method shown in FIG. 2 is used to limit the flow of the bandwidth in dynamic change. If the bandwidth of the member port controlled by the network processor has not changed, the network processor does not need to generate the first information. If the other network processors do not receive the first information sent by the network processor, it can be determined that the bandwidth information of the member port controlled by the network processor has not changed, and the historical bandwidth information of the member port corresponding to the network processor can be obtained, and the bandwidth information of the member port controlled by the network processor is determined according to the historical bandwidth information.

[0067] Exemplarily, the link aggregation group comprises three member ports: member port 1, member port 2 and member port 3, the network processor 1 controls the member port 1, the network processor 2 controls the member port 2, and the network processor 3 controls the member port 3; the network processor 1 receives the first information sent by the network processor 2 and does not receive the first information sent by the network processor 3, so the network processor 1 obtains the historical bandwidth information of the member port 3, and determines the bandwidth information of the member port 3 according to the historical bandwidth information.

[0068] Optionally, each member port of the link aggregation group has an initial limit bandwidth, and the initial limit bandwidth is determined when the links of the plurality of member ports of the link aggregation group are established, for example, the initial limit bandwidths of the three member ports are the same. Thus, if the network processor does not find the historical bandwidth information of the member port, the initial limit bandwidth can be used as the historical bandwidth information thereof.

[0069] Optionally, in order to realize the real-time adjustment of the limit bandwidth of the plurality of member ports of the link aggregation group, a trigger event can be set, and after the network processor detects the event, the first information is generated and sent to the other network processors, so as to realize the dynamic adjustment of the bandwidth of the member ports of the link aggregation group, for example, the event can be a packet loss rate, a change of the number of member ports, etc.

[0070] In some embodiments, the first network processor generates the first information in S201, comprising:

[0071] In response to the target event, the first network processor generates the first information, the target event being used to trigger the adjustment of the limited bandwidth of the first member port. Thus, when the first network processor detects the target event, the first information is generated and sent to other network processors; by sending the first information between the network processors, each network processor can obtain the bandwidth information of the plurality of member ports of the link aggregation group, so as to adjust the limited bandwidth of each member port in real time according to the bandwidth information of the plurality of member ports.

[0072] In some embodiments, the target event includes a change in the number of member ports of the link aggregation group, i.e. the number of member ports of the link aggregation group increases or decreases, for example, the number of member ports of the link aggregation group changes from 7 to 5, or from 3 to 5. Since the bandwidth configured for the corresponding Eth-Trunk interface of the link aggregation group is shared by the plurality of member ports, the change in the number of member ports requires the adjustment of the limited bandwidth of the current member port in order to redistribute the bandwidth configured for the Eth-Trunk interface.

[0073] Optionally, the network device further includes a processor, when the number of member ports of the link aggregation group changes, the processor sends first notification information to the corresponding network processor (i.e. the first network processor and the second network processor) of the link aggregation group, the first notification information being used to indicate the change in the number of member ports of the link aggregation group. After the network processor receives the first notification information sent by the processor of the network device, the network processor generates the first information. That is, the first notification information sent by the processor triggers the first network processor to generate the first information, and further triggers the network processor to adjust the limited bandwidth of the plurality of member ports of the link aggregation group.

[0074] Exemplarily, referring to FIG. 4, which is a schematic diagram of a scenario provided by the embodiment of the present application, the bandwidth configured for the Eth-Trunk interface corresponding to the link aggregation group is 300 Mbps. The link aggregation group includes three member ports: member port 1, member port 2 and member port 3. Network processor 1 controls member port 1, network processor 2 controls member port 2, and network processor 3 controls member port 3. The limiting bandwidths of the three member ports are 100 Mbps respectively. Due to link failure, member port 3 cannot be normally used, and thus the number of member ports of the link aggregation group changes. The processor of the network device sends first notification information to network processor 1 and network processor 2, the first notification information being used to indicate that the number of member ports of the link aggregation group changes. Network processor 1 generates first information after receiving the first notification information, and sends the first information to network processor 2, the first information including that the bandwidth of member port 1 is 40 Mbps. Network processor 2 generates first information after receiving the first notification information, and sends the first information to network processor 1, the first information including that the bandwidth of member port 2 is 80 Mbps. Network processor 1 calculates the limiting bandwidth of member port 1: 300*40 / (80+40) = 100 Mbps. Network processor 2 calculates the limiting bandwidth of member port 2: 300*80 / (80+40) = 200 Mbps.

[0075] Optionally, the first notification information includes the number of member ports of the current link aggregation group. The number of member ports in the link aggregation group is preset in each network processor, and after receiving the first notification information, each network processor replaces the number of member ports in the first notification information with the number stored in the network processor.

[0076] As shown in FIG. 4, after the number of member ports of the link aggregation group changes, the number of network processors controlling the member ports also changes, and the number of network processors controlling the member ports in FIG. 4 decreases. Of course, in other embodiments, for example, if the number of member ports of the link aggregation group increases, the number of network processors controlling the member ports of the link aggregation group can also increase.

[0077] In some embodiments, the target event includes that the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group changes. Since multiple member ports of the link aggregation group share the bandwidth of the Eth-Trunk interface, when the bandwidth of the Eth-Trunk interface changes, the limiting bandwidth of the multiple member ports needs to be adjusted.

[0078] In some embodiments, the first network device further comprises a processor, the processor sends second notification information to the first network processor and the second network processor, the second notification information is used to indicate that the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group is changed, then after each network processor receives the second information, the second notification information triggers the network processor to generate first information as a target event, and sends the first information to other network processors, and each network processor adjusts the bandwidth control of the member port according to the obtained bandwidth information of the member port. Since the bandwidth information of the Eth-Trunk interface is changed, the network processor needs to adjust the bandwidth limitation of the member port of the link aggregation group according to the change of the bandwidth information of the Eth-Trunk interface.

[0079] Optionally, the second notification information comprises the bandwidth information of the Eth-Trunk interface, so that the network processor can obtain the current bandwidth information of the Eth-Trunk interface according to the second notification information.

[0080] Exemplarily, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 300Mbps, the link aggregation group comprises three member ports: member port 1, member port 2 and member port 3, the network processor 1 controls the member port 1, the network processor 2 controls the member port 2, and the network processor 3 controls the member port 3, and the limited bandwidth of the three member ports is 100Mbps respectively. Due to user configuration, the Eth-Trunk interface is configured with a bandwidth of 270Mbps, and the processor of the network device sends second notification information to the network processor 1, the network processor 2 and the network processor 3, the second notification information indicates that the bandwidth of the Eth-Trunk interface is changed; the network processor 1 generates first information after receiving the second notification information, and sends the first information to the network processor 2 and the network processor 3, the first information comprises that the bandwidth of the member port 1 is 40Mbps; the network processor 2 generates first information after receiving the second notification information, and sends the first information to the network processor 1 and the network processor 3, the first information comprises that the bandwidth of the member port 2 is 80Mbps, and the network processor 3 generates first information after receiving the second notification information, and sends the first information to the network processor 1 and the network processor 2, the first information comprises that the bandwidth of the member port 2 is 80Mbps; the network processor 1 calculates the limited bandwidth of the member port 1: 270*40 / (80+40+80)=54Mbps, the network processor 2 calculates the limited bandwidth of the member port 2: 270*80 / (80+40+80)=108Mbps, and the network processor 3 calculates the limited bandwidth of the member port 3: 270*80 / (80+40+80)=108Mbps.

[0081] In some embodiments, the target event comprises reaching a limit bandwidth adjustment period of the first member port. By setting the target event, the network processor controlling the member ports of the link aggregation group can periodically generate the first information to perform the periodic limit bandwidth adjustment of the member ports of the link aggregation group.

[0082] Optionally, a timer is set in the network processor, and upon detecting that the timer reaches the limit bandwidth adjustment period of the first member port, the network processor generates the first information to perform the limit bandwidth adjustment of the member ports of the link aggregation group.

[0083] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270 Mbps, the link aggregation group comprises three member ports: member port 1, member port 2 and member port 3, network processor 1 controls the member port 1, network processor 2 controls the member port 2, and network processor 3 controls the member port 3, and the limit bandwidths of the three member ports are 90 Mbps, 90 Mbps and 90 Mbps respectively. Upon detecting that the timer reaches the limit bandwidth adjustment period of the first member port, network processor 1 generates the first information and sends the first information to network processor 2 and network processor 3, the first information comprising the bandwidth of the member port 1 being 40 Mbps; network processor 2 generates the first information and sends the first information to network processor 1 and network processor 3, the first information comprising the bandwidth of the member port 2 being 80 Mbps; network processor 3 generates the first information and sends the first information to network processor 1 and network processor 2, the first information comprising the bandwidth of the member port 2 being 80 Mbps; network processor 1 calculates the limit bandwidth of the member port 1: 270*40 / (80+40+80)=54 Mbps, network processor 2 calculates the limit bandwidth of the member port 2: 270*80 / (80+40+80)=108 Mbps, and network processor 3 calculates the limit bandwidth of the member port 3: 270*80 / (80+40+80)=108 Mbps.

[0084] Optionally, the network processors controlling the member ports of the link aggregation group are each provided with a timer, and the periods of the timers are the same, and upon reaching the limit bandwidth adjustment period of the member port, each network processor generates the first information and sends the first information to the other network processors to perform the limit bandwidth adjustment of the member ports of the link aggregation group.

[0085] In some embodiments, the target event comprises the first member port satisfying a packet loss condition, for example, the data transmitted by the member port generates packet loss due to the bandwidth of the member port being greater than the limit bandwidth of the member port, and the limit bandwidth of the member port can be adjusted to reduce the packet loss of the data transmitted by the member port.

[0086] Optionally, the first member port satisfying the packet loss condition can include the network processor detecting that a packet loss rate of data packets transmitted by the member port controlled by the network processor is greater than or equal to a preset packet loss threshold, or a number of packet losses of data packets transmitted by the member port within a unit time exceeds a preset number threshold.

[0087] Optionally, the target event includes the first member port satisfying the packet loss condition, i.e., the first member port satisfying the packet loss condition triggers the first network processor to generate the first information, and the first information further includes packet loss information of the first member port.

[0088] Correspondingly, the second network processor determining the limited bandwidth of the second member port according to the first information and the bandwidth information of the second member port in S203 can include: the second network processor determining the limited bandwidth of the second member port according to the first information, the bandwidth information of the second member port, and the packet loss information of the second member port.

[0089] Thus, when data transmitted by at least one of the plurality of member ports of the link aggregation group satisfies the packet loss condition, the network processors transmit the first information carrying the packet loss information and the bandwidth information to each other, so that the network processors adjust the limited bandwidth of the member ports according to the packet loss information and the bandwidth information, so that the maximum throughput of the plurality of member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group, thereby reducing packet loss of the member ports.

[0090] Optionally, the packet loss information can be a packet loss rate or a packet loss amount of data packets transmitted by the first member port.

[0091] Optionally, the plurality of member ports of the link aggregation group of the network device are controlled by a plurality of network processors, and when one of the member ports satisfies the packet loss condition, a first network processor controlling the member port generates first information, the first information including bandwidth information and packet loss information of the member port; and the first network processor transmits the first information to other network processors. After receiving the first information, the other network processors obtain bandwidth information and packet loss information of member ports controlled by the other network processors except the first network processor, and determine limited bandwidths of the member ports controlled by the other network processors according to the obtained bandwidth information and packet loss information of the plurality of member ports.

[0092] Optionally, after the second network processor receives the first information, if the first information includes the bandwidth information and the packet loss information of the first member port, the method further includes: the second network processor generates second information, and sends the second information to the first network processor, wherein the second information includes the bandwidth information and the packet loss information of the second member port. If the received first information carries the packet loss information, it can be determined that the first information is triggered by the first member port satisfying the packet loss condition, and the process of determining the limited bandwidth needs to consider the influence of the packet loss information. Therefore, by generating the second information and sending the second information to the corresponding network processor, the network processor controlling multiple member ports can obtain the bandwidth information and the packet loss information of each member port, and adjust the limited bandwidth of the member port according to the bandwidth information and the packet loss information of each member port.

[0093] Optionally, the second network processor determines the limited bandwidth of the second member port according to the first information, the bandwidth information of the second member port and the packet loss information of the second member port, including:

[0094] The second network processor determines the first receiving bandwidth of the first member port according to the first information, and determines the second receiving bandwidth of the second member port according to the bandwidth information of the second member port and the packet loss information of the second member port, wherein the first receiving bandwidth includes the bandwidth information and the packet loss information of the first member port, and the second receiving bandwidth includes the bandwidth information and the packet loss information of the second member port; and the second network processor determines the limited bandwidth of the second member port according to the first receiving bandwidth and the second receiving bandwidth.

[0095] Exemplarily, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270 Mbps, the link aggregation group includes three member ports: member port 1, member port 2 and member port 3, the network processor 1 controls the member port 1, the network processor 2 controls the member port 2, and the network processor 3 controls the member port 3, and the limited bandwidth of the three member ports is 90 Mbps respectively. When it is detected that the transmitted data of the first member port satisfies the packet loss condition, the network processor 1 generates first information and sends the first information to the network processor 2 and the network processor 3, the first information including that the bandwidth of the member port 1 is 40 Mbps, the packet loss amount is 20 Mbps, and the receiving bandwidth is 60 Mbps; the network processor 2 generates the first information and sends the first information to the network processor 1 and the network processor 3, the first information including that the bandwidth of the member port 2 is 80 Mbps, the packet loss amount is 10 Mbps, and the receiving bandwidth is 90 Mbps; the network processor 3 generates the first information and sends the first information to the network processor 1 and the network processor 2, the first information including that the bandwidth of the member port 2 is 30 Mbps, the packet loss amount is 0, and the receiving bandwidth is 30 Mbps; the network processor 1 calculates the limited bandwidth of the member port 1: 270*60 / (90+60+30) = 90 Mbps, the network processor 2 calculates the limited bandwidth of the member port 2: 270*90 / (90+60+30) = 135 Mbps, and the network processor 3 calculates the limited bandwidth of the member port 3: 270*80 / (80+40+80) = 108 Mbps.

[0096] Of course, in other embodiments, the second network processor determines the additional weight information of each member port according to the packet loss information of the member port, and determines the limited bandwidth of the member port according to the additional weight information and the bandwidth information of the member port.

[0097] Exemplarily, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270 Mbps, the link aggregation group includes three member ports: member port 1, member port 2 and member port 3, the network processor 1 controls the member port 1, the network processor 2 controls the member port 2, and the network processor 3 controls the member port 3, and the limit bandwidths of the three member ports are 90 Mbps, 80 Mbps and 30 Mbps respectively. When it is detected that the data transmitted by the first member port satisfies the packet loss condition, the network processor 1 generates the first information and sends the first information to the network processor 2 and the network processor 3, the first information including that the bandwidth of the member port 1 is 40 Mbps and the packet loss rate is 50%; the network processor 2 generates the first information and sends the first information to the network processor 1 and the network processor 3, the first information including that the bandwidth of the member port 2 is 80 Mbps and the packet loss rate is 25%, and the network processor 3 generates the first information and sends the first information to the network processor 1 and the network processor 2, the first information including that the bandwidth of the member port 2 is 30 Mbps and the packet loss rate is 0; then it is determined that the additional weight information of the first member port is 1.5, the additional weight information of the second member port is 1, and the additional weight information of the third member port is 0.8; the network processor 1 calculates the limit bandwidth of the member port 1: 270*40*1.2 / (80+40*1.2+30*0.8) = 85.3 Mbps, the network processor 2 calculates the limit bandwidth of the member port 2: 270*80 / (80+40*1.2+30*0.8) = 142 Mbps, and the network processor 3 calculates the limit bandwidth of the member port 3: 270*30*0.80 / (80+40*1.2+30*0.8) = 42.7 Mbps.

[0098] In some embodiments, the target event includes that the first member port satisfies the delay condition, for example, the delay of the data transmitted by the member port is too long due to that the throughput of the member port is greater than the limit bandwidth of the member port; for example, the waiting time of the data packet is too long due to the limit bandwidth, so that the transmission delay of the data packet is greater than the preset delay threshold, and the limit bandwidth of the member port can be adjusted to reduce the packet loss of the data transmitted by the member port.

[0099] Optionally, the first member port satisfying the delay condition can include that the network processor detects that the transmission delay of the data packet transmitted by the member port controlled by the network processor is greater than or equal to a preset delay threshold, or the number of the data packets transmitted by the member port in a unit time and having a transmission delay greater than the preset delay threshold exceeds a preset number threshold.

[0100] Optionally, the target event includes that the first member port satisfies the delay condition, that is, the first member port satisfying the delay condition triggers the first network processor to generate the first information, and the first information further includes the delay information of the first member port.

[0101] Correspondingly, the second network processor determines the limited bandwidth of the second member port according to the first information and the bandwidth information of the second member port in S203, including: the second network processor determines the limited bandwidth of the second member port according to the first information, the bandwidth information of the second member port and the time delay information of the second member port.

[0102] Thus, when the data transmitted by at least one of the plurality of member ports of the link aggregation group satisfies the time delay condition, the network processors carry the time delay information in the first information transmitted by each other, so that the network processors adjust the limited bandwidth of the member ports according to the time delay information and the bandwidth information, to reduce the time delay of the data transmitted by the member ports.

[0103] Optionally, the time delay information includes at least one of the sending time delay, the transmission time delay, the queuing time delay and the processing time delay of the data packet transmitted by the first member port.

[0104] Optionally, the plurality of member ports of the link aggregation group of the network device are controlled by a plurality of network processors, and when one of the member ports satisfies the time delay condition, a first network processor controlling the member port generates first information, the first information including the bandwidth information and the time delay information of the member port; the first network processor sends the first information to other network processors. After receiving the first information, the other network processors obtain the bandwidth information and the time delay information of the member ports controlled by the other network processors, and determine the limited bandwidth of each member port according to the bandwidth information and the time delay information of the plurality of member ports.

[0105] Optionally, after the second network processor receives the first information in S203, if the first information includes the bandwidth information and the time delay information of the first member port, the method further includes: the second network processor generates second information, and sends the second information to the first network processor, the second information including the bandwidth information and the time delay information of the second member port. If the first information carries the time delay information, it can be determined that the first information is triggered by the first member port satisfying the time delay condition, and the process of determining the limited bandwidth needs to consider the influence of the time delay information. Therefore, by generating the second information and sending the second information to the corresponding network processor, the network processors controlling the plurality of member ports can obtain the bandwidth information and the time delay information of each member port, and adjust the limited bandwidth of the member ports according to the bandwidth information and the time delay information of each member port.

[0106] Optionally, the second network processor determines the limited bandwidth of the second member port according to the first information, the bandwidth information of the second member port and the time delay information of the second member port, including:

[0107] The second network processor determines a first time delay skew bandwidth of the first member port according to the first information, determines a second time delay skew bandwidth of the second member port according to the bandwidth information of the second member port and the time delay information of the second member port, and determines the limit bandwidth of the second member port according to the first time delay skew bandwidth and the second time delay skew bandwidth, the bandwidth information of the first member port and the bandwidth information of the second member port. The time delay information of the data packet transmitted through each member port increases or decreases the bandwidth of each member port. The sum of the time delay skew bandwidths of the plurality of member ports of the link aggregation group is 0.

[0108] Exemplarily, the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group is configured as 270 Mbps, the link aggregation group includes three member ports: member port 1, member port 2 and member port 3, the network processor 1 controls the member port 1, the network processor 2 controls the member port 2, and the network processor 3 controls the member port 3, and the limit bandwidths of the three member ports are respectively 90 Mbps. When it is detected that the transmitted data of the first member port satisfies the time delay condition, the network processor 1 generates the first information and sends the first information to the network processor 2 and the network processor 3, the first information including that the bandwidth of the member port 1 is 40 Mbps and the transmission time delay is 1 ms; the network processor 2 generates the first information and sends the first information to the network processor 1 and the network processor 3, the first information including that the bandwidth of the member port 2 is 80 Mbps and the transmission time delay is 2 ms, and the network processor 3 generates the first information and sends the first information to the network processor 1 and the network processor 2, the first information including that the bandwidth of the member port 2 is 30 Mbps and the transmission time delay is 4 ms; the time delay skew bandwidths of the member port 1, the member port 2 and the member port 3 are respectively: -20 Mbps, 0 Mbps and 20 Mbps; then the network processor 1 calculates the limit bandwidth of the member port 1: 270*40 / (80+40+80)-20=34 Mbps, the network processor 2 calculates the limit bandwidth of the member port 2: 270*80 / (80+40+80)=108 Mbps, and the network processor 3 calculates the limit bandwidth of the member port 3: 270*80 / (80+40+80)+20=128 Mbps.

[0109] Of course, in other embodiments, the second network processor determines the additional weight information of each member port according to the time delay information of the member port, and determines the limit bandwidth of the member port according to the additional weight information and the bandwidth information of the member port.

[0110] Exemplarily, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270 Mbps, the link aggregation group includes three member ports: member port 1, member port 2 and member port 3, the network processor 1 controls the member port 1, the network processor 2 controls the member port 2, and the network processor 3 controls the member port 3, and the limit bandwidths of the three member ports are 90 Mbps, 80 Mbps and 30 Mbps respectively. When it is detected that the data transmitted by the first member port satisfies the packet loss condition, the network processor 1 generates first information and sends the first information to the network processor 2 and the network processor 3, the first information including that the bandwidth of the member port 1 is 40 Mbps and the transmission delay is 8 ms; the network processor 2 generates first information and sends the first information to the network processor 1 and the network processor 3, the first information including that the bandwidth of the member port 2 is 80 Mbps and the transmission delay is 2 ms, and the network processor 3 generates first information and sends the first information to the network processor 1 and the network processor 2, the first information including that the bandwidth of the member port 2 is 30 Mbps and the transmission delay is 1 ms; then the additional weight information of the first member port is determined as 1.5, the additional weight information of the second member port is determined as 1, and the additional weight information of the third member port is determined as 0.8; the network processor 1 calculates the limit bandwidth of the member port 1 as 85.3 Mbps, the network processor 2 calculates the limit bandwidth of the member port 2 as 142 Mbps, and the network processor 3 calculates the limit bandwidth of the member port 3 as 42.7 Mbps.

[0111] Optionally, if the first member port simultaneously satisfies the delay condition and the packet loss condition, the first network card controller controlling the first member port generates first information, and the first information includes the bandwidth information, the delay information and the packet loss information of the first member port; after the second network processor receives the first information, the limit bandwidth of the second member port is determined according to the bandwidth information of the first member port, the delay information of the first member port, the packet loss information of the first member port, the bandwidth information of the second member port, the delay information of the second member port and the packet loss information of the second member port, the limit bandwidth of the member port is adjusted by combining the bandwidth information with the delay information and the packet loss information, and the transmission delay and the packet loss of the data transmitted by the second member port are reduced by adjusting the limit bandwidth.

[0112] Optionally, after S203, the limit bandwidths of the member ports in the link aggregation group are determined, the network processor can perform flow control on the member port controlled by the network processor according to the limit bandwidth, or other network chips can perform flow control on the member port according to the limit bandwidth, for example, a traffic management unit (TM).

[0113] Optionally, after determining the limit bandwidth of the member port, the member port can be flow-limited by a token bucket algorithm. For example, the generation rate of tokens is determined according to the limit bandwidth of the member port, and then the maximum capacity of the token bucket is set. When a data packet is ready to be sent through the member port, the number of tokens in the token bucket is checked. If the number of tokens is sufficient, the data packet is allowed to be sent, and the corresponding number of tokens is deducted from the bucket. If the number of tokens is insufficient, the data packet is processed according to a strategy (such as buffering, discarding, or marking).

[0114] It is easy to understand that, because the forwarding performance of different network processors is different, the performance of different physical ports of the network device is different, and different member ports correspond to different physical ports. Therefore, the weight coefficient of each member port can be determined according to the forwarding performance of the network processor and / or the performance of the physical port, and the limit bandwidth of the member port can be determined based on the weight coefficient.

[0115] Optionally, the network device can configure the weight coefficient corresponding to the member port in the corresponding network processor through the processor.

[0116] In S203, the second network processor determines the limit bandwidth of the second member port according to the first information and the bandwidth information of the second member port, including: the second network processor determines the limit bandwidth of the second member port according to the first information, the weight coefficient corresponding to the first member port, the bandwidth information of the second member port, and the weight coefficient corresponding to the second member port.

[0117] For example, the bandwidth configured for the Eth-Trunk interface corresponding to the link aggregation group is 270 Mbps, the link aggregation group includes three member ports: member port 1, member port 2, and member port 3, the network processor 1 controls the member port 1, the bandwidth of the member port 1 is 40 Mbps and the weight coefficient is 1; the bandwidth of the member port 2 is 80 Mbps and the weight coefficient is 1, and the bandwidth of the member port 3 is 80 Mbps and the weight coefficient is 2; the limit bandwidth of the member port 1 is calculated as: 270*40*1 / (80*1+40*1+80*2) = 38.5 Mbps, the limit bandwidth of the member port 2 is calculated as: 270*80 / (80*1+40*1+80*2) = 77.2 Mbps, and the limit bandwidth of the member port 3 is calculated as: 270*80*2 / (80*1+40*1+80*2) = 154.3 Mbps.

[0118] Optionally, the weight coefficient of the member port can also be determined based on other parameters, for example, a user can configure different weight coefficients for each member port according to the characteristics of the service.

[0119] It should be understood that the above merely helps the person skilled in the art to better understand the embodiments of the present application, and is not intended to limit the scope of the embodiments of the present application. The person skilled in the art can obviously make various equivalent modifications or changes according to the above examples given, for example, some steps in each of the above methods can not be necessary, or some steps can be newly added, etc. Or a combination of any two or more of the above embodiments. Such modifications, changes or combinations also fall within the scope of the embodiments of the present application.

[0120] It should also be understood that the ways, cases, categories and divisions of embodiments in the embodiments of the present application are only for the convenience of description and should not constitute special limitations. The features in various ways, categories, cases and embodiments can be combined without contradiction.

[0121] It should also be understood that the various numerical designations involved in the embodiments of the present application are only for the convenience of description and do not limit the scope of the embodiments of the present application. The size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0122] It should also be understood that the above description of the embodiments of the present application focuses on the differences between the various embodiments, and the same or similar aspects that are not mentioned can be referred to each other. For the sake of brevity, they will not be repeated here.

[0123] The above describes the embodiments of the method and system provided by the embodiments of the present application in combination with FIG. 1-FIG. 4. The network device provided by the embodiments of the present application is described below.

[0124] The embodiments can divide the network device into functional modules according to the above method. For example, each function can be divided into a functional module, or two or more functions can be integrated into a processing module. The integrated module can be realized in the form of hardware. It should be noted that the division of the modules in the embodiments is illustrative, and is only a logical functional division. Actual implementation can have another division manner.

[0125] It should be noted that the related content of each step involved in the above method embodiments can be cited to the functional description of the corresponding functional module, which will not be repeated here.

[0126] The network device provided by the embodiments of the present application is used to execute the traffic limiting method provided by the above method embodiments, and therefore can achieve the same effect as the above implementation method.

[0127] In other embodiments, in the case of employing integrated units, the network device can include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the network device. For example, it can be used to support the network device to perform the steps performed by the processing unit. The storage module can be used to support the storage of program code and data, etc. The communication module can be used to support the communication between the network device and other network devices, the network device.

[0128] Among them, the processing module can be a processor or a controller. It can be various exemplary logic blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (digital signal processing, DSP) and microprocessors, etc. The storage module can be a memory. The communication module can be a device that interacts with other network devices or network devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.

[0129] Based on the same idea, the embodiments of the present application also provide a network device, as shown in FIG. 5, which shows a structural schematic diagram of an exemplary network device of the present application. The network device shown in FIG. 5 can perform the steps in the traffic limiting method performed by any one of the network devices provided by the embodiments of the present application.

[0130] The network device 500 includes at least one processor 501, a memory 503, and at least one network interface 504.

[0131] The processor 501 is, for example, a general-purpose CPU, a digital signal processor (DSP), a network processor (NP), a GPU, a neural network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits or application specific integrated circuits (ASICs) for implementing the schemes of the present application, programmable logic devices (PLDs), or other programmable logic devices, transistor logic devices, hardware components, or any 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. It can implement or execute various logical blocks, modules, and circuits described in connection with the disclosure of the present application. The processor can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, and the like.

[0132] Optionally, the network device 500 further includes a bus 502. The bus 502 is used to transmit information between the components of the network device 500. The bus 502 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 502 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is shown in FIG. 5, but it does not mean that there is only one bus or only one type of bus.

[0133] The memory 503 is, for example, a read only memory (ROM) or other type of 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 disk storage, magneto-optical storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 503 is, for example, independent and connected to the processor 501 through the bus 502. The memory 503 can also be integrated with the processor 501.

[0134] The network interface 504 uses any transceiver-like mechanism for communicating with other devices or a communication network, which can be an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), or the like. The network interface 504 can include a wired network interface and can also include a wireless network interface. Specifically, the network interface 504 can be an Ethernet interface, such as a fast Ethernet (FE) interface, a gigabit Ethernet (GE) interface, an asynchronous transfer mode (ATM) interface, a WLAN interface, a cellular network interface, or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In some embodiments of the present application, the network interface 504 can be used for the network device 500 to communicate with other devices.

[0135] In a specific implementation, as some embodiments, the processor 501 can include one or more CPUs. Each of these processors can be a single core processor or a multiple core processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0136] In a particular implementation, as some embodiments, the network device 500 can include a plurality of processors. Each of the processors can be a single core processor or a multiple core processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data such as computer program instructions.

[0137] In some embodiments, the memory 503 is configured to store program instructions for performing the solutions of the present application, and the processor 501 can execute the program instructions stored in the memory 503. That is, the network device 500 can implement the method provided by the method embodiments shown in the above embodiments by the processor 501 and the program instructions in the memory 503. The program instructions can include one or more software modules. Alternatively, the processor 501 itself can also store program instructions for performing the solutions of the present application.

[0138] In the implementation process, the processor 501 in the network device 500 of the present application reads the instructions in the memory 503, so that the network device 500 shown in FIG. 5 can execute all or part of the steps of the traffic limiting method executed by the network device in the above embodiments.

[0139] Among them, each step of the method described in the above embodiments is completed by the integrated logic circuit of the hardware in the processor of the network device 500 or the instructions in the form of software. The steps of the method embodiments disclosed in the present application can be directly embodied as the execution of the hardware processor, or the execution of the combination of the hardware and the software modules in the processor. The software module can be located in the random access memory, the flash memory, the read-only memory, the programmable read-only memory, the electrically erasable programmable memory, the register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method embodiments. To avoid repetition, they will not be described in detail here.

[0140] It is to be understood that the above-described processor can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is to be noted that the processor can be a processor supporting an advanced RISC machine (ARM) architecture.

[0141] Further, in an alternative embodiment, the above-described memory can include read-only memory and random access memory, and provide the processor with instructions and data. The memory can also include non-volatile random access memory. For example, the memory can also store device type information.

[0142] The memory can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used. For example, a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous DRAM (SDRAM), a double data rate synchronous DRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a synchlink DRAM (SLDRAM), and a direct rambus RAM (DR RAM) can be used.

[0143] The network device provided by the embodiment can execute the method embodiments described above, and the implementation principles and technical effects are similar, which will not be described here.

[0144] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method described in the above method embodiments.

[0145] The embodiment of the present application also provides a computer program product, which, when running on a network device, enables the network device to execute the method described in the above method embodiments.

[0146] The embodiment of the present application provides a chip, including a processor, for calling and running instructions stored in a memory, so that the communication device installed with the chip executes the method described in the above method embodiments executed by any one of the network devices provided by the embodiment of the present application.

[0147] The embodiment of the present application further provides a chip system, comprising a processor coupled with a memory, and the processor executes a computer program stored in the memory to implement the method described in the above method embodiment. The chip system can be a single chip or a chip module composed of multiple chips.

[0148] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted by the computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk or magnetic tape), optical media (such as DVD) or semiconductor media (such as solid state disk (SSD)) and the like.

[0149] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program to instruct the relevant hardware to complete, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The storage medium mentioned above can include ROM or random access memory (RAM), magnetic disk or optical disk and various media that can store program codes.

[0150] In the present application, the naming or numbering of the steps does not mean that the steps in the method process must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0151] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.

[0152] In the embodiments of the present disclosure, it should be understood that the disclosed apparatuses / devices and methods can be implemented in other manners. For example, the embodiments of the apparatuses / devices described above are merely schematic. For example, the division of the modules or units is merely logical function division. There can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units.

[0153] It should be understood that, in the description of the specification and the appended claims of the present application, the terms "comprise", "contain", "have" and any variations of them are intended to cover the non-exclusive inclusion, and mean "including but not limited to", unless otherwise specifically emphasized. For example, a process, method, system, product or device that includes a series of steps or modules does not have to be limited to those steps or modules clearly listed, but can include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices.

[0154] In the description of the present application, unless otherwise specified, " / " means that the associated objects before and after are in an "or" relationship, for example, A / B can mean A or B; "and / or" in the present application is used to describe the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can mean: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural.

[0155] Also, in the description of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or similar expressions means any combination of the items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0156] As used in the specification and the appended claims of the present application, the term "if" can be interpreted as "when" or "upon" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted as meaning "upon determining" or "in response to determining" or "upon detecting [a described condition or event]" or "in response to detecting [a described condition or event]" depending on the context.

[0157] In addition, in the description of the present application and the appended claims, the terms "first", "second", and the like are used merely to distinguish similar objects from each other, and do not necessarily indicate a particular order or sequence, nor do they necessarily indicate relative importance of, or a preference for, the identified technical features. It is to be understood that data used in this way can be interchanged, where appropriate, so that the embodiments described herein can be carried out in other than the order shown or described herein; features defined with "first", "second" can explicitly or implicitly include at least one of the features.

[0158] In the present application, the words "exemplary" and "for example" are used to mean serving as an example, instance, or illustration. Any implementation described herein as "exemplary" or as an "example" is not necessarily to be construed as preferred or advantageous over other implementations. Rather, the use of terms such as "exemplary" or "example" is intended to present concepts in a concrete manner.

[0159] In the present application, the words "exemplary" and "for example" are used to mean serving as an example, instance, or illustration. Any implementation described herein as "exemplary" or as an "example" is not necessarily to be construed as preferred or advantageous over other implementations. Rather, the use of terms such as "exemplary" or "example" is intended to present concepts in a concrete manner.

[0160] Finally, it should be noted that the above-described embodiments are merely intended for describing and illustrating, but not limiting, the technical solutions of the present application; even though the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above-described embodiments, or make equivalent replacements to some or all of the technical features; and such modifications or replacements do not cause the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A flow restriction method characterized by, The method is applied to a first network device, the first network device comprising a first network processor and a second network processor, and the method comprises: The first network processor generates first information, the first network device communicates with a second network device through a link aggregation group, the link aggregation group comprises a first member port and a second member port, the first member port is controlled by the first network processor, the second member port is controlled by the second network processor, and the first information comprises bandwidth information of the first member port. The first network processor sends the first information to the second network processor.

2. The method of claim 1, wherein, The first network processor generates first information, comprising: In response to a target event, the first network processor generates first information, and the target event is used to trigger adjustment of the limited bandwidth of the first member port.

3. The method of claim 2, wherein, If the target event comprises that the first member port meets a packet loss condition, the first information further comprises packet loss information of the first member port; and / or If the target event comprises that the first member port meets a delay condition, the first information further comprises delay information of the first member port.

4. The method of claim 3, wherein, The method further comprises: The first network processor receives second information sent by the second network processor, the second information is generated by the second network processor based on the first information, the second information comprises bandwidth information of the second member port, and the second information further comprises packet loss information and / or delay information of the second member port.

5. The method of claim 2, wherein, The target event comprises at least one of the following: a number of member ports of the link aggregation group changes, a bandwidth of a link aggregation interface corresponding to the link aggregation group changes, and a limited bandwidth adjustment period of the first member port is reached.

6. A flow restriction method characterized by, The method is applied to a first network device, the first network device comprising a first network processor and a second network processor, and the method comprises: The second network processor receives first information sent by the first network processor, the first network device communicates with a second network device through a link aggregation group, the link aggregation group comprises a first member port and a second member port, the first member port is controlled by the first network processor, the second member port is controlled by the second network processor, and the first information comprises bandwidth information of the first member port. The second network processor determines a limited bandwidth of the second member port according to the first information and bandwidth information of the second member port.

7. The method of claim 6, wherein, If the first information further comprises packet loss information of the first member port and / or delay information of the first member port, the method further comprises: The second network processor sends second information to the first network processor, the second information comprises bandwidth information of the second member port, and the second information further comprises packet loss information and / or delay information of the second member port.

8. The method according to claim 6 or 7, characterized in that, The first information further comprises packet loss information and / or delay information of the first member port, and the second network processor determines a limited bandwidth of the second member port according to the first information and bandwidth information of the second member port, comprising: The second network processor determines the limited bandwidth of the second member port according to the first information, bandwidth information of the second member port, packet loss information of the second member port, and / or latency information of the second member port.

9. A method of flow restriction, characterized by, The application discloses a network device and a traffic limitation method. The first network processor generates first information, the first network device communicates with a second network device through a link aggregation group, the link aggregation group comprises a first member port and a second member port, the first member port is controlled by the first network processor, the second member port is controlled by the second network processor, and the first information comprises bandwidth information of the first member port. The first network processor sends the first information to the second network processor. The second network processor receives the first information. The second network processor determines the limited bandwidth of the second member port according to the first information and bandwidth information of the second member port.

10. The method of claim 9, wherein, The first network processor generates first information, comprising: In response to a target event, the first network processor generates first information, and the target event is used for triggering adjustment of the limited bandwidth of the first member port.

11. The method of claim 10, wherein, If the target event comprises that the first member port satisfies a packet loss condition, the first information further comprises packet loss information of the first member port; and / or if the target event comprises that the first member port satisfies a latency condition, the first information further comprises latency information of the first member port.

12. The method according to claim 10 or 11, characterized in that, If the first information further comprises packet loss information of the first member port and / or latency information of the first member port, the method further comprises: The second network processor sends second information to the first network processor, the second information comprises bandwidth information of the second member port, and the second information further comprises packet loss information of the second member port and / or latency information of the second member port. The first network processor receives the second information sent by the second network processor.

13. The method according to any one of claims 10 to 12, characterized in that, If the first information further comprises packet loss information of the first member port and / or latency information of the first member port, the second network processor determines the limited bandwidth of the second member port according to the first information and bandwidth information of the second member port, comprising: The second network processor determines the limited bandwidth of the second member port according to the first information, bandwidth information of the second member port, packet loss information of the second member port, and / or latency information of the second member port.

14. A network device, comprising: Comprise: A memory comprising computer readable instructions; A processor in communication with the memory, the processor configured to execute the computer readable instructions to cause the network device to perform the traffic limitation method of any one of claims 1-13.

15. A computer-readable storage medium, characterized in that, A program or instructions that, when executed by a processor, implement the traffic limitation method of any one of claims 1-13.

16. A computer program product, characterised in that, The computer program product comprises instructions, when the instructions are run by a computer, implement the traffic limitation method of any one of claims 1-13. The computer program product comprises instructions, when the instructions are run by a computer, implement the traffic limitation method of any one of claims 1-13.

Citation Information

Patent Citations

  • System for rate management of aggregate-rate communication services

    CN101411132A

  • Traffic management method based on aggregation link and traffic management device thereof

    CN106453111A

  • Link aggregation method and device

    CN115643206A

  • Flow control between transmitter and receiver entities in communications system

    CN1426651A

  • Shared rate limiting

    US10097474B1