WO2015123988A1 - 拥塞控制方法、装置及设备 - Google Patents

拥塞控制方法、装置及设备 Download PDF

Info

Publication number
WO2015123988A1
WO2015123988A1 PCT/CN2014/086178 CN2014086178W WO2015123988A1 WO 2015123988 A1 WO2015123988 A1 WO 2015123988A1 CN 2014086178 W CN2014086178 W CN 2014086178W WO 2015123988 A1 WO2015123988 A1 WO 2015123988A1
Authority
WO
WIPO (PCT)
Prior art keywords
congestion control
control message
address
source
mac address
Prior art date
Application number
PCT/CN2014/086178
Other languages
English (en)
French (fr)
Inventor
秦瑜
刘树名
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015123988A1 publication Critical patent/WO2015123988A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • Congestion control method, device and device The present application claims priority to Chinese Patent Application No. 201410055899.7, entitled “Congestion Control Method, Apparatus and Equipment", filed on February 19, 2014, the entire contents of which is hereby incorporated by reference. This is incorporated herein by reference.
  • the present invention relates to the field of communications technologies, and in particular, to a congestion control method, apparatus, and device.
  • BACKGROUND OF THE INVENTION Storage Area Network (English: Storage Area Network, abbreviation: SAN) Network is a high-speed network. Since the SAN mainly provides data transmission between the computer and the storage device, it is sensitive to packet loss and requires the message to be saved during transmission.
  • the SAN provides a congestion notification mechanism, that is, Quantized Congestion Notification (QCN).
  • QCN Quantized Congestion Notification
  • FIG. 1 is a schematic diagram of the working principle of QCN technology.
  • server 1 and server 2 send traffic to server 3 through the SAN.
  • the switching device detects the traffic congestion, the switching device obtains the packet from the cache queue, and determines the server that sends the packet, for example, the server 1. Therefore, the switching device sends the QCN packet to the server 1 to notify the server. 1 reduce the flow.
  • the destination MAC address identifies the source device that causes traffic congestion. Therefore, the QCN packet can only be sent to the device in the same Layer 2 network.
  • the QCN message is sent to the gateway device connected to the switching device, and the gateway device is not the source device that sends the traffic causing the congestion. Therefore, the QCN packet cannot reach the source. Device, unable to perform congestion control. Summary of the invention
  • the present invention provides a congestion control method, apparatus, and device.
  • the technical solution is as follows:
  • a congestion control method comprising: Obtaining the first packet from the receiving buffer of the switching device when detecting that the switching device is congested; and acquiring the first packet when the source MAC address of the first packet is the MAC address of the gateway device Source IP address;
  • the source IP address is not the IP address of the gateway device, generating a first congestion control message according to the source IP address of the first packet, where the first congestion control message includes the gateway device MAC address, a MAC address of the switching device and a source IP address of the first packet;
  • a source IP address of the first packet is located in a payload of the first congestion control message.
  • the second packet is obtained from a receiving buffer of the switching device;
  • the second congestion control message is generated, where the second congestion control message includes a source MAC address of the second packet and a MAC address of the switching device.
  • a second aspect provides a congestion control method, including: when a congestion occurs, a gateway device receives a first congestion control message, where the first congestion control message includes a MAC address of the gateway device, a MAC address of the switching device, and An IP address of the source device; the source device is a device that sends traffic that causes congestion; generates a second congestion control message according to the first congestion control message and an IP address of the source device; and sends the second congestion control The second congestion control message is used to enable the source device to control traffic transmission.
  • a source MAC address of the first congestion control message is a MAC address of the switching device, and a destination MAC address is a MAC address of the gateway device.
  • the IP address of the source device is carried in a payload of the first congestion control message.
  • Control messages include:
  • the gateway device Determining, according to the IP address of the source device, whether the gateway device is a gateway device of the source device; if the gateway device is a gateway device of the source device, the gateway device acquires the And generating, by the MAC address of the source device, the second congestion control message according to the first congestion control message and the MAC address of the source device, where a destination MAC address of the second congestion control message is a MAC address of the source device.
  • the transmitting the second congestion control message includes sending the second congestion control message to the source device according to the destination MAC address.
  • the control message includes: determining, according to the IP address of the source device, whether the gateway device is a gateway device of the source device; if the gateway device is not a gateway device of the source device, the gateway device is according to the a congestion control message generates a second congestion control message, the destination IP address of the second congestion control message is an IP address of the source device, and the second congestion control message carries the first congestion control message;
  • the second congestion control message is an IP packet.
  • the sending the second congestion control message includes:
  • the source device sends the modified first congestion control message, so that the source device controls the sending of the traffic; the destination gateway device is the gateway device of the source device.
  • the second congestion control message further includes a source port number and a destination port number, and the source port number and The destination port number is a preset port number, which is used to indicate the type of the second congestion control message.
  • a congestion control apparatus comprising:
  • a first acquiring module configured to: when detecting that the switching device is congested, obtain a first packet from a receiving buffer of the switching device;
  • a second acquiring module configured to acquire a source IP address of the first packet when the source MAC address of the first packet is a MAC address of the gateway device;
  • a generating module configured to generate a first congestion control message according to a source IP address of the first packet, where the source IP address is not an IP address of the gateway device, where the first congestion control message includes the a gateway device MAC address, a MAC address of the switching device, and a source IP address of the first packet;
  • a sending module configured to send the first congestion control message to the gateway device.
  • a source IP address of the first packet is in a payload of the first congestion control message.
  • the first acquiring module is further configured to obtain a second packet from a receiving buffer of the switching device.
  • the generating module is further configured to: when the source MAC address of the second packet is not the MAC address of the gateway device, generate a second congestion control message, where the second congestion control message includes the second packet Source MAC address and MAC address of the switching device.
  • a congestion control apparatus including:
  • a receiving module configured to receive a first congestion control message when congestion occurs, where the first congestion control message includes a MAC address of the gateway device, a MAC address of the switching device, and an IP address of the source device; Sending a device that causes congested traffic;
  • a generating module configured to generate a second congestion control message according to the first congestion control message and an IP address of the source device
  • a sending module configured to send the second congestion control message, where the second congestion control message is used to enable the source device to control traffic transmission.
  • a source MAC address of the first congestion control message is a MAC address of the switching device, and a destination MAC address is a MAC address of the gateway device.
  • the IP address of the source device is carried in a payload of the first congestion control message.
  • the generating module is configured to determine, according to an IP address of the source device, whether the gateway device is a gateway device of the source device; if the gateway device is a gateway device of the source device, the gateway device acquires a MAC address of the source device according to the IP address, according to the first congestion control message and the Generating, by the MAC address of the source device, the second congestion control message, where the destination MAC address of the second congestion control message is the MAC address of the source device, and the sending module is further configured to use the destination MAC address The source device sends the second congestion control message.
  • the generating module is configured to determine, according to an IP address of the source device, whether the gateway device is Gateway device of the source device;
  • the gateway device If the gateway device is not the gateway device of the source device, the gateway device generates a second congestion control message according to the first congestion control message, where the destination IP address of the second congestion control message is the source device.
  • the second congestion control message carries the first congestion control message, and the second congestion control message is an IP packet.
  • the sending module is configured to use a routing manner according to a destination IP address of the second congestion control message Sending, by the source device, the second congestion control message, after the destination gateway device receives the second congestion control message, acquiring the first congestion control message from the second congestion control message, according to the Obtaining, by the destination IP address, the MAC address of the source device, modifying the source MAC address of the first congestion control message to the MAC address of the destination gateway device, and modifying the destination MAC address of the first congestion control message to Decoding the MAC address of the source device, and sending the modified first congestion control message to the source device, so that the source device controls the sending of the traffic; the destination gateway device is the gateway device of the source device.
  • the second congestion control message further includes a source port number and a destination port number, and the source port number and The destination port number is a preset port number, which is used to indicate the type of the second congestion control message.
  • the IP address of the source device that causes the congestion is added to the congestion control message, so that when the source device is not in the current Layer 2 network, the congestion control message may be transparently transmitted in the Layer 3 network to implement the third Congestion control in the layer SAN avoids packet loss or packet ordering in the Layer 3 SAN.
  • Figure 1 is a schematic diagram of the working principle of QCN technology
  • FIG. 2 is a flowchart of a congestion control method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a congestion control method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a three-layer SAN architecture according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of another congestion control method according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a congestion control message according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another congestion control message according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of still another congestion control message according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of still another congestion control message according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of another three-layer SAN architecture according to an embodiment of the present invention.
  • FIG. 11 is a flowchart of another congestion control method according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a congestion control apparatus according to an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of another congestion control apparatus according to an embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a switching device according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic structural diagram of a gateway device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS In order to make the objects, technical solutions, and advantages of the present invention more comprehensible, the embodiments of the present invention will be further described in detail with reference to the accompanying drawings.
  • FIG. 2 is a flowchart of a congestion control method according to an embodiment of the present invention. The method is applied to a three-layer SAN, see FIG. 2, the method includes:
  • step 501 When detecting that the switching device is congested, obtain the first packet from the receiving buffer of the switching device.
  • the congestion can be detected in multiple manners. For details, refer to the description of step 501.
  • the source MAC address of the first packet is a gateway device MAC address, obtain the source of the first packet.
  • the source IP address of the first packet is not the IP address of the gateway device, generate a first congestion control message according to the source IP address of the first packet, where the first congestion control message includes the gateway.
  • the MAC address of the device, the MAC address of the switching device, and the source IP address of the first packet are not the IP address of the gateway device.
  • the first congestion control message is used to enable the gateway device to send the first congestion control message to the source device corresponding to the source IP address when the first congestion control message is received, so that the source device controls the traffic to be sent.
  • the first congestion control message is an extended QCN message.
  • the payload of the extended QCN packet includes the source IP address of the first packet.
  • FIG. 3 is a flowchart of another congestion control method according to an embodiment of the present invention. The method is applied to three layers
  • the method includes:
  • the gateway device receives a first congestion control message, where the first congestion control message includes a MAC address of the gateway device, a MAC address of the switching device, and an IP address of the source device.
  • the device of the congested traffic includes a MAC address of the gateway device, a MAC address of the switching device, and an IP address of the source device.
  • a three-layer SAN includes two Layer 2 networks, and the two Layer 2 networks are connected by a Layer 3 network.
  • the Layer 3 network includes multiple routers or core switching devices as an example to specifically describe the embodiments of the present invention. .
  • the two Layer 2 networks are Layer 2 Network 1 and Layer 2 Network 2.
  • the IP addresses of devices in a Layer 2 network belong to the same IP address pool.
  • the Layer 2 network 1 includes a switch E, and a server A (MAC address is MAC A) and a server B (MAC address is MAC B) connected to the switch E.
  • the Layer 2 network 1 has a gateway device 1 (the MAC address is MAC1). .
  • the Layer 2 network 2 includes a switch F (MAC address is MAC F), a server C (MAC address is MAC C) connected to the switch F, and a server D (MAC address is MAC D), a switch G, and the switch G. Connected memory 1 and memory 2, switch F and switch G are connected, and the layer 2 network 1 has gateway device 2 (MAC address is MAC2).
  • the switch in the Layer 2 network 2 detects the receiving rate of itself in real time.
  • the embodiment of the present invention detects the receiving rate of the switch F through the switch F to learn whether the switch F is congested.
  • the switch can also detect the receiving rate and the sending rate, and determine the receiving rate. Whether it is greater than the sending rate, when the receiving rate is greater than the sending rate, it is determined that the switch F is congested.
  • the switch can also detect whether the amount of the received buffer data is greater than the amount of the sent buffer data to determine whether congestion occurs. Not limited.
  • the switch F detects that the receiving rate of the switch is greater than the preset threshold, confirm that the congestion is sent, and obtain the first packet from the receiving buffer of the switch F.
  • the preset threshold value can be set by the technician according to the capability of the switch or the network capability, which is not limited herein.
  • the switch F can obtain multiple packets from its own receiving buffer, that is, the switch can obtain the second packet in addition to the first packet.
  • the number of the obtained packets may be a preset value, and the obtaining process may be a random acquisition, or a packet may be obtained every multiple packets, which is not limited herein.
  • the switch F determines that the source MAC address of the first packet is a MAC address of the gateway device.
  • the source MAC address of the obtained first packet is the gateway device MAC.
  • the address is used as an example.
  • the source device of the first packet is a gateway device or a device in another sub-network, and the switch F needs to be generated.
  • a congestion control message of the source device of the first packet can be found.
  • the switch F obtains the second packet from the cache, and when the switch F determines that the source MAC address of the second packet is not the MAC address of the gateway device, the source device of the second packet is specified. It is a device in the current sub-network (that is, the Layer 2 network 2). Therefore, the congestion control message generated by the switch F is an existing QCN packet.
  • the QCN message carries the source MAC address of the second packet and the MAC address of the switch, and then the generated FCN packet is sent by the switch F. Assume that the source MAC address of the second packet is MAC C, and the source device of the second packet is determined to be the server C. Then, the second congestion control message as shown in FIG. 6 can be generated.
  • the Flow-ID is an identifier of the data flow to which the second packet belongs.
  • the source MAC address of the first packet may be determined, and when the number of packets obtained in step 502 is multiple, each packet may be used.
  • the source MAC address is judged, so that different packets are processed according to different judgment results. In the embodiment of the present invention, only the processing procedure of one of the packets is taken as an example for description.
  • the switch can obtain the gateway device by obtaining the gateway information set by the network administrator on the switch.
  • the IP address is ARP-detected according to the IP address of the gateway device, and the MAC address of the gateway device is obtained.
  • the source MAC address of the obtained first packet is MAC2
  • the switch F obtains a source IP address of the first packet.
  • the source MAC address of the first packet is the MAC address of the gateway device
  • the traffic that causes the congestion is obtained from the gateway device.
  • the IP layer of the packet is parsed to obtain the source IP address of the packet.
  • the source IP address is the IP address of the gateway device, it can be confirmed that the traffic causing the congestion is from the gateway device. If the source IP address is not the IP address of the gateway device, it can be determined that the traffic causing congestion is from other children.
  • Devices in the network For the sake of convenience, in this embodiment, the IP address IP A of the server A in the Layer 2 network 1 is taken as an example for description.
  • the switch F When the source IP address of the first packet is not the IP address of the gateway device, the switch F generates a first congestion control message according to the source IP address of the first packet, where the first congestion control message includes the gateway device. MAC address, MAC address of switch F, and source IP address of the first packet.
  • the first congestion control message is an extended QCN message, and the extended QCN message is compared with the existing QCN.
  • the source IP address is carried in the payload of the packet.
  • the source IP address of the packet is the IP address of the source device that causes traffic congestion. Based on the example in step 504, a first congestion control message as shown in FIG. 7 can be generated.
  • the switch F sends the first congestion control message to the gateway device 2.
  • the destination MAC address of the first congestion control message is the MAC address of the gateway device 2
  • the source MAC address is the MAC address of the switch F
  • the payload portion carries the IP address of the source device.
  • the The IP address of the source device is IP A.
  • the gateway device 2 receives the first congestion control message, and determines that the gateway device 2 is not a gateway device of the source device corresponding to the source IP address.
  • the gateway device that receives the first congestion control message is not necessarily the gateway device of the sub-network where the source device corresponding to the source IP address is located. Therefore, it is necessary to further determine whether the gateway device is the first A gateway device of the source device corresponding to the IP address carried by the congestion control message determines a manner of processing the first congestion control message.
  • the gateway device is the source device corresponding to the IP address carried by the first congestion control message.
  • the gateway device can directly communicate with the source device, and if the IP address carried by the first congestion control message does not have a corresponding MAC address in the ARP table of the gateway device, the gateway device is not the first A gateway device of the source device corresponding to the IP address carried by the congestion control message, where the gateway device needs to communicate with the source device via a route.
  • the gateway device may generate an IP packet according to the IP address carried by the first congestion control message, and the IP packet is generated.
  • the destination IP address is the IP address carried in the first congestion control message, and the IP packet includes the first congestion control message.
  • the gateway device 2 needs to be routed to find the gateway device 1 of the source device corresponding to the IP address. Therefore, an IP packet needs to be generated for transparent transmission in the Layer 3 network.
  • the IP packet can be a UDP packet, and the source port number and the destination port number of the IP packet are preset port numbers, which are used to indicate the type of the IP packet, that is, the IP packet is used for Congestion control message, the IP packet includes a first congestion control message.
  • the IP packet can be as shown in Figure 8.
  • the IP address of the IP packet is IP A, and the source port number and the destination port number are preset port numbers.
  • the data of the IP packet includes the first congestion control message.
  • the outbound port and the ingress port MAC address of a gateway device are not distinguished, and in a real scenario, the source MAC address of the outbound port packet of each gateway device is The MAC address of the outbound port can be the same.
  • the ingress and egress ports of the gateway device represent gateways of two networks, each with an IP address, and their MAC addresses can be different.
  • the gateway device receives the first congestion control message by using the inbound interface, and the destination MAC address of the first congestion control message is the MAC address of the inbound interface, and then The interface sends an IP packet.
  • the source MAC address of the Ethernet header of the IP packet is the MAC address of the outbound interface.
  • the gateway device receives the first congestion control message through the inbound interface, and the destination MAC address of the first congestion control message is the MAC address of the inbound interface, and the modified interface sends the MAC address of the inbound interface.
  • the first congestion control message, the source MAC address of the modified first congestion control message is the MAC address of the outbound interface, and the destination MAC address is the MAC address of the source device.
  • the gateway device 2 sends the IP packet.
  • the gateway device that receives the first congestion control message is not the gateway device of the source device corresponding to the IP address, the gateway device sends the IP packet to the source device corresponding to the IP address by way of routing according to the destination IP address.
  • the destination gateway device receives the IP packet, obtains the first congestion control message according to the IP packet, obtains the MAC address of the source device according to the destination IP address, and modifies the source MAC address of the first congestion control message. Modifying, by the MAC address of the destination gateway device, the destination MAC address of the first congestion control message to the MAC address of the source device, and sending the modified first congestion control message to the source device, so that the source device controls The traffic is sent, such as stopping traffic transmission or reducing traffic transmission.
  • the destination gateway device is the gateway device of the source device.
  • the destination IP address and the source IP address of the IP packet are unchanged, and only the destination MAC address and the source MAC address in the IP packet are changed, so that the IP packet is obtained.
  • the text can be transparently transmitted between devices of the three-layer network.
  • the gateway device 1 receives the IP packet, determine that the network device 1 is the gateway device of the source device corresponding to the IP packet.
  • the gateway device 1 obtains the first congestion control message from the IP packet, obtains the MAC address of the source device according to the destination IP address, and modifies the source MAC address of the first congestion control message to the destination gateway device.
  • the MAC address is used to modify the destination MAC address of the first congestion control message to the MAC address of the source device.
  • the destination MAC address of the modified first congestion control message is the MAC address of the server A
  • the source MAC address is the MAC address of the gateway device 1.
  • the modification further includes deleting the source IP address from the payload of the first congestion control message, that is, deleting the IP address of the server A.
  • the gateway device 1 sends the modified first congestion control message.
  • the IP address of the source device that causes the congestion is added to the congestion control message, so that when the source device is not in the current Layer 2 network, the congestion control message may be transparently transmitted in the Layer 3 network.
  • packet loss or packet unpreserved in the Layer 3 SAN is avoided.
  • the embodiment of the present invention is specifically described by taking a three-layer network as a two-layer network, and connecting the two two-layer networks through a router or a three-layer switch.
  • the two Layer 2 networks are Layer 2 Network 1 and Layer 2 Network 2.
  • the IP addresses of devices in a Layer 2 network belong to the same IP address pool.
  • the gateway device connecting the Layer 2 network 1 and the Layer 2 network 2 is the gateway device 3, and the MAC address of the port of the gateway device 3 and the Layer 2 network 2 is MACi, and the MAC address of the port of the gateway device 3 and the Layer 2 network 1 is MACo.
  • Layer 2 network 1 includes switch E, and server A (MAC address is MAC A) and server B (MAC address is MAC B) connected to switch E.
  • server A MAC address is MAC A
  • server B MAC address is MAC B
  • the Layer 2 network 2 includes a switch F (MAC address is MAC F), a server C (MAC address is MAC C) connected to the switch F, and a server D (MAC address is MAC D), a switch G, and the switch G. Connected memory 1 and memory 2, switch F and switch G are connected.
  • switch F MAC address is MAC F
  • server C MAC address is MAC C
  • server D MAC address is MAC D
  • the congestion control method provided by the embodiment of the present invention is described in detail based on the network architecture in FIG. 10. Referring to FIG. 11, the specific steps of the congestion control method are as follows:
  • the switch in the Layer 2 network 2 detects the receiving rate of itself in real time.
  • the switch F When the switch F detects that its receiving rate is greater than the preset threshold, it confirms that congestion occurs and obtains the third packet from its own receiving buffer.
  • the switch F determines that the source MAC address of the third packet is a MAC address of the gateway device.
  • the switch F obtains a source IP address of the third packet.
  • the switch F When the source IP address of the third packet is not the IP address of the gateway device 3, the switch F generates a first congestion control message according to the source IP address of the packet, where the first congestion control message includes the gateway device MAC address. Address, MAC address of switch F, and source IP address of the packet. 1106. The switch F sends the first congestion control message to the gateway device 3.
  • gateway device 3 When the gateway device 3 receives the first congestion control message, determine that the gateway device 3 is a gateway device of the source device corresponding to the IP address.
  • steps 1101-1107 are the same as steps 501-507, and are not described herein again.
  • the gateway device 3 is a gateway device of the source device corresponding to the IP address.
  • the gateway device 3 acquires a MAC address of the source device according to the IP address, and generates a second congestion control message according to the first congestion control message and a MAC address of the source device, where the second congestion control message is The destination MAC address is the MAC address of the source device.
  • the gateway device 3 may obtain the device MAC address corresponding to the IP address included in the first congestion control message from the ARP table, and generate a second congestion control message. If the source of the congestion is the server A, the generated second congestion control message may be as shown in FIG. 9. The source MAC address of the generated second congestion control message is the MAC address of the gateway device 3 The destination MAC address is the MAC address MAC A of server A.
  • the gateway device 3 sends the second congestion control message to the server A according to the destination MAC address.
  • FIG. 12 is a schematic structural diagram of a congestion control apparatus according to an embodiment of the present invention. Referring to Figure 12, the device includes:
  • the first obtaining module 1201 is configured to: when detecting that the switching device is congested, obtain the first packet from the receiving buffer of the switching device;
  • the second obtaining module 1202 is configured to obtain a source IP address of the first packet when the source MAC address of the first packet is a MAC address of the gateway device.
  • the generating module 1203 is configured to generate, according to the source IP address of the first packet, a first congestion control message, where the source IP address is not the IP address of the gateway device, where the first congestion control message includes the gateway device MAC address The MAC address of the switching device and the source IP address of the first packet.
  • the sending module 1204 is configured to send the first congestion control message to the gateway device.
  • the source IP address of the first packet is in a payload of the first congestion control message.
  • the first obtaining module 1201 is further configured to obtain a second packet from the receiving buffer of the switching device.
  • the generating module 1203 is further configured to: when the source MAC address of the second packet is not the MAC address of the gateway device. At the address, a second congestion control message is generated, where the second congestion control message includes a source MAC address of the second packet and a MAC address of the switching device.
  • FIG. 13 is a schematic structural diagram of a congestion control apparatus according to an embodiment of the present invention. Referring to FIG.
  • the method includes: a receiving module 1301, configured to: when a congestion occurs, receive a first congestion control message, where the first congestion control message includes a MAC address of the gateway device, a MAC address of the switching device, and an IP address of the source device;
  • the source device is a device that sends traffic causing congestion;
  • the generating module 1302 is configured to generate a second congestion control message according to the first congestion control message and an IP address of the source device.
  • the sending module 1303 is configured to send the second congestion control message, where the second congestion control message is used to enable the source device to control traffic transmission.
  • the source MAC address of the first congestion control message is a MAC address of the switching device
  • the destination MAC address is a MAC address of the gateway device
  • the IP address of the source device is carried in a payload of the first congestion control message.
  • the generating module is configured to determine, according to an IP address of the source device, whether the gateway device is a gateway device of the source device; if the gateway device is a gateway device of the source device, the gateway device obtains according to the IP address. Generating, by the MAC address of the source device, the second congestion control message according to the first congestion control message and the MAC address of the source device, where the destination MAC address of the second congestion control message is a MAC address of the source device; The module is further configured to send the second congestion control message to the source device according to the destination MAC address.
  • the generating module is configured to determine, according to an IP address of the source device, whether the gateway device is a gateway device of the source device;
  • the gateway device is not the gateway device of the source device, generate a second congestion control message according to the first congestion control message, where the destination IP address of the second congestion control message is an IP address of the source device, and the second congestion control message Carrying the first congestion control message; the second congestion control message is an IP packet.
  • the sending module is configured to send, by using a route, the second congestion control message to the source device according to the destination IP address of the second congestion control message, so that the destination gateway device receives the second congestion control message.
  • the device is the gateway device of the source device.
  • the second congestion control message further includes a source port number and a destination port number, where the source port number and the destination port number are preset port numbers, and are used to indicate the type of the second congestion control message.
  • FIG. 14 is a schematic structural diagram of a switching device according to an embodiment of the present invention. As shown in FIG.
  • the switching device includes a transmitter 1402, a receiver 1401, a memory 1403, and a processor 1404 connected to the transmitter 1402, the receiver 1401, and the memory 1403, respectively; of course, the switching device may further include an input and an output.
  • the present invention does not impose any limitation on the general components of the device.
  • the memory 1403 stores a set of program codes
  • the processor 1404 is configured to invoke the program code stored in the memory 1403 to perform the following operations:
  • the first packet from the receiving buffer of the switching device when detecting that the switching device is congested; and acquiring the first packet when the source MAC address of the first packet is the MAC address of the gateway device And generating a first congestion control message according to the source IP address of the first packet, where the source IP address is not the IP address of the gateway device, where the first congestion control message includes the a gateway device MAC address, a MAC address of the switching device, and a source IP address of the first packet; and sending the first congestion control message to the gateway device.
  • the source IP address of the first packet is located in a payload of the first congestion control message.
  • it is also used to do the following:
  • FIG. 15 is a schematic structural diagram of a gateway device according to an embodiment of the present invention. As shown in FIG.
  • the off device includes a transmitter 1502, a receiver 1501, a memory 1503, and a processor 1504 connected to the transmitter 1502, the receiver 1501, and the memory 1503, respectively; the memory 1503 stores a set of program codes, and the processor 1504 is configured to call
  • the program code stored in the memory 1503 is configured to: when a congestion occurs, the gateway device receives a first congestion control message, where the first congestion control message includes a MAC address of the gateway device, and a MAC of the switching device The address and the IP address of the source device; the source device is a device that sends the traffic causing the congestion; generates a second congestion control message according to the first congestion control message and the IP address of the source device; a congestion control message, where the second congestion control message is used to enable the source device to control traffic transmission.
  • the source MAC address of the first congestion control message is the MAC address of the switching device
  • the destination MAC address is the MAC address of the gateway device
  • the IP address of the source device carries the payload of the first congestion control message. In the payload.
  • the gateway device Determining, according to the IP address of the source device, whether the gateway device is a gateway device of the source device; if the gateway device is a gateway device of the source device, the gateway device acquires the And generating, by the MAC address of the source device, the second congestion control message according to the first congestion control message and the MAC address of the source device, where a destination MAC address of the second congestion control message is a MAC address of the source device Address
  • the sending the second congestion control message includes:
  • the gateway device Determining, according to the IP address of the source device, whether the gateway device is a gateway device of the source device; if the gateway device is not a gateway device of the source device, the gateway device according to the first congestion control message And generating a second congestion control message, where the destination IP address of the second congestion control message is an IP address of the source device, the second congestion control message carries the first congestion control message, and the second congestion control message For IP packets.
  • the second congestion control message Sending, according to the destination IP address of the second congestion control message, the second congestion control message to the source device by using a route, so that after the destination gateway device receives the second congestion control message, the Acquiring the first congestion control message in the second congestion control message, and acquiring the source device according to the destination IP address a MAC address, modifying a source MAC address of the first congestion control message to a MAC address of the destination gateway device, modifying a destination MAC address of the first congestion control message to a MAC address of the source device, and The source device sends the modified first congestion control message, so that the source device controls the sending of the traffic; the destination gateway device is the gateway device of the source device.
  • the second congestion control message further includes a source port number and a destination port number, where the source port number and the destination port number are preset port numbers, and are used to indicate the type of the second congestion control message.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种拥塞控制方法、装置及设备,属于通信技术领域。方法包括:当检测到交换设备发生拥塞时,从交换设备的接收缓存中获取第一报文;当所述第一报文的源MAC地址为网关设备的MAC地址时,获取所述第一报文的源IP地址;当所述源IP地址不是所述网关设备的IP地址时,根据所述第一报文的源IP地址,生成第一拥塞控制消息,所述第一拥塞控制消息包括所述网关设备MAC地址、所述交换设备的MAC地址和所述第一报文的源IP地址;向所述网关设备发送所述第一拥塞控制消息。本发明实现对三层SAN中的拥塞控制,避免了三层SAN发生丢包或者报文不保序等现象。

Description

拥塞控制方法、 装置及设备 本申请要求于 2014年 2月 19日提交中国专利局、 申请号为 201410055899.7、 发明 名称为 "拥塞控制方法、 装置及设备"的中国专利申请的优先权, 其全部内容通过引用结 合在本申请中。 技术领域 本发明涉及通信技术领域, 特别涉及一种拥塞控制方法、 装置及设备。 背景技术 存储区域网络 (英文: Storage Area Network, 缩写: SAN) 网络是一种高速网络。 由于 SAN主要提供在计算机与存储设备之间的数据传输, 因此, 对丢包很敏感, 且要 求报文在传输过程中保序。
为了避免丢包, SAN提供了一种拥塞通知机制, 即量化拥塞通知(英文: Quantized Congestion Notification, 缩写: QCN), 当交换机出端口的某个队列发生拥塞时, 所述交 换机随机从该队列中获取一个或几个报文, 通知上游设备停止发送该报文所属的数据 流, 直到拥塞解除。
图 1是 QCN技术的工作原理的示意图。 参见图 1, 服务器 1、 服务器 2通过 SAN 发送流量给服务器 3。 当交换设备检测到发生流量拥塞时, 交换设备从自身的缓存队列 中获取报文, 确定发送所述报文的服务器, 例如为服务器 1, 因此, 交换设备发送 QCN 报文到服务器 1, 通知服务器 1减少流量。
在实现本发明的过程中, 发明人发现现有技术至少存在以下问题:
由于 QCN报文是二层报文, 其目的 MAC地址标识了导致流量拥塞的源设备, 因 此 QCN报文只能发送给同一个二层网络里的设备。当引起拥塞的流量来自三层网络时, QCN报文都被发送到连接所述交换设备的网关设备, 而网关设备并不是真正的发送引 起拥塞的流量的源设备, 因此 QCN报文不能到达源设备, 无法进行拥塞控制。 发明内容
为了解决三层 SAN场景下的流量拥塞问题, 本发明提供了一种拥塞控制方法、 装 置及设备。 所述技术方案如下:
第一方面, 提供了一种拥塞控制方法, 所述方法包括: 当检测到交换设备发生拥塞时, 从所述交换设备的接收缓存中获取第一报文; 当所述第一报文的源 MAC地址为网关设备的 MAC地址时, 获取所述第一报文的 源 IP地址;
当所述源 IP地址不是所述网关设备的 IP地址时, 根据所述第一报文的源 IP地址, 生成第一拥塞控制消息, 所述第一拥塞控制消息包括所述网关设备 MAC地址、 所述交 换设备的 MAC地址和所述第一报文的源 IP地址;
向所述网关设备发送所述第一拥塞控制消息。
结合第一方面, 在第一方面提供的第一种可能实现方式中, 所述第一报文的源 IP 地址位于所述第一拥塞控制消息的载荷 payload中。
结合第一方面的上述任一种可能实现方式,在第一方面提供的第二种可能实现方式 中, 从所述交换设备的接收缓存中获取第二报文; 当所述第二报文的源 MAC地址不是 所述网关设备的 MAC地址时, 生成第二拥塞控制消息, 所述第二拥塞控制消息包括所 述第二报文的源 MAC地址和所述交换设备的 MAC地址。
第二方面, 提供了一种拥塞控制方法, 包括: 当发生拥塞时, 网关设备接收第一拥 塞控制消息,所述第一拥塞控制消息包括所述网关设备的 MAC地址、交换设备的 MAC 地址和源设备的 IP地址; 所述源设备为发送引起拥塞的流量的设备; 根据所述第一拥 塞控制消息以及所述源设备的 IP地址, 生成第二拥塞控制消息; 发送所述第二拥塞控 制消息, 所述第二拥塞控制消息用于使所述源设备控制流量发送。
结合第二方面, 在第二方面提供的第一种可能实现方式中, 所述第一拥塞控制消息 的源 MAC地址为所述交换设备的 MAC地址, 目的 MAC地址为所述网关设备的 MAC 地址, 所述源设备的 IP地址携带在所述第一拥塞控制消息的载荷 payload中。
结合第二方面的上述任一种可能实现方式,在第二方面提供的第二种可能实现方式 中, 所述根据所述第一拥塞控制消息以及所述源设备的 IP地址, 生成第二拥塞控制消 息包括:
根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备; 如 果所述网关设备为所述源设备的网关设备, 所述网关设备根据所述 IP地址获取所述源 设备的 MAC地址, 根据所述第一拥塞控制消息以及所述源设备的 MAC地址, 生成所 述第二拥塞控制消息, 所述第二拥塞控制消息的目的 MAC地址为所述源设备的 MAC 地址; 所述发送所述第二拥塞控制消息包括根据所述目的 MAC地址向所述源设备发送 所述第二拥塞控制消息。 结合第二方面的上述任一种可能实现方式,在第二方面提供的第三种可能实现方式 中, 所述根据所述第一拥塞控制消息以及所述源设备的 IP地址, 生成第二拥塞控制消 息包括: 根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备; 如果所述网关设备不是所述源设备的网关设备,所述网关设备根据所述第一拥塞控制消 息生成第二拥塞控制消息, 所述第二拥塞控制消息的目的 IP地址为所述源设备的 IP地 址, 所述第二拥塞控制消息携带所述第一拥塞控制消息; 所述第二拥塞控制消息为 IP 报文。
结合第二方面的上述任一种可能实现方式,在第二方面提供的第四种可能实现方式 中, 所述发送所述第二拥塞控制消息包括包括:
根据所述第二拥塞控制消息的目的 IP地址, 通过路由的方式向所述源设备发送所 述第二拥塞控制消息, 使得目的网关设备接收到所述第二拥塞控制消息后, 从所述第二 拥塞控制消息中获取所述第一拥塞控制消息, 根据所述目的 IP地址获取所述源设备的
MAC地址, 将所述第一拥塞控制消息的源 MAC地址修改为所述目的网关设备的 MAC 地址, 将所述第一拥塞控制消息的目的 MAC地址修改为所述源设备的 MAC地址, 并 向所述源设备发送所述修改后的第一拥塞控制消息, 使得所述源设备控制流量发送; 所 述目的网关设备为所述源设备的网关设备。
结合第二方面的上述任一种可能实现方式,在第二方面提供的第五种可能实现方式 中, 所述第二拥塞控制消息还包括源端口号和目的端口号, 所述源端口号和目的端口号 为预设端口号, 用于表明所述第二拥塞控制消息的类型。
第三方面, 提供了一种拥塞控制装置, 所述装置包括:
第一获取模块, 用于当检测到交换设备发生拥塞时, 从所述交换设备的接收缓存中 获取第一报文;
第二获取模块, 用于当所述第一报文的源 MAC地址为网关设备的 MAC地址时, 获取所述第一报文的源 IP地址;
生成模块, 用于当所述源 IP地址不是所述网关设备的 IP地址时, 根据所述第一报 文的源 IP地址,生成第一拥塞控制消息,所述第一拥塞控制消息包括所述网关设备 MAC 地址、 所述交换设备的 MAC地址和所述第一报文的源 IP地址;
发送模块, 用于向所述网关设备发送所述第一拥塞控制消息。
结合第三方面, 在第三方面提供的第一种可能实现方式中, 所述第一报文的源 IP 地址位于所述第一拥塞控制消息的载荷 payload中。 结合第三方面的上述任一种可能实现方式,在第三方面提供的第二种可能实现方式 中, 所述第一获取模块还用于从所述交换设备的接收缓存中获取第二报文; 所述生成模 块还用于当所述第二报文的源 MAC地址不是所述网关设备的 MAC地址时, 生成第二 拥塞控制消息, 所述第二拥塞控制消息包括所述第二报文的源 MAC地址和所述交换设 备的 MAC地址。
第四方面, 提供了一种拥塞控制装置, 其特征在于, 包括:
接收模块, 用于当发生拥塞时, 接收第一拥塞控制消息, 所述第一拥塞控制消息包 括所述网关设备的 MAC地址、 交换设备的 MAC地址和源设备的 IP地址; 所述源设备 为发送引起拥塞的流量的设备;
生成模块, 用于根据所述第一拥塞控制消息以及所述源设备的 IP地址, 生成第二 拥塞控制消息;
发送模块, 用于发送所述第二拥塞控制消息, 所述第二拥塞控制消息用于使所述源 设备控制流量发送。
结合第四方面, 在第四方面提供的第一种可能实现方式中, 所述第一拥塞控制消息 的源 MAC地址为所述交换设备的 MAC地址, 目的 MAC地址为所述网关设备的 MAC 地址, 所述源设备的 IP地址携带在所述第一拥塞控制消息的载荷 payload中。
结合第四方面的上述任一种可能实现方式,在第四方面提供的第二种可能实现方式 中, 所述生成模块用于根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设 备的网关设备; 如果所述网关设备为所述源设备的网关设备, 所述网关设备根据所述 IP 地址获取所述源设备的 MAC地址,根据所述第一拥塞控制消息以及所述源设备的 MAC 地址, 生成所述第二拥塞控制消息, 所述第二拥塞控制消息的目的 MAC地址为所述源 设备的 MAC地址; 所述发送模块还用于根据所述目的 MAC地址向所述源设备发送所 述第二拥塞控制消息。
结合第四方面的上述任一种可能实现方式,在第四方面提供的第三种可能实现方式 中所述生成模块用于根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设备 的网关设备;
如果所述网关设备不是所述源设备的网关设备,所述网关设备根据所述第一拥塞控 制消息生成第二拥塞控制消息, 所述第二拥塞控制消息的目的 IP地址为所述源设备的 IP地址, 所述第二拥塞控制消息携带所述第一拥塞控制消息; 所述第二拥塞控制消息为 IP报文。 结合第四方面的上述任一种可能实现方式,在第四方面提供的第四种可能实现方式 中, 所述发送模块用于根据所述第二拥塞控制消息的目的 IP地址, 通过路由的方式向 所述源设备发送所述第二拥塞控制消息, 使得目的网关设备接收到所述第二拥塞控制消 息后, 从所述第二拥塞控制消息中获取所述第一拥塞控制消息, 根据所述目的 IP地址 获取所述源设备的 MAC地址, 将所述第一拥塞控制消息的源 MAC地址修改为所述目 的网关设备的 MAC地址, 将所述第一拥塞控制消息的目的 MAC地址修改为所述源设 备的 MAC地址, 并向所述源设备发送所述修改后的第一拥塞控制消息, 使得所述源设 备控制流量发送; 所述目的网关设备为所述源设备的网关设备。
结合第四方面的上述任一种可能实现方式,在第四方面提供的第五种可能实现方式 中, 所述第二拥塞控制消息还包括源端口号和目的端口号, 所述源端口号和目的端口号 为预设端口号, 用于表明所述第二拥塞控制消息的类型。
本发明实施例提供的技术方案带来的有益效果是:
通过在拥塞控制消息中添加导致拥塞的源设备的 IP地址, 使得当所述源设备不处于 当前二层网络中时, 可以将所述拥塞控制消息在三层网络中透传, 以实现对三层 SAN中 的拥塞控制, 避免了三层 SAN发生丢包或者报文不保序等现象。 附图说明 为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用 的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对 于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得 其他的附图。
图 1是 QCN技术的工作原理的示意图;
图 2是本发明实施例提供的一种拥塞控制方法的流程图;
图 3是本发明实施例提供的一种拥塞控制方法的流程图;
图 4是本发明实施例提供的一种三层 SAN架构示意图;
图 5是本发明实施例提供的另一种拥塞控制方法的流程图;
图 6是本发明实施例提供的一种拥塞控制消息结构示意图;
图 7是本发明实施例提供的另一种拥塞控制消息结构示意图;
图 8是本发明实施例提供的又一种拥塞控制消息结构示意图;
图 9是本发明实施例提供的再一种拥塞控制消息结构示意图; 图 10是本发明实施例提供的另一种三层 SAN架构示意图;
图 11是本发明实施例提供的另一种拥塞控制方法的流程图;
图 12是本发明实施例提供的一种拥塞控制装置的结构示意图;
图 13是本发明实施例提供的另一种拥塞控制装置的结构示意图;
图 14是本发明实施例提供的一种交换设备的结构示意图;
图 15是本发明实施例提供的一种网关设备的结构示意图。 具体实施方式 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施方式 作进一步地详细描述。
图 2是本发明实施例提供的一种拥塞控制方法的流程图。所述方法应用于三层 SAN 中, 参见图 2, 该方法包括:
201、 当检测到交换设备发生拥塞时, 从所述交换设备的接收缓存中获取第一报文。 所述拥塞可以通过多种方式检测, 具体请参考对步骤 501的说明。
202、 当该第一报文的源 MAC地址为网关设备 MAC地址时, 获取该第一报文的源
IP地址。
203、当所述第一报文的源 IP地址不是所述网关设备的 IP地址时,根据该第一报文 的源 IP地址,生成第一拥塞控制消息,该第一拥塞控制消息包括该网关设备 MAC地址、 该交换设备的 MAC地址和该第一报文的源 IP地址。
204、 向该网关设备的 MAC地址发送该第一拥塞控制消息。
所述第一拥塞控制消息用于使所述网关设备接收到该第一拥塞控制消息时,将该第 一拥塞控制消息发送至该源 IP地址对应的源设备, 使得该源设备控制流量发送。
其中, 所述第一拥塞控制消息为扩展的 QCN报文。 所述扩展的 QCN报文的载荷 payload中包括了所述第一报文的源 IP地址。
图 3 是本发明实施例提供的另一种拥塞控制方法的流程图。 所述方法应用于三层
SAN中, 参见图 3, 该方法包括:
301、 当发生拥塞时, 网关设备接收第一拥塞控制消息, 该第一拥塞控制消息包括 所述网关设备的 MAC地址、 交换设备的 MAC地址和源设备的 IP地址; 所述源设备为 发送引起所述拥塞的流量的设备。
302、 根据该第一拥塞控制消息以及所述源设备的 IP地址生成第二拥塞控制消息。 303、 发送所述第二拥塞控制消息, 所述第二拥塞控制消息用于使所述源设备控制 流量发送。
首先, 以三层 SAN包括两个二层网络, 所述两个二层网络之间通过一个三层网络 相连, 三层网络中包括多个路由器或者核心交换设备为例对本发明实施例进行具体说 明。
参见图 4, 该两个二层网络分别为二层网络 1和二层网络 2, 一个二层网络中设备 的 IP地址均属于同一个 IP地址池。
二层网络 1中包括交换机 E, 以及与交换机 E相连的服务器 A (MAC地址为 MAC A) 和服务器 B (MAC地址为 MAC B), 该二层网络 1具有网关设备 1 (MAC地址为 MAC1 )。
二层网络 2中包括交换机 F (MAC地址为 MAC F)、 以及与交换机 F相连的服务器 C (MAC地址为 MAC C)和服务器 D (MAC地址为 MAC D)、 交换机 G、 以及与该交 换机 G相连的存储器 1和存储器 2,交换机 F和交换机 G相连,该二层网络 1具有网关 设备 2 (MAC地址为 MAC2)。
下面,基于图 4中的网络架构,详细对本发明实施例提供的拥塞控制方法进行说明, 参见图 5, 该拥塞控制方法的具体步骤如下:
501、 二层网络 2中的交换机 F实时对自身的接收速率进行检测。
本发明实施例是通过交换机 F对自身的接收速率进行检测,以获知交换机 F是否发 生拥塞, 而在本发明提供的另一实施例中, 还可以由交换机检测接收速率和发送速率, 判断接收速率是否大于发送速率,当接收速率大于发送速率时,确定交换机 F发生拥塞, 当然,还可以通过交换机检测接收缓存数据量是否大于发送缓存数据量的方式来确定是 否发生拥塞, 本发明实施例对此不做限定。
502、 当交换机 F检测到自身的接收速率大于预设门限值时, 确认发送拥塞, 从交 换机 F的自身的接收缓存中获取第一报文。
该预设门限值可以由技术人员根据交换机的能力或网络能力设置, 在此不做限定。 交换机 F可以从自身的接收缓存中获取多个报文, 即除了该第一报文外, 交换机还可以 获取第二报文。 获取的报文的数目可以为预设数值, 其获取过程可以为随机获取, 或是 每隔多个报文获取一个报文, 在此不做限定。
503、 交换机 F确定该第一报文的源 MAC地址是网关设备的 MAC地址。
在本发明一个实施方式中, 以所获取的第一报文的源 MAC地址为网关设备 MAC 地址为例进行说明, 当确定第一报文的源 MAC地址为网关设备的 MAC地址时, 说明 该第一报文的源设备是网关设备或另一个子网络中的设备, 则交换机 F需要生成能够 寻找到该第一报文的源设备的拥塞控制消息。
在本发明一个实施方式中, 交换机 F从缓存中获取第二报文, 当交换机 F确定该第 二报文的源 MAC地址不是该网关设备的 MAC地址时, 说明该第二报文的源设备是当 前子网络(即二层网络 2)中的设备, 因此, 交换机 F生产的拥塞控制消息即为现有的 QCN报文。该 QCN报文携带包括该第二报文的源 MAC地址和该交换机的 MAC地址, 然后,由交换机 F发送生成的 QCN报文。假设,该第二报文的源 MAC地址为 MAC C, 则确定该第二报文的源设备为服务器 C, 那么, 可以生成如图 6所示的第二拥塞控制 消息。 其中, Flow-ID是该第二报文所属的数据流的标识。
如果在步骤 502中仅获取了第一报文, 则可以对该第一报文的源 MAC地址进行判 断, 而当步骤 502中所获取的报文为多个时, 则可以对每一个报文的源 MAC地址进行 判断, 从而根据不同的判断结果对不同的报文进行处理。 在本发明实施例中, 仅以对其 中一个报文的处理过程为例进行说明。
该交换机可以通过获取网络管理员在交换机上设置的网关信息获取该网关设备的
IP地址, 根据该网关设备的 IP地址进行 ARP探测, 得到该网关设备的 MAC地址。
对于如图 4的网络架构来说, 如果获取的第一报文的源 MAC地址为 MAC2, 则可 以确定该报文的源 MAC地址是网关设备的 MAC地址。
504、 交换机 F获取该第一报文的源 IP地址。
如前所述, 对于所获取的第一报文的源 MAC地址为网关设备的 MAC地址的场景 下, 则可以认为造成拥塞的流量(即该第一报文所属的数据流)来自于网关设备或其他 子网络中的设备, 则对该报文的 IP层进行解析, 以得到报文的源 IP地址。
当然, 如果其中源 IP地址为网关设备的 IP地址, 则可以确认该造成拥塞的流量来 自于网关设备, 如果源 IP地址不是网关设备的 IP地址, 则可以确定该造成拥塞的流量 来自于其他子网络中的设备。 为了便于说明, 在本实施例中, 仅以该报文的源 IP地址 为二层网络 1中的服务器 A的 IP地址 IP A为例进行说明。
505、 当该第一报文的源 IP地址不是网关设备的 IP地址时, 交换机 F根据该第一 报文的源 IP地址, 生成第一拥塞控制消息, 该第一拥塞控制消息包括该网关设备 MAC 地址、 交换机 F的 MAC地址和该第一报文的源 IP地址。
该第一拥塞控制消息为扩展的 QCN报文, 与现有的 QCN相比, 该扩展的 QCN报 文的载荷中携带了该源 IP地址, 该报文的源 IP地址为造成流量拥塞的源设备的 IP地 址。 基于步骤 504中的示例, 可以生成如图 7所示的第一拥塞控制消息。
506、 交换机 F向该网关设备 2发送该第一拥塞控制消息。
此时的第一拥塞控制消息的目的 MAC地址为网关设备 2的 MAC地址, 源 MAC 地址为交换机 F的 MAC地址, 而其载荷部分携带该源设备的 IP地址, 基于步骤 504 中的示例, 该源设备的 IP地址为 IP A。
507、 网关设备 2接收该第一拥塞控制消息, 并确定该网关设备 2不是该源 IP地 址对应的源设备的网关设备。
由于网络架构的复杂度较高, 因此, 接收到第一拥塞控制消息的网关设备不一定是 该源 IP地址对应的源设备所在子网络的网关设备, 因此, 需要进一步判断网关设备是 否为该第一拥塞控制消息所携带的 IP地址对应的源设备的网关设备, 以确定对该第一 拥塞控制消息的处理方式。
具体地, 该如果该第一拥塞控制消息所携带的 IP地址在网关设备的 ARP表中有相 应的 MAC地址,则说明该网关设备为该第一拥塞控制消息所携带的 IP地址对应的源设 备的网关设备, 该网关设备可以直接与该源设备通信, 而如果该第一拥塞控制消息所携 带的 IP地址在网关设备的 ARP表中没有相应的 MAC地址, 则说明该网关设备不是该 第一拥塞控制消息所携带的 IP地址对应的源设备的网关设备, 该网关设备需要经由路 由与该源设备通信。
508、 根据该第一拥塞控制消息生成 IP报文, 该 IP报文的目的 IP地址为该第一拥 塞控制消息携带的 IP地址, 该 IP报文包括该第一拥塞控制消息。
在确定该网关设备不是该第一拥塞控制消息所携带的 IP地址对应的源设备的网关 设备后, 网关设备可以根据该第一拥塞控制消息所携带的 IP地址, 生成 IP报文, 该 IP 报文的目的 IP地址为该第一拥塞控制消息携带的 IP地址,该 IP报文包括该第一拥塞控 制消息。
该网关设备 2需要经由路由, 才能够找到与该 IP地址对应的源设备的网关设备 1, 因此, 需要生成一个 IP报文以便在三层网络中透传。
可选地, 该 IP报文可以为 UDP报文, IP报文的源端口号和目的端口号为预设端 口号, 用于表明该 IP报文的类型, 即表明该 IP报文为用于拥塞控制的消息, 该 IP报文 包括第一拥塞控制消息。
则基于图 4的网络架构, 如果源设备为服务器 A时, 该 IP报文可以为如图 8所示 的结构, 其中, IP报文的目的 IP地址为 IP A, 源端口号和目的端口号均为预设端口号, IP报文的数据包括所述第一拥塞控制消息。
另外, 需要说明的是, 在本发明实施例中并没有对一个网关设备的出端口和入端口 MAC地址进行区分, 而在现实场景中, 每个网关设备的出端口报文的源 MAC地址和 出端口的 MAC地址保持一致即可。 对于三层转发场景下, 网关设备的入端口和出端口 代表了 2个网络的网关, 各自有个 IP地址, 它们的 MAC地址可以不同。对于需要把第 一拥塞控制消息改成 IP报文转发的场景, 网关设备通过入接口接收第一拥塞控制消息, 该第一拥塞控制消息的目的 MAC地址是入接口的 MAC地址, 然后, 从出接口发送 IP 报文, 这个 IP报文的以太头的源 MAC地址是出接口的 MAC地址。 而对于通过网关设 备就是源设备的网关设备的场景, 网关设备通过入接口接收第一拥塞控制消息, 第一拥 塞控制消息的目的 MAC地址是入接口的 MAC地址, 通过出接口发送的是修改后的第 一拥塞控制消息,该修改后的第一拥塞控制消息的源 MAC地址是出接口的 MAC地址, 目的 MAC地址为源设备的 MAC地址。
509、 网关设备 2发送该 IP报文。
如果该接收到第一拥塞控制消息的网关设备不是该 IP地址对应的源设备的网关设 备, 则该网关设备根据该目的 IP地址, 通过路由的方式向该 IP地址对应的源设备发送 该 IP报文,使得目的网关设备接收到 IP报文,根据该 IP报文获取该第一拥塞控制消息, 根据该目的 IP地址获取该源设备的 MAC地址, 将该第一拥塞控制消息的源 MAC地址 修改为该目的网关设备的 MAC地址, 将该第一拥塞控制消息的目的 MAC地址修改为 该源设备的 MAC地址, 并向该源设备发送该修改后的第一拥塞控制消息, 使得该源设 备控制流量发送, 如停止流量发送或者减小流量发送等, 该目的网关设备为该源设备的 网关设备。
需要说明的是, 在进行三层转发的过程中, 该 IP报文的目的 IP地址和源 IP地址不 变, 变化的仅是 IP报文中的目的 MAC地址和源 MAC地址, 以使得 IP报文能够在三 层网络的设备之间进行透传。
510、当网关设备 1接收到该 IP报文时,确定网络设备 1是该 IP报文对应的源设备 的网关设备。
511、 网关设备 1对从该 IP报文中获取第一拥塞控制消息,根据该目的 IP地址获取 该源设备的 MAC地址,将该第一拥塞控制消息的源 MAC地址修改为该目的网关设备 的 MAC地址,将该第一拥塞控制消息的目的 MAC地址修改为该源设备的 MAC地址。 此时, 修改后的第一拥塞控制消息的目的 MAC地址为服务器 A的 MAC地址, 源 MAC地址为该网关设备 1的 MAC地址。
该修改还包括从该第一拥塞控制消息的载荷中该源 IP地址, 即删除该服务器 A的 IP地址。
512、 网关设备 1发送该修改后的第一拥塞控制消息。
513、 当服务器 A接收到该修改后的第一拥塞控制消息时, 进行流量控制。
在本发明实施例中, 通过在拥塞控制消息中添加导致拥塞的源设备的 IP地址, 使 得当源设备不处于当前二层网络中时, 可以将该拥塞控制消息在三层网络中透传, 以实 现对三层 SAN中的拥塞控制, 避免了三层 SAN发生丢包或者报文不保序等现象。
然后, 以三层 SAN包括两个二层网络, 该两个二层网络之间通过一个路由器或者 三层交换机相连为例对本发明实施例进行具体说明。
参见图 10, 该两个二层网络分别为二层网络 1和二层网络 2, 一个二层网络中设备 的 IP地址均属于同一个 IP地址池。 连接二层网络 1和二层网络 2的网关设备为网关设 备 3, 该网关设备 3与二层网络 2的端口的 MAC地址为 MACi, 该网关设备 3与二层 网络 1的端口的 MAC地址为 MACo。
二层网络 1中包括交换机 E, 以及与交换机 E相连的服务器 A (MAC地址为 MAC A) 和服务器 B (MAC地址为 MAC B)。
二层网络 2中包括交换机 F (MAC地址为 MAC F)、 以及与交换机 F相连的服务器 C (MAC地址为 MAC C)和服务器 D (MAC地址为 MAC D)、 交换机 G、 以及与该交 换机 G相连的存储器 1和存储器 2, 交换机 F和交换机 G相连。
下面, 基于图 10中的网络架构, 详细对本发明实施例提供的拥塞控制方法进行说 明, 参见图 11, 该拥塞控制方法的具体步骤如下:
1101、 二层网络 2中的交换机 F实时对自身的接收速率进行检测。
1102、 当交换机 F检测到自身的接收速率大于预设门限值时, 确认发生拥塞, 从自 身的接收缓存中获取第三报文。
1103、 交换机 F确定该第三报文的源 MAC地址是网关设备的 MAC地址。
1104、 交换机 F获取该第三报文的源 IP地址。
1105、 当该第三报文的源 IP地址不是网关设备 3的 IP地址时, 交换机 F根据该报 文的源 IP地址, 生成第一拥塞控制消息, 该第一拥塞控制消息包括该网关设备 MAC地 址、 交换机 F的 MAC地址和该报文的源 IP地址。 1106、 交换机 F向该网关设备 3发送该第一拥塞控制消息。
1107、 当网关设备 3接收到第一拥塞控制消息, 确定该网关设备 3是该 IP地址对 应的源设备的网关设备。
上述步骤 1101-1107与步骤 501-507同理, 在此不再赘述。
在本发明实施例中, 由于两个二层网络之间仅具有一个路由器或者三层交换机如网 关设备 3, 则可以确定该网关设备 3是该 IP地址对应的源设备的网关设备。
1108、 网关设备 3根据所述 IP地址获取所述源设备的 MAC地址, 根据所述第一拥 塞控制消息以及所述源设备的 MAC地址, 生成第二拥塞控制消息, 该第二拥塞控制消 息的目的 MAC地址为所述源设备的 MAC地址。
在确定该网关设备 3为源设备的网关设备后, 网关设备 3可以从 ARP表中获取该 第一拥塞控制消息所包括的 IP地址相应的设备 MAC地址, 生成第二拥塞控制消息。如 果仍以拥塞源为服务器 A为例, 则该生成的第二拥塞控制消息可以如图 9所示的结构, 其中, 生成的第二拥塞控制消息的源 MAC地址为网关设备 3的 MAC地址 MACo, 目 的 MAC地址为服务器 A的 MAC地址 MAC A。
1109、 网关设备 3根据该目的 MAC地址向服务器 A发送该第二拥塞控制消息。
1110、 当服务器 A接收到该目的 MAC地址为 MAC A的第二拥塞控制消息时, 进 行流量控制。
该流量控制包括但不限于停止流量发送或减小流量发送等。 图 12是本发明实施例提供的一种拥塞控制装置的结构示意图。 参见图 12, 该装置 包括:
第一获取模块 1201,用于当检测到交换设备发生拥塞时,从所述交换设备的接收缓 存中获取第一报文;
第二获取模块 1202,用于当该第一报文的源 MAC地址为网关设备的 MAC地址时, 获取该第一报文的源 IP地址;
生成模块 1203, 用于当该源 IP地址不是该网关设备的 IP地址时, 根据该第一报文 的源 IP地址,生成第一拥塞控制消息,该第一拥塞控制消息包括该网关设备 MAC地址、 该交换设备的 MAC地址和该第一报文的源 IP地址;
发送模块 1204, 用于向该网关设备发送该第一拥塞控制消息。
可选地, 该第一报文的源 IP地址位于该第一拥塞控制消息的载荷 payload中。 可选地, 该第一获取模块 1201还用于从该交换设备的接收缓存中获取第二报文; 该生成模块 1203还用于当该第二报文的源 MAC地址不是该网关设备的 MAC地址 时, 生成第二拥塞控制消息, 该第二拥塞控制消息包括该第二报文的源 MAC地址和该 交换设备的 MAC地址。 图 13是本发明实施例提供的一种拥塞控制装置的结构示意图。 参见图 13, 包括: 接收模块 1301, 用于当发生拥塞时, 接收第一拥塞控制消息, 该第一拥塞控制消息 包括该网关设备的 MAC地址、 交换设备的 MAC地址和源设备的 IP地址; 该源设备为 发送引起拥塞的流量的设备;
生成模块 1302, 用于根据该第一拥塞控制消息以及该源设备的 IP地址, 生成第二 拥塞控制消息;
发送模块 1303,用于发送该第二拥塞控制消息,该第二拥塞控制消息用于使该源设 备控制流量发送。
可选地,该第一拥塞控制消息的源 MAC地址为该交换设备的 MAC地址,目的 MAC 地址为该网关设备的 MAC地址,该源设备的 IP地址携带在该第一拥塞控制消息的载荷 payload中。
可选地, 该生成模块用于根据该源设备的 IP地址, 判断该网关设备是否为该源设 备的网关设备; 如果该网关设备为该源设备的网关设备, 该网关设备根据该 IP地址获 取该源设备的 MAC地址, 根据该第一拥塞控制消息以及该源设备的 MAC地址, 生成 该第二拥塞控制消息,该第二拥塞控制消息的目的 MAC地址为该源设备的 MAC地址; 该发送模块还用于根据该目的 MAC地址向该源设备发送该第二拥塞控制消息。 可选地, 该生成模块用于根据该源设备的 IP地址, 判断该网关设备是否为该源设 备的网关设备;
如果该网关设备不是该源设备的网关设备,根据该第一拥塞控制消息生成第二拥塞 控制消息, 该第二拥塞控制消息的目的 IP地址为该源设备的 IP地址, 该第二拥塞控制 消息携带该第一拥塞控制消息; 该第二拥塞控制消息为 IP报文。
可选地, 该发送模块用于根据该第二拥塞控制消息的目的 IP地址, 通过路由的方 式向该源设备发送该第二拥塞控制消息, 使得目的网关设备接收到该第二拥塞控制消息 后, 从该第二拥塞控制消息中获取该第一拥塞控制消息, 根据该目的 IP地址获取该源 设备的 MAC 地址, 将该第一拥塞控制消息的源 MAC 地址修改为该目的网关设备的 MAC地址, 将该第一拥塞控制消息的目的 MAC地址修改为该源设备的 MAC地址, 并 向该源设备发送该修改后的第一拥塞控制消息, 使得该源设备控制流量发送; 该目的网 关设备为该源设备的网关设备。
可选地, 该第二拥塞控制消息还包括源端口号和目的端口号, 该源端口号和目的端 口号为预设端口号, 用于表明该第二拥塞控制消息的类型。
需要说明的是: 上述实施例提供的拥塞控制装置在拥塞控制时, 仅以上述各功能模 块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功能分配由不同的功能模 块完成, 即将设备的内部结构划分成不同的功能模块, 以完成以上描述的全部或者部分 功能。 另外, 上述实施例提供的拥塞控制装置与拥塞控制方法实施例属于同一构思, 其 具体实现过程详见方法实施例, 这里不再赘述。 图 14是本发明实施例所提供的一种交换设备的结构示意图。 如图 14所示, 所述交 换设备包括发射机 1402、 接收机 1401、 存储器 1403 以及分别与发射机 1402、 接收机 1401和存储器 1403连接的处理器 1404; 当然, 该交换设备还可以包括输入输出装置等 一些通用部件, 本发明实施例在此不做任何限制。
其中, 存储器 1403中存储一组程序代码, 且所述处理器 1404用于调用所述存储器 1403中存储的程序代码, 用于执行以下操作:
当检测到交换设备发生拥塞时, 从所述交换设备的接收缓存中获取第一报文; 当所 述第一报文的源 MAC地址为网关设备的 MAC地址时,获取所述第一报文的源 IP地址; 当所述源 IP地址不是所述网关设备的 IP地址时, 根据所述第一报文的源 IP地址, 生成 第一拥塞控制消息, 所述第一拥塞控制消息包括所述网关设备 MAC地址、 所述交换设 备的 MAC地址和所述第一报文的源 IP地址;向所述网关设备发送所述第一拥塞控制消 息。
其中, 所述第一报文的源 IP地址位于所述第一拥塞控制消息的载荷 payload中。 可选地, 还用于执行以下操作:
从所述交换设备的接收缓存中获取第二报文;
当所述第二报文的源 MAC地址不是所述网关设备的 MAC地址时, 生成第二拥塞 控制消息, 所述第二拥塞控制消息包括所述第二报文的源 MAC地址和所述交换设备的 MAC地址。 图 15是本发明实施例所提供的一种网关设备的结构示意图。 如图 15所示, 所述网 关设备包括发射机 1502、 接收机 1501、 存储器 1503 以及分别与发射机 1502、 接收机 1501和存储器 1503连接的处理器 1504; 存储器中 1503存储一组程序代码, 且所述处 理器 1504用于调用所述存储器 1503中存储的程序代码, 用于执行以下操作: 当发生拥 塞时, 网关设备接收第一拥塞控制消息, 所述第一拥塞控制消息包括所述网关设备的 MAC地址、 交换设备的 MAC地址和源设备的 IP地址; 所述源设备为发送引起拥塞的 流量的设备; 根据所述第一拥塞控制消息以及所述源设备的 IP地址, 生成第二拥塞控 制消息; 发送所述第二拥塞控制消息, 所述第二拥塞控制消息用于使所述源设备控制流 量发送。
可选地, 还用于执行以下操作:
所述第一拥塞控制消息的源 MAC地址为所述交换设备的 MAC地址, 目的 MAC 地址为所述网关设备的 MAC地址,所述源设备的 IP地址携带在所述第一拥塞控制消息 的载荷 payload中。
可选地, 还用于执行以下操作:
根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备; 如果所述网关设备为所述源设备的网关设备, 所述网关设备根据所述 IP地址获取 所述源设备的 MAC地址, 根据所述第一拥塞控制消息以及所述源设备的 MAC地址, 生成所述第二拥塞控制消息, 所述第二拥塞控制消息的目的 MAC地址为所述源设备的 MAC地址;
所述发送所述第二拥塞控制消息包括:
根据所述目的 MAC地址向所述源设备发送所述第二拥塞控制消息。
可选地, 还用于执行以下操作:
根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备; 如果所述网关设备不是所述源设备的网关设备,所述网关设备根据所述第一拥塞控 制消息生成第二拥塞控制消息, 所述第二拥塞控制消息的目的 IP地址为所述源设备的 IP地址, 所述第二拥塞控制消息携带所述第一拥塞控制消息; 所述第二拥塞控制消息为 IP报文。
可选地, 还用于执行以下操作:
根据所述第二拥塞控制消息的目的 IP地址, 通过路由的方式向所述源设备发送所 述第二拥塞控制消息, 使得目的网关设备接收到所述第二拥塞控制消息后, 从所述第二 拥塞控制消息中获取所述第一拥塞控制消息, 根据所述目的 IP地址获取所述源设备的 MAC地址, 将所述第一拥塞控制消息的源 MAC地址修改为所述目的网关设备的 MAC 地址, 将所述第一拥塞控制消息的目的 MAC地址修改为所述源设备的 MAC地址, 并 向所述源设备发送所述修改后的第一拥塞控制消息, 使得所述源设备控制流量发送; 所 述目的网关设备为所述源设备的网关设备。
其中, 所述第二拥塞控制消息还包括源端口号和目的端口号, 所述源端口号和目的 端口号为预设端口号, 用于表明所述第二拥塞控制消息的类型。 本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来 完成, 也可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一种计算机可读 存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。

Claims

权利要求
1、 一种拥塞控制方法, 其特征在于, 所述方法包括:
当检测到交换设备发生拥塞时, 从所述交换设备的接收缓存中获取第一报文; 当所述第一报文的源 MAC地址为网关设备的 MAC地址时, 获取所述第一报文的 源 IP地址;
当所述源 IP地址不是所述网关设备的 IP地址时, 根据所述第一报文的源 IP地址, 生成第一拥塞控制消息, 所述第一拥塞控制消息包括所述网关设备 MAC地址、 所述交 换设备的 MAC地址和所述第一报文的源 IP地址;
向所述网关设备发送所述第一拥塞控制消息。
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一报文的源 IP地址位于所述 第一拥塞控制消息的载荷 payload中。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述方法还包括:
从所述交换设备的接收缓存中获取第二报文;
当所述第二报文的源 MAC地址不是所述网关设备的 MAC地址时, 生成第二拥塞 控制消息, 所述第二拥塞控制消息包括所述第二报文的源 MAC地址和所述交换设备的 MAC地址。
4、 一种拥塞控制方法, 其特征在于, 包括:
当发生拥塞时, 网关设备接收第一拥塞控制消息, 所述第一拥塞控制消息包括所述 网关设备的 MAC地址、 交换设备的 MAC地址和源设备的 IP地址; 所述源设备为发送 引起拥塞的流量的设备;
根据所述第一拥塞控制消息以及所述源设备的 IP地址, 生成第二拥塞控制消息; 发送所述第二拥塞控制消息,所述第二拥塞控制消息用于使所述源设备控制流量发 送。
5、 根据权利要求 4所述的方法, 其特征在于,
所述第一拥塞控制消息的源 MAC地址为所述交换设备的 MAC地址, 目的 MAC 地址为所述网关设备的 MAC地址,所述源设备的 IP地址携带在所述第一拥塞控制消息 的载荷 payload中。
6、 根据权利要求 4或 5所述的方法, 其特征在于, 所述根据所述第一拥塞控制消 息以及所述源设备的 IP地址, 生成第二拥塞控制消息包括:
根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备; 如果所述网关设备为所述源设备的网关设备, 所述网关设备根据所述 IP地址获取 所述源设备的 MAC地址, 根据所述第一拥塞控制消息以及所述源设备的 MAC地址, 生成所述第二拥塞控制消息, 所述第二拥塞控制消息的目的 MAC地址为所述源设备的 MAC地址;
所述发送所述第二拥塞控制消息包括:
根据所述目的 MAC地址向所述源设备发送所述第二拥塞控制消息。
7、 根据权利要求 4或 5所述的方法, 其特征在于, 所述根据所述第一拥塞控制消 息以及所述源设备的 IP地址, 生成第二拥塞控制消息包括:
根据所述源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备; 如果所述网关设备不是所述源设备的网关设备,所述网关设备根据所述第一拥塞控 制消息生成第二拥塞控制消息, 所述第二拥塞控制消息的目的 IP地址为所述源设备的 IP地址, 所述第二拥塞控制消息携带所述第一拥塞控制消息; 所述第二拥塞控制消息为 IP报文。
8、 根据权利要求 7所述的方法, 其特征在于, 所述发送所述第二拥塞控制消息包 括包括:
根据所述第二拥塞控制消息的目的 IP地址, 通过路由的方式向所述源设备发送所 述第二拥塞控制消息, 使得目的网关设备接收到所述第二拥塞控制消息后, 从所述第二 拥塞控制消息中获取所述第一拥塞控制消息, 根据所述目的 IP地址获取所述源设备的 MAC地址, 将所述第一拥塞控制消息的源 MAC地址修改为所述目的网关设备的 MAC 地址, 将所述第一拥塞控制消息的目的 MAC地址修改为所述源设备的 MAC地址, 并 向所述源设备发送所述修改后的第一拥塞控制消息, 使得所述源设备控制流量发送; 所 述目的网关设备为所述源设备的网关设备。
9、 根据权利要求 7或 8所述的方法, 其特征在于, 所述第二拥塞控制消息还包括 源端口号和目的端口号, 所述源端口号和目的端口号为预设端口号, 用于表明所述第二 拥塞控制消息的类型。
10、 一种拥塞控制装置, 其特征在于, 所述装置包括:
第一获取模块, 用于当检测到交换设备发生拥塞时, 从所述交换设备的接收缓存中 获取第一报文;
第二获取模块, 用于当所述第一报文的源 MAC地址为网关设备的 MAC地址时, 获取所述第一报文的源 IP地址;
生成模块, 用于当所述源 IP地址不是所述网关设备的 IP地址时, 根据所述第一报 文的源 IP地址,生成第一拥塞控制消息,所述第一拥塞控制消息包括所述网关设备 MAC 地址、 所述交换设备的 MAC地址和所述第一报文的源 IP地址;
发送模块, 用于向所述网关设备发送所述第一拥塞控制消息。
11、 根据权利要求 10所述的装置, 其特征在于, 所述第一报文的源 IP地址位于所 述第一拥塞控制消息的载荷 payload中。
12、 根据权利要求 10所述的装置, 其特征在于,
所述第一获取模块还用于从所述交换设备的接收缓存中获取第二报文;
所述生成模块还用于当所述第二报文的源 MAC地址不是所述网关设备的 MAC地 址时, 生成第二拥塞控制消息, 所述第二拥塞控制消息包括所述第二报文的源 MAC地 址和所述交换设备的 MAC地址。
13、 一种拥塞控制装置, 其特征在于, 包括:
接收模块, 用于当发生拥塞时, 接收第一拥塞控制消息, 所述第一拥塞控制消息包 括所述网关设备的 MAC地址、 交换设备的 MAC地址和源设备的 IP地址; 所述源设备 为发送引起拥塞的流量的设备;
生成模块, 用于根据所述第一拥塞控制消息以及所述源设备的 IP地址, 生成第二 拥塞控制消息;
发送模块, 用于发送所述第二拥塞控制消息, 所述第二拥塞控制消息用于使所述源 设备控制流量发送。
14、 根据权利要求 13所述的装置, 其特征在于, 所述第一拥塞控制消息的源 MAC 地址为所述交换设备的 MAC地址, 目的 MAC地址为所述网关设备的 MAC地址, 所 述源设备的 IP地址携带在所述第一拥塞控制消息的载荷 payload中。
15、 根据权利要求 13或 14所述的装置, 其特征在于, 所述生成模块用于根据所述 源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备; 如果所述网关设 备为所述源设备的网关设备,所述网关设备根据所述 IP地址获取所述源设备的 MAC地 址, 根据所述第一拥塞控制消息以及所述源设备的 MAC地址, 生成所述第二拥塞控制 消息, 所述第二拥塞控制消息的目的 MAC地址为所述源设备的 MAC地址;
所述发送模块还用于根据所述目的 MAC地址向所述源设备发送所述第二拥塞控制 消息。
16、 根据权利要求 14或 15所述的装置, 其特征在于, 所述生成模块用于根据所述 源设备的 IP地址, 判断所述网关设备是否为所述源设备的网关设备;
如果所述网关设备不是所述源设备的网关设备,根据所述第一拥塞控制消息生成第 二拥塞控制消息, 所述第二拥塞控制消息的目的 IP地址为所述源设备的 IP地址, 所述 第二拥塞控制消息携带所述第一拥塞控制消息; 所述第二拥塞控制消息为 IP报文。
17、 根据权利要求 16所述的装置, 其特征在于,
所述发送模块用于根据所述第二拥塞控制消息的目的 IP地址, 通过路由的方式向 所述源设备发送所述第二拥塞控制消息, 使得目的网关设备接收到所述第二拥塞控制消 息后, 从所述第二拥塞控制消息中获取所述第一拥塞控制消息, 根据所述目的 IP地址 获取所述源设备的 MAC地址, 将所述第一拥塞控制消息的源 MAC地址修改为所述目 的网关设备的 MAC地址, 将所述第一拥塞控制消息的目的 MAC地址修改为所述源设 备的 MAC地址, 并向所述源设备发送所述修改后的第一拥塞控制消息, 使得所述源设 备控制流量发送; 所述目的网关设备为所述源设备的网关设备。
18、 根据权利要求 16或 17所述的装置, 其特征在于, 所述第二拥塞控制消息还包 括源端口号和目的端口号, 所述源端口号和目的端口号为预设端口号, 用于表明所述第 二拥塞控制消息的类型。
PCT/CN2014/086178 2014-02-19 2014-09-10 拥塞控制方法、装置及设备 WO2015123988A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410055899.7 2014-02-19
CN201410055899.7A CN104852855B (zh) 2014-02-19 2014-02-19 拥塞控制方法、装置及设备

Publications (1)

Publication Number Publication Date
WO2015123988A1 true WO2015123988A1 (zh) 2015-08-27

Family

ID=53852219

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/086178 WO2015123988A1 (zh) 2014-02-19 2014-09-10 拥塞控制方法、装置及设备

Country Status (2)

Country Link
CN (1) CN104852855B (zh)
WO (1) WO2015123988A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9497125B2 (en) 2013-07-28 2016-11-15 Mellanox Technologies Ltd. Congestion control enforcement in a virtualized environment
US10009277B2 (en) 2015-08-04 2018-06-26 Mellanox Technologies Tlv Ltd. Backward congestion notification in layer-3 networks
US10237376B2 (en) 2015-09-29 2019-03-19 Mellanox Technologies, Ltd. Hardware-based congestion control for TCP traffic

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493238A (zh) 2016-06-13 2017-12-19 华为技术有限公司 一种网络拥塞控制方法、设备及系统
CN106254267B (zh) * 2016-08-31 2020-01-14 浙江宇视科技有限公司 一种数据转发路径调整方法及网关设备
CN107135164A (zh) * 2017-06-27 2017-09-05 中国联合网络通信集团有限公司 拥塞控制方法及装置
CN111490943A (zh) * 2019-01-29 2020-08-04 中兴通讯股份有限公司 拥塞控制方法、终端及可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567818A (zh) * 2008-12-25 2009-10-28 中国人民解放军总参谋部第五十四研究所 基于硬件的大规模网络路由仿真方法
CN102006230A (zh) * 2010-11-26 2011-04-06 中南大学 一种有线/无线混合网络中融合三种信息的拥塞控制方法
CN102611620A (zh) * 2012-02-23 2012-07-25 福建星网锐捷网络有限公司 拥塞控制方法和报文处理设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2482497B1 (en) * 2009-09-21 2013-12-04 Huawei Technologies Co., Ltd. Data forwarding method, data processing method, system and device thereof
CN102025617B (zh) * 2010-11-26 2015-04-01 中兴通讯股份有限公司 以太网拥塞控制方法及装置
CN102255808B (zh) * 2011-07-08 2014-04-23 福建星网锐捷网络有限公司 拥塞通告方法、装置、系统及网络设备
CN102638395B (zh) * 2012-03-19 2015-01-21 华为技术有限公司 一种报文转发的方法和设备
CN102891803B (zh) * 2012-10-10 2015-05-13 华为技术有限公司 拥塞处理方法及网络设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567818A (zh) * 2008-12-25 2009-10-28 中国人民解放军总参谋部第五十四研究所 基于硬件的大规模网络路由仿真方法
CN102006230A (zh) * 2010-11-26 2011-04-06 中南大学 一种有线/无线混合网络中融合三种信息的拥塞控制方法
CN102611620A (zh) * 2012-02-23 2012-07-25 福建星网锐捷网络有限公司 拥塞控制方法和报文处理设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9497125B2 (en) 2013-07-28 2016-11-15 Mellanox Technologies Ltd. Congestion control enforcement in a virtualized environment
US10009277B2 (en) 2015-08-04 2018-06-26 Mellanox Technologies Tlv Ltd. Backward congestion notification in layer-3 networks
US10237376B2 (en) 2015-09-29 2019-03-19 Mellanox Technologies, Ltd. Hardware-based congestion control for TCP traffic

Also Published As

Publication number Publication date
CN104852855A (zh) 2015-08-19
CN104852855B (zh) 2018-08-21

Similar Documents

Publication Publication Date Title
WO2015123988A1 (zh) 拥塞控制方法、装置及设备
US10855654B2 (en) Session identifier for a communication session
CN108234235B (zh) 用于数据监控的方法、网络设备以及计算机可读存储介质
US10574763B2 (en) Session-identifer based TWAMP data session provisioning in computer networks
CN107948076B (zh) 一种转发报文的方法及装置
EP3154227A1 (en) Packet transmission method, node, path management server and storage medium
US20160380966A1 (en) Media Relay Server
CN110022264B (zh) 控制网络拥塞的方法、接入设备和计算机可读存储介质
CN102340447B (zh) 一种远程端口镜像实现系统及方法
CN114073043B (zh) 以太网网桥端口管理的方法和装置
EP3026872B1 (en) Packet forwarding method, apparatus, and system
JP2014530548A (ja) レイヤ2ネットワーク・ループを処理するための方法、装置、およびネットワーク装置
US20160380789A1 (en) Media Relay Server
BR112014001861B1 (pt) Método para implementar um protocolo de túnel de serviço geral de rádio por pacotes, e, sistema computacional em nuvem para gerenciar a implementação de um protocolo de túnel de serviço geral de rádio por pacotes
JP2021516012A (ja) ネットワークにおけるフロー管理
WO2014023003A1 (zh) 控制数据传输的方法、装置和系统
WO2016184283A1 (zh) 一种虚拟机数据流管理方法和系统
JP2013126244A (ja) パケット通信装置および方法
WO2021196967A1 (zh) 消息交互方法、装置、设备和存储介质
WO2013053266A1 (zh) 一种报文的学习方法、装置和系统
WO2012095022A1 (zh) 一种mff手工模式下的报文传输方法及装置
KR20180025944A (ko) Sdn 기반의 arp 구현 방법 및 장치
JP2007274467A (ja) ネットワーク中継装置、ネットワークシステム、データ中継方法及びデータ中継プログラム
WO2014040422A1 (zh) 介质访问控制地址学习控制方法、装置和路由桥
KR101457314B1 (ko) 라우팅 방법 및 관련 라우팅 장치 및 목적지 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14882924

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14882924

Country of ref document: EP

Kind code of ref document: A1