CN106375232B - A kind of message transmitting method and system - Google Patents
A kind of message transmitting method and system Download PDFInfo
- Publication number
- CN106375232B CN106375232B CN201510444289.0A CN201510444289A CN106375232B CN 106375232 B CN106375232 B CN 106375232B CN 201510444289 A CN201510444289 A CN 201510444289A CN 106375232 B CN106375232 B CN 106375232B
- Authority
- CN
- China
- Prior art keywords
- router
- packet
- congestion
- routers
- end device
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/11—Identifying congestion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/31—Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种报文传输方法及系统。在本发明实施例提供的方法中,发送端设备按照第一路由信息发送第一报文,其中,第一报文中包含有用于记录第一路由信息中的每个路由器的拥塞状态的拥塞标记位。第一路由器接收第二报文后,确定第一路由器的拥塞状态,并在第二报文中的第一路由器的拥塞标记位中记录第一路由器的拥塞状态。然后,第一路由器根据第一路由信息转发记录有第一路由器的拥塞状态的第二报文,其中,第二报文包括第一报文或经过至少两个路由器中除第一路由器之外的其他至少一个路由器转发的第一报文。接收端设备接收经过至少两个路由器转发后的第一报文后,接收端设备将至少两个路由器的拥塞状态信息返回给发送端设备。
The embodiment of the invention discloses a message transmission method and system. In the method provided by the embodiment of the present invention, the sending end device sends the first packet according to the first routing information, wherein the first packet contains a congestion flag for recording the congestion status of each router in the first routing information bit. After receiving the second packet, the first router determines the congestion state of the first router, and records the congestion state of the first router in the congestion flag bit of the first router in the second packet. Then, according to the first routing information, the first router forwards the second packet that records the congestion status of the first router, wherein the second packet includes the first packet or passes through at least two routers except the first router. The first packet forwarded by at least one other router. After the receiving end device receives the first message forwarded by the at least two routers, the receiving end device returns the congestion state information of the at least two routers to the sending end device.
Description
技术领域technical field
本发明涉及通信领域,尤其涉及一种报文传输方法及系统。The present invention relates to the communication field, in particular to a message transmission method and system.
背景技术Background technique
随着通信技术的发展,拥塞成为网络中的一个不容忽视的问题。在网络中,由于总会存在数据输入速率大于数据输出速率的情况,所以无论多快的网络,拥塞都可能存在。网络中的拥塞,会影响数据的有效传输,对网络的性能产生负面影响,因此需要对拥塞进行相应的控制。With the development of communication technology, congestion has become a problem that cannot be ignored in the network. In the network, since there is always a situation where the data input rate is greater than the data output rate, no matter how fast the network is, congestion may exist. Congestion in the network will affect the effective transmission of data and negatively affect the performance of the network. Therefore, it is necessary to control the congestion accordingly.
当前,通常在数据的传播路径上对拥塞进行控制管理;当检测到拥塞时,通过丢弃或标记数据包的形式,将网络拥塞信息传递到发送方,使得发送方调整数据发送速率实现拥塞控制。At present, congestion is usually controlled and managed on the data propagation path; when congestion is detected, the network congestion information is transmitted to the sender by discarding or marking data packets, so that the sender can adjust the data transmission rate to achieve congestion control.
目前,应用最广泛的标记数据包的方法是显示拥塞通知(Explicit CongestionNotification,简称ECN)技术,其工作原理为:路由器在检测到拥塞时,在数据包的网络协议(Internet Protocol,简称IP)头中的ECN位记录拥塞,用于指示数据包的传输路径发生拥塞,接收端可以通过检查数据包中的ECN位来检测到路径已拥塞;若接收端通过ECN位检测到路径上有拥塞发生,则在确认包中通知发送端该路径有拥塞发生。At present, the most widely used method of marking data packets is the Congestion Notification (Explicit Congestion Notification, referred to as ECN) technology. The ECN bit in the data packet records congestion, which is used to indicate that the transmission path of the data packet is congested. The receiving end can detect that the path is congested by checking the ECN bit in the data packet; if the receiving end detects that there is congestion on the path through the ECN bit, Then notify the sender that there is congestion on the path in the confirmation packet.
但是,ECN技术只能告知发送方传输路径是否发生拥塞,造成网络利用率较低。However, ECN technology can only inform the sender whether the transmission path is congested, resulting in low network utilization.
发明内容Contents of the invention
本发明的实施例提供一种报文传输方法及网络设备,能够减少通信链路的拥塞,提高网络利用率。Embodiments of the present invention provide a message transmission method and network equipment, which can reduce communication link congestion and improve network utilization.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,提供一种报文传输方法,应用于报文传输系统,所述报文传输系统包括发送端设备、接收端设备以及多个路由器;所述方法包括:In a first aspect, a message transmission method is provided, which is applied to a message transmission system, and the message transmission system includes a sending end device, a receiving end device, and a plurality of routers; the method includes:
所述发送端设备按照第一路由信息发送第一报文,其中,所述第一路由信息中包含有至少两个路由器的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位;The sending end device sends a first message according to the first routing information, wherein the first routing information includes routing information of at least two routers, and the first message includes information for recording the first The congestion flag bit of the congestion state of each router in the routing information;
所述至少两个路由器中的第一路由器接收第二报文,其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文,所述第一路由器为所述至少两个路由器中的任意一个路由器;The first router among the at least two routers receives the second packet, wherein the second packet includes the first packet or passes through the at least two routers except the first router The first packet forwarded by at least one other router, where the first router is any one of the at least two routers;
所述第一路由器确定所述第一路由器的拥塞状态;determining a congestion state of the first router by the first router;
所述第一路由器在所述第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态;The first router records the congestion state of the first router in the congestion flag bit of the first router in the second packet;
所述第一路由器根据所述第一路由信息转发记录有所述第一路由器的拥塞状态的所述第二报文;forwarding, by the first router, the second packet recorded with the congestion state of the first router according to the first routing information;
所述接收端设备接收经过所述至少两个路由器转发后的第一报文,所述转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息;The receiving end device receives the first message forwarded by the at least two routers, and the forwarded first message includes congestion state information of the at least two routers;
所述接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备。The receiving end device returns the congestion state information of the at least two routers to the sending end device.
结合第一方面,在第一方面的第一种可能的实现方式中,在所述第一路由器接收第二报文之后,所述方法还包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, after the first router receives the second packet, the method further includes:
所述第一路由器将所述第二报文中的路由器标记位的值加一;其中,所述路由器标记位用于记录在当前传输方向传输过程中经过的路由器数量。The first router adds one to the value of the router flag bit in the second packet; wherein, the router flag bit is used to record the number of routers passed during the transmission process of the current transmission direction.
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,在所述发送端设备按照第一路由信息发送第一报文之前,所述方法还包括:With reference to the first aspect or the first possible implementation of the first aspect, in the second possible implementation of the first aspect, before the sending end device sends the first packet according to the first routing information, the The method also includes:
所述发送端设备将所述第一报文中拥塞标记位的值清零。The sending end device clears the value of the congestion flag bit in the first packet to zero.
结合第一方面或第一方面的第一种可能的实现方式或第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备,包括:With reference to the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the receiving end device uses the The congestion status information of the at least two routers is returned to the sending end device, including:
所述接收端设备生成确认包,所述确认包用于确认所述接收端设备已接收到所述第一报文,所述确认包中包含有所述至少两个路由器的拥塞状态信息;The receiving end device generates an acknowledgment packet, the acknowledgment packet is used to confirm that the receiving end device has received the first message, and the acknowledgment packet includes congestion status information of the at least two routers;
所述接收端设备向所述发送端设备发送所述确认包。The receiving end device sends the confirmation packet to the sending end device.
结合第一方面或第一方面的第一种可能的实现方式至第一方面的第三种可能的实现方式中任一项,在第一方面的第四种可能的实现方式中,所述第一路由器确定所述第一路由器的拥塞状态,包括:Combining any one of the first aspect or the first possible implementation manner of the first aspect to the third possible implementation manner of the first aspect, in the fourth possible implementation manner of the first aspect, the first A router determining a congestion state of the first router comprising:
若所述第一路由器缓冲区队列长度不小于预设阈值,则确定所述第一路由器的拥塞状态为发生拥塞;If the buffer queue length of the first router is not less than a preset threshold, then determining that the congestion state of the first router is congestion;
若所述第一路由器缓冲区队列长度小于所述预设阈值,则确定所述第一路由器的拥塞状态为未发生拥塞。If the buffer queue length of the first router is smaller than the preset threshold, it is determined that the congestion state of the first router is no congestion.
第二方面,提供一种报文传输系统,所述报文传输系统包括发送端设备、接收端设备以及多个路由器;其中,In a second aspect, a message transmission system is provided, and the message transmission system includes a sending end device, a receiving end device, and multiple routers; wherein,
所述发送端设备用于,按照第一路由信息发送第一报文,其中,所述第一路由信息中包含有至少两个路由器的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位;The sending end device is configured to send a first message according to the first routing information, wherein the first routing information includes routing information of at least two routers, and the first message includes information for recording all The congestion flag bit of the congestion state of each router in the first routing information;
所述至少两个路由器中的第一路由器用于:接收第二报文,其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文,所述第一路由器为所述至少两个路由器中的任意一个路由器;The first router among the at least two routers is configured to: receive a second packet, wherein the second packet includes the first packet or passes through the at least two routers except the first router The first message forwarded by at least one router other than the first router, where the first router is any one of the at least two routers;
确定所述第一路由器的拥塞状态;determining a congestion state of the first router;
在所述第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态;recording the congestion state of the first router in the congestion flag bit of the first router in the second message;
根据所述第一路由信息转发记录有所述第一路由器的拥塞状态的所述第二报文;Forwarding the second packet recorded with the congestion state of the first router according to the first routing information;
所述接收端设备用于,接收经过所述至少两个路由器转发后的第一报文,所述转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息,并将所述至少两个路由器的拥塞状态信息返回给所述发送端设备。The receiving end device is configured to receive the first packet forwarded by the at least two routers, the forwarded first packet contains the congestion state information of the at least two routers, and send the The congestion state information of the at least two routers is returned to the sending end device.
结合第二方面,在第二方面的第一种可能的实现方式中,所述第一路由器还用于:With reference to the second aspect, in a first possible implementation manner of the second aspect, the first router is further configured to:
在接收所述第二报文之后,将所述第二报文中的路由器标记位的值加一;其中,所述路由器标记位用于记录在当前传输方向传输过程中经过的路由器数量。After receiving the second message, add one to the value of the router flag in the second message; wherein, the router flag is used to record the number of routers passed during the transmission process of the current transmission direction.
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述发送端设备还用于:With reference to the second aspect or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the sending end device is further configured to:
在按照第一路由信息发送第一报文之前,将所述第一报文中拥塞标记位的值清零。Before sending the first packet according to the first routing information, the value of the congestion flag bit in the first packet is cleared.
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述接收端设备具体用于:With reference to the second aspect or the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the receiving end device specifically uses At:
生成确认包,所述确认包用于确认所述接收端设备已接收到所述第一报文,所述确认包中包含有所述至少两个路由器的拥塞状态信息;generating an acknowledgment packet, where the acknowledgment packet is used to confirm that the receiving end device has received the first message, and the acknowledgment packet includes congestion status information of the at least two routers;
向所述发送端设备发送所述确认包。Send the confirmation packet to the sending end device.
结合第二方面或第二方面的第一种可能的实现方式至第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述第一路由器具体用于:Combining the second aspect or the first possible implementation manner of the second aspect to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the first router specifically uses At:
若所述第一路由器缓冲区队列长度不小于预设阈值,则确定所述第一路由器的拥塞状态为发生拥塞;If the buffer queue length of the first router is not less than a preset threshold, then determining that the congestion state of the first router is congestion;
若所述第一路由器缓冲区队列长度小于预设阈值,则确定所述第一路由器的拥塞状态为未发生拥塞。If the buffer queue length of the first router is smaller than a preset threshold, it is determined that the congestion state of the first router is no congestion.
本发明实施例提供的报文传输方法及系统,通过发送端设备按照第一路由信息发送第一报文,其中,所述第一路由信息中包含有至少两个路由器的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位;所述至少两个路由器中的第一路由器接收第二报文,其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文,所述第一路由器为所述至少两个路由器中的任意一个路由器;所述第一路由器确定所述第一路由器的拥塞状态;所述第一路由器在所述第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态;所述第一路由器根据所述第一路由信息转发记录有所述第一路由器的拥塞状态的所述第二报文;所述接收端设备接收经过所述至少两个路由器转发后的第一报文,所述转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息;所述接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备。这样一来,对报文传输过程中经过的每一个路由器的拥塞状态均进行了标记,也就是对报文传输路径中的每一个链路的拥塞状态进行了标记。相比于现有技术中仅对路径的拥塞进行标记而言,本发明实施例提供的报文传输方法可以在报文中标记路径中每条链路的拥塞状态,使得发送端设备能够通过获知的路径中每条链路的拥塞状态控制后续报文的发送,有利于减少通信链路的拥塞,提供网络利用率。In the message transmission method and system provided by the embodiments of the present invention, the sending end device sends the first message according to the first routing information, wherein the first routing information includes routing information of at least two routers, and the first routing information includes routing information of at least two routers, and the first routing information includes A packet contains a congestion flag bit for recording the congestion state of each router in the first routing information; the first router among the at least two routers receives the second packet, wherein the second The message includes the first message or the first message forwarded by at least one router of the at least two routers except the first router, and the first router is the at least two routers Any router in the router; the first router determines the congestion status of the first router; the first router records the congestion status of the first router in the congestion flag bit of the first router in the second message Congestion state; the first router forwards the second message recorded with the congestion state of the first router according to the first routing information; the receiving end device receives the message forwarded by the at least two routers The first message, the forwarded first message includes the congestion state information of the at least two routers; the receiving end device returns the congestion state information of the at least two routers to the sending end equipment. In this way, the congestion state of each router that the message passes through is marked, that is, the congestion state of each link in the message transmission path is marked. Compared with only marking the congestion of the path in the prior art, the packet transmission method provided by the embodiment of the present invention can mark the congestion state of each link in the path in the packet, so that the sending end device can know the The congestion status of each link in the path controls the sending of subsequent messages, which is beneficial to reduce the congestion of communication links and improve network utilization.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only are drawings of some embodiments of the invention.
图1为本发明实施例提供的一种报文传输方法的流程图;FIG. 1 is a flowchart of a message transmission method provided by an embodiment of the present invention;
图2为本发明实施例提供的一种报文传输系统结构示意图;FIG. 2 is a schematic structural diagram of a message transmission system provided by an embodiment of the present invention;
图3为本发明实施例提供的另一种报文传输方法的流程图;FIG. 3 is a flowchart of another message transmission method provided by an embodiment of the present invention;
图4为本发明实施例提供的又一种报文传输系统的结构示意图;FIG. 4 is a schematic structural diagram of another message transmission system provided by an embodiment of the present invention;
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention.
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。Additionally, the terms "system" and "network" are often used herein interchangeably. The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
实施例一Embodiment one
本发明实施例提供一种报文传输方法,应用于报文传输系统,所述报文传输系统可以包括发送端设备、接收端设备以及多个路由器。参见图1,所述方法可以包括:An embodiment of the present invention provides a message transmission method, which is applied to a message transmission system, and the message transmission system may include a sending end device, a receiving end device, and multiple routers. Referring to Figure 1, the method may include:
S101、发送端设备按照第一路由信息发送第一报文。S101. The sending end device sends a first packet according to the first routing information.
其中,所述第一路由信息中包含有至少两个路由器的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位。Wherein, the first routing information includes routing information of at least two routers, and the first message includes a congestion flag bit for recording the congestion status of each router in the first routing information.
需要说明的是,所述第一路由信息为所述第一报文发送之前确定的第一报文到达接收端设备所需要经过的路由器及顺序,本发明对于第一路由信息的内容,以及第一路由信息的内容的确定方式不进行具体限定,可以根据实际需求确定。It should be noted that the first routing information is the routers and the sequence that the first message needs to pass through before the first message is sent to reach the receiving end device. A method for determining the content of the routing information is not specifically limited, and may be determined according to actual requirements.
具体的,收发双方可以在通信之初协商确定报文中用于标记传输路径中每个路由器的拥塞状态的拥塞标记位在报文中的位置。Specifically, the sending and receiving parties can negotiate at the beginning of the communication to determine the position of the congestion flag bit used to mark the congestion state of each router in the transmission path in the message.
可选的,收发双方可以在通信之初协商确定,将报文中的IP选项域作为用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位。Optionally, the sending and receiving parties may negotiate and determine at the beginning of the communication that the IP option field in the message is used as a congestion flag bit for recording the congestion state of each router in the first routing information.
可选的,所述报文可以为数据包或者确认包。Optionally, the message may be a data packet or a confirmation packet.
S102、所述至少两个路由器中的第一路由器接收第二报文。S102. The first router among the at least two routers receives the second packet.
其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文。所述第一路由器为所述至少两个路由器中的任意一个路由器。Wherein, the second packet includes the first packet or the first packet forwarded by at least one router of the at least two routers except the first router. The first router is any one of the at least two routers.
具体的,若第二报文是发送端设备向第一路由器发送的,则第二报文包括所述第一报文。Specifically, if the second packet is sent by the sending end device to the first router, the second packet includes the first packet.
若第二报文是所述至少两个路由器中除第一路由器之外的路由器向第一路由器发送的,则第二报文是经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文。If the second packet is sent to the first router by a router other than the first router in the at least two routers, the second packet is sent by a router other than the first router in the at least two routers The first packet forwarded by at least one other router.
需要说明的是,本发明以第一路由器对报文的处理过程进行描述,所述至少两个路由器中每个路由器对报文的处理过程相同,不再一一赘述。It should be noted that, in the present invention, the processing process of the message by the first router is described, and the process of processing the message by each router of the at least two routers is the same, so details will not be repeated one by one.
S103、第一路由器确定第一路由器的拥塞状态。S103. The first router determines the congestion state of the first router.
其中,所述拥塞状态可以为是否发生拥塞,或者,所述拥塞状态可以为发生拥塞。Wherein, the congestion status may be whether congestion occurs, or the congestion status may be congestion occurrence.
具体的,所述第一路由器判断内容是否发生拥塞,可以包括:Specifically, the first router judging whether content congestion occurs may include:
若第一路由器缓冲区队列长度不小于预设阈值,则确定第一路由器的拥塞状态为发生拥塞;If the buffer queue length of the first router is not less than the preset threshold, then determining that the congestion state of the first router is congestion;
若第一路由器缓冲区队列长度小于预设阈值,则确定第一路由器的拥塞状态为未发生拥塞。If the buffer queue length of the first router is smaller than the preset threshold, it is determined that the congestion state of the first router is no congestion.
其中,所述预设阈值可以根据实际需求设定取值,本发明对此不进行具体取值;预设阈值设置的越高,路由器不易判断发生拥塞,但是经过路由器传输报文的效率可能降低,网络性能也将降低;预设阈值设置的越低,路由器容易判断发生拥塞,但是有可能发生对数据流的过早限速,同样可能导致网络利用率的降低。Wherein, the preset threshold value can be set according to actual needs, and the present invention does not set a specific value for this; the higher the preset threshold value is set, the router is not easy to judge that congestion occurs, but the efficiency of message transmission through the router may be reduced , the network performance will also be reduced; the lower the preset threshold is set, the router is more likely to judge that congestion has occurred, but premature speed limit on data flow may occur, which may also lead to a decrease in network utilization.
优选的,所述预设阈值可以为缓冲区长度的80%。Preferably, the preset threshold may be 80% of the buffer length.
需要说明的是,上述描述仅仅描述了一种检测所述路由器内是否发生拥塞的方法,并不是具体限定。当然,还可以有其他方案用于检测路由器内是否发生拥塞,例如空闲队列数量、数据包通过端口的延迟等等。本发明对于检测路由器内是否发生拥塞的方法不进行具体限定。It should be noted that the above description only describes a method for detecting whether congestion occurs in the router, and is not specifically limited. Of course, there are other schemes for detecting whether congestion occurs in the router, such as the number of idle queues, the delay of packets passing through the ports, and so on. The present invention does not specifically limit the method for detecting whether congestion occurs in the router.
S104、第一路由器在第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态。S104. The first router records the congestion state of the first router in the congestion flag bit of the first router in the second packet.
可选的,每个路由器设置各自对应的拥塞标记位在报文中的具体位置可以在通信之初协商确定。Optionally, the specific position in the packet where each router sets its corresponding congestion flag bit can be negotiated and determined at the beginning of the communication.
可选的,每个路由器设置各自对应的拥塞标记位在报文中的具体位置的确定,可以采用的方案包括但不限于下述两种方案:Optionally, each router sets the determination of the specific position of the corresponding congestion flag bit in the message. The schemes that can be used include but are not limited to the following two schemes:
方案1、可以在通信之初协商确定每个路由器对应的拥塞标记位的具体位置按照报文经过路由器的顺序依次排列。Solution 1. It is possible to negotiate at the beginning of the communication to determine the specific position of the congestion flag bit corresponding to each router and arrange them in sequence according to the order in which the packets pass through the routers.
示例性的,假设一报文传输路径中,依次经过路由器1、路由器2、路由器3这三个路由器,可以在通信之初协商确定,根据报文传输路径依次经过的路由器的顺序依次设置每个路由器对应的拥塞标记位,这样,该报文中的拥塞标记位可以采用3bit,其中高位作为路由器1的拥塞标记位、接下来为路由器2的拥塞标记位,最后一个低位为路由器3的拥塞标记位。Exemplarily, assuming that a message transmission path passes through three routers, router 1, router 2, and router 3 in sequence, which can be negotiated and determined at the beginning of communication, and set each The congestion flag bit corresponding to the router. In this way, the congestion flag bit in the message can use 3 bits, where the high bit is the congestion flag bit of router 1, the next is the congestion flag bit of router 2, and the last low bit is the congestion flag bit of router 3 bit.
示例性的,假设一报文传输路径中,依次经过路由器A、路由器B、路由器C这三个路由器,可以在通信之初协商确定,每个路由器对应的标记位置顺序为从低位到高位,这样,拥塞标记位中的高位则为路由器C的拥塞标记位、接下来为路由器B的拥塞标记位,低位为路由器1的拥塞标记位。Exemplarily, assuming that a message transmission path passes through three routers, router A, router B, and router C in sequence, which can be negotiated and determined at the beginning of communication, and the order of the tag positions corresponding to each router is from low to high, so , the high bit in the congestion flag bit is the congestion flag bit of router C, followed by the congestion flag bit of router B, and the low bit is the congestion flag bit of router 1.
需要说明的是,上述两种示例只是举例说明报文中的每个路由器的拥塞标记位的位置关系,并不是对具体内容和形式的限定;在实际应用中,可以根据实际需求设定报文中每个路由器的拥塞标记位的位置关系。It should be noted that the above two examples are only examples to illustrate the positional relationship of the congestion flag bits of each router in the message, and are not intended to limit the specific content and form; in practical applications, the message can be set according to actual needs. The positional relationship of the congestion flag bits of each router in .
方案2、也可以在通信之初协商确定报文中每个路由器对应的拥塞标记位的具体位置。Solution 2. It is also possible to negotiate and determine the specific position of the congestion flag bit corresponding to each router in the message at the beginning of the communication.
示例性的,假设一报文传输路径中,依次经过路由器5、路由器6、路由器7、路由器8这四个路由器,可以在通信之初协商确定报文中每个路由器对应的拥塞标记位的具体位置如表1所示:Exemplarily, assuming that in a message transmission path, four routers such as router 5, router 6, router 7, and router 8 are sequentially passed through, the specific congestion flag bit corresponding to each router in the message can be negotiated and determined at the beginning of communication. The location is shown in Table 1:
表1Table 1
这样,位置1则为路由器5的拥塞标记位、位置2则为路由器8的拥塞标记位、位置3则为路由器7的拥塞标记位、位置4则为路由器6的拥塞标记位。In this way, position 1 is the congestion flag bit of router 5, position 2 is the congestion flag bit of router 8, position 3 is the congestion flag bit of router 7, and position 4 is the congestion flag bit of router 6.
需要说明的是,表1只是以举例的形式描述上述方案2,并不是对方案2的具体实施手段的限定。在实际应用过程中,可以根据实际需求,确定方案2的具体实施手段。It should be noted that Table 1 describes the above solution 2 by way of example only, and does not limit the specific implementation means of solution 2. In the actual application process, the specific implementation means of Scheme 2 can be determined according to actual needs.
当然,所述第一路由器在第二报文中的第一路由器的拥塞标记位中记录第一路由器的拥塞状态,还可以通过其他方式实现,例如,可以通过字符记录每个路由器的拥塞状态等。本发明对此不进行具体限定,凡是通过在标记每个路由器的拥塞状态的方案,都属于本发明的保护范围。Of course, the first router records the congestion status of the first router in the congestion flag bit of the first router in the second message, and it can also be realized in other ways, for example, the congestion status of each router can be recorded by characters, etc. . The present invention does not specifically limit this, and any scheme that marks the congestion state of each router belongs to the protection scope of the present invention.
进一步的,拥塞标记的具体内容可以根据实际需求确定,本发明对此不进行具体限定。Further, the specific content of the congestion flag can be determined according to actual requirements, which is not specifically limited in the present invention.
示例性的,当路由器判断自身拥塞时,可以在该路由器的拥塞标记位标记“1”,用于指示该路由器拥塞;而当判断路由器没有拥塞时,在该路由器的拥塞标记位标记“0”,用于指示该路由器没有发生拥塞。Exemplarily, when a router judges that it is congested, it can mark "1" on the router's congestion flag bit to indicate that the router is congested; and when it is judged that the router is not congested, it can mark "0" on the router's congestion flag bit , used to indicate that the router is not congested.
示例性的,当路由器判断自身拥塞时,可以将该路由器的拥塞标记位更新为“1”,用于指示该路由器拥塞;而当路由器判断自身未拥塞时,可以在该路由器的拥塞标记位不进行更新,用于指示该路由器未拥塞。Exemplarily, when a router judges that it is congested, it can update the router's congestion flag to "1" to indicate that the router is congested; Update to indicate that this router is not congested.
当然,在拥塞标记位中标记的具体内容可以多种方式实现,在具体实施过程中,可以根据实际需求确定,上述示例并不是对此的具体限定。Of course, the specific content marked in the congestion flag bit can be implemented in various ways, and can be determined according to actual requirements during the specific implementation process, and the above examples are not specifically limited thereto.
示例性的,假设主机(Host)A向Host B发送数据包,根据路由信息,数据包需依次经过路由器A、路由器B到达Host B。Exemplarily, assuming that host (Host) A sends a data packet to Host B, according to the routing information, the data packet needs to pass through router A and router B to reach Host B in sequence.
假设Host A发送的一个数据包如表2所示。Assume that a data packet sent by Host A is shown in Table 2.
表2Table 2
需要说明的是,表2仅仅示例描述一个数据包,并不是对数据包的内容及形式的限定。It should be noted that Table 2 is only an example to describe a data packet, and does not limit the content and form of the data packet.
假设在传输过程中,当表2所示的数据包传输至路由器A时,路由器A确定自身的拥塞状态为已发生拥塞,那么将数据包中路由器A的拥塞标记位(当前传输方向的最高位)更新为1,此时数据包如表3所示。Assuming that in the transmission process, when the data packet shown in Table 2 is transmitted to router A, router A determines that its own congestion state is congested, then the congestion flag bit of router A in the data packet (the highest bit of the current transmission direction ) is updated to 1, and the data packet is shown in Table 3 at this time.
表3table 3
假设在传输过程中,当表3所示的数据包传输至路由器B时,路由器B确定自身的拥塞状态为未发生拥塞,那么将数据包中路由器B的拥塞标记位(当前传输方向的最低位)不进行更新,此时数据包仍然如表3所示。Assuming that in the transmission process, when the data packet shown in Table 3 is transmitted to router B, router B determines that its own congestion state is not congested, then the congestion flag bit of router B in the data packet (the lowest bit of the current transmission direction ) is not updated, and the data packet is still as shown in Table 3 at this time.
因此,表3所示的数据包将到达Host B。Therefore, the packets shown in Table 3 will arrive at Host B.
S105、第一路由器根据第一路由信息转发记录有所述第一路由器的拥塞状态的第二报文。S105. The first router forwards the second packet in which the congestion state of the first router is recorded according to the first routing information.
具体的,第一路由器根据第一路由信息将所述报文进行下一跳转发时,下一跳可能为路由器,也可能为接收端设备,具体的转发过程此处不再进行详细赘述。Specifically, when the first router forwards the packet to the next hop according to the first routing information, the next hop may be a router or a receiving end device, and the specific forwarding process will not be described in detail here.
S106、接收端设备接收经过所述至少两个路由器转发后的第一报文。其中,所述转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息。S106. The receiver device receives the first packet forwarded by the at least two routers. Wherein, the forwarded first message includes congestion state information of the at least two routers.
具体的,在第一报文的传输过程中,第一报文首先由发送端设备发送,之后按照第一路由信息,经过所述至少两个路由器的转发后到达接收端设备处,由于每个路由器在转发报文时,均在报文中自身的拥塞标记位处对自身的拥塞状态进行了标记,因此,经过所述至少两个路由器转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息。Specifically, during the transmission of the first message, the first message is first sent by the sending end device, and then reaches the receiving end device after being forwarded by the at least two routers according to the first routing information, because each When a router forwards a message, it marks its own congestion status at its own congestion mark bit in the message. Therefore, the first message forwarded by the at least two routers contains the at least two Congestion status information of a router.
S107、接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备。S107. The receiving end device returns the congestion status information of the at least two routers to the sending end device.
具体的,所述接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备,可以包括下述两个步骤:Specifically, the receiving end device returns the congestion status information of the at least two routers to the sending end device, which may include the following two steps:
步骤A、生成确认包,所述确认包用于确认所述接收端设备已接收到所述第一报文,所述确认包中包含有所述至少两个路由器的拥塞状态信息;Step A, generating an acknowledgment packet, the acknowledgment packet is used to confirm that the receiving end device has received the first message, and the acknowledgment packet includes congestion status information of the at least two routers;
步骤B、向所述发送端设备发送所述确认包。Step B. Send the confirmation packet to the sending device.
进一步的,若报文为确认包,报文也可以经过S101至S106的过程,在报文中包含拥塞标记位,以记录确认包的传输中经过的路由器的拥塞状态。Further, if the message is an acknowledgment packet, the message may also go through the process from S101 to S106, and include a congestion flag bit in the message to record the congestion status of the routers that the acknowledgment packet passes through during transmission.
进一步的,当报文为确认包,所述确认包中除了包含有所述至少两个路由器的拥塞状态信息,还可以包含自身的拥塞标记位,以记录确认包的传输中经过的路由器的拥塞状态;此时,报文中包含了两个传输方向的拥塞标记位。Further, when the message is an acknowledgment packet, in addition to the congestion status information of the at least two routers, the acknowledgment packet can also contain its own congestion flag bit to record the congestion of the routers passing through the transmission of the acknowledgment packet. Status; at this time, the packet contains the congestion flag bits of the two transmission directions.
可选的,当报文中同时包括两个传输方向的拥塞标记位时,可以采用一个拥塞标记位的两个部分实现,也可以采用两个拥塞标记位分别实现,本发明对此不进行具体限定。Optionally, when the message includes the congestion flags of two transmission directions at the same time, it can be realized by using two parts of one congestion flag, or by using two congestion flags respectively. limited.
进一步的,当报文中同时包括两个传输方向的拥塞标记位,且采用一个拥塞标记位的两个部分实现时,可以采用拥塞标记位的两个行分别实现。Further, when the packet includes the congestion flag bits of two transmission directions at the same time, and the two parts of one congestion flag bit are used for realization, the two rows of the congestion flag bits can be used for realization respectively.
示例性的,表4示意了一种报文中同时包括两个传输方向的拥塞标记位。Exemplarily, Table 4 shows that a packet includes congestion flag bits of two transmission directions at the same time.
表4Table 4
其中,拥塞标记位中不同的行,标识了不同的传输方向的拥塞标记位。Wherein, different lines in the congestion flag bit identify congestion flag bits of different transmission directions.
需要说明的是,表4只是以表格的形式举例说明了一种报文中包括的拥塞标记位,并不是对报文中包括的拥塞标记位域的形式及内容的具体限定。在实际应用中,可以根据实际需求确定报文中包括的拥塞标记位的形式及内容,本发明对此不进行具体限定。It should be noted that Table 4 only exemplifies the congestion flag bits included in a message in the form of a table, and does not specifically limit the form and content of the congestion flag bit field included in the message. In practical applications, the form and content of the congestion flag bits included in the message may be determined according to actual requirements, which is not specifically limited in the present invention.
进一步的,在S102之后,所述方法还可以包括:所述第一路由器将所述第二报文中的路由器标记位的值加一。Further, after S102, the method may further include: the first router adds one to the value of the router flag bit in the second packet.
其中,所述路由器标记位用于记录在当前传输方向传输过程中经过的路由器数量。Wherein, the router flag bit is used to record the number of routers passed during the transmission process of the current transmission direction.
示例性的,表5示意了一种报文,该报文还包括当前传输方向的路由器标记位。Exemplarily, Table 5 shows a message, and the message also includes a router flag bit of the current transmission direction.
表5table 5
需要说明的是,表5只是以表格的形式举例说明了一种还包括当前传输方向的路由器标记位的报文,并不是对报文的形式及内容的具体限定。It should be noted that Table 5 only exemplifies a message in the form of a table that also includes the router flag bit of the current transmission direction, and does not specifically limit the form and content of the message.
这样一来,通过在报文中包含路由器标记位记录报文经过的路由器数量,可以检测到发送端设备、接收端设备之间的路径长度,为进一步的路径规划提供参考。In this way, by including router flags in the message to record the number of routers the message passes through, the path length between the sending end device and the receiving end device can be detected, providing reference for further path planning.
更进一步的,所述报文还可以包括功能指示信息,用于指示所述报文是否支持记录每个路由器的拥塞状态。Furthermore, the message may also include function indication information, which is used to indicate whether the message supports recording the congestion state of each router.
具体的,可以在传输控制协议(Transmission Control Protocol,简称TCP)连接建立时,通信双方协商是否支持扩展显示拥塞通知(Extend Explicit CongestionNotification,简称Ex-ECN)功能(即是否支持记录每个路由器的拥塞状态)。Specifically, when a Transmission Control Protocol (Transmission Control Protocol, referred to as TCP) connection is established, the communication parties negotiate whether to support the Extend Explicit Congestion Notification (Ext-ECN) function (that is, whether to support recording the congestion of each router). state).
示例性的,可以利用TCP保留字来进行协商。为了与ECN相兼容,可以将6位保留字的后三位定义为扩展的ECN响应(ECN-Echo-Extend,简称ECEx),ECN响应(ECN-Echo,简称ECE),拥塞窗口减少(Congestion Window Reduced,简称CWR)。其中,ECEx=1表示支持Ex-ECN,ECEx=0并且ECE=1表示支持ECN。CWR的用法与ECN相同,此处不再进行赘述。Exemplarily, TCP reserved words can be used for negotiation. In order to be compatible with ECN, the last three bits of the 6-bit reserved word can be defined as extended ECN response (ECN-Echo-Extend, referred to as ECEx), ECN response (ECN-Echo, referred to as ECE), congestion window reduction (Congestion Window Reduced, referred to as CWR). Wherein, ECEx=1 indicates that Ex-ECN is supported, ECEx=0 and ECE=1 indicates that ECN is supported. The usage of CWR is the same as that of ECN and will not be repeated here.
示例性的,为了与ECN相兼容,可以将原始的ECN协议中的ECT为0定义使用ECN,ECT为1定义使用Ex-ECN。Exemplarily, in order to be compatible with ECN, ECT in the original ECN protocol can be defined as 0 to define the use of ECN, and ECT to be 1 to define the use of Ex-ECN.
当然,对于功能指示信息的形式和内容指示的对应关系,均可以根据实际需求确定,本发明对此不进行具体限定。Of course, the corresponding relationship between the form of the function indication information and the content indication can be determined according to actual needs, and the present invention does not specifically limit this.
相应的,在S104之前,所述方法还可以包括:Correspondingly, before S104, the method may further include:
第一路由器根据功能指示信息,判断所述第二报文是否支持记录每个路由器的拥塞状态;The first router judges whether the second message supports recording the congestion state of each router according to the function indication information;
若所述报文支持记录记录每个路由器的拥塞状态,则执行S104。If the packet supports recording the congestion state of each router, perform S104.
若所述报文不支持记录每个路由器的拥塞状态,则可以按照现有技术中的ECN技术对报文进行相应处理,此处不再进行赘述。If the message does not support recording the congestion state of each router, the message may be processed accordingly according to the ECN technology in the prior art, which will not be repeated here.
这样一来,可以使得兼容ECN功能及Ex-ECN功能,提高了网络兼容性,也将降低网络建网成本。In this way, the ECN function and the Ex-ECN function can be compatible, which improves the network compatibility and reduces the cost of network construction.
本发明实施例提供的报文传输方法,通过发送端设备按照第一路由信息发送第一报文,其中,所述第一路由信息中包含有至少两个路由器的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位;所述至少两个路由器中的第一路由器接收第二报文,其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文,所述第一路由器为所述至少两个路由器中的任意一个路由器;所述第一路由器确定所述第一路由器的拥塞状态;所述第一路由器在所述第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态;所述第一路由器根据所述第一路由信息转发记录有所述第一路由器的拥塞状态的所述第二报文;所述接收端设备接收经过所述至少两个路由器转发后的第一报文,所述转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息;所述接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备。这样一来,对报文传输过程中经过的每一个路由器的拥塞状态均进行了标记,也就是对报文传输路径中的每一个链路的拥塞状态进行了标记,相比于现有技术中仅对路径的拥塞进行标记而言,便于发送报文的发送端在进行拥塞控制时,除了可以调整发送速率,还可以根据路径中链路的拥塞情况,重新规划路径进行报文传输,使得拥塞控制方法多样且提高了网络利用率。需要说明的是,在本发明实施例中,链路就是指从一个结点到相邻结点的一段物理线路,而中间没有任何其他的交换结点。本领域技术人员可以知道,在进行数据通信时,两个计算机之间的通信路径往往要经过许多段这样的链路,链路只是一条路径的组成部分。In the packet transmission method provided by the embodiment of the present invention, the sending end device sends the first packet according to the first routing information, wherein the first routing information includes routing information of at least two routers, and the first packet The text contains a congestion flag bit for recording the congestion state of each router in the first routing information; the first router among the at least two routers receives a second packet, wherein the second packet Including the first packet or the first packet forwarded by at least one router other than the first router among the at least two routers, the first router being one of the at least two routers Any router; the first router determines the congestion status of the first router; the first router records the congestion status of the first router in the congestion flag bit of the first router in the second message ; The first router forwards the second message that records the congestion status of the first router according to the first routing information; the receiving end device receives the first message forwarded by the at least two routers message, the forwarded first message includes the congestion state information of the at least two routers; the receiving end device returns the congestion state information of the at least two routers to the sending end device. In this way, the congestion status of each router passed through in the message transmission process is marked, that is, the congestion status of each link in the message transmission path is marked, compared with the prior art As far as only marking the congestion of the path is concerned, it is convenient for the sending end of the message to perform congestion control. In addition to adjusting the sending rate, it can also re-plan the path for message transmission according to the congestion of the link in the path, so that the congestion Various control methods and improved network utilization. It should be noted that, in the embodiment of the present invention, a link refers to a section of physical line from one node to an adjacent node without any other switching nodes in between. Those skilled in the art can know that, during data communication, the communication path between two computers usually passes through many segments of such links, and the link is only a component of one path.
实施例二Embodiment two
本发明实施例二提供另一种报文传输方法,以报文传输系统中包括的发送端设备、多个路由器及接收端设备对报文的传输过程为例,对实施例一和实施例二描述的报文传输方法进行详细描述。Embodiment 2 of the present invention provides another message transmission method. Taking the message transmission process of the sending end device, multiple routers and receiving end devices included in the message transmission system as an example, the first and second embodiments The described message transmission method is described in detail.
以图2所示的报文传输系统为例,发送端设备(Host A)向接收端设备(Host B)发送数据包,根据路由信息,数据包需依次经过路由器A、路由器B到达Host B;Host B通过路由器C向Host A反馈确认包。Taking the message transmission system shown in Figure 2 as an example, the sending end device (Host A) sends a data packet to the receiving end device (Host B), and according to the routing information, the data packet needs to pass through router A and router B to reach Host B in turn; Host B feeds back an acknowledgment packet to Host A through router C.
其中,通信双方协商为按照路由信息,路由器的拥塞标记位从高位到低位。Wherein, the communication parties negotiate that according to the routing information, the congestion flag bit of the router is from high bit to low bit.
参见图3,本发明实施例三提供的报文传输方法可以包括:Referring to FIG. 3, the message transmission method provided by Embodiment 3 of the present invention may include:
S301、Host A将数据包中拥塞标记位及路由器标记位清零。S301. Host A clears the congestion flag bit and the router flag bit in the data packet.
示例性的,在S401中,经Host A的清零处理后的数据包如表6所示。Exemplarily, in S401, the data packets processed by Host A are shown in Table 6.
表6Table 6
S302、Host A向路由器A发送数据包。S302. Host A sends a data packet to router A.
示例性的,Host A向路由器A发送如表6所示的数据包。Exemplarily, Host A sends the data packets shown in Table 6 to Router A.
S303、路由器A判断数据包是否支持Ex-ECN功能。S303. Router A judges whether the data packet supports the Ex-ECN function.
示例性的,当路由器A接收到如表6所示的数据包时,根据数据包中的ECT信息为“1”,判断接收的数据包支持Ex-ECN功能。Exemplarily, when router A receives the data packet shown in Table 6, according to the ECT information in the data packet being "1", it is judged that the received data packet supports the Ex-ECN function.
可选的,若S303中,路由器A判断数据包支持Ex-ECN功能,则执行S304;若S303中,路由器A判断数据包不支持Ex-ECN功能,则采用ECN技术进行标记。Optionally, if in S303, router A judges that the data packet supports the Ex-ECN function, execute S304; if in S303, router A judges that the data packet does not support the Ex-ECN function, then uses ECN technology for marking.
S304、路由器A将数据包中的路由器标记位的值加一。S304. Router A adds one to the value of the router flag bit in the data packet.
示例性的,路由器A将接收到如表6所示的数据包中路由器标记位的值加一,此时数据包如表7所示。Exemplarily, router A adds one to the value of the router flag bit in the received data packet shown in Table 6, and the data packet is shown in Table 7 at this time.
表7Table 7
S305、路由器A确定自身的拥塞状态,更新数据包内路由器A的拥塞标志位。S305. Router A determines its own congestion state, and updates the congestion flag bit of router A in the data packet.
示例性的,假设路由器A通过判断缓冲区队列长度大于或等于预设阈值判断路由器A中发生拥塞,则将接收到的如表7所示的数据包更新为如表8所示。Exemplarily, assuming that router A judges that congestion occurs in router A by judging that the buffer queue length is greater than or equal to a preset threshold, the received data packets shown in Table 7 are updated as shown in Table 8.
表8Table 8
S306、路由器A向路由器B发送更新后的数据包。S306. Router A sends the updated data packet to router B.
示例性的,路由器A向路由器B发送如表8所示的数据包。Exemplarily, router A sends the data packet shown in Table 8 to router B.
S307、路由器B对接收的数据包进行更新。S307. Router B updates the received data packet.
需要说明的是,S307中路由器B对接收的数据包进行转发的过程,与S303至S306中路由器A对接收的数据包进行转发的过程相同,此处不再一一详述。It should be noted that the process of router B forwarding the received data packet in S307 is the same as the process of router A forwarding the received data packet in S303 to S306, and will not be described in detail here.
示例性的,假设路由器B确定自身的拥塞状态为未发生拥塞,S307中路由器B对数据包进行转发后,数据包如表9所示。Exemplarily, assuming that router B determines that its own congestion state is no congestion, after router B forwards the data packet in S307, the data packet is as shown in Table 9.
表9Table 9
S308、路由器B向Host B发送更新后的数据包。S308. Router B sends the updated data packet to Host B.
示例性的,路由器B向Host B发送如表9所示的数据包。Exemplarily, router B sends the data packets shown in Table 9 to Host B.
S309、Host B提取接收的数据包中的路由器标记位及拥塞标记位添加至确认包中。S309. Host B extracts the router flag and the congestion flag from the received data packet and adds them to the confirmation packet.
示例性的,当Host B接收到如表9所示的数据包时,根据数据包中的ECT判断该数据包支持Ex-ECN,因此,提取数据包中的路由器标记位及拥塞标记位,添加至向Host A反馈的确认包中,此时的确认包如表10所示。Exemplary, when Host B receives the data packet shown in table 9, according to the ECT in the data packet, it is judged that the data packet supports Ex-ECN, therefore, extract the router mark bit and the congestion mark bit in the data packet, add To the acknowledgment packet fed back to Host A, the acknowledgment packet at this time is shown in Table 10.
表10Table 10
S310、Host B向路由器C反馈确认包。S310. Host B feeds back an acknowledgment packet to router C.
示例性的,Host B向路由器C反馈如表10所示的确认包。Exemplarily, Host B feeds back the acknowledgment packet shown in Table 10 to Router C.
S311、路由器C对确认包进行更新。S311. The router C updates the confirmation packet.
需要说明的是,S311中路由器C对确认包进行转发的过程,与S303至S306中路由器A对数据包进行转发的过程相同,此处不再一一详述。It should be noted that the process of forwarding the confirmation packet by router C in S311 is the same as the process of forwarding the data packet by router A in S303 to S306, and will not be described in detail here.
示例性的,假设路由器C确定自身的拥塞状态为未发生拥塞,S311中路由器C对确认包进行更新后,确认包如表11所示。Exemplarily, assuming that router C determines that its own congestion state is no congestion, after router C updates the acknowledgment packet in S311, the acknowledgment packet is as shown in Table 11.
表11Table 11
S312、路由器C向Host A发送更新后的确认包。S312. Router C sends an updated confirmation packet to Host A.
示例性的,路由器C可以向Host A发送如表11所示的确认包。Exemplarily, router C may send the confirmation packet shown in Table 11 to Host A.
具体的,当Host A接收到如表11所示的确认包时,在可以获知路由器A发送拥塞;参考此信息,Host A可以重新规划路径,避免拥塞。Specifically, when Host A receives the acknowledgment packet shown in Table 11, it can know that router A is congested; referring to this information, Host A can re-plan the path to avoid congestion.
本发明实施例提供的报文传输方法,通过发送端设备按照第一路由信息发送第一报文,其中,所述第一路由信息中包含有至少两个路由器的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位;所述至少两个路由器中的第一路由器接收第二报文,其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文,所述第一路由器为所述至少两个路由器中的任意一个路由器;所述第一路由器确定所述第一路由器的拥塞状态;所述第一路由器在所述第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态;所述第一路由器根据所述第一路由信息转发记录有所述第一路由器的拥塞状态的所述第二报文;所述接收端设备接收经过所述至少两个路由器转发后的第一报文,所述转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息;所述接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备。这样一来,对报文传输过程中经过的每一个路由器的拥塞状态均进行了标记,也就是对报文传输路径中的每一个链路的拥塞状态进行了标记,相比于现有技术中仅对路径的拥塞进行标记而言,便于发送报文的发送端在进行拥塞控制时,除了可以调整发送速率,还可以根据路径中链路的拥塞情况,重新规划路径进行报文传输,使得拥塞控制方法多样且提高了网络利用率。本发明实施例提供的报文传输方法可以使得发送端设备能够通过获知的路径中每条链路的拥塞状态控制后续报文的发送,有利于减少通信链路的拥塞,提供网络利用率。In the packet transmission method provided by the embodiment of the present invention, the sending end device sends the first packet according to the first routing information, wherein the first routing information includes routing information of at least two routers, and the first packet The text contains a congestion flag bit for recording the congestion state of each router in the first routing information; the first router among the at least two routers receives a second packet, wherein the second packet Including the first packet or the first packet forwarded by at least one router other than the first router among the at least two routers, the first router being one of the at least two routers Any router; the first router determines the congestion status of the first router; the first router records the congestion status of the first router in the congestion flag bit of the first router in the second message ; The first router forwards the second message that records the congestion status of the first router according to the first routing information; the receiving end device receives the first message forwarded by the at least two routers message, the forwarded first message includes the congestion state information of the at least two routers; the receiving end device returns the congestion state information of the at least two routers to the sending end device. In this way, the congestion status of each router passed through in the message transmission process is marked, that is, the congestion status of each link in the message transmission path is marked, compared with the prior art As far as only marking the congestion of the path is concerned, it is convenient for the sending end of the message to perform congestion control. In addition to adjusting the sending rate, it can also re-plan the path for message transmission according to the congestion of the link in the path, so that the congestion Various control methods and improved network utilization. The message transmission method provided by the embodiment of the present invention can enable the sender device to control the sending of subsequent messages by knowing the congestion state of each link in the path, which is beneficial to reduce the congestion of communication links and improve network utilization.
实施例三Embodiment three
本发明实施例三提供一种报文传输系统40,参见图4,所述报文传输系统40可以包括发送端设备401、接收端设备402以及多个路由器403;其中,Embodiment 3 of the present invention provides a message transmission system 40. Referring to FIG. 4, the message transmission system 40 may include a sending end device 401, a receiving end device 402, and multiple routers 403; wherein,
所述发送端设备401用于,按照第一路由信息发送第一报文,其中,所述第一路由信息中包含有至少两个路由器403的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位;The sending end device 401 is configured to send a first packet according to the first routing information, wherein the first routing information includes routing information of at least two routers 403, and the first packet includes routing information for record the congestion flag bit of the congestion state of each router in the first routing information;
所述至少两个路由器403中的第一路由器403用于:接收第二报文,其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文,所述第一路由器为所述至少两个路由器中的任意一个路由器;The first router 403 of the at least two routers 403 is configured to: receive a second message, wherein the second message includes the first message or passes through the at least two routers except the first message. A first packet forwarded by at least one router other than the router, where the first router is any one of the at least two routers;
所述第一路由器403还用于,确定所述第一路由器的拥塞状态;The first router 403 is further configured to determine the congestion state of the first router;
所述第一路由器403还用于,在所述第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态;The first router 403 is further configured to record the congestion status of the first router in the congestion flag bit of the first router in the second packet;
所述第一路由器403还用于,根据所述第一路由信息转发记录有所述第一路由器的拥塞状态的所述第二报文;The first router 403 is further configured to forward, according to the first routing information, the second packet recorded with the congestion state of the first router;
所述接收端设备402用于,接收经过所述至少两个路由器403转发后的第一报文,所述转发后的第一报文中包含有所述至少两个路由器403的拥塞状态信息;The receiving end device 402 is configured to receive the first message forwarded by the at least two routers 403, where the forwarded first message includes congestion state information of the at least two routers 403;
所述接收端设备402还用于,将所述至少两个路由器403的拥塞状态信息返回给所述发送端设备。The receiving end device 402 is further configured to return the congestion state information of the at least two routers 403 to the sending end device.
进一步的,所述第一路由器403还可以用于:Further, the first router 403 may also be used for:
在接收所述第二报文之后,将所述第二报文中的路由器标记位的值加一;其中,所述路由器标记位用于记录在当前传输方向传输过程中经过的路由器数量。After receiving the second message, add one to the value of the router flag in the second message; wherein, the router flag is used to record the number of routers passed during the transmission process of the current transmission direction.
进一步的,所述发送端设备401还可以用于:Further, the sending end device 401 may also be used for:
在按照第一路由信息发送第一报文之前,将所述第一报文中拥塞标记位的值清零。Before sending the first packet according to the first routing information, the value of the congestion flag bit in the first packet is cleared.
进一步的,所述接收端设备402具体可以用于:Further, the receiving end device 402 may specifically be used for:
生成确认包,所述确认包用于确认所述接收端设备已接收到所述第一报文,所述确认包中包含有所述至少两个路由器的拥塞状态信息;generating an acknowledgment packet, where the acknowledgment packet is used to confirm that the receiving end device has received the first message, and the acknowledgment packet includes congestion status information of the at least two routers;
向所述发送端设备401发送所述确认包。Send the confirmation packet to the sending end device 401 .
可选的,所述第一路由器403具体可以用于:Optionally, the first router 403 may specifically be used for:
若所述第一路由器缓冲区队列长度不小于预设阈值,则确定所述第一路由器的拥塞状态为发生拥塞;If the buffer queue length of the first router is not less than a preset threshold, then determining that the congestion state of the first router is congestion;
若所述第一路由器缓冲区队列长度小于预设阈值,则确定所述第一路由器的拥塞状态为未发生拥塞。If the buffer queue length of the first router is smaller than a preset threshold, it is determined that the congestion state of the first router is no congestion.
本发明实施例提供的报文传输系统,通过发送端设备按照第一路由信息发送第一报文,其中,所述第一路由信息中包含有至少两个路由器的路由信息,所述第一报文中包含有用于记录所述第一路由信息中的每个路由器的拥塞状态的拥塞标记位;所述至少两个路由器中的第一路由器接收第二报文,其中,所述第二报文包括所述第一报文或经过所述至少两个路由器中除所述第一路由器之外的其他至少一个路由器转发的第一报文,所述第一路由器为所述至少两个路由器中的任意一个路由器;所述第一路由器确定所述第一路由器的拥塞状态;所述第一路由器在所述第二报文中的第一路由器的拥塞标记位中记录所述第一路由器的拥塞状态;所述第一路由器根据所述第一路由信息转发记录有所述第一路由器的拥塞状态的所述第二报文;所述接收端设备接收经过所述至少两个路由器转发后的第一报文,所述转发后的第一报文中包含有所述至少两个路由器的拥塞状态信息;所述接收端设备将所述至少两个路由器的拥塞状态信息返回给所述发送端设备。这样一来,对报文传输过程中经过的每一个路由器的拥塞状态均进行了标记,也就是对报文传输路径中的每一个链路的拥塞状态进行了标记,相比于现有技术中仅对路径的拥塞进行标记而言,便于发送报文的发送端在进行拥塞控制时,除了可以调整发送速率,还可以根据路径中链路的拥塞情况,重新规划路径进行报文传输,使得拥塞控制方法多样且提高了网络利用率。本发明实施例提供的报文传输系统可以在报文中标记路径中每条链路的拥塞状态,使得发送端设备能够通过获知的路径中每条链路的拥塞状态控制后续报文的发送,有利于减少通信链路的拥塞,提供网络利用率。In the packet transmission system provided by the embodiment of the present invention, the sending end device sends the first packet according to the first routing information, wherein the first routing information includes routing information of at least two routers, and the first packet The text contains a congestion flag bit for recording the congestion state of each router in the first routing information; the first router among the at least two routers receives a second packet, wherein the second packet Including the first packet or the first packet forwarded by at least one router other than the first router among the at least two routers, the first router being one of the at least two routers Any router; the first router determines the congestion status of the first router; the first router records the congestion status of the first router in the congestion flag bit of the first router in the second message ; The first router forwards the second message that records the congestion status of the first router according to the first routing information; the receiving end device receives the first message forwarded by the at least two routers message, the forwarded first message includes the congestion state information of the at least two routers; the receiving end device returns the congestion state information of the at least two routers to the sending end device. In this way, the congestion status of each router passed through in the message transmission process is marked, that is, the congestion status of each link in the message transmission path is marked, compared with the prior art As far as only marking the congestion of the path is concerned, it is convenient for the sending end of the message to perform congestion control. In addition to adjusting the sending rate, it can also re-plan the path for message transmission according to the congestion of the link in the path, so that the congestion Various control methods and improved network utilization. The message transmission system provided by the embodiment of the present invention can mark the congestion state of each link in the path in the message, so that the sending end device can control the sending of subsequent messages through the learned congestion state of each link in the path, It is beneficial to reduce the congestion of the communication link and improve the utilization rate of the network.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the above description of the implementation, those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described device can refer to the corresponding process in the foregoing method embodiment, which is not repeated here. repeat.
本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The essence of the technical solution of the present invention or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for Make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此。The above descriptions are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510444289.0A CN106375232B (en) | 2015-07-24 | 2015-07-24 | A kind of message transmitting method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510444289.0A CN106375232B (en) | 2015-07-24 | 2015-07-24 | A kind of message transmitting method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106375232A CN106375232A (en) | 2017-02-01 |
CN106375232B true CN106375232B (en) | 2019-11-26 |
Family
ID=57881047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510444289.0A Active CN106375232B (en) | 2015-07-24 | 2015-07-24 | A kind of message transmitting method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106375232B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108933738B (en) * | 2017-05-27 | 2021-09-17 | 华为技术有限公司 | Method, device and system for processing network congestion |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056260A (en) * | 2007-05-21 | 2007-10-17 | 中南大学 | ECN mechanism-based congestion control method in the mixed network |
US7558200B2 (en) * | 2005-09-01 | 2009-07-07 | Microsoft Corporation | Router congestion management |
WO2014074802A1 (en) * | 2012-11-09 | 2014-05-15 | Interdigital Patent Holdings, Inc. | Controlling traffic in information centric networks |
-
2015
- 2015-07-24 CN CN201510444289.0A patent/CN106375232B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7558200B2 (en) * | 2005-09-01 | 2009-07-07 | Microsoft Corporation | Router congestion management |
CN101056260A (en) * | 2007-05-21 | 2007-10-17 | 中南大学 | ECN mechanism-based congestion control method in the mixed network |
WO2014074802A1 (en) * | 2012-11-09 | 2014-05-15 | Interdigital Patent Holdings, Inc. | Controlling traffic in information centric networks |
Also Published As
Publication number | Publication date |
---|---|
CN106375232A (en) | 2017-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113709057B (en) | Network congestion notification method, proxy node, network node and computer equipment | |
WO2018210117A1 (en) | Congestion control method, network device, and network interface controller thereof | |
US9246818B2 (en) | Congestion notification in leaf and spine networks | |
EP2261811B1 (en) | Method and system for energy-efficiency-based packet classification | |
US8953631B2 (en) | Interruption, at least in part, of frame transmission | |
WO2018121535A1 (en) | Load balance processing method and apparatus | |
TW200828922A (en) | Communication apparatus and communication method | |
CN108432194A (en) | A congestion processing method, host and system | |
CN113746743B (en) | Data message transmission method and device | |
CN108243117B (en) | Flow monitoring method and device and electronic equipment | |
CN100512227C (en) | Packet transfer control system and method | |
CN113055935A (en) | Congestion control method, equipment and system | |
CN110191066A (en) | A kind of method, equipment and the system of determining maximum transmission unit PMTU | |
CN105191234A (en) | Method for allocating resources in a mesh communications network, computer program, information storage means and node device | |
CN101616078A (en) | A method for discovering the maximum transmission unit of a path, a router and a node device | |
CN117459460A (en) | Method, device, equipment, network system and storage medium for processing network congestion | |
CN117354253A (en) | A network congestion notification method, device and storage medium | |
CN117041133A (en) | Traffic scheduling optimization method, system and medium in SRv6 network | |
EP3811678B1 (en) | Method and mesh node for enabling communication in a wireless mesh network | |
JP2008118281A (en) | Communication device | |
CN106375232B (en) | A kind of message transmitting method and system | |
CN107979544A (en) | A kind of retransmission method of IP packet, equipment and system | |
CN104104601A (en) | Data transmission method, device and system | |
CN108322402B (en) | Message processing method, device and system | |
CN114513440A (en) | Message transmission method, sending end and network equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |