A method for handling network congestion and related devices
By monitoring and notifying the second network device of the outgoing port that enters the congested state, the forwarding path of sending messages to the outgoing port is avoided, and the problem of difficult to effectively avoid congestion in the explosive traffic growth network is solved, and the effect of improving network bandwidth utilization and reducing transmission delay is achieved.
Patent Information
- Application Number
- CN201910913827.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-07-24
- Filing Date
- 2019-09-25
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2039-09-25
AI Technical Summary
In network scenarios with explosive traffic growth, existing congestion control technologies are difficult to effectively avoid network congestion, resulting in transmission delay, packet loss and the inability to establish new connections.
The first network device monitors and determines the outgoing port entering the pre-blocking state or the congested state, and sends a notification to the relevant second network device to avoid sending the message to the forwarding path, thereby alleviating network congestion.
It effectively avoids network congestion, improves network bandwidth utilization, and reduces transmission delay and packet loss.
Smart Images

Figure CN112311685B_ABST
Abstract
Description
Technical Field
[0001] This application relates to network communication technologies, and in particular, to a method for handling network congestion and related devices. Background Art
[0002] Network congestion occurs when the amount of data carried by a network node or link in a network exceeds the amount of data that the network node or link can handle. The impacts brought by network congestion include transmission delay, packet loss, or the inability to establish a new connection. Severe network congestion can lead to congestion collapse.
[0003] A variety of congestion control technologies are used to avoid congestion collapse. For example, when network congestion occurs, received data packets are discarded or reordered, the TCP congestion avoidance algorithm is used to implement congestion control, and the Explicit Congestion Notification mechanism is used to adjust the sending rate of the sending end, etc.
[0004] In a network scenario where traffic grows explosively, how to provide more efficient congestion control technologies is an urgent problem in this field. Summary of the Invention
[0005] This application provides a method for handling network congestion and related devices, which can effectively avoid network congestion and improve the utilization rate of network bandwidth.
[0006] In the first aspect of this application, a method for handling network congestion is provided. A first network device determines a target port; the target port is an egress port that enters the pre-congestion state or the congestion state. The first network device sends a first notification to at least one second network device. The at least one second network device includes one or more network devices that can send data streams to a host under the target port through at least two forwarding paths. The first notification includes information about the network device where the target port is located and information about the target port. Among them, the at least one second network device is determined according to the role of the first network device, the attributes of the target port, and the role of the network device where the target port is located.
[0007] In the above method of this application, when there is an egress port that enters the pre-congestion state or the congestion state in the network, the first network device notifies the egress port to the second network devices in the network. The second network devices can obtain information about the egress port and avoid sending packets to the forwarding path including the egress port when forwarding packets later, so as to avoid network congestion.
[0008] Optionally, when the network device where the target port is located is the first network device, the first network device monitors the outgoing ports of the first network device; when the buffer usage of an outgoing port of the first network device exceeds the port buffer threshold, the first network device determines that the outgoing port is the target port.
[0009] Optionally, when the network device where the target port is located is the first network device, the first network device monitors the outgoing port queue of the first network device; when the length of an outgoing port queue exceeds the queue buffer threshold, the first network device determines that the outgoing port where the outgoing port queue is located is the target port.
[0010] In this application, it is possible to determine whether the outgoing port enters a congestion state or a pre-congestion state based on the buffer usage of the outgoing port, or to determine whether the outgoing port enters a congestion state or a pre-congestion state based on the length of the outgoing port queue in the outgoing port, so that the notification and handling of network congestion can be flexibly implemented.
[0011] Optionally, the network device where the target port is located is the third network device, and the first network device receives a second notification sent by the third network device, where the second notification includes information about the third network device and information about the target port. The first network device determines the target port according to the second notification.
[0012] In this application, the first network device also receives notifications sent by other network devices to obtain information about ports that other network devices have found to enter a pre-congestion state or a congestion state, so as to implement network congestion handling for the entire network.
[0013] Optionally, the information about the network device where the target port is located includes the identifier of the network device where the target port is located, and the information about the target port includes the identifier of the target port or the identifier of the forwarding path where the target port is located. Alternatively, the information about the network device where the target port is located further includes the role of the network device where the target port is located, and the role indicates the location of the network device where the target port is located; the information about the target port further includes the attribute of the target port, and the attribute indicates the direction of the data stream sent by the target port.
[0014] The notifications in this application can include various types of information to adapt to different types of network architectures and improve the applicability of the technical solution.
[0015] Optionally, before the first network device sends a first notification to at least one second network device, the first network device also determines that there is no idle egress port on the first network device that can forward the target data stream corresponding to the target port. The target data stream is a data stream corresponding to a target address range; the target address range is the address range of the hosts under the target port, and the target address range is determined according to the information of the network device where the target port is located and the information of the target port.
[0016] In the present application, the first network device preferably forwards the target data stream through the idle egress port on the first network device, which can reduce the frequency of switching of the target data stream and reduce the impact on other network devices caused by switching the forwarding path of the target data stream.
[0017] Optionally, the information of the target port may further include the identifier of the target egress port queue. The target egress port queue is the egress port queue that enters the congestion state or the pre-congestion state in the target port. The target data stream is a data stream corresponding to a target address range and has a priority corresponding to the identifier of the egress port queue.
[0018] In the present application, the processing for avoiding network congestion may be performed only on the data stream corresponding to the egress port queue that enters the pre-congestion state or the congestion state, which can avoid network congestion while reducing the impact on other data streams.
[0019] Optionally, the first network device stores the information of the network device where the target port is located and the information of the target port. Further, the first network device may also store the state of the target port.
[0020] Further, the first network device also sets an aging time for the stored information. In this way, when the first network device receives a subsequent data stream, it can process the received data stream according to the stored information, and avoid sending the data stream to the forwarding path where the target port is located, so as to relieve network congestion.
[0021] A method for processing network congestion is provided in the second aspect of the present application. The second network device receives a first notification from the first network device. The first notification includes the information of the network device where the target port is located and the information of the target port. The target port is a port that enters the pre-congestion state or the congestion state. The second network device is a network device that can send data streams to the hosts under the target port through at least two forwarding paths. The second network device determines the target data stream, and the first forwarding path of the target data stream includes the target port. The second network device determines whether there is an idle egress port on the second network device that can forward the target data stream, and obtains a determination result. The second network device processes the target data stream according to the determination result.
[0022] In this application, the second network device processes the target data stream according to the first notification including the information of the target port that enters the pre-blocking state or the congestion state, which can avoid sending the target data stream to the forwarding path where the target port is located, thereby avoiding network congestion.
[0023] Optionally, when there is an idle output port on the second network device that can forward the target data stream, the second network device sends the target data stream through the idle output port, and the second forwarding path where the idle output port is located does not include the target port.
[0024] The second network device forwards the target data stream through the idle output port on the second network device, which can avoid spreading the information of the target port to other network devices and avoid causing oscillations to the network.
[0025] Optionally, when there is no idle output port on the second network device that can forward the target data stream, the second network device forwards the target data stream through the first forwarding path. Further, the second network device also generates a second notification, which includes the information of the network device where the target port is located and the information of the target port. The second network device sends the second notification to at least one third network device; the at least one third network device includes those that can send data streams to the host under the target port through at least two forwarding paths.
[0026] In this application, when there is no idle output port on the second network device that can forward the target data stream, the second network device forwards the target data stream through the first forwarding path, which can avoid the loss of the already received data stream. Further, the second network device also spreads the information of the target port to the third network device through the second notification. After receiving the second notification, the third network device can perform the processing to avoid network congestion to avoid network congestion.
[0027] Optionally, when the second network device is directly connected to the source host of the target data stream, the second network device also sends a backpressure message to the source host of the target data stream, and the backpressure message is used to make the source host perform the operation of processing network congestion.
[0028] The second network message sends a backpressure message to the source host of the target data stream, which can avoid too many data streams entering the network from the source, thereby avoiding network congestion.
[0029] Optionally, the second network device determines a target address range according to the information of the network device where the target port is located and the information of the target port, and the target address range is the address range corresponding to the host under the target port; the second network device determines the data stream whose destination address belongs to the target address range as the target data stream.
[0030] Optionally, the first notification further includes an identifier of a target egress port queue, where the target egress port queue is an egress port queue in the target port that enters the pre-insertion state or the congestion state; the second network device determines a data stream whose destination address belongs to the target address range and whose priority corresponds to the identifier of the egress port queue as the target data stream.
[0031] Optionally, the second network device stores information about the network device where the target port is located and information about the target port. Further, the second network may also store the state of the target port.
[0032] A third aspect of this application provides a network device for handling network congestion. The network device includes multiple functional modules that execute the method for handling network congestion provided in the first aspect or any possible design of the first aspect; this application does not limit the division of the multiple functional modules, and the multiple functional modules can be correspondingly divided according to the process steps of the method for handling network congestion in the first aspect, or can be divided according to specific implementation requirements. The multiple functional modules can be hardware modules or software modules, and the multiple functional modules can be deployed on the same physical device or on different physical devices.
[0033] A fourth aspect of this application provides a network device for handling network congestion. The network device includes multiple functional modules that execute the method for handling network congestion provided in the second aspect or any possible design of the second aspect; this application does not limit the division of the multiple functional modules, and the multiple functional modules can be correspondingly divided according to the process steps of the method for handling network congestion in the second aspect, or can be divided according to specific implementation requirements. The multiple functional modules can be hardware modules or software modules, and the multiple functional modules can be deployed on the same physical device or on different physical devices.
[0034] A fifth aspect of this application provides yet another network device for handling network congestion. The device includes a memory and a processor. The memory is used to store program code, and the processor is used to call the program code to implement the method for handling network congestion in the first aspect and any possible design thereof in this application, and to implement the method for handling network congestion in the second aspect and any possible design thereof in this application.
[0035] A sixth aspect of this application provides a chip that, when running, can implement the method for handling network congestion in the first aspect and any possible design thereof in this application, and can implement the method for handling network congestion in the second aspect and any possible design thereof in this application.
[0036] The seventh aspect of the present application provides a storage medium, in which program code is stored. When the program code runs, it can enable a device (such as a switch, a router, a server, etc.) running the program code to implement the method for handling network congestion in the first aspect of the present application and any possible design thereof, and to implement the method for handling network congestion in the second aspect of the present application and any possible design thereof.
[0037] The eighth aspect of the present application provides a data center network, which includes a first network device and a second network device. The first network device is used to implement the method for handling network congestion in the first aspect of the present application and any possible design thereof, and the second network device is used to implement the method for handling network congestion in the second aspect of the present application and any possible design thereof.
[0038] For the beneficial effects of the third to eighth aspects of the present application, reference can be made to the description of the beneficial effects of the first and second aspects and their respective possible designs, which will not be elaborated here. Description of the Drawings
[0039] Figure 1 It is a schematic structural diagram of a network system provided by an embodiment of the present application;
[0040] Figure 2 It is a schematic structural diagram of another network system provided by an embodiment of the present application;
[0041] Figure 3 It is a schematic flowchart of a method for handling network congestion provided by an embodiment of the present application;
[0042] Figure 4 It is a schematic diagram of the processing process when the target port is the downstream port of the core device in the multi-plane Clos architecture;
[0043] Figure 5 It is a schematic diagram of the numbering mechanism for a switch and its ports provided by the present application;
[0044] Figure 6 It is a schematic diagram of the processing process when the target port is the downstream port of the aggregation device in the multi-plane Clos architecture;
[0045] Figure 7 It is a schematic diagram of the processing process when the target port is the downstream port of the access device in the multi-plane Clos architecture;
[0046] Figure 8 It is a schematic diagram of the processing process when the target port is the upstream port of the aggregation device in the multi-plane Clos architecture;
[0047] Figure 9 It is a schematic diagram of the processing process when the target port is the downstream port of the core device in the single-plane Clos architecture;
[0048] Figure 10 It is a schematic diagram of the processing procedure when the target port is a downstream port of the aggregation device in a single-plane Clos architecture;
[0049] Figure 11 For Figure 2 It is a schematic diagram of the processing procedure when the target port is a port within the group in the architecture shown;
[0050] Figure 12 For Figure 2 It is a schematic diagram of the processing procedure when the target port is a port between groups in the architecture shown;
[0051] Figure 13 It is a schematic diagram of the structure of a network device provided by an embodiment of the present application;
[0052] Figure 14 It is a schematic diagram of the structure of another network device provided by an embodiment of the present application;
[0053] Figure 15 It is a schematic diagram of the structure of yet another network device provided by an embodiment of the present application. Detailed implementation manners
[0054] An embodiment of the present application provides a method and related device for handling network congestion, which are applied to a system including multiple network devices. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0055] Figure 1 It is a schematic diagram of the structure of a network system provided by an embodiment of the present application. The network system adopts a Clos architecture. The network system includes an access layer 1110, an aggregation layer 1120, and a core layer 1130. The access layer 1110 includes multiple access devices T1 - T8, the aggregation layer 1120 includes multiple aggregation devices A1 - A7, and the core layer 1130 includes multiple core devices C1 - C4. Each access layer device is connected to one or more hosts Hx. Figure 1 The Clos architecture in Figure 1 is a multi-plane architecture. Among them, multi-plane means that there are multiple core device groups, and each aggregation device is only connected to the core devices in one core device group. For example, Figure 1The access devices and aggregation devices can also form different Points of Delivery (PoDs). Each PoD includes a certain number of access devices and aggregation devices, and the access devices in a PoD are connected to all the aggregation devices in that PoD. For example, PoD 1 includes aggregation devices A1 and A2, and the access device T1 in PoD 1 is connected to aggregation devices A1 and A2, and the access device T2 is also connected to aggregation devices A1 and A2. Each core device in the core layer is connected to all the PoDs. In this application Figure 1 Multiple PoDs are shown to illustrate the connection relationships between the devices. In the subsequent drawings related to the Clos network, for the sake of simplicity, the PoDs will no longer be drawn. Further, Figure 1 the multi-plane Clos architecture in this application can be replaced with a single-plane Clos architecture, that is, each core device is connected to all the aggregation devices. The access devices in this application can be switches, and the aggregation devices and core devices can be switches or routers.
[0056] Figure 2 is a schematic structural diagram of another network system provided by an embodiment of this application. As Figure 2 shown, this network architecture includes multiple groups of switches ( Figure 2 4 are shown). Each group of switches can be called a PoD. Each group of switches (PoD) includes N switches. The number (identifier) of each switch is in the format of xy, where x indicates the PoD to which the switch belongs, and y indicates the number of the switch in the PoD to which it belongs. For example Figure 2 PoD 1 includes switches 11, 12, 13... 1N, PoD 2 includes switches 21, 22, 23... 2N, PoD 3 includes switches 31, 32, 33... 3N, and PoD 4 includes switches 41, 42, 43... 4N. Among them, any two of the N switches in each group of switches are directly connected. Each switch is directly connected to the corresponding switches in other PoDs, forming a total of N inter-group planes. Corresponding switches refer to switches with the same number (identifier) in different groups of switches. For example, switches 11, 21, 31, and 41 are corresponding switches to each other. And switches 11, 21, 31, and 41 are connected to each other to form Figure 2 the left inter-group plane in Figure 2The inter-group plane on the right side in [description]. The direct connection means that there are no other network devices such as switches or routers between two switches, but there may be devices for providing connections or devices for enhancing signals. The ports connecting switches in different switch groups are called inter-group ports, and the ports connecting switches in the same switch group are called intra-group ports. The switches in a pod have the same configuration or specifications. Each pod forms an intra-group plane. Further, Figure 2 Each of the shown switches is also connected to one or more hosts, Figure 2 and only hosts H1 and H2 under switch 11 are shown in [description].
[0057] Based on Figure 1 or Figure 2 the shown network system, as Figure 3 shown, this application provides a method for handling network congestion. This method is implemented by the cooperation of a first network device and a second network device. The first network device can be Figure 1 or Figure 2 any device in [description], and the second network device can be determined by the first network device or pre-configured. The following describes the method in combination with Figure 3 [description].
[0058] In step 301, the first network device determines a target port.
[0059] The target port is an out-port that enters a congestion state or a pre-congestion state. Among them, the pre-congestion state refers to a state where congestion is about to occur but has not occurred yet.
[0060] In one implementation, the target port is an out-port of the first network device, and step 301 may include 301-1 and 301-2.
[0061] In step 301-1, the first network device monitors the out-ports of the first network device. In this application, the first network device can be any network device. When the first network device forwards a packet, the packet to be sent enters the out-port queue of the out-port. Each out-port has multiple (for example, 8) out-port queues. The first network device monitoring the out-ports of the first network device can be monitoring each out-port of the first network device or monitoring each out-port queue of the first network device. For example, the first network device monitors whether the buffer occupancy of each out-port exceeds a first threshold, or the first network device monitors whether the length of each out-port queue exceeds a second threshold. The first threshold indicates the proportion or number of bytes of the buffer occupied by an out-port, and can also be called the port buffer threshold; the second threshold indicates the proportion or number of bytes of the buffer occupied by an out-port queue, and can also be called the queue buffer threshold.
[0062] In step 301-2, the first network device determines a target port according to the monitoring result.
[0063] Optionally, when the buffer usage of an egress port exceeds a first threshold, the first network device determines the egress port as the target port. The first threshold may be a pre-blocking threshold or a congestion threshold. When the buffer usage of the egress port exceeds the pre-blocking threshold, the egress port enters the pre-blocking state. When the buffer usage of the egress port exceeds the congestion threshold, the egress port enters the congestion state.
[0064] Optionally, when the length of an egress port queue exceeds a second threshold, the first network device determines the egress port where the egress port queue is located as the target port. The egress port queue may be referred to as the target egress port queue. The first network device allocates a buffer for each egress port queue, and the maximum length of the egress port queue refers to the size of the buffer allocated for the egress port queue. When a packet enters the buffer corresponding to the egress port queue, the amount of data stored in the buffer is the length of the egress port queue. The second threshold may be a length (in bytes) or a ratio. For example, the maximum length of egress port queue A is 2MB, and the second threshold is 70%. If the amount of data stored in the buffer of egress port queue A reaches or exceeds 1.4MB, it is determined that egress port queue A enters the pre-blocking state or the congestion state (determined according to the setting). The first network device determines the egress port where egress port queue A is located as the target port. In another implementation, the first network device is not the network device where the target port is located. Step 301 includes the first network device receiving notification A sent by a third network device. The third network device is the network device where the target port is located. Notification A includes the information of the third network device and the information of the target port. The first network device determines the target port according to the information of the target port in the notification. Further, notification A may also include the identifier of the egress port queue that enters the pre-blocking state or the congestion state in the target port.
[0065] Optionally, after determining the target port, the first network device also stores congestion information, which includes the information of the target port and the information of the network device where the target port is located. The congestion information may also include the state of the target port, so as to process the data stream according to the congestion information when receiving the data stream subsequently. Further, the first network device sets an aging time for the congestion information, and deletes the congestion information when the aging time arrives.
[0066] In step 302, the first network device sends notification B to at least one second network device. Notification B includes the information of the network device where the target port is located and the information of the target port.
[0067] Optionally, the notification B may further include the type of the notification B, which is used to indicate that the target port carried in the notification B is a port that enters the pre-blocking state or the congestion state. Optionally, the information of the target port in the notification B includes the state of the target port, and the state includes the pre-blocking state or the congestion state. Optionally, the notification B further includes the identifier of the output port queue of the target output port that enters the congestion state or the pre-blocking state. In this application, the information of the network device where the destination port included in the notification B is located and the information of the target port are collectively referred to as congestion information.
[0068] The first network device may send the notification B to the at least one second network device by multicast, or may separately send the notification B to each second network device among the at least one second network device by unicast.
[0069] In one embodiment, the information of the network device where the target port is located includes the identifier of the network device, and the information of the target port includes the identifier of the target port or the identifier of the path where the target port is located. The identifier of the path where the target port is located may be the identifier of the network device on the forwarding path where the target port is located. In another embodiment, the information of the network device where the target port is located includes the identifier of the network device and the role of the network device, and the information of the target port includes the identifier of the target port and the attribute of the target port.
[0070] The at least one second network device may be pre-configured or determined by the first network device according to pre-set rules. The at least one second network device includes one or more network devices that can send data streams to the host under the target port through at least two forwarding paths. Or, the at least one second network device includes one or more network devices that can send data streams to the host under the target port through at least two forwarding paths and have the fewest hops from the network device where the target port is located. The host under the target port is a proximal host that can receive data streams through the target port. The at least one second network device is determined according to the role of the network device where the target port is located, the attribute of the target port, and the role of the first network device. The attribute of the target port indicates the forwarding direction of the data stream in the target port, and the role of the network device indicates the position of the network device in the network system.
[0071] In Figure 1 In the network system shown, the role of the network device may be an access device, an aggregation device, or a core device. The attributes of the port include an uplink port or a downlink port. The port on the access device connected to the aggregation device and the port on the aggregation device connected to the core device are uplink ports; the port on the core device connected to the aggregation device and the port on the aggregation device connected to the access device are downlink ports. In Figure 1In the network system shown, a proximal host refers to a host that does not cross a core device. For example, Figure 4 in Figure 4 , the proximal hosts under port 4 of core device C2 refer to the hosts connected by access devices T7 and T8; Figure 6 in Figure 6 , the proximal hosts under port 3 of aggregation device A7 refer to the hosts connected by access devices T7 and T8; Figure 7 in Figure 7 , the proximal host under port 3 of access device T7 refers to the host connected by access device T7; Figure 8 in Figure 8 , the proximal hosts under port 1 of aggregation device A1 refer to the hosts connected by access devices T1 and T2; Figure 9 in Figure 9 , the proximal hosts under port 7 of core device C1 refer to the hosts connected by access devices T7 and T8; Figure 10 in Figure 10 , the proximal host under port 1 of access device T7 refers to the host connected by access device T7.
[0072] In Figure 2 the network system shown, the attributes of a port include an intra-group port or an inter-group port. The ports connecting switches within the same switch group are called intra-group ports. For example, the ports connecting switch 11 and switch 12. The ports connecting switches in different switch groups are called inter-group ports. For example, the ports connecting switch 1N and switch 2N. The roles of network devices can be intra-group switches or inter-group switches. Switches belonging to the same switch group are intra-group switches to each other, and two switches belonging to different switches are inter-group switches to each other. For example, switches 11, 12... 1N in Pod 1 are intra-group switches to each other, and switch 1N in Pod 1 is an inter-group switch relative to switch 2N in Pod 2. In Figure 2 the network system shown, a proximal host refers to a host under the switch directly connected to the target port. For example, Figure 11 in Figure 11 , the proximal hosts under port 3 of switch 3N refer to all hosts 34 connected by switch 33; Figure 12 in Figure 12 , the proximal host under port 2 of switch 1N is all hosts connected by switch 2N. Before step 302, the first network device can also determine whether there is an idle output port on the first network device that can forward the target data stream. When there is no idle output port, step 302 is executed. When there is an idle output port, the first network device forwards the target data stream through this idle output port.
[0073] The target data stream is the data stream corresponding to the target address range; the target address range is the address range corresponding to the hosts under the target port, and the target address range is determined according to the information of the network device where the target port is located and the information of the target port. When the first network device only determines the target ports that enter the pre-blocking state or the congestion state, the target data stream includes the data stream sent to the hosts under the target port. When the first network device also determines the output port queue that enters the pre-blocking state or the congestion state, the target data stream includes the data stream sent to the hosts under the target port and whose priority corresponds to the identifier of the output port queue that enters the congestion state or the pre-blocking state. Optionally, the target data stream can also be the elephant flow in the data stream sent to the hosts under the target port, or the elephant flow in the data stream sent to the hosts under the target port and whose priority corresponds to the identifier of the output port queue that enters the congestion state or the pre-blocking state. An elephant flow refers to a data stream whose traffic (total number of bytes) per unit time exceeds a set threshold.
[0074] The packets in the data stream carry priorities. When the network device forwards the data stream, it will schedule the data streams with the same priority to the same output port queue. In this way, packets with different priorities enter different output port queues at the output port. Therefore, there is a corresponding relationship between the priority of the packet and the identifier of the output port queue. When all network devices in the network system use the same scheduling rule to forward the data stream, a network device can know the identifier of the output port queue corresponding to the data stream on another network device according to the priority of the data stream it receives.
[0075] When the target port is Figure 1 the downstream port in the Clos architecture shown, the target address range corresponding to the target data stream means that the address of the target data stream belongs to the target address range. When the target port is Figure 1 the upstream port in the Clos architecture shown, the target address range corresponding to the target data stream means that the address of the target data stream does not belong to the target address range. When the target port Figure 2 is the intra-group port or the inter-group port in the architecture shown, the target address range corresponding to the target data stream means that the address of the target data stream belongs to the target address range.
[0076] In step 303, the second network device receives the notification B.
[0077] The second network device is any one of the at least one second network device. Optionally, after receiving notification B, the second network device stores the information of the target port carried in the notification B and the information of the network device where the target port is located. The second network device may also store the status of the target port. For example, the second network device sets up a first table to store information about ports that enter the pre-blocking state or congestion state. Each entry in the first table includes the information of a target port and the information of the network device where the target port is located. Another example is that the second network device sets up a second table, and each entry in the second table includes the information of a target port, the information of the network device where the target port is located, and the status of the target port. Further, the second network device may set an aging time for the information of each target port, and delete the information of the destination port after the aging time arrives.
[0078] In step 304, the second network device determines the target data stream.
[0079] Since the second network device receives notification B, the second network device is not the network device where the target port is located.
[0080] In one implementation, the second network device determines the target address range according to the information of the target port in the notification B and the information of the network device where the target port is located, stores the target address range, and determines the data stream whose destination address belongs to the target address range received subsequently as the target data stream. For example, the second network device obtains the destination address of the received data stream. If the destination address belongs to the target address range, or the destination address belongs to the target address range and the priority of the data stream corresponds to the identifier of the target output port queue, the second network device determines the data stream as the target data stream. The target address range is the address range corresponding to the hosts under the target port, and the first forwarding path of the target data stream (i.e., the initial forwarding path before receiving notification B) includes the target port.
[0081] In step 305, the second network device determines whether there is an idle output port on the second network device that can forward the target data stream, obtains the determination result, and processes the target data stream according to the determination result.
[0082] Wherein, the idle output port refers to another output port on the second network device that has not entered the congestion state or pre-blocking state and is different from the current output port of the target data stream. The port buffer capacity of the idle output port does not exceed the above-mentioned first threshold, or the length of the output port queue in the idle output port does not exceed the above-mentioned second threshold.
[0083] For example, in Figure 4In the Clos architecture shown, when the first network device is the core device C2, the target port is the downstream port 4, and the second network device is the aggregation device A1, the target address range determined by the aggregation device A1 is the address range corresponding to the hosts connected to the access devices T7 and T8. When the aggregation device A1 receives a data stream whose destination address belongs to the target address range, the aggregation device A1 determines whether there is an idle egress port among the upstream ports of the aggregation device A1, and the forwarding path where the idle egress port is located does not include the downstream port 4 of the core device C2.
[0084] The second network device processes the target data stream according to the determination result, including step 306 and step 307.
[0085] In step 306, there is an idle egress port on the second network device, and the second network device sends the target data stream through the idle egress port.
[0086] In this application, the forwarding path where the idle egress port determined by the second network device for the target data stream is located is called the second forwarding path of the target data stream, and the second forwarding path does not include the target port.
[0087] In step 307, there is no idle egress port on the second network device, and the second network device forwards the target data stream through the initial forwarding path (i.e., the first forwarding path) of the target data stream, that is, does not change the egress port of the target data stream on the second network device.
[0088] Furthermore, since there is no idle egress port on the second network device, the second network device also notifies the congestion status or congestion state of the target port to at least one third network device that can send data streams to the host under the target port through at least two forwarding paths. Optionally, the second network device generates a notification C according to the information of the network device where the target port is located and the information of the target port, and sends the notification C to the third network device. Among them, the at least one third network device can be pre-configured on the second network device, or can be determined by the second network device according to the information of the network device where the target port is located and the information of the target port.
[0089] Through Figure 3 the method shown, when Figure 1 or Figure 2 the egress port or egress port queue of any network device in the network system shown enters the pre-congestion state or congestion state, the network device can send a notification to enable the network device that receives the notification to perform processing for network congestion. The processing for network congestion includes reselecting a forwarding path for the target data stream to avoid sending the target data stream to the egress port, and the processing for network congestion also includes sending a notification to other network devices to spread the target port. ThroughFigure 3 The method shown can avoid network congestion. Moreover, this method can also achieve load balancing of the entire network and improve network resource utilization.
[0090] The following combines Figures 4 to 12 to describe Figure 3 different implementation manners of each step in the method shown.
[0091] Figure 4 is Figure 1 a schematic diagram of the processing procedure when the target port is the downlink port of the core device in the multi-plane Clos architecture shown. As Figure 4 shown, the thin solid line represents the link where the target port is located, and the thick solid line represents the notified forwarding path. A data stream (denoted as data stream 1) sent from host H2 to host H7 passes through access device T2 and aggregation device A1 and reaches core device C2. Core device C2 forwards data stream 1 to aggregation device 7 through output port queue 3 (Q3) of port 4 (P4). During the process of forwarding data stream 1, core device C2 monitors that the length of output port queue 3 exceeds the second threshold, determines that output port queue 3 enters the pre-blocking state, and further determines that port 4 is the target port (step 301).
[0092] Core device C2 first confirms whether there are other idle output ports on core device C2 that can reach host H7. Since there are no other idle output ports on core device C2 that can reach host H7, core device C2 sends a multicast notification to multiple aggregation devices except aggregation device A7 connected to port 4 (step 302). In the multi-plane scenario, these multiple aggregation devices and core device C2 belong to the same forwarding plane. In Figure 4 , if core device C2 sends the notification in a multicast manner, core device C2 determines the target multicast group corresponding to port 4. The multicast source of this target multicast group is core device C2, and the multicast output ports are the ports connected to aggregation devices A1, A3, and A5, assumed to be port 1, port 2, and port 3. Then, core device C2 sends the multicast notification through port 1, port 2, and port 3. This multicast notification includes the identifier (C2) of core device C2, the identifier (P4) of port 4. Optionally, this multicast notification can also include one or more of the role of core device C2, the port attribute (downlink port) of port 4, and the identifier (Q3) of output port queue 3. In addition, core device C2 can also store the congestion information of port 4. This multicast notification reaches aggregation devices A1, A3, and A5. The processing procedure of the aggregation device is described below taking aggregation device A1 as an example.
[0093] The aggregation device A1 receives the multicast notification sent by the core device C2 (step 303). Optionally, the aggregation device A1 obtains the congestion information in the multicast notification ("C2P4" or "C2P4Q3" or "C2P4Q3 downstream"), stores the congestion information and sets the aging time. The aggregation device A1 determines the target data stream (step 304). When determining the target data stream, the aggregation device A1 first determines the address range (target address range) of the hosts under the port P4 of the core device C2, and determines the data stream whose destination address belongs to the target address range as the target data stream, or determines the data stream whose destination address belongs to the target address range and whose priority corresponds to Q3 as the target data stream.
[0094] When determining the address range of the hosts corresponding to the port P4 of the core device C2, in an optional manner, since the target port P4 is a downstream port, the core device C2 determines the address range of all the hosts connected under the aggregation device A7 connected to P4.
[0095] In one embodiment, addresses can be assigned to network devices and hosts according to the network architecture. For example, Figure 1 each network device is assigned a number, and this number is the identifier of the network device. As Figure 5 shown, the number in each square representing a network device is a specific implementation of the identifier of the switch. For example, 10 can be a value of C2. The combination of each network device identifier and the downstream port identifier can uniquely identify a lower-layer device. For example, the core device 10 and the port 00 combination can identify the aggregation device A1 000, and the combination of the identifier (00+) of the pod where the aggregation device A1 000 is located and the port 1111 can identify the access device T2 1111. The address of the host includes the port of the access device connected to the host and the identifier of the access device on the aggregation device. According to the above addressing rules, the address of the host H2 can be XX.XX.001111.1110.
[0096] Based on Figure 5 the addressing rules shown, if the identifier of the network device included in the multicast notification received by the aggregation device A1 is 10 and the port identifier is 11, then the host address range determined by the aggregation device A1 according to this multicast notification is that the lower 5 - 10 bits are 110000 or 111111, and the determined priority is the priority corresponding to Q3, for example, 3. The aggregation device A1 determines the data stream whose received destination address falls within this host address range and whose priority is 3 as the target data stream.
[0097] When determining the address ranges of all hosts connected to port P4 of the core device C2, in another alternative approach, the aggregation device A1 determines the address ranges of all hosts connected to port P4 of the core device C2 by looking up a table. For example, three tables are stored on each network device. The first table stores the correspondence between the core device, the ports of the core device, and the aggregation device; the second table stores the connection relationships between the aggregation device, the ports of the aggregation device, and the access devices; the third table stores the connection relationships between the access devices and the host addresses. After receiving the multicast notification, the aggregation device A1 determines that the role of the network device is the core device based on the identifier of the network device (C2) in it. It looks up the aggregation device A7 from the first table according to C2 and P4, then looks up the access devices T7 and T8 from the second table based on the aggregation device A7, and finally looks up the addresses of the hosts connected to the access devices T7 and T8 from the third table to generate a list of host addresses corresponding to the congestion information. Optionally, these three tables can also be integrated into one table, and the corresponding relationships between the core device, the aggregation device, the access device, and the host addresses need to be stored in this table.
[0098] After the aggregation device A1 determines the target data flow (assumed to be data flow 1), it determines whether there is an idle upstream output port on the aggregation device A1 (since the target port P4 is a downstream port of the core device, and the downstream port of the core device corresponds to the upstream port of the aggregation device, so the aggregation device A1 needs to determine whether there is an idle upstream port) (step 305). When there is an idle upstream output port, the aggregation device A1 uses this idle upstream output port as the output port of the target data flow and forwards the target data flow through this idle upstream output port (step 306). When there is no idle upstream output port, the aggregation device A1 continues to forward the target data flow through the initial forwarding path corresponding to the target data flow (step 307).
[0099] Before the congestion information ages, the aggregation device A1 can process any data flow according to the above method when receiving it.
[0100] In addition, after the aggregation device A1 executes step 307, it also needs to spread the congestion information to the access devices. That is, the aggregation device A1 also generates another notification and sends this another notification to the access devices T1 and T2 (step 302). This another notification includes the congestion information. After receiving this another notification, the access devices T1 and T2 perform corresponding processing. Taking the access device T2 as an example below, the processing process of the access device is described.
[0101] After the access device T2 receives another notification (step 303), similar to the aggregation device A1, the access device T2 obtains the congestion information in the other notification, stores the congestion information and sets the aging time. The access device T2 determines the target address range according to the congestion information, determines the target data stream according to the target address range (step 304), determines whether there is an idle egress port on the access device T2 that can forward the target data stream (step 305). If there is an idle egress port, the access device T2 forwards the target data stream through the idle egress port (step 306); if there is no idle egress port, the access device T2 forwards the target data stream through the initial forwarding path of the target data stream (step 307). Moreover, the access device T2 determines the source host of the target data stream and sends a backpressure message to the source host, and the backpressure message is used to notify the source host to perform an operation to avoid network congestion. The operation to avoid network congestion can be to reduce the rate of sending data to the access device T2 or reduce the rate of sending the target data stream to the access device T2. The process of the access device T2 determining the target data stream and the way of processing the target data stream is similar to that of the aggregation device A1. For the process not described in detail in this part, reference can be made to the description of the processing process of the aggregation device A1.
[0102] Through the above process, after the core device in the Clos system enters the pre-blocking state or the congestion state at the egress port, it can send the congestion information to the aggregation device, and the aggregation device can send the congestion to the access device. Each network device that receives the congestion information performs an operation to handle network congestion, which can avoid network congestion and improve the bandwidth utilization rate of the entire Clos system.
[0103] Figure 6 For Figure 1 Schematic diagram of the processing process when the target port is the downstream port of the aggregation device in the multi-plane Clos architecture shown. The thin solid line represents the link where the target port is located, and the thick solid line represents the forwarding path of the notification. As Figure 6As shown, assume that host H2 sends data stream 1 to host H7. Data stream 1 enters queue 3 of egress port 3 on aggregation device A7. Aggregation device A7 detects that the length of queue 3 of egress port 3 exceeds the second threshold, determines that queue 3 enters the pre-blocking state, and then egress port 3 is the target port. There is no idle downstream port on aggregation device A7. Aggregation device A7 sends a notification to multiple second network devices (step 302). The multiple second network devices are determined according to the port attribute (downstream port) of egress port 3 and the attribute of aggregation device A7 (aggregation device), and include all access devices except access device T7 connected to egress port 3. The notification includes the identifier of aggregation device A7 (A7) and the identifier of egress port 3 (P3). Optionally, the notification may also include one or more of the role of aggregation device A7 (aggregation device), the attribute of egress port 3 (downstream port), and the identifier of queue 3 (Q3). The notification can be sent in unicast or multicast mode.
[0104] The notification sent by aggregation device A7 to access device T8 can reach access device T8 directly, and the notifications sent to access devices T1 - T6 first reach core devices C1 and C2 that belong to the same forwarding plane as aggregation device A7.
[0105] Since core devices C1 and C2 cannot send data streams to the hosts under egress port 3 of aggregation device A7 through at least two forwarding paths, core devices C1 and C2 are not the destinations of this notification. After receiving the notification, core devices C1 and C2 forward the notification to other ports except the port that receives the notification ( Figure 6 Only the forwarding path of core device C2 is shown).
[0106] After being forwarded by core device C1 or C2, the notification reaches aggregation devices A1, A3, and A5 that belong to the same forwarding plane as aggregation device A7. Since aggregation devices A1, A3, and A5 cannot send data streams to the hosts under egress port 3 of aggregation device A7 through at least two forwarding paths, aggregation devices A1, A3, and A5 are not the destinations of this notification either, but aggregation devices A1, A3, and A5 still need to forward the received notification. Taking aggregation device A1 as an example, after receiving the notification, aggregation device A1 copies and forwards the notification to the downstream ports, that is, sends the notification to connected access devices T1 and T2.
[0107] Figure 6 In the shown scenario, since the destination of the notification sent by aggregation device A7 is other access devices except access device T7, core devices and aggregation devices only forward the notification after receiving it. After any one of access devices T1 - T6 and T8 receives the notification, steps 304 - 307 are executed in the manner described in the above embodiments.
[0108] Through the above process, after the aggregation device in the Clos system enters the pre-blocking state or congestion state at the egress port, it can notify all other access devices except the access device connected to the egress port of the congestion information. Each access device that receives the congestion information performs operations to handle network congestion. Therefore, the above process can avoid network congestion and improve the bandwidth utilization rate of the entire Clos system.
[0109] Figure 7 It is a schematic diagram of the processing process when the target port is the downstream port of the access device in the multi-plane Clos architecture. As Figure 7 shown, the thin solid line represents the link where the target port is located, and the thick solid line represents the forwarding path of the notification. As Figure 7 shown, assume that host H2 sends data stream 1 to host H7. Data stream 1 enters queue 3 of egress port 3 on access device T7. Access device T7 detects that the length of queue 3 of egress port 3 exceeds the second threshold, determines that queue 3 enters the pre-blocking state, and further determines that egress port 3 is the target port. Moreover, there is no other downstream port on access device T7 that can reach host H7. Access device T7 generates a notification, which includes the identifier of access device T7 (T7) and the identifier of egress port 3 (P3). Further, the notification may also include one or more of the role of access device T7 (access device), the attribute of egress port 3 (downstream port), and the identifier of queue 3 (Q3). Access device T7 sends the notification to multiple second network devices. Among them, the multiple second network devices include all other access devices except access device T7. In addition, since access device T7 is directly connected to host H7 and access device T7 knows the address of host H7, the notification may also include the address of host H7. In this way, other access devices that receive the notification can directly determine the target data stream based on the address of host H7. The notification can be sent in a unicast or multicast manner.
[0110] Similar to Figure 6 the process described, after the aggregation device or core device receives the notification, it forwards the notification according to the destination address of the notification. After each access device receives the notification, it performs operations similar to those of access device T2 in Figure 4 .
[0111] In Figure 4 , Figure 6 and Figure 7 the scenarios shown, the target ports are all downstream ports. In other embodiments, the target port can also be an upstream port.
[0112] As Figure 8As shown in the figure, it is a schematic diagram of the processing process when the target port is the uplink port of the aggregation device in the multi-plane Clos architecture. Among them, the thin solid line represents the link where the target port is located, and the thick solid line represents the notified forwarding path. Still taking the data stream 1 sent from host H2 to host H7 as an example, during the process of forwarding data stream 1, aggregation device A1 monitors that the length of the output port queue 3 (Q3) of port 1 (P1) where data stream 1 is located exceeds the second threshold, determines that the output port queue 3 enters the pre-blocking state, so output port 1 is the target port. Aggregation device A1 confirms whether there are other idle output ports (uplink ports) on aggregation device A1 that can reach host H7. If there are other idle output ports that can reach host H7, aggregation device A1 switches data stream 1 to this idle output port and sends data stream 1 through this idle output port. When there are no other idle output ports that can reach host H7, aggregation device A1 sends a notification (step 302) to multiple access devices connected to aggregation device A1 in a multicast or unicast manner. This notification includes the identifier (A1) of aggregation device A1, the identifier (P1) of port 1. Optionally, this notification may also include the role of aggregation device A1, the attribute of port 1 (uplink port), and the identifier (Q3) of output port queue 3. Figure 8 Among them, although aggregation devices A3, A5, and A7 can all send data streams to the host under the target port through at least two forwarding paths, since aggregation devices A3, A5, and A7 are not the devices with the fewest hops from aggregation device A1, therefore, aggregation device A1 only sends this notification to access devices T1 and T2, and does not send this notification to aggregation devices A3, A5, and A7 and other access devices. This notification reaches access devices T1 and T2. The following takes access device T2 as an example to illustrate the processing flow of the access device.
[0113] After receiving the notification (step 303), the access device T2 obtains the congestion information in the notification, stores the congestion information and sets the aging time. The access device T2 determines the target address range corresponding to the aggregation device A1, that is, the addresses of the hosts corresponding to all the access devices connected to the aggregation device A1, and determines the data stream whose destination address does not belong to this target address range or whose destination address does not belong to this target address range and whose priority corresponds to Q3 as the target data stream (step 304). In this embodiment, since the uplink port of the aggregation device A1 fails, the data streams sent between all the hosts under this aggregation device A1 will not pass through the uplink port of the aggregation device A1. Therefore, the access device T2 determines the data stream sent to the hosts outside the management range of the aggregation device A1 as the target data stream. After determining the target data stream, the access device T2 determines whether there is an idle outgoing port (uplink port) corresponding to this congestion information on the access device T2, that is, the idle outgoing port (step 305). If there is an idle outgoing port, the access device T2 forwards the target data stream through this idle outgoing port (step 306); if there is no idle outgoing port, the access device T2 sends the target data stream through the initial forwarding path of this target data stream (step 307). Further, the access device T2 determines the source host of this target data stream and sends a backpressure message to this source host, and this backpressure message is used to notify this source host to perform an operation for handling network congestion. The operation for handling network congestion may be to reduce the rate of sending data to the access device T2 or reduce the rate of sending this target data stream to the access device T2.
[0114] In another scenario, when the target port is the uplink port of the access device, the access device determines the data stream sent to this uplink port as the target data stream, and determines whether there is an idle outgoing port (uplink port) on this access device that can forward this target data stream. If there is an idle outgoing port, the target data stream is sent through this idle outgoing port. If there is no idle outgoing port, the source host of this target data stream is determined, and a backpressure message is sent to this source host, and this backpressure message is used to notify this source host to perform an operation for handling network congestion. It can be seen that when the target port is the uplink port of the access device, the access device does not need to send a notification.
[0115] This application Figure 3 The method shown can also be applied to a single-plane Clos architecture. In a single-plane Clos architecture, each core device is connected to all aggregation devices.
[0116] Such as Figure 9 shown, it is a schematic diagram of the processing process when the target port is the downlink port of the core device in a single-plane Clos architecture. Such as Figure 9As shown, the thin solid line represents the link where the target port is located, and the thick solid line represents the forwarding path of the notification. A data stream (denoted as data stream 1) sent from host H2 to host H7 passes through access device T2 and aggregation device A1 to reach core device C1. Core device C1 forwards data stream 1 to aggregation device A7 through output port queue 3 (Q3) of port 7 (P7). During the process of forwarding data stream 1, core device C2 monitors that the length of output port queue 3 exceeds the second threshold, determines that output port queue 3 enters the pre-blocking state, and further determines that port 7 is the target port (step 301). Since there is no idle output port (i.e., idle downstream output port) on core device C1 that has the same attributes as port 7, core device C1 sends a notification to all other aggregation devices except aggregation device A7. The congestion information included in this notification can be referred to Figure 4 in the relevant description. After receiving the notification, the aggregation device (such as A1) determines the target address range (i.e., the addresses of the hosts connected to access devices T7 and T8) according to the notification, determines the target data stream according to the target address range after receiving the data stream, and then determines whether there is an idle output port (upstream port) that can forward the target data stream. When there is an idle output port, the target data stream is switched to this idle output port. When there is no idle output port, the data stream is forwarded through the current output port of the target data stream, and a notification is regenerated according to the congestion information and sent to all access devices connected to this aggregation device.
[0117] After receiving the notification, the access device (such as T2) determines the target data stream according to the congestion information, and when there is an idle output port (upstream port) that can forward the target data stream, the target data stream is switched to this idle output port. When there is no idle output port, an anti-pressure message is sent to the source host of the target data stream, and this anti-pressure message is used to notify the source host to perform operations for handling network congestion.
[0118] Figure 10 It is a schematic diagram of the processing process when the target port is the downstream port of the aggregation device in a single-plane Clos architecture. As Figure 10As shown in the figure, the thin solid line represents the link where the target port is located, and the thick solid line represents the forwarding path of the notification. A data stream (denoted as data stream 1) sent from host H2 to host H7 passes through access device T2, aggregation device A1, and core device C1 to reach aggregation device A7. Aggregation device A7 forwards data stream 1 to access device T7 through output port queue 3 (Q3) of port 1 (P1). During the process of forwarding data stream 1, aggregation device A7 monitors that the length of output port queue 3 exceeds the second threshold, determines that output port queue 3 enters the pre-blocking state, and further determines that port 1 is the target port (step 301). Since there is no idle output port (i.e., idle downstream output port) on aggregation device A7 that has the same attributes as port 1, aggregation device A7 sends a notification to all core devices and other access devices (such as access device T8) connected to this aggregation device. This notification includes congestion information (the congestion information refers to the above-mentioned embodiments). In this case, core devices C1 and C2 can also send data streams to the host under port 1 of aggregation device A7 through at least two forwarding paths, and core devices C1 and C2 are only one hop away from aggregation device A7. The aggregation device sends notifications to core devices C1, C2, and access device T8.
[0119] After receiving this notification, the core device (such as C1) determines the target data stream according to this congestion information. If there is an idle downstream output port on this core device that can forward this target data stream, this core device sends this target data stream through this idle downstream output port. If there is no idle downstream output port on this core device that can forward this target data stream, it sends a notification to other aggregation devices except aggregation device A7, and this notification includes this congestion information.
[0120] After any aggregation device receives the notification sent by the core device, it performs the same operations as aggregation device A1 in Figure 9 .
[0121] Figure 10 After any access device in Figure 9 receives the notification, it performs the same operations as access device T2 in
[0122] The processing process when the target port is the downstream port of the access device in the single-plane Clos architecture is similar to the processing process when the target port is the downstream port of the access device in the multi-plane architecture. The processing method when the target port is the upstream port in the single-plane Clos architecture is similar to the processing method when the target port is the upstream port in the multi-plane Clos architecture.
[0123] This application Figure 3 The method shown can also be applied to the Figure 2 network architecture shown. In Figure 2In the network architecture shown, the identifier of each switch can be the number of the switch. For example, if the number of the switch is xy, x represents the number of the pod where the switch is located, and y represents the number of the switch within the pod where it is located. For example, switch 11 represents the switch numbered 1 in Pod 1. In this way, the first switch can know the role of the second switch based on the number of the second switch, and can also know the attributes of the ports of the second switch.
[0124] As Figure 11 shown, it is Figure 2 a schematic diagram of the processing procedure when the target port is an intra-group port in the architecture shown. Assume that when switch 3N is sending data stream 1 to switch 33, it monitors that the length of out-port queue 3 of port 3 exceeds the second threshold, determines that out-port queue 3 enters the pre-blocking state, and further determines that port 3 is the target port (step 301). Switch 3N sends a notification to multiple second network devices, and this notification includes the identifier of switch 3N and the identifier of port 3 (step 302). Optionally, the identifier of switch 3N can be obtained by parsing the identifier of port 3. Correspondingly, the identifier of switch 3N and the identifier of port 3 can be represented by only one field. The notification can also include the identifier of out-port queue 3. When Figure 2 the identifiers of the switches in the network architecture shown adopt other forms, the notification can also include the attributes of port 3 and the role of switch 3N (inter-group switch). The multiple second network devices include the inter-group switches connected to switch 3N, namely switches 1N, 2N, and 4N. Each inter-group switch is only one hop away from switch 3N. Switch 3N sends this notification to switches 1N, 2N, and 4N in a multicast or unicast manner. Subsequently, taking switch 1N as an example, the process of switches 1N, 2N, and 4N processing the notification will be described.
[0125] After switch 1N receives the notification (step 303), it obtains the congestion information therein, stores the congestion information and sets the aging time. Switch 1N determines the target data stream according to the congestion information (step 304). The target data stream is the data stream sent to the host connected to switch 3N, or the target data stream is the data stream sent to the host connected to switch 3N and whose priority corresponds to out-port queue 3. Switch 1N determines whether there is an idle out-port on switch 1N that can send this target data stream, that is, an idle inter-group port (step 305). If there is an idle out-port, switch 1N forwards this target data stream through this idle out-port (step 306). If there is no idle out-port, then switch 1N sends this target data stream through the initial forwarding path of this target data stream (step 307). Moreover, switch 1N sends a notification to other switches within the same switch group according to the congestion information. Switches 11, 12, and 13 receive this notification and perform similar processing to the access devices under the Clos architecture.
[0126] In Figure 2 the architecture shown, addresses can be assigned to hosts according to the network architecture. That is, the address of each host can be determined according to the number of the switch to which the host is connected. For example, the address of the host connected under switch 1N is 1N.XXX.XXX. According to the above addressing rule, when the intra-group port between switch 3N and switch 33 is the target port, the target data stream is the data stream with the destination address of 33.XXX.XXX and the priority corresponding to Q3.
[0127] In Figure 2 the network architecture shown, when the target port is the port where the switch connects to the host, the processing process of this switch is similar to the processing process when the target port is the intra-group port.
[0128] As Figure 12 shown, it is Figure 2 a schematic diagram of the processing process when the target port is the inter-group port in the architecture shown. Assume that during the process of switch 1N sending data stream 1 to switch 2N, it is monitored that the length of out-port queue 3 of port 2 of switch 1N exceeds the second threshold, that is, out-port queue 3 enters the congestion state. Switch 1N determines that port 2 is the target port (step 301). The host under this target port is the host connected to switch 2N. Switch 1N sends notifications to multiple second network devices (step 302). These multiple second network devices include the intra-group switches connected to switch 1N, that is, switches 11, 12, and 13, etc. The notification includes the identifier of switch 1N (1N), the identifier of port 2 (P2). The notification may also include the identifier of out-port queue 3 (Q3). When Figure 2 the identifiers of the switches in the system shown adopt other forms, the notification may also include the attributes of port 2 and the role of switch 1N (intra-group switch). Switch 1N sends this notification to switches 11, 12, and 13, etc. in a multicast or unicast manner. Switches 11, 12, and 13, etc. receive this notification and perform similar processing to the access devices under the Clos architecture.
[0129] It can be seen from the description of the above embodiments that this application Figure 3The provided method can, after detecting that an egress port or an egress port queue enters a congestion state or a pre-congestion state, issue a notification to other network devices in the network. The network device that receives the notification selects an idle egress port for the target data stream or continues to spread the state of the egress port or the egress port queue in the network, so that network devices throughout the network can perform operations to handle network congestion, and network congestion can be avoided under various network architectures. Moreover, the network device in this application can forward the target data stream through an idle egress port after receiving the notification, which can achieve end-to-end load balancing in the entire network and improve the utilization rate of network resources. In addition, when the target data stream of this application is based on an egress port queue, this application can only adjust the forwarding path of the data stream causing congestion without affecting normal data streams, further improving the data stream forwarding efficiency.
[0130] Furthermore, an embodiment of this application also provides a network device 1300, and the network device 1300 can be Figure 1 or Figure 2 any network device in Figure 13 As shown in Figure 3 the network device 1300 includes a determination unit 1310 and a sending unit 1320. Optionally, the network device 1300 further includes a receiving unit 1330 and a storage unit 1340. The network device 1300 is used to implement the functions of
[0131] the first network device in
[0132] The determination unit 1310 is used to determine a target port, and the target port is an egress port that enters a pre-congestion state or a congestion state. The sending unit 1320 is used to send a first notification to at least one second network device; the at least one second network device includes one or more network devices that can send data streams to a host under the target port through at least two forwarding paths; the first notification includes information about the network device where the target port is located and information about the target port.
[0133] Optionally, the network device where the target port is located is the first network device, and the determination unit is used to: monitor the egress ports of the first network device; when the cache usage of an egress port of the first network device exceeds the port cache threshold, determine that the egress port is the target port.
[0134] Optionally, the network device where the target port is located is a third network device, and the receiving unit 1330 is configured to receive a second notification sent by the third network device, where the second notification includes information about the third network device and information about the target port; the determining unit determines the target port according to the second notification.
[0135] Optionally, the information about the network device where the target port is located includes an identifier of the network device where the target port is located, and the information about the target port includes an identifier of the target port or an identifier of a forwarding path where the target port is located.
[0136] Optionally, the information about the network device where the target port is located further includes a role of the network device where the target port is located, and the role indicates the location of the network device where the target port is located; the information about the target port further includes an attribute of the target port, and the attribute indicates a direction of a data stream sent by the target port.
[0137] Optionally, the determining unit is further configured to: determine that there is no idle outgoing port on the network device that can forward a target data stream corresponding to the target port. The target data stream is a data stream corresponding to a target address range; the target address range is an address range corresponding to a host under the target port, and the target address range is determined according to the information about the network device where the target port is located and the information about the target port.
[0138] Optionally, the information about the target port may further include an identifier of a target outgoing port queue, where the target outgoing port queue is an outgoing port queue that enters a congestion state or a pre-congestion state in the target port, and the target data stream is a data stream corresponding to a target address range and having a priority corresponding to the identifier of the outgoing port queue.
[0139] Optionally, the storage unit 1340 is configured to store the information about the network device where the target port is located and the information about the target port. The storage unit 1340 is further configured to store the state of the target port.
[0140] Further, an embodiment of the present application further provides a network device 1400, and the network device 1400 may be Figure 1 or Figure 2 any network device in. As Figure 14 shown, the network device 1400 includes a receiving unit 1410, a first determining unit 1420, a second determining unit 1430, and a processing unit 1440. Optionally, the network device 1400 further includes a storage unit 1450. The network device 1400 is configured to implement Figure 3 the functions of the second network device in.
[0141] A receiving unit 1410, configured to receive a first notification from a first network device, where the first notification includes information about a network device where a target port is located and information about the target port, and the target port is a port that enters a pre-blocking state or a congestion state; the second network device is a network device capable of sending data streams to a host under the target port through at least two forwarding paths. A first determination unit 1420, configured to determine a target data stream, where a first forwarding path of the target data stream includes the target port. A second determination unit 1430, configured to determine whether there is an idle output port on the second network device that can forward the target data stream, and obtain a determination result. A processing unit 1440, configured to process the target data stream according to the determination result.
[0142] Optionally, when there is an idle output port on the network device that can forward the target data stream, the processing unit 1440 sends the target data stream through the idle output port, and a second forwarding path where the idle output port is located does not include the target port.
[0143] Optionally, when there is no idle output port on the network device that can forward the target data stream, the processing unit 1440 forwards the target data stream through the first forwarding path.
[0144] Optionally, the processing unit 1440 is further configured to: generate a second notification, where the second notification includes information about a network device where the target port is located and information about the target port; and send the second notification to at least one third network device; the at least one third network device includes a network device capable of sending data streams to a host under the target port through at least two forwarding paths.
[0145] Optionally, the processing unit 1440 is further configured to send a backpressure message to a source host of the target data stream, where the backpressure message is used to cause the source host to perform an operation for handling network congestion.
[0146] Optionally, the first determination unit 1420 is configured to: determine a target address range according to information about a network device where the target port is located and information about the target port, where the target address range is an address range corresponding to a host under the target port; and determine a data stream whose destination address belongs to the target address range as the target data stream.
[0147] Optionally, the first notification further includes an identifier of a target output port queue, and the target output port queue is an output port queue that enters a pre-blocking state or a congestion state in the target port; the first determination unit 1420 is configured to: determine a data stream whose destination address belongs to the target address range and whose priority corresponds to the identifier of the output port queue as the target data stream.
[0148] Optionally, the storage unit 1450 is used to store information about the network device where the target port is located and information about the target port. The storage unit 1450 is further used to store the status of the target port.
[0149] Figure 13 and Figure 14 The network devices that Figure 3 cooperate with each other can implement the method shown in
[0150] Further, Figure 13 and Figure 14 The network devices can be composed of, for example, Figure 15Specifically implemented by the network device 1500 shown, the network device 1500 may include a processor 1510, a memory 1520, and a bus system 1530. Among them, the processor 1510 and the memory 1520 are connected through the bus system 1530. The memory 1520 is used to store program code, and the processor 1510 is used to execute the program code stored in the memory 1520. For example, the processor 1510 may call the program code stored in the memory 1520 to execute the method for handling network congestion in various embodiments of the present application. In the embodiments of the present application, the processor 1510 may be a central processing unit (CPU), and the processor 1510 may also be 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. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor 1510 may include one or more processing cores. The memory 1520 may include a read-only memory (ROM) device or a random-access memory (RAM) device. Any other suitable type of storage device may also be used as the memory 1520. The memory 1520 may include data 1522 accessed by the processor 1510 through the bus 1530. The memory 1520 may further include an operating system 1523 to support the operation of the network device 1500. In addition to the data bus, the bus system 1530 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, all kinds of buses are labeled as the bus system 1530 in the figure. Optionally, the network device 1500 may further include one or more output devices, such as a communication interface 1540. The network device 1500 may communicate with other devices through the communication interface 1540. The communication interface 1540 may be connected to the processor 1510 via the bus system 1530. Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by hardware or by means of software plus a necessary general-purpose hardware platform. Based on such an understanding, the technical solution of the present application may be embodied in the form of a hardware product or a software product. The hardware product may be a dedicated chip.The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a portable hard drive, etc.), and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0151] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for handling network congestion, characterized in that, it includes: The first network device determines a target port; the target port is an egress port that enters the pre-blocking state or the congestion state; The first network device sends a first notification to at least one second network device; the at least one second network device includes one or more network devices that can send data streams to the host under the target port through at least two forwarding paths; the first notification includes information about the network device where the target port is located and information about the target port; the information about the network device where the target port is located includes the role of the network device where the target port is located, and the role indicates the location of the network device where the target port is located; The information about the target port includes the attribute of the target port, and the attribute indicates the direction of sending the data stream of the target port; Wherein, the at least one second network device is determined according to the role of the first network device, the attribute of the target port, and the role of the network device where the target port is located.
2. The method according to claim 1, characterized in that, The network device where the target port is located is the first network device, and the first network device determines the target port including: The first network device monitors the egress ports of the first network device; When the buffer usage of an egress port of the first network device exceeds the port buffer threshold, the first network device determines the egress port as the target port.
3. The method according to claim 1, characterized in that, The network device where the target port is located is the first network device, and the first network device determines the target port including: The first network device monitors the egress port queue of the first network device; When the length of an egress port queue exceeds the queue buffer threshold, the first network device determines the egress port where the egress port queue is located as the target port.
4. The method according to claim 1, characterized in that, The network device where the target port is located is the third network device, and the first network device determines the target port including; The first network device receives a second notification sent by the third network device, and the second notification includes information about the third network device and information about the target port; The first network device determines the target port according to the second notification.
5. The method according to any one of claims 1-4, characterized in that, The information about the network device where the target port is located further includes the identifier of the network device where the target port is located, and the information about the target port further includes the identifier of the target port or the identifier of the forwarding path where the target port is located.
6. The method according to any one of claims 1-4, characterized in that, Before the first network device sends a first notification to at least one second network device, the method further includes: Determining that there is no idle egress port on the first network device that can forward the target data stream corresponding to the target port; The target data stream is the data stream corresponding to the target address range; the target address range is the address range corresponding to the host under the target port, and the target address range is determined according to the information of the network device where the target port is located and the information of the target port.
7. The method according to claim 1, wherein the information of the target port may further include an identifier of a target output port queue, the target output port queue is an output port queue that enters a congestion state or a pre-congestion state in the target port, the target data stream is a data stream corresponding to a target address range, and the priority is the data stream corresponding to the identifier of the output port queue.
8. The method according to claim 7, characterized in that, further comprising: The first network device stores the information of the network device where the target port is located and the information of the target port.
9. A method for handling network congestion, characterized in that, comprising: The second network device receives a first notification from the first network device, the first notification includes the information of the network device where the target port is located and the information of the target port, the target port is a port that enters a pre-congestion state or a congestion state; the second network device is a network device that can send a data stream to the host under the target port through at least two forwarding paths; the information of the network device where the target port is located includes the role of the network device where the target port is located, and the role indicates the location of the network device where the target port is located; the information of the target port includes the attribute of the target port, and the attribute indicates the direction of sending the data stream by the target port; wherein, the second network device is determined according to the role of the first network device, the attribute of the target port, and the role of the network device where the target port is located; The second network device determines a target data stream, and a first forwarding path of the target data stream includes the target port; The second network device determines whether there is an idle output port on the second network device that can forward the target data stream, and obtains a determination result; The second network device processes the target data stream according to the determination result.
10. The method according to claim 9, characterized in that, The processing of the target data stream according to the determination result includes: When there is an idle output port on the second network device that can forward the target data stream, the second network device sends the target data stream through the idle output port, and the second forwarding path where the idle output port is located does not include the target port.
11. The method according to claim 9, characterized in that, The processing of the target data stream according to the determination result includes: When there is no idle output port on the second network device that can forward the target data stream, the second network device forwards the target data stream through the first forwarding path.
12. The method according to claim 11, characterized in that, further comprising: The second network device generates a third notification, and the third notification includes the information of the network device where the target port is located and the information of the target port; The second network device sends the third notification to at least one third network device; the at least one third network device includes those capable of sending data streams to the host under the target port through at least two forwarding paths.
13. The method according to claim 11, wherein, it further includes: The second network device sends a backpressure message to the source host of the target data stream, and the backpressure message is used to cause the source host to perform operations for handling network congestion.
14. The method according to any one of claims 9 - 13, wherein, The second network device determines the target data stream as follows: The second network device determines a target address range according to the information of the network device where the target port is located and the information of the target port, and the target address range is the address range corresponding to the host under the target port; The second network device determines the data stream whose destination address belongs to the target address range as the target data stream.
15. The method according to claim 14, wherein, The first notification further includes an identifier of the target output port queue, and the target output port queue is the output port queue that enters the pre - congestion state or the congestion state in the target port; The second network device determines the data stream whose destination address belongs to the target address range as the target data stream, including: The second network device determines the data stream whose destination address belongs to the target address range and whose priority corresponds to the identifier of the output port queue as the target data stream.
16. The method according to any one of claims 9 - 13, wherein, Before the second network device determines the target data stream, the method further includes: The second network device stores the information of the network device where the target port is located and the information of the target port.
17. A network device for handling network congestion, wherein, The network device is a first network device, including: A determination unit for determining a target port, where the target port is an output port that enters the pre - congestion state or the congestion state; A sending unit for sending a first notification to at least one second network device; the at least one second network device includes one or more network devices capable of sending data streams to the host under the target port through at least two forwarding paths; the first notification includes the information of the network device where the target port is located and the information of the target port; the information of the network device where the target port is located includes the role of the network device where the target port is located, and the role indicates the location of the network device where the target port is located; the information of the target port includes the attribute of the target port, and the attribute indicates the direction of sending the data stream by the target port; wherein, the at least one second network device is determined according to the role of the first network device, the attribute of the target port, and the role of the network device where the target port is located.
18. The network device according to claim 17, wherein, The network device where the target port is located is the first network device, and the determination unit is used for: Monitoring the output ports of the first network device; When the buffer usage of an output port of the first network device exceeds the port buffer threshold, determine the output port as the target port.
19. The network device according to claim 17, wherein, the network device where the target port is located is the first network device, and the determining unit is configured to: monitor the output port queue of the first network device; when the length of an output port queue exceeds the queue buffer threshold, determine the output port where the output port queue is located as the target port.
20. The network device according to claim 17, wherein, the network device where the target port is located is the third network device, the network device further includes a receiving unit, configured to receive a second notification sent by the third network device, where the second notification includes information of the third network device and information of the target port; the determining unit determines the target port according to the second notification.
21. The network device according to any one of claims 17-20, wherein, the information of the network device where the target port is located further includes an identifier of the network device where the target port is located, and the information of the target port further includes an identifier of the target port or an identifier of the forwarding path where the target port is located.
22. The network device according to any one of claims 17-20, wherein, the determining unit is further configured to: determine that there is no idle output port on the network device that can forward the target data stream corresponding to the target port; the target data stream is a data stream corresponding to a target address range; the target address range is the address range corresponding to the host under the target port, and the target address range is determined according to the information of the network device where the target port is located and the information of the target port.
23. According to the network device of claim 22, the information of the target port may further include an identifier of a target output port queue, where the target output port queue is an output port queue that enters a congested state or a pre-congested state in the target port, and the target data stream is a data stream corresponding to a target address range and having a priority corresponding to the identifier of the output port queue.
24. The network device according to claim 23, wherein, further includes: a storage unit, configured to store the information of the network device where the target port is located and the information of the target port.
25. A network device for handling network congestion, wherein, the network device is a second network device, including: A receiving unit, configured to receive a first notification from a first network device, where the first notification includes information about the network device where a target port is located and information about the target port, and the target port is a port that enters a pre-blocking state or a congestion state; the second network device is a network device capable of sending data streams to a host under the target port through at least two forwarding paths; the information about the network device where the target port is located includes the role of the network device where the target port is located, and the role indicates the location of the network device where the target port is located; the information about the target port includes the attribute of the target port, and the attribute indicates the direction of sending the data stream by the target port; wherein, the second network device is determined according to the role of the first network device, the attribute of the target port, and the role of the network device where the target port is located; A first determination unit, configured to determine a target data stream, where a first forwarding path of the target data stream includes the target port; A second determination unit, configured to determine whether there is an idle output port on the second network device that can forward the target data stream, and obtain a determination result; A processing unit, configured to process the target data stream according to the determination result.
26. The network device according to claim 25, wherein, when there is an idle output port on the network device that can forward the target data stream, the processing unit sends the target data stream through the idle output port, and a second forwarding path where the idle output port is located does not include the target port.
27. The network device according to claim 25, wherein, when there is no idle output port on the network device that can forward the target data stream, the processing unit forwards the target data stream through the first forwarding path.
28. The network device according to claim 27, wherein, the processing unit is further configured to: generate a third notification, where the third notification includes information about the network device where the target port is located and information about the target port; send the third notification to at least one third network device; the at least one third network device includes a device capable of sending data streams to a host under the target port through at least two forwarding paths.
29. The network device according to claim 28, wherein, the processing unit is further configured to send a backpressure message to a source host of the target data stream, and the backpressure message is used to cause the source host to perform an operation of processing network congestion.
30. The network device according to any one of claims 25-29, wherein, the first determination unit is configured to: determine a target address range according to the information about the network device where the target port is located and the information about the target port, and the target address range is an address range corresponding to a host under the target port; determine a data stream whose destination address belongs to the target address range as the target data stream.
31. The network device according to claim 30, wherein, The first notification further includes an identifier of a target output port queue, where the target output port queue is an output port queue that enters a pre-blocking state or a congestion state among the target ports; The first determining unit is configured to: determine a data stream whose destination address belongs to the target address range and whose priority corresponds to the identifier of the output port queue as the target data stream.
32. The network device according to any one of claims 25-29, characterized in that the network device further includes: a storage unit, configured to store information of the network device where the target port is located and information of the target port.
33. A network device, characterized in that it includes a memory and a processor, the memory is configured to store program code; the processor is configured to execute the program code to implement the method according to any one of claims 1-16.
34. A storage medium, characterized in that the storage medium is configured to store program code; when the program code is executed by a computer device, the method according to any one of claims 1-16 can be implemented.
Citation Information
Patent Citations
Method, device and system for relieving congestion
CN109981471A