Flow limiting method and related device

By dynamically adjusting the bandwidth of the member ports of the link aggregation group using the network processor, the problem of insufficient throughput in Ethernet link aggregation is solved, and the data transmission quality is improved.

CN121728041APending Publication Date: 2026-03-24HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2026-03-24

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

The network processor of the network device obtains the bandwidth information of multiple member ports in the link aggregation group, realizes dynamic limiting of the traffic of member ports, and transmits the bandwidth information using microcode broadcasting. Each network processor communicates with each other to adjust the limited bandwidth of member ports.

Benefits of technology

This achieved the maximum throughput of multiple member ports reaching the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group, thus improving data transmission quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728041A_ABST
    Figure CN121728041A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a flow limiting method and a related device, the method is applied to network equipment, the network equipment comprises at least two network processors, the network equipment communicates with other network equipment through a link aggregation group, the link aggregation group comprises a plurality of member ports, and the network processors generate first information, the first information comprises bandwidth information of member ports controlled by the first information; and then the network processor sends the first information to other network processors. Each network processor of the network equipment can receive first information sent by other network processors, so that each network processor can obtain bandwidth information of each member port of a link aggregation group; and then the network processor determines the limited bandwidth of the member ports controlled by the network processor according to the obtained bandwidth information of the member ports, so that the flow of the member ports of the link aggregation group is dynamically adjusted, 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a traffic limiting method and related apparatus. Background Technology

[0002] Ethernet link aggregation (Ethernet-Trunk), or simply link aggregation, increases link bandwidth by bundling multiple physical interfaces into a single logical port without requiring hardware upgrades. A Link Aggregation Group (LAG) is a logical link formed by binding several Ethernet links together; it is also called an Eth-Trunk link. Each aggregation group can include multiple member ports. If the data bandwidth of one member port exceeds its allowed data bandwidth, that member port will consume the bandwidth of the other member ports in the aggregation group, potentially preventing other member ports from receiving normal bandwidth service. To ensure the normal operation of the communication network, it is necessary to limit the bandwidth of the multiple member ports in the aggregation group.

[0003] Multiple member ports of each aggregation group can be controlled by multiple physical modules (e.g., network processors) of a network device (e.g., a switch). In practice, for ease of management, the bandwidth of member ports controlled by multiple physical modules is usually set evenly. However, the actual amount of data transmitted by multiple member ports is not completely uniform, resulting in the actual maximum throughput of multiple member ports failing to reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group. Summary of the Invention

[0004] This application provides a traffic limiting method and related apparatus, which obtains the bandwidth information of multiple member ports within a link aggregation group through the network processor of a network device, and realizes dynamic adjustment of the bandwidth limitation of multiple member ports of the link aggregation group, thereby realizing dynamic limitation of traffic of the member ports, so that the actual maximum throughput of multiple member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] In a first aspect, a traffic limiting method is provided, applied to a first network device, the first network device including a first network processor and a second network processor, the method including: the first network processor generating first information; the first network device communicating with the 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 the first network processor sending the first information to the second network processor.

[0007] In this way, network devices communicate with other network devices through link aggregation groups, which include multiple member ports. Each network device includes at least two network processors, each controlling at least one member port of the link aggregation group. Each network processor generates first information carrying bandwidth information of the member port it controls, and sends this first information to the other network processors in the network device. Each network processor receives the first information from the other network processors, thus obtaining the bandwidth information of each member port in the link aggregation group. Based on this bandwidth information, each network processor determines the bandwidth limit for the member port it controls, thereby dynamically limiting the traffic to the member ports of the link aggregation group so that the maximum throughput of multiple member ports can reach the bandwidth of the corresponding Eth-Trunk interface of the link aggregation group.

[0008] This application controls multiple network processors within a link aggregation group to communicate and obtain bandwidth information for each member port within the group. Each network processor limits the bandwidth of the member port it controls based on the obtained bandwidth information. Compared to control via the processor of a network device, the traffic limiting method of this application is faster. For example, multiple network processors can transmit the first information via microcode broadcast, enabling millisecond-level adjustment of the limited bandwidth of member ports, which is faster and more flexible.

[0009] In some implementations of the first aspect, the first network processor generates first information, including: in response to a target event, the first network processor generates first information, wherein the target event is used to trigger an adjustment of the limited bandwidth of the first member port. Thus, by setting a target event to trigger the generation of first information, the network controller generates first information based on the detected target event, that is, adjusts the limited bandwidth of the member port according to the target.

[0010] In some implementations of the first aspect, if the target event includes the first member port meeting a packet loss condition, then the first information also includes packet loss information of the first member port; and / or if the target event includes the first member port meeting a latency condition, then the first information also includes latency information of the first member port. Thus, if data transmitted by at least one member port in a link aggregation group satisfies either a packet loss condition or a latency condition, the first information sent between network processors carries packet loss information and / or latency information, so that the network processors can adjust the limited bandwidth of the member port based on bandwidth information, packet loss information, and / or latency information to reduce packet loss at the member port. That is, by combining packet loss information and / or latency information with bandwidth information, the limited bandwidth of the member port is adjusted to reduce or eliminate packet loss of data packets transmitted via the member port or reduce the latency of data transmitted via the member port.

[0011] In some implementations of the first aspect, the method further includes: the first network processor receiving 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 also including packet loss information and / or latency information of the second member port. Thus, multiple member ports of the link aggregation group of the network device are controlled by multiple network processors. If one member port meets the packet loss condition and / or latency condition, the first network processor controlling that member port generates first information, the first information being the bandwidth information, packet loss information, and / or latency information of that member port; the first network processor then sends the first information to other network processors. After receiving the first information, the network processor corresponding to the member port that does not meet the packet loss condition or latency condition can generate second information and send the second information to other network processors, so that the network processors can obtain the bandwidth information, packet loss information, and / or latency information of each member port in the link aggregation group.

[0012] In some implementations of the first aspect, the target event includes at least one of the following: 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 the limit bandwidth adjustment period of the first member port.

[0013] Secondly, a traffic limiting method is provided, applying a first network device, the first network device including a first network processor and a second network processor, the method including: the second network processor receiving first information sent by the first network processor, the first network device communicating with the 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; the second network processor determining the limiting bandwidth of the second member port based on the first information and the bandwidth information of the second member port.

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

[0015] The second network processor sends second information to the first network processor. The second information includes bandwidth information of the second member port, packet loss information of the second member port, and / or latency information of the second member port.

[0016] In some implementations of the second aspect, the first information further includes packet loss information and / or latency information of the first member port, and the second network processor determines the limited bandwidth of the second member port based on 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 based on the first information, the bandwidth information of the second member port, the packet loss information and / or latency information of the second member port.

[0017] Thirdly, a traffic limiting method is provided, applying a first network device, the first network device including a first network processor and a second network processor, the method comprising: the first network processor generating first information; the first network device communicating with the 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; the first network processor sending the first information to the second network processor; the second network processor receiving the first information sent by the first network processor; and the second network processor determining the limiting bandwidth of the second member port based on the first information and the bandwidth information of the second member port.

[0018] In some implementations of the third aspect, the first network processor generates first information, including: in response to a target event, the first network processor generates first information, wherein the target event is used to trigger an adjustment of the bandwidth limit of the first member port.

[0019] In some implementations of the third aspect, if the target event includes the first member port satisfying the packet loss condition, then the first information also includes the packet loss information of the first member port; and / or if the target event includes the first member port satisfying the delay condition, then the first information also includes the delay information of the first member port.

[0020] 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 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 and / or latency information of the second member port; and the first network processor receiving the second information sent by the second network processor.

[0021] In some implementations of the third aspect, if the first information also includes packet loss information and / or latency information of the first member port, then the second network processor determines the limited bandwidth of the second member port based on 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 based on the first information, the bandwidth information of the second member port, the packet loss information and / or latency information of the second member port.

[0022] Fourthly, a network device is provided, comprising: a memory including computer-readable instructions; and a processor communicating with the memory, the processor being configured to execute the computer-readable instructions, causing the network device to perform the traffic limiting method described in any one of the first aspects.

[0023] Fifthly, a computer-readable storage medium is provided, including a program or instructions that, when executed by a processor, implement the flow limiting method as described in any one of the first aspects.

[0024] In a sixth aspect, a chip is provided, including a processor for retrieving and executing instructions stored in a memory, causing a network device on which the chip is installed to perform the traffic limiting method described in any one aspect.

[0025] In a seventh aspect, a computer program product is provided, the computer program product comprising instructions that, when executed by a computer, implement the method as described in any one of the first aspects.

[0026] The beneficial effects of each possible implementation 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 of the embodiments of this application can be referred to the descriptions of the various possible implementations in the first aspect, and will not be repeated here. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of a scene;

[0028] Figure 2 A flowchart illustrating a traffic limiting method provided in an embodiment of this application;

[0029] Figure 3 This is a schematic diagram illustrating the interaction of first information as provided in an embodiment of this application;

[0030] Figure 4 A scenario diagram provided for an embodiment of this application;

[0031] Figure 5 This is a schematic diagram of the structure of a network device provided in an embodiment of this application. Detailed Implementation

[0032] The technical solutions in this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments in this specification, and not all of them.

[0033] Please see Figure 1 , Figure 1 It is a scene diagram. Figure 1 The first network device communicates with the second network device through a link aggregation group.

[0034] Figure 1 The link aggregation group in the network 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. Among them, network processor 1 is used to control member port 1, network processor 2 is used to control member port 2, and network processor 3 is used to control member port 3.

[0035] Each link aggregation group corresponds to one link aggregation interface (Eth-Trunk interface). To prevent the bandwidth of each member port from exceeding its allocated bandwidth, bandwidth limits can be imposed on the three member ports. For example, if the Eth-Trunk interface is configured with a bandwidth of 300Mbps, then the bandwidth limit for each of the three member ports is 100Mbps. If the Eth-Trunk interface has a bandwidth of 150Mbps, after load balancing on the three member ports, member port 1 has a bandwidth of 50Mbps, member port 2 has a bandwidth of 50Mbps, and member port 3 has a bandwidth of 50Mbps. The actual bandwidth of each member port is less than its bandwidth limit, meaning that all three member ports can transmit data normally. If there is a sudden change in traffic between the first and second network devices, and the real-time bandwidth of the Eth-Trunk interface changes to 280Mbps, after load balancing on the three member ports, member port 1 has a bandwidth of 80Mbps, member port 2 has a bandwidth of 80Mbps, and member port 3 has a bandwidth of 120Mbps. Since the bandwidth of member port 3 is greater than its bandwidth limit, packet loss occurs in the data transmitted through member port 3 (e.g., packet loss of 20Mbps).

[0036] In practical applications, multiple member ports of a link aggregation group are often controlled by at least two network processors, and the bandwidth limits of these member ports are evenly distributed. However, due to the dynamic changes in the amount of data transmitted by the Eth-Trunk interface of the network device, the actual amount of data transmitted by each member port in the link aggregation group also changes dynamically. This uneven load distribution among the member ports means that the actual maximum throughput of the member ports cannot reach the bandwidth of the Eth-Trunk interface, thus affecting the data transmission quality.

[0037] To address the aforementioned issues, this application provides a traffic limiting method applied to a network device. This network device communicates with other network devices via a link aggregation group. The network device includes at least two network processors, and the link aggregation group includes multiple member ports. Each network processor controls at least one member port. Each network processor sends bandwidth information of its controlled member port to other network processors, enabling each network processor to determine the limited bandwidth of its controlled member port based on the obtained bandwidth information. This allows for dynamic adjustment of the limited bandwidth of the member ports in the link aggregation group, ensuring that the maximum throughput of each member port reaches its limited bandwidth. Consequently, the maximum throughput of multiple member ports can reach the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group, thereby improving data transmission quality.

[0038] Figure 1The first network device includes three network processors, which is easy to understand. In other embodiments, the network device may include two, four or more network processors, each of which is used to control at least one member port of the link aggregation group.

[0039] Figure 1 In this embodiment, the link aggregation group includes 3 member ports, which is easy to understand. In other embodiments, the link aggregation group may include 2, 4 or more member ports.

[0040] Figure 1 In this embodiment, each network processor controls one member port of the link aggregation group. It is easy to understand that in other embodiments, each network processor controls two or more member ports of the link aggregation group, and multiple member ports of the link aggregation group are controlled by at least two network processors. For example, if the link aggregation group has five member ports, network processor 1 controls four member ports and network processor 2 controls one member port.

[0041] In some embodiments, if the network device includes at least one board, then at least two network processors for controlling multiple member ports of a link aggregation group may be located on one board or at least two boards.

[0042] Optionally, the network processor has a traffic limiting function to control the traffic of corresponding member ports. Of course, the network processor may also have other functions, such as high-speed packet processing, protocol analysis, route lookup, data aggregation, firewall, and Quality of Service (QoS) functions.

[0043] Optionally, the network device in this application may be a hub, switch, bridge, router, gateway, network interface card, and wireless access point, etc.

[0044] Please see Figure 2 , Figure 2 This is a flowchart illustrating a traffic limiting method provided in an embodiment of this application. Figure 2 The traffic limiting method is applied to a first network device, which 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. 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.

[0045] Figure 2 The flow restriction methods include: S201 to S203.

[0046] S201, The first network processor generates first information, which includes the bandwidth information of the first member port.

[0047] Optionally, if the first network processor is used to control multiple member ports of the link aggregation group, the first information includes the bandwidth information of the multiple member ports controlled by the first network processor.

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

[0049] Optionally, the bandwidth information may be the amount of data transmitted per unit time through the first member port or the throughput of that member port.

[0050] Optionally, if the first network processor is used to control multiple member ports of the link aggregation group, the first network processor can generate corresponding first information for each member port, and each first information includes the bandwidth information of the member port.

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

[0052] Optionally, multiple network processors of the same network device can exchange first information in various ways, such as through a dedicated communication interface or communication protocol, such as a high-speed first network processor.

[0053] Optionally, the first network processor can broadcast first information to other network processors in the network device via microcode. Microcode is low-level control code running on the network processor, used to implement specific functions. Broadcasting first information via microcode can be done by writing or modifying the microcode to include specific broadcast instructions or functions. Other network processors can listen for the broadcast by configuring a listening address or identifier to receive the first information sent by the first network processor.

[0054] S203. The second network processor receives the first information sent by the first network processor, and the second network processor determines the limited bandwidth of the second member port based on the first information and the bandwidth information of the second member port.

[0055] The bandwidth limit is the bandwidth allowed to be used by the second member port. By determining the bandwidth limit, traffic restriction can be implemented on the member ports of the aggregated link.

[0056] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 300Mbps, and the bandwidth limit of the first member port and the second member port is 150Mbps. If the bandwidth of the first member port is 140Mbps and the bandwidth of the second member port is 70Mbps, then after the second network processor obtains the bandwidth of the first member port and the second member port of the link aggregation group, it calculates the bandwidth limit of the first member port: 70 / (140+70)*300Mbps=75Mbps.

[0057] Optionally, the second network processor determines the limited bandwidth of the second member port based on 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 it can be pre-configured by the user or the network device's processor.

[0058] Optionally, the second network processor controls multiple member ports of the aggregated link group, and the bandwidth limit can be the total bandwidth limit of the multiple member ports. After determining the total bandwidth limit, the second network processor can perform load balancing on the multiple member ports to determine the bandwidth limit of each member port controlled by the second network processor.

[0059] For example, the second network processor is used to control member port 1 and member port 2 of the link aggregation group. The second network processor determines the bandwidth limit to be 100Mbps, and then performs load balancing on member port 1 and member port 2. The bandwidth limit of member port 1 is 60Mbps and the bandwidth limit of member port 2 is 40Mbps.

[0060] Easy to understand Figure 2 The first and second network processors in the illustrated method can be either processors of a network device. Thus, the network device communicates with other network devices through a link aggregation group, which includes multiple member ports. The network device includes at least two network processors, each controlling at least one member port of the link aggregation group. Each network processor generates first information carrying bandwidth information of the member port it controls. Each network processor sends its generated first information to other network processors in the network device. Upon receiving the first information from other network processors, each network processor obtains the bandwidth information of each member port in the link aggregation group. Based on this bandwidth information, the network processor determines the bandwidth limit for the member port it controls, thereby achieving dynamic traffic limiting of the member ports in the link aggregation group. This ensures that the maximum throughput of multiple member ports reaches the bandwidth of the corresponding Eth-Trunk interface of the link aggregation group, improving data transmission quality.

[0061] This method involves controlling multiple network processors within a link aggregation group to communicate and obtain bandwidth information for each member port within the group. Each network processor determines the bandwidth limit for the member port it controls based on this bandwidth information. Compared to control via the network device's processor, this traffic limiting method is faster. For example, multiple network processors can transmit initial information via microcode broadcasting, enabling millisecond-level adjustment of member port bandwidth limits, which is both faster and more flexible. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a schematic diagram illustrating the interaction of first information by a network processor, as provided in an embodiment of this application. Figure 3 In this context, the network equipment includes network processor 1, network processor 2, and network processor 3; Figure 3 The network devices communicate with other network devices through link aggregation groups. Each link aggregation group includes multiple member ports. Each of network processors 1, 2, and 3 controls at least one member port. Each network processor generates first information, which includes the bandwidth information of the member port it controls. Network processors 1, 2, and 3 exchange first information in pairs to ensure that each network processor receives the bandwidth information of each member port in the link aggregation group. Based on the obtained bandwidth information, the network processors determine the limited bandwidth of the member ports they control, thereby dynamically adjusting the limited traffic of the member ports in the link aggregation group. This ensures that the maximum throughput of multiple member ports reaches the bandwidth of the corresponding Eth-Trunk interface of the link aggregation group.

[0062] Thus, if a network device includes at least two network processors, and communicates with other network devices through a link aggregation group, the link aggregation group includes multiple member ports. Each network processor controls at least one member port in the link aggregation group, and each network processor can generate first information. This first information includes the bandwidth information of the member port controlled by the network processor. Then, each network processor sends this first information to the other network processors in the network device, that is, multiple network processors send 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, thereby obtaining the bandwidth information of each member port in the link aggregation group. Then, each network processor determines the limited bandwidth of the member port it controls based on the obtained bandwidth information of each member port, thereby realizing the dynamic adjustment of the bandwidth of the member ports of the link aggregation group.

[0063] Optionally, if multiple member ports of a link aggregation group are controlled by multiple network processors, the multiple network processors can be combined into a multicast group. The multiple network processors can then send first information to each other in pairs within the multicast group, so that each network processor can obtain the bandwidth information of each member port of the link aggregation group.

[0064] Optionally, the first information may also include identification information, which is used to indicate the first member port, such as the identifier of the first member port. In this way, after the network processor receives multiple pieces of first information, it can determine the bandwidth information in the first information as the bandwidth information of the first member port based on the identification information in the first information.

[0065] Optionally, since the bandwidth of each member port changes dynamically during data transmission, this application... Figure 2 The method shown applies traffic limiting to dynamically changing bandwidth. If the bandwidth of a member port controlled by a network processor remains unchanged, the network processor does not need to generate the first message. If other network processors do not receive the first message 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. In this case, the historical bandwidth information of the corresponding member port of the network processor can be obtained, and the bandwidth information of the member port controlled by the network processor can be determined based on the historical bandwidth information.

[0066] For example, 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. When network processor 1 receives the first information sent by network processor 2 but does not receive the first information sent by network processor 3, network processor 1 obtains the historical bandwidth information of member port 3 and determines the bandwidth information of member port 3 based on the historical bandwidth information.

[0067] Optionally, each member port of the link aggregation group has an initial limited bandwidth, which is determined when the links of the multiple member ports of the link aggregation group are established. For example, if the link aggregation group includes three member ports, the initial limited bandwidth of the three member ports is the same. In this way, if the network processor cannot find the historical bandwidth information of a member port, it can use the initial limited bandwidth as its historical bandwidth information.

[0068] Optionally, in order to enable real-time adjustment of bandwidth limits for multiple member ports of the link aggregation group, a trigger event can be set. After the network processor detects the event, it generates first information and sends the first information to other network processors to achieve dynamic adjustment of the bandwidth of the member ports of the link aggregation group. For example, the event could be packet loss rate, change in the number of member ports, etc.

[0069] In some embodiments, the first network processor in S201 generates first information, including:

[0070] In response to a target event, the first network processor generates first information, which is used to trigger an adjustment of the bandwidth limit of the first member port. Thus, when the first network processor detects a target event, it generates first information and sends it to other network processors. By sending first information to each other, each network processor can obtain the bandwidth information of multiple member ports in the link aggregation group, so as to adjust the bandwidth limit of each member port in real time based on the bandwidth information of multiple member ports.

[0071] 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 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 multiple member ports, and the number of member ports changes, it is necessary to adjust the current bandwidth limit of the member ports in order to reallocate the bandwidth configured for the Eth-Trunk interface.

[0072] Optionally, the network device also includes a processor. When the number of member ports in a link aggregation group changes, the processor sends a first notification message to the network processors corresponding to the link aggregation group (i.e., the first network processor and the second network processor). The first notification message indicates that the number of member ports in the link aggregation group has changed. After receiving the first notification message from the network device's processor, the network processor generates first information. That is, the first notification message sent by the processor acts as a target event, triggering the first network processor to generate first information, which in turn triggers the network processor to adjust the bandwidth limits of multiple member ports in the link aggregation group.

[0073] For example, please see Figure 4 , Figure 4This is a schematic diagram of a scenario provided in an embodiment of this application. The Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 300Mbps. 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 bandwidth limit for each of the three member ports is 100Mbps. Due to a link failure, member port 3 cannot be used normally, thus changing the number of member ports in the link aggregation group. The processor of the network device sends a first notification message to network processor 1 and network processor 2, indicating that the number of member ports in the link aggregation group has changed. After receiving the first notification information, network processor 1 generates first information and sends it to network processor 2. The first information includes that the bandwidth of member port 1 is 40Mbps. After receiving the first notification information, network processor 2 generates first information and sends it to network processor 1. The first information includes that the bandwidth of member port 2 is 80Mbps. Network processor 1 calculates the limited bandwidth of member port 1: 300*40 / (80+40) = 100Mbps. Network processor 2 calculates the limited bandwidth of member port 2: 300*80 / (80+40) = 200Mbps.

[0074] Optionally, the first notification information includes the number of member ports in the current link aggregation group. Each network processor then has a preset number of member ports within the link aggregation group. After receiving the first notification information, the network processor replaces its stored number with the number of member ports in the first notification information.

[0075] like Figure 4 As shown, after the number of member ports in the link aggregation group changes, the number of network processors controlling the member ports also changes accordingly. Figure 4 The number of network processors controlling the member ports in the link aggregation group has decreased. Of course, in other embodiments, such as if the number of member ports in the link aggregation group has increased, the number of network processors controlling the member ports of the link aggregation group may also increase.

[0076] In some embodiments, the target event includes a change in the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group. Since multiple member ports of the link aggregation group share the bandwidth of the Eth-Trunk interface, a change in the bandwidth of the Eth-Trunk interface requires bandwidth adjustment for multiple member ports.

[0077] In some embodiments, the first network device further includes a processor. The processor sends second notification information to a first network processor and a second network processor. The second notification information indicates that the bandwidth of the Eth-Trunk interface corresponding to the link aggregation group has changed. After receiving the second information, each network processor triggers the network processor to generate first information as a target event and sends the first information to other network processors. Each network processor adjusts the bandwidth control of the member ports based on the obtained bandwidth information of the member ports. Since the bandwidth information of the Eth-Trunk interface has changed, the network processor needs to adjust the bandwidth limitation of the member ports of the link aggregation group according to the change in the bandwidth information of the Eth-Trunk interface.

[0078] Optionally, the second notification information includes the bandwidth information of the Eth-Trunk interface, so that the network processor can obtain the current bandwidth information of the Eth-Trunk interface based on the second notification information.

[0079] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 300Mbps. 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 bandwidth limit for each of the three member ports is 100Mbps. Due to user configuration, the Eth-Trunk interface is configured with a bandwidth of 270Mbps. The network device's processor sends a second notification message to network processor 1, network processor 2, and network processor 3, indicating that the configured bandwidth of the Eth-Trunk interface has changed. After receiving the second notification message, network processor 1 generates first information and sends it to network processor 2 and network processor 3. This first information includes a bandwidth of 40Mbps for member port 1. After receiving the second notification message, network processor 2 generates first information and sends it to network processor 1 and network processor 3. The first information includes the bandwidth of member port 2 as 80Mbps. After receiving the second notification information, network processor 3 generates the first information and sends it to network processor 1 and network processor 2. The first information includes the bandwidth of member port 2 as 80Mbps. Network processor 1 calculates the limited bandwidth of member port 1 as 270*40 / (80+40+80) = 54Mbps. Network processor 2 calculates the limited bandwidth of member port 2 as 270*80 / (80+40+80) = 108Mbps. Network processor 3 calculates the limited bandwidth of member port 3 as 270*80 / (80+40+80) = 108Mbps.

[0080] In some embodiments, the target event includes reaching the limit bandwidth adjustment period for a first member port. By setting this target event, the network processor controlling the member ports of the link aggregation group can periodically generate first information to periodically adjust the limit bandwidth for multiple member ports of the link aggregation group.

[0081] Optionally, a timer is set in the network processor. When the timer is detected to have reached the bandwidth limitation adjustment period of the first member port, the network processor generates first information to periodically adjust the bandwidth limitation of the member ports of the link aggregation group.

[0082] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270Mbps. 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 bandwidth limit of the three member ports is 90Mbps. When the timer detects that the bandwidth limit adjustment period of the first member port has been reached, network processor 1 generates first information and sends it to network processor 2 and network processor 3. The first information includes that the bandwidth of member port 1 is 40Mbps. Network processor 2 generates first information and sends it to network processor 1 and network processor 3. The first information includes that the bandwidth of member port 2 is 80Mbps. Network processor 3 generates first information and sends it to network processor 1 and network processor 2. The first information includes that the bandwidth of member port 2 is 80Mbps. Network processor 1 calculates the bandwidth limit of member port 1: 270*40 / (80+40+80) = 54Mbps. Network processor 2 calculates the bandwidth limit of member port 2: 270*80 / (80+40+80) = 108Mbps. Network processor 3 calculates the bandwidth limit of member port 3: 270*80 / (80+40+80) = 108Mbps.

[0083] Optionally, each network processor controlling multiple member ports of the link aggregation group is equipped with a timer, and each timer has the same period. When the bandwidth limitation adjustment period of the member port is reached, each network processor generates first information and sends the first information to other network processors to adjust the bandwidth limitation of multiple member ports of the link aggregation group.

[0084] In some embodiments, the target event includes the first member port meeting the packet loss condition, such as packet loss of data transmitted through the member port due to the member port bandwidth being greater than the member port limit bandwidth. In this case, the packet loss of data transmitted through the member port can be reduced by adjusting the member port limit bandwidth.

[0085] Optionally, the first member port meeting the packet loss condition may include the network processor detecting that the packet loss rate of the data packets transmitted by the member port it controls is greater than or equal to a preset packet loss threshold, or the number of packet losses of the data packets transmitted by the member port per unit time exceeds a preset number threshold.

[0086] Optionally, the target event includes the first member port meeting the packet loss condition, that is, the first member port meeting the packet loss condition triggers the first network processor to generate first information, and the first information also includes the packet loss information of the first member port;

[0087] Accordingly, in S203, the second network processor determines the limited bandwidth of the second member port based on 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 based on the first information, the bandwidth information of the second member port, and the packet loss information of the second member port.

[0088] Thus, if the data transmitted by at least one member port in the multiple member ports of the link aggregation group meets the packet loss condition, the first information sent between the network processors carries packet loss information and bandwidth information, so that the network processors can adjust the limited bandwidth of the member ports according to the packet loss information and bandwidth information, so that the maximum throughput of the multiple 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.

[0089] Optionally, the packet loss information may be the packet loss rate or the amount of packets lost in the data packets transmitted through the first member port.

[0090] Optionally, multiple member ports of a link aggregation group in a network device are controlled by multiple network processors. If a packet loss condition is met in one of the member ports, the first network processor controlling that member port generates first information, which includes the bandwidth and packet loss information of that member port. The first network processor then sends the first information to the other network processors. After receiving the first information, the other network processors obtain the bandwidth and packet loss information of the member ports controlled by the other network processors besides the first network processor, and determine the bandwidth limit for the member ports they control based on the obtained bandwidth and packet loss information of the multiple member ports.

[0091] Optionally, after the second network processor receives the first information in S203, if the first information includes bandwidth information and packet loss information of the first member port, the method further includes: the second network processor generating second information and sending the second information to the first network processor, the second information including bandwidth information and packet loss information of the second member port. If the received first information carries packet loss information, it can be determined that the first information was triggered by the first member port meeting the packet loss condition. Therefore, the process of determining the bandwidth limit needs to consider the impact of packet loss information. Thus, 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 packet loss information of each member port, and adjust the bandwidth limit of the member port according to the bandwidth information and packet loss information of each member port.

[0092] Optionally, the second network processor determines the limited bandwidth of the second member port based on the first information, the bandwidth information of the second member port, and the packet loss information of the second member port, including:

[0093] The second network processor determines the first receiving bandwidth of the first member port based on the first information, and determines the second receiving bandwidth of the second member port based on the bandwidth information and packet loss information of the second member port. The first receiving bandwidth includes the bandwidth information and packet loss information of the first member port, and the second receiving bandwidth includes the bandwidth information and packet loss information of the second member port. The second network processor determines the limited bandwidth of the second member port based on the first receiving bandwidth and the second receiving bandwidth.

[0094] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270Mbps. 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 bandwidth limit for each of the three member ports is 90Mbps. If the data transmitted through the first member port meets the packet loss condition, network processor 1 generates first information and sends it to network processor 2 and network processor 3. This first information includes the bandwidth of member port 1 as 40Mbps, the packet loss rate as 20Mbps, and the receiving bandwidth as 60Mbps. Network processor 2 generates first information and sends it to network processor 1 and network processor 3. This first information includes the bandwidth of member port 2 as 80Mbps, the packet loss rate as 10Mbps, and the receiving bandwidth as 90Mbps. Network processor 3 generates first information... The first information is sent to network processor 1 and network processor 2. The first information includes the bandwidth of member port 2 as 30Mbps and the packet loss as 0, and the receiving bandwidth as 30Mbps. Network processor 1 calculates the limited bandwidth of member port 1 as 270*60 / (90+60+30)=90Mbps, network processor 2 calculates the limited bandwidth of member port 2 as 270*90 / (90+60+30)=135Mbps, and network processor 3 calculates the limited bandwidth of member port 3 as 270*80 / (80+40+80)=108Mbps.

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

[0096] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270Mbps. 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 bandwidth limit for each of the three member ports is 90Mbps. If the data transmitted on the first member port meets the packet loss condition, network processor 1 generates first information and sends it to network processor 2 and network processor 3. This first information includes that the bandwidth of member port 1 is 40Mbps and the packet loss rate is 50%. Network processor 2 generates first information and sends it to network processor 1 and network processor 3. This first information includes that the bandwidth of member port 2 is 80Mbps and the packet loss rate is 25%. Network processor 3 generates first information and sends it to network processor 1 and network processor 2. This first information includes that the bandwidth of member port 2 is 30Mbps and the packet loss rate is 0%. The additional weight information for the first member port is determined to be 1.5, the additional weight information for the second member port is 1, and the additional weight information for the third member port is 0.8. Network processor 1 calculates the bandwidth limit for member port 1: 270*40*1.2 / (80+40*1.2+30*0.8)=85.3Mbps, network processor 2 calculates the bandwidth limit for member port 2: 270*80 / (80+40*1.2+30*0.8)=142Mbps, and network processor 3 calculates the bandwidth limit for member port 3: 270*30*0.80 / (80+40*1.2+30*0.8)=42.7Mbps.

[0097] In some embodiments, the target event includes the first member port meeting a delay condition, such as the delay of data transmission on the member port being too long due to the throughput of the member port being greater than the limited bandwidth of the member port; or the data packet waiting time being too long due to the limited bandwidth, resulting in the data packet transmission delay being greater than a preset delay threshold. In such cases, the packet loss of data transmitted on the member port can be reduced by adjusting the limited bandwidth of the member port.

[0098] Optionally, the first member port meeting the delay condition may include the network processor detecting that the transmission delay of the data packets transmitted by the member port it controls is greater than or equal to a preset delay threshold, or the number of data packets transmitted by the member port per unit time whose transmission delay is greater than the preset delay threshold exceeds a preset number threshold.

[0099] Optionally, the target event includes the first member port meeting the delay condition, that is, the first member port meeting the delay condition triggers the first network processor to generate first information, and the first information also includes the delay information of the first member port;

[0100] Accordingly, in S203, the second network processor determines the limited bandwidth of the second member port based on 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 based on the first information, the bandwidth information of the second member port, and the latency information of the second member port.

[0101] Thus, if the data transmitted by at least one member port in a link aggregation group satisfies the latency condition, the network processors will carry latency information in the first message they send to each other, so that the network processors can adjust the bandwidth limit of the member port according to the latency information and bandwidth information to reduce the latency of data transmission in the member port.

[0102] Optionally, the delay information includes at least one of the following: the transmission delay, the queuing delay, and the processing delay of the data packets transmitted through the first member port.

[0103] Optionally, multiple member ports of the link aggregation group of the network device are controlled by multiple network processors. When one of the member ports meets the latency condition, the first network processor controlling that member port generates first information, which includes the bandwidth and latency information of that member port. The first network processor then sends the first information to the other network processors. After receiving the first information, the other network processors obtain the bandwidth and latency information of the member ports controlled by the other network processors, and determine the bandwidth limit for each member port based on the bandwidth and latency information of the multiple member ports.

[0104] Optionally, after the second network processor receives the first information in S203, if the first information includes bandwidth information and latency information of the first member port, the method further includes: the second network processor generating second information and sending the second information to the first network processor, the second information including bandwidth information and latency information of the second member port. If the received first information carries latency information, it can be determined that the first information is triggered by the first member port meeting the latency condition. Therefore, the process of determining the bandwidth limitation needs to consider the impact of latency information. Thus, 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 latency information of each member port, and adjust the bandwidth limitation of the member port according to the bandwidth information and latency information of each member port.

[0105] Optionally, the second network processor determines the limited bandwidth of the second member port based on the first information, the bandwidth information of the second member port, and the latency information of the second member port, including:

[0106] The second network processor determines the first delay skew bandwidth of the first member port based on the first information. The second network processor determines the second delay skew bandwidth of the second member port based on the bandwidth information and delay information of the second member port. The second network processor then determines the limited bandwidth of the second member port based on the first and second delay skew bandwidths, the bandwidth information of the first member port, and the bandwidth information of the second member port. The bandwidth of each member port is increased or decreased based on the delay information of data packets transmitted through it. The sum of the delay skew bandwidths of multiple member ports in the link aggregation group is 0.

[0107] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270Mbps. 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 bandwidth limit for each of the three member ports is 90Mbps. If the data transmitted on the first member port meets the latency condition, network processor 1 generates first information and sends it to network processors 2 and 3. This first information includes the bandwidth of member port 1 as 40Mbps and the transmission latency as 1ms. Network processor 2 generates first information and sends it to network processors 1 and 3. This first information includes the bandwidth of member port 2 as 80Mbps and the transmission latency as 2ms. Network processor 3 generates first information and sends it to network processors 1 and 2. This first information includes the bandwidth of member port 1 as 80Mbps and the transmission latency as 2ms. The bandwidth of port 2 is 30Mbps and the transmission delay is 4ms; the delay skew bandwidths of member port 1, member port 2 and member port 3 are -20Mbps, 0Mbps and 20Mbps respectively; then network processor 1 calculates the limited bandwidth of member port 1 as: 270*40 / (80+40+80)-20=34Mbps, network processor 2 calculates the limited bandwidth of member port 2 as: 270*80 / (80+40+80)=108Mbps, and network processor 3 calculates the limited bandwidth of member port 3 as: 270*80 / (80+40+80)+20=128Mbps.

[0108] Of course, in other embodiments, the second network processor determines the additional weight information of each member port based on the latency information of each member port, and determines the limited bandwidth of each member port based on the additional weight information and bandwidth information of each member port.

[0109] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270Mbps. 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 bandwidth limit for each of the three member ports is 90Mbps. If the data transmitted through the first member port meets the packet loss condition, network processor 1 generates first information and sends it to network processors 2 and 3. This first information includes a bandwidth of 40Mbps for member port 1 and a transmission latency of 8ms. Network processor 2 generates first information and sends it to network processors 1 and 3. This first information includes a bandwidth of 80Mbps for member port 2 and a transmission latency of 2ms. Network processor 3 generates first information and sends it to network processors 1 and 2. This first information includes a bandwidth of 30Mbps for member port 2 and a transmission latency of 1ms. s; then the additional weight information of the first member port is determined to be 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; network processor 1 calculates the limited bandwidth of member port 1: 270*40*1.2 / (80+40*1.2+30*0.8)=85.3Mbps, network processor 2 calculates the limited bandwidth of member port 2: 270*80 / (80+40*1.2+30*0.8)=142Mbps, network processor 3 calculates the limited bandwidth of member port 3: 270*30*0.80 / (80+40*1.2+30*0.8)=42.7Mbps.

[0110] Optionally, if the first member port simultaneously meets the latency condition and the packet loss condition, the first network interface controller controlling the first member port generates first information, which includes the bandwidth information, latency information, and packet loss information of the first member port. After receiving the first information, the second network processor determines the limited bandwidth of the second member port based on the bandwidth information, latency information, and packet loss information of the first member port, the bandwidth information, latency information, and packet loss information of the second member port, and then adjusts the limited bandwidth of the member port in a targeted manner by combining the latency information and packet loss information with the bandwidth information. By adjusting the limited bandwidth, the latency and packet loss of data transmitted through the second member port are reduced.

[0111] Optionally, after S203, once the bandwidth limit of each member port in the link aggregation group is determined, the network processor can perform flow control on the member ports it controls based on the bandwidth limit, or other network chips can perform flow control based on the bandwidth limit, such as the Traffic Management (TM) unit.

[0112] Optionally, after determining the bandwidth limit of the member port, traffic limiting can be applied to the member port using a token bucket algorithm. For example, the token generation rate can be determined based on the bandwidth limit of the member port, and then the maximum capacity of the token bucket can be 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 policy (such as buffering, dropping, or marking).

[0113] It's easy to understand that different network processors have different forwarding performance, and different physical ports of network devices have different performance; different member ports correspond to different physical ports. Therefore, the weight coefficient of each member port can be determined based on the forwarding performance of the network processor and / or the performance of the physical port, and the limited bandwidth of the member port can be determined based on the weight coefficient.

[0114] Optionally, the network device can configure the weight coefficients corresponding to the member ports in the corresponding network processor via the processor.

[0115] In S203, the second network processor determines the limited bandwidth of the second member port based on 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 based on 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.

[0116] For example, the Eth-Trunk interface corresponding to the link aggregation group is configured with a bandwidth of 270Mbps. 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, which has a bandwidth of 40Mbps and a weight coefficient of 1; member port 2 has a bandwidth of 80Mbps and a weight coefficient of 1; and member port 3 has a bandwidth of 80Mbps and a weight coefficient of 2. The limited bandwidth of member port 1 is calculated as: 270*40*1 / (80*1+40*1+80*2)=38.5Mbps, the limited bandwidth of member port 2 is calculated as: 270*80 / (80*1+40*1+80*2)=77.2Mbps, and the limited bandwidth of member port 3 is calculated as: 270*80*2 / (80*1+40*1+80*2)=154.3Mbps.

[0117] Optionally, the weighting coefficient of a member port can also be determined based on other parameters, such as configuring different weighting coefficients for each member port according to the characteristics of the business.

[0118] It should be understood that the above description is merely to help those skilled in the art better understand the embodiments of this application, and is not intended to limit the scope of the embodiments of this application. Based on the examples given above, those skilled in the art can obviously make various equivalent modifications or changes. For example, some steps in the various methods described above may be unnecessary, or new steps may be added. Alternatively, any combination of two or more of the above embodiments may be used. Such modifications, changes, or combinations also fall within the scope of the embodiments of this application.

[0119] It should also be understood that the methods, situations, categories, and classifications of embodiments in this application are for the convenience of description only and should not constitute a special limitation. Various methods, categories, situations, and features in embodiments can be combined without contradiction.

[0120] It should also be understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The order of the process numbers described above does not imply the order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0121] It should also be understood that the above description of the embodiments of this application focuses on highlighting the differences between the various embodiments. Any similarities or differences not mentioned can be referred to each other. For the sake of brevity, they will not be repeated here.

[0122] The above combination Figures 1-4 The embodiments of the methods and systems provided in this application have been described. The network device provided in the embodiments of this application is described below.

[0123] This embodiment can divide the network device into functional modules according to the above method. For example, it can be divided into functional modules corresponding to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0124] It should be noted that the relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0125] The network device provided in this application embodiment is used to execute the traffic limiting method provided in the above method embodiment, and thus can achieve the same effect as the above implementation method.

[0126] In other embodiments, when using integrated units, the network device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the operations of the network device. For example, it can be used to support the network device in executing the steps performed by the processing unit. The storage module can be used to store program code and data, etc. The communication module can be used to support communication between the network device and other network devices.

[0127] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other network devices.

[0128] Based on the same concept, embodiments of this application also provide a network device, see [link to relevant documentation]. Figure 5 , Figure 5 A schematic diagram of the structure of an exemplary network device of this application is shown. Figure 5 The network device shown can execute the steps of any of the traffic limiting methods performed by the network device provided in the embodiments of this application.

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

[0130] Processor 501 may be, 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) used to implement the solutions of this application, a programmable logic device (PLD), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, 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 the various logic blocks, modules, and circuits described in conjunction with the disclosure of this application. A processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

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

[0132] Memory 503 may be, for example, read-only memory (ROM) or other types of storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 503 may exist independently and be connected to processor 501 via bus 502. Memory 503 may also be integrated with processor 501.

[0133] Network interface 504 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), or wireless local area network (WLAN). Network interface 504 can include wired network interfaces and wireless network interfaces. Specifically, network interface 504 can be an Ethernet interface, such as Fast Ethernet (FE), Gigabit Ethernet (GE), Asynchronous Transfer Mode (ATM), WLAN, cellular network, or combinations thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In some embodiments of this application, network interface 504 can be used for network device 500 to communicate with other devices.

[0134] In specific implementations, as some embodiments, processor 501 may include one or more CPUs. Each of these processors may be a single-core processor or a multi-core processor. Here, "processor" may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0135] In specific implementations, as some methods, network device 500 may include multiple processors. Each of these processors may be a single-core processor or a multi-core processor. Here, a processor may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0136] In some embodiments, memory 503 is used to store program instructions for executing the present application's solution, and processor 501 can execute the program instructions stored in memory 503. That is, network device 500 can implement the method provided in the above embodiments through processor 501 and the program instructions in memory 503. The program instructions may include one or more software modules. Optionally, processor 501 itself may also store program instructions for executing the present application's solution.

[0137] In specific implementation, the processor 501 in the network device 500 of this application reads instructions from the memory 503, causing... Figure 5 The network device 500 shown can perform all or part of the steps in the traffic limiting method performed by the network device in the above embodiments.

[0138] In the above embodiments, each step of the method is implemented through integrated logic circuits in the hardware of the processor of the network device 500 or through software instructions. The steps of the method embodiments disclosed in this application can be directly implemented by the hardware processor, or implemented by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. Since the storage medium is located in memory, the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method embodiments; to avoid repetition, these will not be described in detail here.

[0139] It should be understood that the aforementioned processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting the Advanced Reduced Instruction Set Computing (RISC) machine (ARM) architecture.

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

[0141] The memory can be volatile or non-volatile, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0142] The network device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so they will not be described again here.

[0143] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described in the above-described method embodiments.

[0144] This application also provides a computer program product that, when run on a network device, enables the network device to implement the methods described in the above-described method embodiments.

[0145] This application provides a chip, including a processor, for calling and executing instructions stored in a memory, causing a communication device with the chip installed to execute the method described in the above-described method embodiments of any network device provided in this application.

[0146] This application also provides a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the method described in the above-described method embodiments. The chip system may be a single chip or a chip module composed of multiple chips.

[0147] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through 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 via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, or magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0148] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium can include various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0149] The naming or numbering of steps in this application does not mean that the steps in the method flow 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 effect can be achieved.

[0150] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0151] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0152] It should be understood that in the description of this application and the appended claims, the terms "comprising," "including," "having," and any variations thereof are intended to cover a non-exclusive inclusion and mean "including but not limited to," unless otherwise specifically emphasized. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product, or apparatus.

[0153] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is used to describe the relationship between the related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural.

[0154] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0155] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0156] Furthermore, in the description of this application and the appended claims, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein; features defined as "first" or "second" may explicitly or implicitly include at least one of those features.

[0157] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0158] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A flow limiting method, characterized in that, Applied to a first network device, the first network device including a first network processor and a second network processor, the method includes: The first network processor generates first information, and the first network device communicates with the 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, and the second member port is controlled by the second network processor. The first information includes the bandwidth information of the first member port. The first network processor sends the first information to the second network processor.

2. The method according to claim 1, characterized in that, The first network processor generates first information, including: In response to a target event, the first network processor generates first information, the target event being used to trigger an adjustment to the limited bandwidth of the first member port.

3. The method according to claim 2, characterized in that, If the target event includes the first member port meeting the packet loss condition, then the first information also includes the packet loss information of the first member port; and / or If the target event includes the first member port satisfying the delay condition, then the first information also includes the delay information of the first member port.

4. The method according to claim 3, characterized in that, The method further includes: 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 includes bandwidth information of the second member port, and also includes packet loss information and / or latency information of the second member port.

5. The method according to claim 2, characterized in that, The target event includes at least one of the following: 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, or reaching the bandwidth adjustment period of the first member port.

6. A flow limiting method, characterized in that, The method, which utilizes a first network device, including a first network processor and a second network processor, comprises: The second network processor receives the first information sent by the first network processor. The first network device communicates with the 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, and the second member port is controlled by the second network processor. The first information includes the bandwidth information of the first member port. The second network processor determines the limited bandwidth of the second member port based on the first information and the bandwidth information of the second member port.

7. The method according to claim 6, characterized in that, 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 sends second information to the first network processor. The second information includes bandwidth information of the second member port, packet loss information of the second member port, and / or latency information of the second member port.

8. The method according to claim 6 or 7, characterized in that, The first information also 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 based on 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 based on 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.

9. A flow limiting method, characterized in that, The method, which utilizes a first network device, including a first network processor and a second network processor, comprises: The first network processor generates first information, and the first network device communicates with the 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, and the second member port is controlled by the second network processor. The first information includes the 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 based on the first information and the bandwidth information of the second member port.

10. The method according to claim 9, characterized in that, The first network processor generates first information, including: In response to a target event, the first network processor generates first information, the target event being used to trigger an adjustment to the limited bandwidth of the first member port.

11. The method according to claim 10, characterized in that, If the target event includes the first member port meeting the packet loss condition, then the first information also includes the packet loss information of the first member port; and / or if the target event includes the first member port meeting the delay condition, then the first information also includes the delay information of the first member port.

12. The method according to claim 10 or 11, characterized in that, 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 sends second information to the first network processor. The second information includes bandwidth information of the second member port, 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 also includes packet loss information and / or latency information of the first member port, then the second network processor determines the limited bandwidth of the second member port based on 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 based on 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.

14. A network device, characterized in that, include: The memory includes computer-readable instructions; A processor communicating with the memory, the processor being configured to execute the computer-readable instructions, causing the network device to perform the traffic limiting method according to any one of claims 1-13.

15. A computer-readable storage medium, characterized in that, Includes a program or instruction that, when executed by a processor, implements the flow limiting method as described in any one of claims 1-13.

16. A computer program product, characterized in that, The computer program product includes instructions that, when executed by a computer, implement the traffic limiting method as described in any one of claims 1-13.