An improved method for fast CNP congestion notification in networks

By detecting the ECN field in the outgoing direction of the switch and building CNP messages, the problems of CNP notification delivery delay and repeated sending in the network are solved, and fast and accurate congestion notification delivery is achieved, improving network performance.

CN115695314BActive Publication Date: 2025-04-18YUNHE ZHIWANG (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211355293.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2025-04-18
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

There are two problems when the prior art quickly transmits congestion notification (CNP) in the network: one is that when congestion occurs in Device A and CNP notifications rely on Device B, it will increase communication overhead; the other is that the source server may receive multiple CNP messages in succession, resulting in unnecessary slowdowns.

Method used

The message ECN field is detected in the outgoing direction of the switch and sent to the control plane to construct the CNP message. The switching chip adds a special mark to the marked ECN message. The destination server knows that the CNP message has been sent by the intermediate switch by identifying the mark, thereby avoiding repeated transmission.

Benefits of technology

It realizes the rapid transmission of CNP messages to the source server in the network, and avoids the repeated receipt of CNP messages by the source server, reduces processing complexity and improves network performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695314B_ABST
    Figure CN115695314B_ABST
Patent Text Reader

Abstract

An improved method for fast CNP congestion notification in a network, wherein the ECN field of a message is detected in the outgoing direction of a switch, the detected message is sent to the control plane of the switch, the control plane analyzes the source IP, and automatically constructs a CNP message; the switch chip adds a special mark to the marked ECN message, and the destination server can judge that the CNP message has been sent by the intermediate switch by identifying the mark, and does not need to send the CNP message repeatedly; the beneficial effect is that when the switch detects that it is congested, it can notify the source server of the CNP message at the first time, and send the ECN mark of the original message to the destination server as 11, so that the destination server knows that congestion has occurred in the middle of the link and will not send the CNP message repeatedly, so that the congestion event is quickly passed, and the source server is prevented from repeatedly receiving the CNP message, thereby reducing the complexity of the source server processing the CNP message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a network communication technology, and in particular to an improved method for fast CNP congestion notification in a network. Background Art

[0002] In network switches, network congestion is a common phenomenon. A common scenario is that when traffic from multiple inbound ports is forwarded to the same outbound port at the same time, traffic congestion will occur at the outbound port. When congestion occurs for a long time, when the switch's traffic exhausts its internal cache, packet loss will occur. Packet loss will reduce the performance of the entire network, because based on the control layer protocol, packet loss means retransmission, and the entire session link may have to be restarted. In order to prevent packet loss caused by this congestion, switches generally enable the flow control function. However, using flow control to avoid packet loss caused by network congestion will also bring other problems;

[0003] like Figure 2 As shown in the figure, when the AE ports of switch1 forward traffic to the G port, the G port will definitely be congested. If at this time, the message entering from the F port of switch2 enters the J port of switch1 through the H port of switch2 and is to be forwarded to the G port, and at the same time, the message entering from the X port of switch2 enters the J port of switch1 through the H port of switch2 and is to be forwarded to the Y port. If flow control is enabled on the J port of switch1, because the traffic forwarded from the F port of switch1 to the G port of switch2 is congested, the J port of switch1 will send a PAUSE frame to the H port of switch2 to stop the H port from sending traffic temporarily. At this time, the traffic forwarded from the X port of switch2 to the Y port of switch1 will not be forwarded because the H port stops sending messages. From the results, the traffic forwarded from the X port to the Y port cannot be forwarded normally because the traffic from F to G is congested. The traffic from X to Y and the traffic from F to G may only occupy 10% or 1% of the bandwidth of the H port, but cannot be forwarded normally. This is the side effect of enabling flow control on the port;

[0004] Looking at the above example again, the root cause is that the traffic forwarded from port AF to port G is congested. In the current network, in order to avoid port flow control, the injection rate of port AF is limited. When the injection rate of port AF is limited, port J will not trigger flow control, and the traffic forwarded from X to Y can be forwarded normally. Currently, network congestion control relies on explicit congestion notification (ECN) technology to reduce the injection rate of port AF;

[0005] ECN was originally defined for the TCP / IP protocol in the RFC 3168 document. It is implemented by embedding a congestion indicator in the IP header and a congestion confirmation in the TCP header. When the switch detects that a message is congested, it will mark the ECN field in the message IP header as 11. The IP header is shown in the figure below. The ECN field has two bits. 00 indicates that the source does not support ECN, and the switch does not need to mark ECN for normal forwarding. 01 / 10 indicates that the source supports ECN. 11 indicates that congestion has occurred. When a source server that supports ECN sends a data message, the ECN is set to 10 by default;

[0006] exist Figure 3 , Figure 4 , Figure 5 In the example, when the message sent by the source server is congested in Device A and the ECNfield is marked as 11, after reaching the target server through Device B, the target server finds that the ECN field of the message is marked as congested, and it will send a CNP message to the source server. After the source server receives the CNP message, it will know that the message it sent before has been congested in the entire communication link, and then it will reduce its own sending rate.

[0007] However, packet congestion occurs on Device A in the sending link. Before the source server receives the CNP packet, the source server will continue to send packets at the original rate. During this period, packet congestion will continue to occur on Device A, which may trigger flow control or even packet loss.

[0008] In order to allow the source server to quickly receive CNP messages, there is currently a fast CNP technology. When Device B detects that there is an ECN-marked congested message at the inlet, Device B directly sends a CNP message to the source server;

[0009] According to the above, the original fast CNP technology has two problems;

[0010] 1. When congestion occurs on Device A, the CNP notification must be sent by Device B, which adds the communication overhead between the two devices. Fast CNP requires dedicated equipment support, and many switches do not support fast CNP. Device A and the first device that supports fast CNP may be several hops apart, so the time overhead is directly increased. Moreover, the link status between Device A and the first device that supports fast CNP cannot be guaranteed.

[0011] 2. In the above example, Device B is a device that supports fast CNP. When Device B detects an ECN message and sends a CNP message to the source server, the source server can reduce its speed, but the destination server will still receive the ECN message and send a CNP message to the source server. This will cause the source server to receive two CNP messages in succession. The source server must ignore the second CNP message, otherwise it will reduce its speed twice in succession, directly affecting the utilization rate of the communication link. Summary of the invention

[0012] According to the present invention, an improved method for fast CNP congestion notification in a network is provided, which can solve the problems mentioned in the background technology; when network congestion occurs, the method can provide CNP congestion notification to the source server more quickly, and can avoid the source server from repeatedly receiving CNP messages, and has a good prospect for promotion and application.

[0013] The technical solution of the present invention to solve the above technical problems is: the present invention detects the ECN field of the message in the outgoing direction of the switch, sends the detected message to the control plane of the switch, and the control plane analyzes the source IP and automatically constructs the CNP message. At the same time, the switching chip adds a special mark to the marked ECN message. The destination server can determine that the CNP message has been sent by the intermediate switch by identifying the mark, and there is no need to send the CNP message repeatedly.

[0014] 1. The control plane will establish a thread. When it finds that the data plane has received a message marked as congested by ECN, it will parse the source MAC and source IP in the message, construct a CNP message and send it to the source IP. The egress of the CNP message can be obtained by querying the routing table and MAC table.

[0015] 2. A loopback port is established inside the switching chip. If the outgoing message is sent through the loopback port, it can go through the chip processing flow again.

[0016] 3. Create an ACL in the outbound direction. The rule of the outbound ACL is to match the message with the ECN field being 11. The action is to mirror the message to the loopback port in step 2 and change the first bit of the Flag field in the IP header to 1. This bit serves as a mark to inform the destination server that it does not need to send a CNP message.

[0017] 4. Create an ACL rule in the inbound direction. This rule matches packets whose ingress is the loopback port and whose ECN field is 11. The action is to redirect to the CPU.

[0018] 5. The control plane receives the ECN-marked message sent from the inbound ACL, parses the message structure, and sends a CNP message to the source server.

[0019] 6. When the destination server receives a message with the first bit of the Flag field in the IP header being 1 and the ECN being 11, it parses the data in the message normally and no longer sends a CNP message to the source IP.

[0020] In this solution, when the switch detects congestion, it can immediately notify the source server of the CNP message, and still send the original message with the ECN mark 11 to the destination server. The destination server will know that congestion has occurred in the middle of the link and will not send the CNP message repeatedly.

[0021] Furthermore, the present invention creates ACLs in the inbound and outbound directions of the switch. The outbound ACL detects the message with ECN 11 and mirrors it to the loopback port inside the chip, and sets the first bit of the Flag field in the IP header to 1. The inbound ACL directly redirects the message with ECN 11 sent from the loopback port to the CPU. After receiving this message, the control plane constructs a CNP message and sends it to the source server.

[0022] The beneficial effect of the present invention is that when the switch detects that it is congested, it can notify the source server of the CNP message at the first time, and can still send the ECN mark of the original message to the destination server as 11. The destination server can know that congestion has occurred in the middle of the link and will not send the CNP message repeatedly. In this way, the congestion event is quickly passed, and the source server is prevented from repeatedly receiving the CNP message, thereby reducing the complexity of the source server processing the CNP message. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of network congestion and control in the prior art.

[0024] Figure 2 This is a schematic diagram of the IP header format of a data message sent by a source server in the prior art.

[0025] Figure 3 The figure is a schematic diagram of the ECN identification bit format of the IP header of a data message in the prior art.

[0026] Figure 4 This is a schematic diagram of the ECN congestion marking and CNP congestion notification message rate adjustment in the early prior art.

[0027] Figure 5 This is a schematic diagram of ECN congestion marking and CNP congestion notification message rate adjustment of the fast CNP technology in the prior art.

[0028] Figure 6 The diagram is a schematic diagram of adjusting the ECN congestion mark and CNP congestion notification message of the network congestion control according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] Example:

[0030] exist Figure 6 In the improved method of fast CNP congestion notification in the network, the ECN field of the message is detected in the outgoing direction of the switch, and the detected message is sent to the control plane of the switch. The control plane analyzes the source IP and automatically constructs the CNP message. At the same time, the switching chip will add a special tag to the marked ECN message. The destination server can determine that the CNP message has been sent by the intermediate switch by identifying the tag, and there is no need to send the CNP message repeatedly;

[0031] The specific implementation steps are as follows:

[0032] Step 1: The control plane will establish a thread. When it finds that the data plane has received a message marked as congested by ECN, it will parse the source MAC and source IP in the message, construct a CNP message and send it to the source IP. The egress of the CNP message can be obtained by querying the routing table and MAC table.

[0033] Step 2: Create a loopback port inside the switching chip. If the outgoing message is sent through the loopback port, it can go through the chip processing flow again.

[0034] Step 3: Create an ACL in the outbound direction. The rule of the outbound ACL is to match the message with the ECN field being 11. The action is to mirror the message to the loopback port in step 2 and change the first bit of the Flag field in the IP header to 1. This bit serves as a mark to inform the destination server that it does not need to send a CNP message.

[0035] Step 4: Create an ACL rule in the inbound direction. This rule matches packets whose ingress is the loopback port and whose ECN field is 11. The action is to redirect to the CPU.

[0036] Step 5: The control plane receives the ECN-marked message sent from the inbound ACL, parses the message structure, and sends a CNP message to the source server.

[0037] Step 6: When the destination server receives a message with the first bit of the Flag field in the IP header being 1 and the ECN being 11, it parses the data in the message normally and no longer sends a CNP message to the source IP.

[0038] With the above solution, when the switch detects that it is congested, it can immediately notify the source server of the CNP message, and still send the original message with the ECN mark 11 to the destination server. The destination server will know that congestion has occurred in the middle of the link and will not send the CNP message repeatedly.

Claims

1. An improved method for fast CNP congestion notification in a network, comprising: detecting the ECN field of a message in the outgoing direction of a switch, sending the detected message to the control plane of the switch, the control plane analyzing the source IP, and automatically constructing a CNP message; at the same time, the switching chip adds a special mark to the marked ECN message, and the destination server can determine that the CNP message has been sent by the intermediate switch by identifying the mark, and does not need to send the CNP message repeatedly; Features: Step 1: The control plane will establish a thread. When it finds that the data plane has received a message marked as congested by ECN, it will parse the source MAC and source IP in the message, construct a CNP message and send it to the source IP. The egress of the CNP message can be obtained by querying the routing table and MAC table. Step 2: A loopback port is established inside the switching chip. If the outgoing message is the loopback port, it can go through the chip processing flow again. Step 3: Create an ACL in the outbound direction. The rule of the outbound ACL is to match the message with the ECN field being 11. The action is to mirror the message to the loopback port in step 2 and change the first bit of the Flag field in the IP header to 1. This bit serves as a flag to inform the destination server that it does not need to send a CNP message. Step 4: Create an ACL rule in the inbound direction. This rule matches packets whose ingress is the loopback interface and whose ECN field is 11. The action is to redirect packets to the CPU. Step 5: The control plane receives the ECN-marked message sent by the inbound ACL, parses the message structure, and sends a CNP message to the source server; Step 6: When the destination server receives a message with the first bit of the Flag field in the IP header being 1 and the ECN being 11, it parses the data in the message normally and no longer sends a CNP message to the source IP.

2. The improved method for fast CNP congestion notification in a network according to claim 1, characterized in that: When the switch detects that it is congested, it immediately notifies the source server of the CNP message and sends the original message with the ECN mark 11 to the destination server. The destination server will know that congestion has occurred in the middle of the link and will not send the CNP message repeatedly.