Movatterモバイル変換


[0]ホーム

URL:


CN103259696B - Network bandwidth detection method, device and the network equipment - Google Patents

Network bandwidth detection method, device and the network equipment
Download PDF

Info

Publication number
CN103259696B
CN103259696BCN201310137241.6ACN201310137241ACN103259696BCN 103259696 BCN103259696 BCN 103259696BCN 201310137241 ACN201310137241 ACN 201310137241ACN 103259696 BCN103259696 BCN 103259696B
Authority
CN
China
Prior art keywords
equipment
network
link
bandwidth
network equipment
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.)
Expired - Fee Related
Application number
CN201310137241.6A
Other languages
Chinese (zh)
Other versions
CN103259696A (en
Inventor
陈峥
胡雪梅
覃伟峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Cable Huaihua Network Co ltd
Shanghai Set Up Mdt Infotech Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN201310137241.6ApriorityCriticalpatent/CN103259696B/en
Publication of CN103259696ApublicationCriticalpatent/CN103259696A/en
Application grantedgrantedCritical
Publication of CN103259696BpublicationCriticalpatent/CN103259696B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本发明实施例公开了网络带宽检测方法、装置及网络设备,该方法包括:第一网络设备分别以第一速率向第二网络设备发送多组探测报文,以使第一网络设备与第二网络设备之间设置的路由设备和第二网络设备中的每个设备接收到一组探测报文;接收每个设备根据接收到的探测报文的数量返回的失效报文;根据每个设备返回的失效报文的数量计算第一网络设备与所述第二网络设备之间每段链路的链路带宽;根据每段链路的链路带宽确定第一网络设备与第二网络设备之间的网络带宽。本发明实施例只需要在第一网络设备侧部署网络带宽检测功能,且无需第二网络设备对第一网络设备发出的每个数据包都进行响应,因此有效缩短了网络带宽的检测时间,节省了网络资源。

The embodiment of the present invention discloses a network bandwidth detection method, device, and network equipment. The method includes: the first network equipment sends multiple sets of detection messages to the second network equipment at a first rate, so that the first network equipment and the second network equipment Each device in the routing device set between the network devices and the second network device receives a group of detection messages; receives the invalidation message returned by each device according to the number of received detection messages; returns according to each device Calculate the link bandwidth of each link between the first network device and the second network device according to the number of failure messages; determine the link bandwidth between the first network device and the second network device according to the link bandwidth of each link network bandwidth. The embodiment of the present invention only needs to deploy the network bandwidth detection function on the first network device side, and does not require the second network device to respond to each data packet sent by the first network device, thus effectively shortening the detection time of the network bandwidth and saving network resources.

Description

Translated fromChinese
网络带宽检测方法、装置及网络设备Network bandwidth detection method, device and network equipment

技术领域technical field

本发明涉及通信技术领域,尤其涉及网络带宽检测方法、装置及网络设备。The invention relates to the technical field of communication, in particular to a network bandwidth detection method, device and network equipment.

背景技术Background technique

随着网络设备的不断更新,网络具有越来越高的网络带宽,但网络延迟的存在极大地影响了网络带宽的利用率,为了充分利用网络带宽,需要采用高效且受网络延迟影响较小的网络带宽检测方法,以便根据检测结果获取的网络带宽,调节网络设备发送数据的速率。With the continuous update of network equipment, the network has higher and higher network bandwidth, but the existence of network delay greatly affects the utilization of network bandwidth. In order to make full use of network bandwidth, it is necessary to use efficient and less affected by network delay. The network bandwidth detection method is used to adjust the data sending rate of the network device according to the network bandwidth obtained from the detection result.

现有技术中,可以采用双端检测方式检测网络带宽,该检测方式先由发送端网络设备以预定速率R向接收端网络设备发送测量包,接收端网络设备记录接收到的测量包的到达时间,并根据记录的到达时间绘出延迟曲线,当根据延迟曲线检测到R高于网络带宽,从而造成传输链路拥塞时,接收端网络设备将检测结果反馈至发送端网络设备,发送端网络设备根据策略调整R的大小并再次发送测量包,直至接收端网络设备根据绘出的延迟曲线确认链路无拥塞,从而检测出调整后的R近似于网络带宽。In the prior art, a double-ended detection method can be used to detect network bandwidth. In this detection method, the network device at the sending end sends a measurement packet to the network device at the receiving end at a predetermined rate R, and the network device at the receiving end records the arrival time of the received measurement packet. , and draw the delay curve according to the recorded arrival time, when it is detected that R is higher than the network bandwidth according to the delay curve, resulting in transmission link congestion, the receiving end network device will feed back the detection result to the sending end network device, and the sending end network device Adjust the size of R according to the policy and send the measurement packet again until the network device at the receiving end confirms that the link is not congested according to the drawn delay curve, thus detecting that the adjusted R is close to the network bandwidth.

发明人在对现有技术的研究过程中发现,现有网络带宽检测方法,需要发送端网络设备与接收端网络设备共同进行检测,并且当发送端网络设备首次发送测量包的速率R高于网络带宽时,可能需要发送端网络设备多次调整速率R并发送测量包才能由接收端网络设备检测出网络带宽,因此检测时间较长,且检测过程需要占用大量网络资源。In the process of researching the existing technology, the inventor found that the existing network bandwidth detection method requires the network device at the sending end and the network device at the receiving end to perform detection together, and when the rate R at which the network device at the sending end sends measurement packets for the first time is higher than that of the network In terms of bandwidth, it may be necessary for the network device at the sending end to adjust the rate R multiple times and send a measurement packet before the network device at the receiving end can detect the network bandwidth. Therefore, the detection time is relatively long, and the detection process requires a large amount of network resources.

发明内容Contents of the invention

本发明实施例中提供了网络带宽检测方法、装置及网络设备,用以解决现有技术中检测网络带宽时间较长,且需要占用大量网络资源的问题。Embodiments of the present invention provide a network bandwidth detection method, device, and network equipment to solve the problems in the prior art that it takes a long time to detect network bandwidth and requires a large amount of network resources.

为解决上述问题,本发明实施例提供的技术方案如下:In order to solve the above problems, the technical solutions provided by the embodiments of the present invention are as follows:

第一方面,提供一种网络带宽检测方法,所述方法包括:In a first aspect, a network bandwidth detection method is provided, the method comprising:

第一网络设备分别以第一速率向第二网络设备发送多组探测报文,以使所述第一网络设备与所述第二网络设备之间设置的路由设备和所述第二网络设备中的每个设备接收到一组探测报文;The first network device respectively sends multiple groups of detection packets to the second network device at the first rate, so that the routing device set between the first network device and the second network device and the second network device Each device of the device receives a set of detection messages;

所述第一网络设备接收所述每个设备根据接收到的探测报文的数量返回的失效报文;The first network device receives the failure message returned by each device according to the number of received detection messages;

所述第一网络设备根据所述每个设备返回的失效报文的数量计算所述第一网络设备与所述第二网络设备之间每段链路的链路带宽;The first network device calculates the link bandwidth of each link between the first network device and the second network device according to the number of failure messages returned by each device;

所述第一网络设备根据所述每段链路的链路带宽确定所述第一网络设备与所述第二网络设备之间的网络带宽。The first network device determines the network bandwidth between the first network device and the second network device according to the link bandwidth of each link.

结合第一方面,在第一方面的第一种可能的实现方式中,所述第一网络设备分别以第一速率向第二网络设备发送多组探测报文,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the first network device respectively sends multiple sets of detection packets to the second network device at a first rate, including:

第一网络设备为所述每个设备生成一组网络控制报文协议ICMP探测报文,所述每个设备的一组ICMP探测报文中的生存时间TTL字段的值设置为与所述设备对应的链路的链路编号一致,所述设备对应的链路为所述设备与所述设备的上一跳设备之间的链路;The first network device generates a group of network control message protocol ICMP detection messages for each device, and the value of the time-to-live TTL field in a group of ICMP detection messages of each device is set to correspond to the device The link numbers of the links are the same, and the link corresponding to the device is the link between the device and the previous hop device of the device;

第一网络设备分别以第一速率向所述第二网络设备发送为所述每个设备生成的一组ICMP探测报文。The first network device respectively sends a group of ICMP detection packets generated for each device to the second network device at a first rate.

结合第一方面,或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述第一网络设备根据所述每个设备返回的失效报文的数量计算所述第一网络设备与所述第二网络设备之间每段链路的链路带宽,包括:With reference to the first aspect, or the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the first network device Calculate the link bandwidth of each link between the first network device and the second network device, including:

所述第一网络设备将向所述每个设备发送的一组探测报文的数量减去所述设备返回的失效报文的数量,获得所述设备对应的链路上的丢失报文数量;The first network device subtracts the number of failure messages returned by the device from the number of a group of detection messages sent to each device to obtain the number of lost messages on the link corresponding to the device;

将所述丢失报文数量除以所述发送的一组探测报文的数量后与所述第一速率相乘,得到第一乘积,将所述第一速率与所述第一乘积的差值确定为所述设备对应的链路的链路带宽。Dividing the number of lost packets by the number of a group of probe packets sent is multiplied by the first rate to obtain a first product, and the difference between the first rate and the first product Determine the link bandwidth of the link corresponding to the device.

结合第一方面,或第一方面的第一种可能的实现方式,或第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述第一网络设备根据所述每段链路的链路带宽确定所述第一网络设备与所述第二网络设备之间的网络带宽,包括: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 first network The device determines the network bandwidth between the first network device and the second network device according to the link bandwidth of each link, including:

所述第一网络设备从所述每段链路的链路带宽中获得最小的链路带宽,将所述最小的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。The first network device obtains the minimum link bandwidth from the link bandwidth of each link, and determines the minimum link bandwidth as the link between the first network device and the second network device network bandwidth.

结合第一方面,或第一方面的第一种可能的实现方式,或第一方面的第二种可能的实现方式,在第一方面的第四种可能的实现方式中,所述第一网络设备根据所述每段链路的链路带宽确定所述第一网络设备与所述第二网络设备之间的网络带宽,包括:With reference to the first aspect, or the first possible implementation of the first aspect, or the second possible implementation of the first aspect, in a fourth possible implementation of the first aspect, the first network The device determines the network bandwidth between the first network device and the second network device according to the link bandwidth of each link, including:

所述第一网络设备从所述每段链路的链路带宽中获得最小的链路带宽;The first network device obtains the minimum link bandwidth from the link bandwidth of each link;

所述第一网络设备为所述最小的链路带宽对应的第一设备重新生成一组探测报文,重新生成的所述一组探测报文中包含的报文数量大于所述第一设备已接收到的所述第一网络设备发送的一组探测报文中包含的报文数量;The first network device regenerates a group of detection packets for the first device corresponding to the minimum link bandwidth, and the number of packets contained in the regenerated group of detection packets is greater than that of the first device. The received number of packets contained in a group of detection packets sent by the first network device;

所述第一网络设备向所述第一设备发送所述重新生成的一组探测报文;The first network device sends the regenerated group of detection packets to the first device;

所述第一网络设备接收所述第一设备根据接收到的探测报文的数量返回的第一失效报文;The first network device receives the first failure message returned by the first device according to the number of received detection messages;

所述第一网络设备将根据所述第一失效报文的数量计算的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。The first network device determines the link bandwidth calculated according to the number of the first failure packets as the network bandwidth between the first network device and the second network device.

第二方面,提供一种网络带宽检测装置,所述装置包括:In a second aspect, a device for detecting network bandwidth is provided, the device comprising:

发送单元,用于分别以第一速率向第二网络设备发送多组探测报文,以使所述第一网络设备与所述第二网络设备之间设置的路由设备和所述第二网络设备中的每个设备接收到一组探测报文;a sending unit, configured to respectively send multiple groups of detection packets to the second network device at a first rate, so that the routing device set between the first network device and the second network device and the second network device Each device in receives a set of detection packets;

接收单元,用于接收所述每个设备根据接收到的探测报文的数量返回的失效报文;a receiving unit, configured to receive invalidation messages returned by each device according to the number of received detection messages;

计算单元,用于根据所述接收单元接收到的所述每个设备返回的失效报文的数量计算所述第一网络设备与所述第二网络设备之间每段链路的链路带宽;a calculation unit, configured to calculate the link bandwidth of each link between the first network device and the second network device according to the number of failure messages returned by each device received by the receiving unit;

确定单元,用于根据所述计算单元计算的所述每段链路的链路带宽确定所述第一网络设备与所述第二网络设备之间的网络带宽。A determining unit, configured to determine the network bandwidth between the first network device and the second network device according to the link bandwidth of each link calculated by the calculating unit.

结合第二方面,在第二方面的第一种可能的实现方式中,所述发送单元包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, the sending unit includes:

探测报文生成子单元,用于为所述每个设备生成一组网络控制报文协议ICMP探测报文,所述每个设备的一组ICMP探测报文中的生存时间TTL字段的值设置为与所述设备对应的链路的链路编号一致,所述设备对应的链路为所述设备与所述设备的上一跳设备之间的链路;Probe message generation subunit, used to generate a set of network control message protocol ICMP probe messages for each device, the value of the time-to-live TTL field in a set of ICMP probe messages of each device is set to Consistent with the link number of the link corresponding to the device, the link corresponding to the device is a link between the device and the previous hop device of the device;

探测报文发送子单元,用于分别以第一速率向所述第二网络设备发送为所述每个设备生成的一组ICMP探测报文。A detection packet sending subunit, configured to respectively send a group of ICMP detection packets generated for each device to the second network device at a first rate.

结合第二方面,或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述计算单元包括: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 computing unit includes:

丢失报文计算子单元,用于将向所述每个设备发送的一组探测报文的数量减去所述设备返回的失效报文的数量,获得所述设备对应的链路上的丢失报文数量;A lost message calculation subunit, configured to subtract the number of invalid messages returned by the device from the number of a group of detection messages sent to each device to obtain the lost message on the link corresponding to the device number of documents;

链路带宽确定子单元,用于将所述丢失报文数量除以所述发送的一组探测报文的数量后与所述第一速率相乘,得到第一乘积,将所述第一速率与所述第一乘积的差值确定为所述设备对应的链路的链路带宽。A link bandwidth determining subunit, configured to divide the number of lost packets by the number of a group of probe packets sent and multiply it by the first rate to obtain a first product, and divide the first rate The difference with the first product is determined as the link bandwidth of the link corresponding to the device.

结合第二方面,或第二方面的第一种可能的实现方式,或第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述确定单元,具体用于从所述每段链路的链路带宽中获得最小的链路带宽,将所述最小的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。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 determining unit, Specifically, it is used to obtain the minimum link bandwidth from the link bandwidth of each link, and determine the minimum link bandwidth as the network bandwidth between the first network device and the second network device .

结合第二方面,或第二方面的第一种可能的实现方式,或第二方面的第二种可能的实现方式,在第二方面的第四种可能的实现方式中,所述确定单元包括:With reference to the second aspect, or the first possible implementation of the second aspect, or the second possible implementation of the second aspect, in a fourth possible implementation of the second aspect, the determining unit includes :

最小带宽获得子单元,用于从所述每段链路的链路带宽中获得最小的链路带宽;a minimum bandwidth obtaining subunit, configured to obtain the minimum link bandwidth from the link bandwidths of each link;

探测报文重生子单元,用于为所述最小的链路带宽对应的第一设备重新生成一组探测报文,重新生成的所述一组探测报文中包含的报文数量大于所述第一设备已接收到的所述第一网络设备发送的一组探测报文中包含的报文数量;The detection message regenerating subunit is configured to regenerate a group of detection messages for the first device corresponding to the minimum link bandwidth, and the number of messages contained in the regenerated group of detection messages is greater than that of the first device. The number of packets contained in a group of detection packets sent by the first network device that a device has received;

探测报文重发子单元,用于向所述第一设备发送所述重新生成的一组探测报文;A detection message resending subunit, configured to send the regenerated group of detection messages to the first device;

失效报文接收子单元,用于接收所述第一设备根据接收到的探测报文的数量返回的第一失效报文;An invalidation message receiving subunit, configured to receive the first invalidation message returned by the first device according to the number of received detection messages;

网络带宽确定子单元,用于将根据所述第一失效报文的数量计算的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。A network bandwidth determining subunit, configured to determine the link bandwidth calculated according to the number of the first failure packets as the network bandwidth between the first network device and the second network device.

第三方面,提供一种网络设备,所述网络设备作为与第二网络设备通信的第一网络设备,包括:总线,以及通过所述总线连接的网络接口、发送器、接收器和处理器,In a third aspect, a network device is provided, and the network device, as a first network device communicating with a second network device, includes: a bus, and a network interface, a transmitter, a receiver, and a processor connected through the bus,

所述网络接口,用于连接网络中的路由设备;The network interface is used to connect to a routing device in the network;

所述发送器,用于通过所述网络接口分别以第一速率向第二网络设备发送多组探测报文,以使所述第一网络设备与所述第二网络设备之间设置的路由设备和所述第二网络设备中的每个设备接收到一组探测报文;The sender is configured to send multiple groups of detection packets to the second network device at a first rate through the network interface, so that the routing device set between the first network device and the second network device and each device in the second network device receives a group of detection packets;

所述接收器,用于接收所述每个设备根据接收到的探测报文的数量返回的失效报文;The receiver is configured to receive invalidation messages returned by each device according to the number of received detection messages;

所述处理器,用于根据所述每个设备返回的失效报文的数量计算所述第一网络设备与所述第二网络设备之间每段链路的链路带宽,并根据所述每段链路的链路带宽确定所述第一网络设备与所述第二网络设备之间的网络带宽。The processor is configured to calculate the link bandwidth of each link between the first network device and the second network device according to the number of failure packets returned by each device, and calculate the link bandwidth of each link between the first network device and the second network device according to the The link bandwidth of the segment link determines the network bandwidth between the first network device and the second network device.

结合第三方面,在第三方面的第一种可能的实现方式中,所述处理器,还用于为所述每个设备生成一组网络控制报文协议ICMP探测报文,所述每个设备的一组ICMP探测报文中的生存时间TTL字段的值设置为与所述设备对应的链路的链路编号一致,所述设备对应的链路为所述设备与所述设备的上一跳设备之间的链路;With reference to the third aspect, in a first possible implementation manner of the third aspect, the processor is further configured to generate a set of network control message protocol ICMP detection messages for each device, and each The value of the time-to-live TTL field in a group of ICMP detection messages of the device is set to be consistent with the link number of the link corresponding to the device, and the link corresponding to the device is the last link between the device and the device. Links between hop devices;

所述发送器,具体用于通过所述网络接口分别以第一速率向所述第二网络设备发送为所述每个设备生成的一组ICMP探测报文。The sender is specifically configured to respectively send a group of ICMP detection packets generated for each device to the second network device at a first rate through the network interface.

结合第三方面,或第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述处理器,具体用于将向所述每个设备发送的一组探测报文的数量减去所述设备返回的失效报文的数量,获得所述设备对应的链路上的丢失报文数量,将所述丢失报文数量除以所述发送的一组探测报文的数量后与所述第一速率相乘,得到第一乘积,将所述第一速率与所述第一乘积的差值确定为所述设备对应的链路的链路带宽。With reference to the third aspect, or the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the processor is specifically configured to send a Subtract the number of group detection messages from the number of invalid messages returned by the device to obtain the number of lost messages on the link corresponding to the device, and divide the number of lost messages by the sent group of detection messages The number of packets is then multiplied by the first rate to obtain a first product, and a difference between the first rate and the first product is determined as the link bandwidth of the link corresponding to the device.

结合第三方面,或第三方面的第一种可能的实现方式,或第三方面的第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述处理器,具体用于从所述每段链路的链路带宽中获得最小的链路带宽,将所述最小的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。With reference to the third aspect, or the first possible implementation manner of the third aspect, or the second possible implementation manner of the third aspect, in the third possible implementation manner of the third aspect, the processor, Specifically, it is used to obtain the minimum link bandwidth from the link bandwidth of each link, and determine the minimum link bandwidth as the network bandwidth between the first network device and the second network device .

结合第三方面,或第三方面的第一种可能的实现方式,或第三方面的第二种可能的实现方式,在第三方面的第四种可能的实现方式中,所述处理器,还用于从所述每段链路的链路带宽中获得最小的链路带宽,为所述最小的链路带宽对应的第一设备重新生成一组探测报文,重新生成的所述一组探测报文中包含的报文数量大于所述第一设备已接收到的所述第一网络设备发送的一组探测报文中包含的报文数量;With reference to the third aspect, or the first possible implementation manner of the third aspect, or the second possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the processor, It is also used to obtain the minimum link bandwidth from the link bandwidth of each link, and regenerate a set of detection packets for the first device corresponding to the minimum link bandwidth, and the regenerated set of The number of packets included in the detection packet is greater than the number of packets included in a group of detection packets sent by the first network device that has been received by the first device;

所述发送器,还用于通过所述网络接口向所述第一设备发送所述重新生成的一组探测报文;The sender is further configured to send the regenerated set of detection packets to the first device through the network interface;

所述接收器,还用于接收所述第一设备根据接收到的探测报文的数量返回的第一失效报文;The receiver is further configured to receive a first failure message returned by the first device according to the number of received detection messages;

所述处理器,还用于将根据所述第一失效报文的数量计算的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。The processor is further configured to determine the link bandwidth calculated according to the number of the first failure packets as the network bandwidth between the first network device and the second network device.

本发明实施例中,第一网络设备分别以第一速率向第二网络设备发送多组探测报文,以使第一网络设备与第二网络设备之间设置的路由设备和第二网络设备中的每个设备接收到一组探测报文,接收每个设备根据接收到的探测报文的数量返回的失效报文,根据每个设备返回的失效报文的数量计算第一网络设备与第二网络设备之间每段链路的链路带宽,并根据每段链路的链路带宽确定第一网络设备与第二网络设备之间的网络带宽。本发明实施例只需要在第一网络设备侧部署网络带宽检测功能,且无需第二网络设备对第一网络设备发出的每个数据包都进行响应,因此有效缩短了网络带宽的检测时间,节省了网络资源;并且,由于采用本发明实施例还可以检测到每段链路的链路带宽,因此提高了网络带宽的检测精度。In this embodiment of the present invention, the first network device sends multiple sets of probe packets to the second network device at the first rate, so that the routing device and the second network device set between the first network device and the second network device Each device in the network receives a group of detection packets, receives the invalidation packets returned by each device according to the number of received detection packets, and calculates the first network device and the second network device according to the number of invalidation packets returned by each device. link bandwidth of each link between the network devices, and determine the network bandwidth between the first network device and the second network device according to the link bandwidth of each link. The embodiment of the present invention only needs to deploy the network bandwidth detection function on the first network device side, and does not require the second network device to respond to each data packet sent by the first network device, thus effectively shortening the detection time of the network bandwidth and saving Network resources are reduced; and, since the link bandwidth of each link can be detected by adopting the embodiment of the present invention, the detection accuracy of the network bandwidth is improved.

附图说明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 accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为应用本发明实施例的一个网络架构示意图;Fig. 1 is a schematic diagram of a network architecture applying an embodiment of the present invention;

图2为本发明网络带宽检测方法的一个实施例流程图;Fig. 2 is a flowchart of an embodiment of the network bandwidth detection method of the present invention;

图3为本发明网络带宽检测方法的另一个实施例流程图;FIG. 3 is a flow chart of another embodiment of the network bandwidth detection method of the present invention;

图4为本发明网络带宽检测方法的另一个实施例流程图;FIG. 4 is a flow chart of another embodiment of the network bandwidth detection method of the present invention;

图5为本发明实施例的一个应用场景示意图;FIG. 5 is a schematic diagram of an application scenario of an embodiment of the present invention;

图6为本发明网络带宽检测装置的实施例框图;6 is a block diagram of an embodiment of a network bandwidth detection device of the present invention;

图7为本发明网络设备的实施例框图。Fig. 7 is a block diagram of an embodiment of a network device according to the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例中,第一网络设备与第二网络设备之间的传输路径上设置有多个路由设备,即第一网络设备与第二网络设备之间的传输路径由多段链路组成,假设第一网络设备、第二网络设备或第一网络设备与第二网络设备之间的每个路由设备都是一个网络节点,则所谓链路就是从一个网络节点到相邻网络节点的一段传输路径,该传输路径上没有其他的网络节点。参见图1,为本发明实施例的一个网络架构示意图:In the embodiment of the present invention, multiple routing devices are set on the transmission path between the first network device and the second network device, that is, the transmission path between the first network device and the second network device is composed of multiple links, assuming The first network device, the second network device, or each routing device between the first network device and the second network device is a network node, so the so-called link is a section of transmission path from a network node to an adjacent network node , there are no other network nodes on the transmission path. Referring to Fig. 1, it is a schematic diagram of a network architecture of an embodiment of the present invention:

图1中,第一网络设备与第二网络设备之间有m个路由设备,第一网络设备与路由设备1之间的链路为链路1,即链路1为路由设备1对应的链路,同理,路由设备1与路由设备2之间的链路为链路2,以此类推,路由设备m-1与路由设备m之间的链路为链路m,路由设备m与第二网络设备之间的链路为链路m+1。本发明实施例通过检测每段链路的链路带宽以获得第一网络设备与第二网络设备之间的网络带宽,下面结合具体实施例进行详细说明。In Figure 1, there are m routing devices between the first network device and the second network device, and the link between the first network device and routing device 1 is link 1, that is, link 1 is the link corresponding to routing device 1 Similarly, the link between routing device 1 and routing device 2 is link 2, and so on, the link between routing device m-1 and routing device m is link m, and the link between routing device m and the first The link between the two network devices is link m+1. In this embodiment of the present invention, the network bandwidth between the first network device and the second network device is obtained by detecting the link bandwidth of each link, which will be described in detail below in conjunction with specific embodiments.

参见图2,为本发明网络带宽检测方法的一个实施例流程图:Referring to Fig. 2, it is a flowchart of an embodiment of the network bandwidth detection method of the present invention:

步骤201:第一网络设备分别以第一速率向第二网络设备发送多组探测报文,以使第一网络设备与第二网络设备之间设置的路由设备和第二网络设备中的每个设备接收到一组探测报文。Step 201: The first network device sends multiple sets of detection packets to the second network device at the first rate, so that each of the routing device and the second network device set between the first network device and the second network device The device receives a set of detection packets.

本发明实施例中,第一网络设备和第二网络设备可以具体为网络中的主机设备,或者交换机,或者路由器等。In the embodiment of the present invention, the first network device and the second network device may specifically be a host device, a switch, or a router in the network.

结合图1,假设第一网络设备预先获知了第一网络设备与第二网络设备之间设置的路由设备的数量m时,则可以为m个路由设备和第二网络设备中的每个设备生成一组探测报文并发送生成的一组探测报文,即共生成m+1组探测报文;如果第一网络设备未获知第一网络设备与第二网络设备之间设置的路由设备的数量m时,则可以根据网络类型生成n组探测报文,n的数量大于m+1,以保证每个路由设备和第二网络设备都可以接收到一组探测报文,例如,对于城域网,可以设置n为10,对于异地网络,则可以设置n为15左右。In conjunction with FIG. 1 , assuming that the first network device has known in advance the number m of routing devices set between the first network device and the second network device, it can be generated for each of the m routing devices and the second network device A group of detection messages and send the generated group of detection messages, that is, a total of m+1 groups of detection messages are generated; if the first network device does not know the number of routing devices set between the first network device and the second network device When m, n groups of detection messages can be generated according to the network type, and the number of n is greater than m+1, so as to ensure that each routing device and the second network device can receive a group of detection messages, for example, for a metropolitan area network , you can set n to 10, and for remote networks, you can set n to about 15.

具体的,第一网络设备可以为包括第二网络设备和所有路由设备在内的每个设备生成一组网络控制报文协议(Internet Control Message Protocol,ICMP)探测报文,每个设备的一组ICMP探测报文中的生存时间(Time To Live,TTL)字段的值设置为与该设备对应的链路的链路编号一致,该设备对应的链路为该设备与该设备的上一跳设备之间的链路,结合图1可知,例如,第一网络设备为路由设备2生成的一组ICMP探测报文的TTL设置为路由设备2对应的链路2的编号,即TTL为2,然后第一网络设备分别以第一速率向第二网络设备发送为每个设备生成的一组ICMP探测报文,该第一速率为预设的速率,通常可以将第一速率设置为高于网络的实际带宽的速率。本实施例中,第一网络设备可以将ICMP探测报文混合在向第二网络设备发送的数据报文中进行发送,此时发送ICMP探测报文的第一速率与数据报文的发送速率一致。Specifically, the first network device may generate a set of Internet Control Message Protocol (Internet Control Message Protocol, ICMP) detection packets for each device including the second network device and all routing devices, and a set of Internet Control Message Protocol (ICMP) detection packets for each device The value of the Time To Live (TTL) field in the ICMP detection message is set to be consistent with the link number of the link corresponding to the device, and the link corresponding to the device is the last hop device between the device and the device As can be seen from Figure 1, for example, the TTL of a group of ICMP detection messages generated by the first network device for routing device 2 is set to the number of link 2 corresponding to routing device 2, that is, the TTL is 2, and then The first network device sends a group of ICMP detection messages generated for each device to the second network device respectively at the first rate, the first rate is a preset rate, usually the first rate can be set higher than the network rate Actual bandwidth rate. In this embodiment, the first network device may mix the ICMP detection message with the data message sent to the second network device, and at this time, the first rate of sending the ICMP detection message is consistent with the sending rate of the data message .

本实施例中,ICMP是传输控制协议/因特网互联协议(TCP/IP,TransmissionControl Protocol/Internet Protocol)的一个子协议,可以用于在IP主机、路由器之间传递控制消息。本实施例中,ICMP探测报文可以具体为Ping报文。TTL字段是ICMP探测报文头部的字段,用来设置报文在网络中经过网络设备转发的次数,即ICMP探测报文每经过一个路由设备转发时,该路由设备会先将该ICMP探测报文头部的TTL字段的值减1,然后再转发到下一跳路由设备,当ICMP探测报文头部的TTL字段的值为0时,则路由设备丢弃该ICMP探测报文,并且返回与所丢弃ICMP探测报文数量一致的失效报文,即路由设备返回的失效报文的数量反映了该路由设备实际接收到的ICMP探测报文的数量。In this embodiment, ICMP is a sub-protocol of Transmission Control Protocol/Internet Protocol (TCP/IP, Transmission Control Protocol/Internet Protocol), and can be used to transfer control messages between IP hosts and routers. In this embodiment, the ICMP detection message may specifically be a Ping message. The TTL field is the field in the header of the ICMP detection message, which is used to set the number of times the message is forwarded by the network device in the network, that is, when the ICMP detection message is forwarded by a routing device, the routing device will first send the The value of the TTL field in the header of the message is reduced by 1, and then forwarded to the next-hop routing device. When the value of the TTL field in the header of the ICMP probe message is 0, the routing device discards the ICMP probe message and returns the same The invalid packets with the same number of discarded ICMP detection packets, that is, the number of invalid packets returned by the routing device reflects the number of ICMP detection packets actually received by the routing device.

步骤202:第一网络设备接收每个设备根据接收到的探测报文的数量返回的失效报文。Step 202: The first network device receives invalidation packets returned by each device according to the number of received detection packets.

步骤203:第一网络设备根据每个设备返回的失效报文的数量计算第一网络设备与第二网络设备之间每段链路的链路带宽。Step 203: The first network device calculates the link bandwidth of each link between the first network device and the second network device according to the number of failure packets returned by each device.

具体的,第一网络设备可以将向包括第二网络设备和所有路由设备在内的每个设备发送的一组探测报文的数量减去所述每个设备返回的失效报文的数量,获得所述设备对应的链路上的丢失报文数量,将丢失报文数量除以发送的一组探测报文的数量后与第一速率相乘,得到第一乘积,将第一速率与第一乘积的差值确定为所述设备对应的链路的链路带宽。Specifically, the first network device may subtract the number of failure messages returned by each device from the number of a group of detection messages sent to each device including the second network device and all routing devices to obtain For the number of lost packets on the link corresponding to the device, divide the number of lost packets by the number of a group of detection packets sent and multiply it by the first rate to obtain the first product, and divide the first rate by the first rate The difference of the products is determined as the link bandwidth of the link corresponding to the device.

步骤204:第一网络设备根据每段链路的链路带宽确定第一网络设备与第二网络设备之间的网络带宽。Step 204: The first network device determines the network bandwidth between the first network device and the second network device according to the link bandwidth of each link.

可选的,第一网络设备可以从每段链路的链路带宽中获得最小的链路带宽,将最小的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。Optionally, the first network device may obtain the minimum link bandwidth from the link bandwidths of each link, and determine the minimum link bandwidth as the link bandwidth between the first network device and the second network device. network bandwidth.

可选的,第一网络设备也可以从每段链路的链路带宽中获得最小的链路带宽,为最小的链路带宽对应的第一设备重新生成一组探测报文,重新生成的一组探测报文中包含的报文数量大于第一设备已接收到的第一网络设备发送的一组探测报文中包含的报文数量,向第一设备发送重新生成的一组探测报文,接收第一设备根据接收到的探测报文的数量返回的第一失效报文,并将根据第一失效报文的数量计算的链路带宽确定为第一网络设备与第二网络设备之间的网络带宽。这种实现方式在通过最小的链路带宽获得了可以表示网络带宽的链路后,通过提高向该链路对应的网络设备发送的探测报文的数量,进一步提高网络带宽的测量精度。Optionally, the first network device may also obtain the minimum link bandwidth from the link bandwidth of each link, and regenerate a set of detection packets for the first device corresponding to the minimum link bandwidth, and the regenerated set of The number of packets contained in the group detection message is greater than the number of packets contained in the group of detection messages sent by the first network device that the first device has received, and a regenerated group of detection messages is sent to the first device, receiving the first failure message returned by the first device according to the number of received detection messages, and determining the link bandwidth calculated according to the number of the first failure message as the link bandwidth between the first network device and the second network device network bandwidth. In this implementation manner, after the link that can represent the network bandwidth is obtained through the minimum link bandwidth, the measurement accuracy of the network bandwidth is further improved by increasing the number of detection packets sent to the network device corresponding to the link.

由上述实施例可见,该实施例只需要在第一网络设备侧部署网络带宽检测功能,且无需第二网络设备对第一网络设备发出的每个数据包都进行响应,因此有效缩短了网络带宽的检测时间,节省了网络资源;并且,由于采用本发明实施例还可以检测到每段链路的链路带宽,因此提高了网络带宽的检测精度。It can be seen from the above embodiment that this embodiment only needs to deploy the network bandwidth detection function on the first network device side, and does not require the second network device to respond to each data packet sent by the first network device, thus effectively shortening the network bandwidth. The detection time saves network resources; and, since the link bandwidth of each link can be detected by adopting the embodiment of the present invention, the detection accuracy of the network bandwidth is improved.

参见图3,为本发明网络带宽检测方法的另一个实施例流程图,该实施例示出了通过最小链路带宽确定网络带宽的检测过程:Referring to Fig. 3, it is a flow chart of another embodiment of the network bandwidth detection method of the present invention, which embodiment shows the detection process of determining the network bandwidth by the minimum link bandwidth:

步骤301:第一网络设备为第一网络设备与第二网络设备之间设置的路由设备和第二网络设备中的每个设备生成一组ICMP探测报文,每个设备的一组ICMP探测报文中的TTL字段的值设置为与该设备对应的链路的链路编号一致。Step 301: The first network device generates a set of ICMP detection packets for each device in the routing device set between the first network device and the second network device and the second network device, and a set of ICMP detection packets for each device The value of the TTL field in the text is set to be consistent with the link number of the link corresponding to the device.

结合图1,假设第一网络设备预先获知了第一网络设备与第二网络设备之间设置的路由设备的数量m时,则第一网络设备可以为路由设备1到路由设备m的m个路由设备以及第二网络设备分别生成一组ICMP探测报文,共m+1组ICMP探测报文,每一组ICMP探测报文中包含的报文数量可以一致,其中,路由设备1对应链路1,因此将为路由设备1生成的一组ICMP探测报文中的TTL字段设置为1,路由设备2对应链路2,因此将为路由设备2生成的一组ICMP探测报文中的TTL字段设置为2,以此类推,将为路由设备m生成的一组ICMP探测报文中的TTL字段设置为m,将为第二网络设备生成的一组ICMP探测报文中的TTL字段设置为m+1。In conjunction with FIG. 1 , assuming that the first network device has known in advance the number m of routing devices set between the first network device and the second network device, the first network device can provide m routes from routing device 1 to routing device m. The device and the second network device respectively generate a group of ICMP detection messages, a total of m+1 groups of ICMP detection messages, and the number of messages contained in each group of ICMP detection messages can be the same, where routing device 1 corresponds to link 1 , so the TTL field in a group of ICMP detection packets generated by routing device 1 is set to 1, and routing device 2 corresponds to link 2, so the TTL field in a group of ICMP detection packets generated by routing device 2 is set to is 2, and so on, the TTL field in a group of ICMP detection messages generated by routing device m is set to m, and the TTL field in a group of ICMP detection messages generated by the second network device is set to m+ 1.

步骤302:第一网络设备分别以第一速率向第二网络设备发送为每个设备生成的一组ICMP探测报文。Step 302: the first network device respectively sends a group of ICMP detection packets generated for each device to the second network device at a first rate.

本实施例中,第一速率为预设的速率,通常可以将第一速率设置为高于网络的实际带宽的速率。本实施例中,第一网络设备可以将ICMP探测报文混合在向第二网络设备发送的数据报文中进行发送,此时发送ICMP探测报文的第一速率与数据报文的发送速率一致。In this embodiment, the first rate is a preset rate, and generally the first rate can be set to a rate higher than the actual bandwidth of the network. In this embodiment, the first network device may mix the ICMP detection message with the data message sent to the second network device, and at this time, the first rate of sending the ICMP detection message is consistent with the sending rate of the data message .

步骤303:第一网络设备接收每个设备根据接收到的探测报文的数量返回的失效报文。Step 303: The first network device receives invalidation packets returned by each device according to the number of received detection packets.

本实施例中,TTL字段是ICMP探测报文头部的字段,用来设置报文在网络中经过网络设备转发的次数,即ICMP探测报文每经过一个路由设备转发时,该路由设备会先将该ICMP探测报文头部的TTL字段的值减1,然后再转发到下一跳路由设备,当ICMP探测报文头部的TTL字段的值为0时,则路由设备丢弃该ICMP探测报文,并且返回与所丢弃ICMP探测报文数量一致的失效报文,即路由设备返回的失效报文的数量反映了该路由设备实际接收到的ICMP探测报文的数量;结合图1,m个路由设备中的每个路由设备返回的失效报文可以具体为TTL失效报文,第二网络设备返回的失效报文可以具体为ICMP响应报文。In this embodiment, the TTL field is the field of the header of the ICMP detection message, which is used to set the number of times the message is forwarded by the network device in the network, that is, when the ICMP detection message is forwarded by a routing device, the routing device will first Subtract 1 from the value of the TTL field in the header of the ICMP probe message, and then forward it to the next-hop routing device. When the value of the TTL field in the header of the ICMP probe message is 0, the routing device discards the ICMP probe message text, and returns invalid packets consistent with the number of discarded ICMP detection packets, that is, the number of invalid packets returned by the routing device reflects the number of ICMP detection packets actually received by the routing device; combined with Figure 1, m The invalidation message returned by each of the routing devices may be specifically a TTL invalidation message, and the invalidation message returned by the second network device may be specifically an ICMP response message.

步骤304:第一网络设备根据每个设备返回的失效报文的数量计算第一网络设备与第二网络设备之间每段链路的链路带宽。Step 304: The first network device calculates the link bandwidth of each link between the first network device and the second network device according to the number of failure packets returned by each device.

结合图1,假设第一速率为P,则如果链路i(i为1至m之间的自然数)的链路带宽Pi>P或Pi=P,则对于路由设备i所接收到的所有初始设置TTL=i的ICMP探测报文,都将返回TTL失效报文,且这些TTL失效报文都会被第一网络设备接收;如果链路i的链路带宽Pi<P,则对于路由设备i所接收到的所有初始设置TTL=i的ICMP探测报文,会有大约t个ICMP探测报文因网络拥塞排队而被丢弃,其中,N为每一组ICMP探测报文中包含的报文数量,对于这t个ICMP探测报文则无TTL失效报文返回,因此第一网络设备接收到的TTL失效报文的数量将会少于所发送的TTL=i的ICMP探测报文的数量,因此第一网络设备可以根据统计接收到的TTL失效报文的数量n就可以估算出该段链路的链路带宽Pi,如下式所示:Pi=P-(N-nN)P.Combined with Figure 1, assuming that the first rate is P, if the link bandwidth Pi>P or Pi=P of link i (i is a natural number between 1 and m), then for all initial Set TTL=i ICMP detection message, will return TTL failure message, and these TTL failure messages will be received by the first network device; if the link bandwidth Pi<P of link i, then for the routing device i For all received ICMP detection packets with TTL=i initially set, about t ICMP detection packets will be discarded due to network congestion and queuing, among which , N is the number of packets contained in each group of ICMP detection packets, and no TTL invalidation packets are returned for these t ICMP detection packets, so the number of TTL invalidation packets received by the first network device will be less Based on the number of ICMP detection packets with TTL=i sent, the first network device can estimate the link bandwidth Pi of the link according to the number n of received TTL invalidation packets, as shown in the following formula Shown: P i = P - ( N - no N ) P .

步骤305:第一网络设备从每段链路的链路带宽中获得最小的链路带宽,将该最小的链路带宽确定为第一网络设备与第二网络设备之间的网络带宽。Step 305: The first network device obtains the minimum link bandwidth from the link bandwidths of each link, and determines the minimum link bandwidth as the network bandwidth between the first network device and the second network device.

结合图1,第一网络设备计算出m个链路的链路带宽后,通过比较从中选择一个最小的链路带宽作为第一网络设备与第二网络设备之间的网络带宽,该最小的链路带宽所在的链路也可以称为第一网络设备与第二网络设备之间的紧张链路。Referring to Fig. 1, after the first network device calculates the link bandwidths of the m links, a minimum link bandwidth is selected as the network bandwidth between the first network device and the second network device by comparison. The link where the bandwidth is located may also be referred to as a tension link between the first network device and the second network device.

本发明实施例可以应用在广域网(Wide Area Network,WAN)中,WAN的一种典型应用场景为,本地主机需要通过WAN将大量数据发送到异地服务器,如图5所示,由于WAN带宽资源有限,因此可以通过应用本发明实施例对WAN的网络带宽进行检测,从而根据网络带宽检测结果确定出紧张链路,对数据发送速率进行调整,以便充分利用WAN的网络带宽。The embodiment of the present invention can be applied in a wide area network (Wide Area Network, WAN). A typical application scenario of a WAN is that the local host needs to send a large amount of data to a remote server through the WAN, as shown in FIG. Therefore, the network bandwidth of the WAN can be detected by applying the embodiment of the present invention, thereby determining a tense link according to the network bandwidth detection result, and adjusting the data transmission rate so as to fully utilize the network bandwidth of the WAN.

由上述实施例可见,该实施例只需要在第一网络设备侧部署网络带宽检测功能,且无需第二网络设备对第一网络设备发出的每个数据包都进行响应,因此有效缩短了网络带宽的检测时间,节省了网络资源;并且,由于采用本发明实施例还可以检测到每段链路的链路带宽,因此提高了网络带宽的检测精度。It can be seen from the above embodiment that this embodiment only needs to deploy the network bandwidth detection function on the first network device side, and does not require the second network device to respond to each data packet sent by the first network device, thus effectively shortening the network bandwidth. The detection time saves network resources; and, since the link bandwidth of each link can be detected by adopting the embodiment of the present invention, the detection accuracy of the network bandwidth is improved.

参见图4,为本发明网络带宽检测方法的另一个实施例流程图,该实施例示出了通过重新向最小链路带宽对应的路由设备发送探测报文,从而进一步精确检测网络带宽的过程:Referring to FIG. 4, it is a flow chart of another embodiment of the network bandwidth detection method of the present invention, which embodiment shows the process of further accurately detecting the network bandwidth by resending the detection message to the routing device corresponding to the minimum link bandwidth:

步骤401:第一网络设备分别以第一速率向第二网络设备发送多组探测报文,以使第一网络设备与第二网络设备之间设置的路由设备和第二网络设备中的每个设备接收到一组探测报文。Step 401: The first network device sends multiple sets of probe packets to the second network device at the first rate, so that each of the routing device and the second network device set between the first network device and the second network device The device receives a set of detection packets.

本发明实施例中,第一网络设备和第二网络设备可以具体为网络中的主机设备,或者交换机,或者路由器等。In the embodiment of the present invention, the first network device and the second network device may specifically be a host device, a switch, or a router in the network.

结合图1,假设第一网络设备预先获知了第一网络设备与第二网络设备之间设置的路由设备的数量m时,则可以为m个路由设备和第二网络设备中的每个设备生成一组探测报文并发送生成的一组探测报文,即共生成m+1组探测报文;如果第一网络设备未获知第一网络设备与第二网络设备之间设置的路由设备的数量m时,则可以根据网络类型生成n组探测报文,n的数量大于m+1,以保证每个路由设备和第二网络设备都可以接收到一组探测报文,例如,对于城域网,可以设置n为10,对于异地网络,则可以设置n为15左右。In conjunction with FIG. 1 , assuming that the first network device has known in advance the number m of routing devices set between the first network device and the second network device, it can be generated for each of the m routing devices and the second network device A group of detection messages and send the generated group of detection messages, that is, a total of m+1 groups of detection messages are generated; if the first network device does not know the number of routing devices set between the first network device and the second network device When m, n groups of detection messages can be generated according to the network type, and the number of n is greater than m+1, so as to ensure that each routing device and the second network device can receive a group of detection messages, for example, for a metropolitan area network , you can set n to 10, and for remote networks, you can set n to about 15.

其中,第一网络设备可以为包括第二网络设备和所有路由设备在内的每个设备生成一组ICMP探测报文,每个设备的一组ICMP探测报文中的TTL字段的值设置为与所述设备对应的链路的链路编号一致,所述设备对应的链路为所述设备与所述设备的上一跳设备之间的链路,然后第一网络设备分别以第一速率向第二网络设备发送为每个设备生成的一组ICMP探测报文。本实施例中,第一网络设备可以将ICMP探测报文混合在向第二网络设备发送的数据报文中进行发送,此时发送ICMP探测报文的第一速率与数据报文的发送速率一致,该ICMP探测报文可以具体为Ping报文。Wherein, the first network device can generate a group of ICMP detection messages for each device including the second network device and all routing devices, and the value of the TTL field in a group of ICMP detection messages of each device is set to be the same as The link number of the link corresponding to the device is the same, and the link corresponding to the device is a link between the device and the previous hop device of the device, and then the first network device sends the The second network device sends a set of ICMP probe packets generated for each device. In this embodiment, the first network device may mix the ICMP detection message with the data message sent to the second network device, and at this time, the first rate of sending the ICMP detection message is consistent with the sending rate of the data message , the ICMP detection message may specifically be a Ping message.

结合图1,例如,第一网络设备生成m+1组Ping报文,每一组Ping报文包含N个报文,第一网络设备以预定速率P向第二网络设备发送数据,则第一网络设备可以同时以预定速率P向各个路由设备和第二网络设备发送m+1组Ping报文。其中,第一组Ping报文的TTL设为1,第二组Ping报文的TTL设为2,依次类推,第m组Ping报文的TTL设为m,第m+1组Ping报文的TTL设为m+1。每一组Ping报文每经过一个路由设备,TTL值减1,当TTL=0时,路由设备会将Ping报文丢弃,并向第一网络设备返回一个失效报文;其中,m个路由设备中的每个路由设备返回的失效报文可以具体为TTL失效报文,第二网络设备返回的失效报文可以具体为ICMP响应报文。其中,N的取值可以根据需要设置,N的取值越大,则网络带宽的检测精度越高。In conjunction with FIG. 1, for example, the first network device generates m+1 groups of Ping messages, each group of Ping messages contains N messages, and the first network device sends data to the second network device at a predetermined rate P, then the first The network device may send m+1 groups of Ping messages to each routing device and the second network device at a predetermined rate P at the same time. Among them, the TTL of the first group of Ping messages is set to 1, the TTL of the second group of Ping messages is set to 2, and so on, the TTL of the mth group of Ping messages is set to m, and the TTL of the m+1th group of Ping messages TTL is set to m+1. Every time each group of Ping messages passes through a routing device, the TTL value is reduced by 1. When TTL=0, the routing device will discard the Ping message and return an invalid message to the first network device; among them, m routing devices The invalidation message returned by each routing device in the network may specifically be a TTL invalidation message, and the invalidation message returned by the second network device may be specifically an ICMP response message. Wherein, the value of N can be set as required, and the larger the value of N is, the higher the detection accuracy of the network bandwidth is.

步骤402:第一网络设备接收每个设备根据接收到的探测报文的数量返回的失效报文。Step 402: The first network device receives invalidation messages returned by each device according to the number of received detection messages.

本发明实施例中,TTL字段是ICMP探测报文头部的字段,用来设置报文在网络中经过网络设备转发的次数,即ICMP探测报文每经过一个路由设备转发时,该路由设备会先将该ICMP探测报文头部的TTL字段的值减1,然后再转发到下一跳路由设备,当ICMP探测报文头部的TTL字段的值为0时,则路由设备丢弃该ICMP探测报文,并且返回与所丢弃ICMP探测报文数量一致的失效报文,即路由设备返回的失效报文的数量反映了该路由设备实际接收到的ICMP探测报文的数量。In the embodiment of the present invention, the TTL field is the field of the header of the ICMP detection message, which is used to set the number of times the message is forwarded by the network device in the network, that is, when the ICMP detection message is forwarded by a routing device, the routing device will First decrement the value of the TTL field in the header of the ICMP probe message by 1, and then forward it to the next-hop routing device. When the value of the TTL field in the header of the ICMP probe message is 0, the routing device discards the ICMP probe The number of invalid packets returned by the routing device reflects the number of ICMP detection packets actually received by the routing device.

步骤403:第一网络设备根据每个设备返回的失效报文的数量计算第一网络设备与第二网络设备之间每段链路的链路带宽。Step 403: The first network device calculates the link bandwidth of each link between the first network device and the second network device according to the number of failure packets returned by each device.

本发明实施例中,结合图1,针对每一组Ping报文,第一网络设备可以根据接收到的路由设备返回的TTL失效报文的数目,确定每一段链路的链路带宽,如下式:In the embodiment of the present invention, in conjunction with FIG. 1, for each group of Ping messages, the first network device can determine the link bandwidth of each link according to the number of TTL invalidation messages returned by the received routing device, as shown in the following formula :

PPii==PP--((NN--nnoNN))PP

上式中,i表示链路的链路号,Pi表示第i段链路的链路带宽,P表示预先设置的第一速率,N表示每一组Ping报文所包含的报文数量,n表示网络设备i返回的TTL失效报文的数量。In the above formula, i represents the link number of the link, Pi represents the link bandwidth of the i-th link, P represents the preset first rate, and N represents the number of packets contained in each group of Ping packets, n represents the number of TTL expiration packets returned by network device i.

下面用一个具体的例子来说明链路带宽的计算过程:The following uses a specific example to illustrate the calculation process of the link bandwidth:

假设第一网络设备与第二网络设备之间有四个路由设备,网络的往返时间(RoundTrip Time,RTT)为1s(秒),报文以一个高于网络实际带宽的速度10MB/s发送。测试时间为4s,这4s中一共发送40个Ping报文,这些Ping报文分为4组,每组Ping报文的TTL字段的值分别为1、2、3、4。4s测试时间结束后,针对每一组Ping报文,假设第一网络设备接收到的TTL失效报文的数量如下表1所示:Assume that there are four routing devices between the first network device and the second network device, the Round Trip Time (RTT) of the network is 1s (second), and the packets are sent at a speed of 10MB/s higher than the actual bandwidth of the network. The test time is 4s, and a total of 40 Ping messages are sent during these 4s. These Ping messages are divided into 4 groups, and the values of the TTL fields of each group of Ping messages are 1, 2, 3, and 4 respectively. After the 4s test time ends, , for each group of Ping messages, it is assumed that the number of TTL invalidation messages received by the first network device is as shown in Table 1 below:

表1Table 1

Ping报文分组编号Ping packet group number11223344TTL字段值TTL field value11223344Ping报文数量NNumber of Ping packets N1010101010101010TTL失效报文数量nNumber of TTL expiration packets n1010887777

结合上表1,对于TTL=1的一组Ping报文,丢失报文数量t=10-10=0,因此链路1的链路带宽P1=P-(N-nN)P=P-(tN)P=10-(0/10)*10=10MB/s;对于TTL=2的一组Ping报文,丢失报文数量t=10-8=2,因此链路2的链路带宽P2=P-(N-nN)P=P-(tN)P==10-(2/10)*10=8MB/s;对于TTL=3的一组Ping报文,丢失报文数量t=10-7=3,因此链路3的链路带宽P3=P-(N-nN)P=P-(tN)P=10-(3/10)*10=7MB/s;对于TTL=4的一组Ping报文,丢失报文数量t=10-7=3,因此链路4的链路带宽P4=P-(N-nN)P=P-(tN)P=10-(3/10)*10=7MB/s.Combined with Table 1 above, for a group of Ping packets with TTL=1, the number of lost packets is t=10-10=0, so the link bandwidth of link 1 P 1 = P - ( N - no N ) P = P - ( t N ) P = 10 - ( 0 / 10 ) * 10 = 10 MB / the s ; For a group of Ping packets with TTL=2, the number of lost packets is t=10-8=2, so the link bandwidth of link 2 P 2 = P - ( N - no N ) P = P - ( t N ) P = = 10 - ( 2 / 10 ) * 10 = 8 MB / the s ; For a group of Ping packets with TTL=3, the number of lost packets is t=10-7=3, so the link bandwidth of link 3 P 3 = P - ( N - no N ) P = P - ( t N ) P = 10 - ( 3 / 10 ) * 10 = 7 MB / the s ; For a group of Ping packets with TTL=4, the number of lost packets is t=10-7=3, so the link bandwidth of link 4 P 4 = P - ( N - no N ) P = P - ( t N ) P = 10 - ( 3 / 10 ) * 10 = 7 MB / the s .

步骤404:第一网络设备从每段链路的链路带宽中获得最小的链路带宽。Step 404: The first network device obtains the minimum link bandwidth from link bandwidths of each link.

根据步骤403中的计算结果可知,链路3及链路4的链路带宽最小,为7MB/s。因此可以将链路3确定网络中的紧张链路,即链路3为网络中链路带宽最小的一段链路。由此可以在后续的测量中增加向链路3对应的路由设备发送的一组Ping报文的数量,从而提高测量精度。According to the calculation result in step 403, it can be seen that the link bandwidth of link 3 and link 4 is the smallest, which is 7MB/s. Therefore, link 3 can be determined as a tense link in the network, that is, link 3 is a link with the smallest link bandwidth in the network. Therefore, the number of a group of Ping messages sent to the routing device corresponding to link 3 can be increased in subsequent measurements, thereby improving measurement accuracy.

步骤405:第一网络设备为最小的链路带宽对应的第一设备重新生成一组探测报文,重新生成的一组探测报文中包含的报文数量大于第一设备已接收到的第一网络设备发送的一组探测报文中包含的报文数量。Step 405: The first network device regenerates a group of detection packets for the first device corresponding to the smallest link bandwidth, and the number of packets contained in the regenerated group of detection packets is greater than the number of packets received by the first device. The number of packets included in a group of probe packets sent by a network device.

由步骤404可知,链路3的链路带宽最下,因此第一网络设备可以重新为链路3对应的路由设备生成一组Ping报文,并将该组Ping报文的TTL字段的值设置为3,为了更加准确地测量网络带宽,上述重新生成的一组Ping报文中的报文数量可以尽可能大,例如,报文数量为100或1000等。It can be seen from step 404 that the link bandwidth of link 3 is the lowest, so the first network device can regenerate a group of Ping messages for the routing device corresponding to link 3, and set the value of the TTL field of the group of Ping messages to is 3, in order to measure the network bandwidth more accurately, the number of packets in the above regenerated group of Ping packets can be as large as possible, for example, the number of packets is 100 or 1000.

步骤406:第一网络设备向第一设备发送重新生成的一组探测报文。Step 406: The first network device sends a newly generated group of detection packets to the first device.

步骤407:第一网络设备接收第一设备根据接收到的探测报文的数量返回的第一失效报文。Step 407: The first network device receives the first failure message returned by the first device according to the number of received detection messages.

步骤408:第一网络设备将根据第一失效报文的数量计算的链路带宽确定为第一网络设备与第二网络设备之间的网络带宽。Step 408: The first network device determines the link bandwidth calculated according to the number of first failure packets as the network bandwidth between the first network device and the second network device.

本步骤中,第一网络设备根据第一失效报文的数量计算链路带宽的过程与步骤403中的描述一致,在此不再赘述。In this step, the process of the first network device calculating the link bandwidth according to the number of the first failure packets is consistent with the description in step 403, and will not be repeated here.

需要说明的是,应用本发明网络带宽检测实施例,不但可以根据检测出的网络带宽进行数据发送速率调节外,还可以将带宽检测程序植入到路由设备中,以使路由设备可以获取网络中的不同链路的链路带宽,并据此进行路由选择,从而避免网络拥塞。It should be noted that, by applying the network bandwidth detection embodiment of the present invention, not only can the data transmission rate be adjusted according to the detected network bandwidth, but the bandwidth detection program can also be implanted into the routing device, so that the routing device can obtain the The link bandwidth of different links of different links, and route selection based on this, so as to avoid network congestion.

由上述实施例可见,该实施例只需要在第一网络设备侧部署网络带宽检测功能,且无需第二网络设备对第一网络设备发出的每个数据包都进行响应,因此有效缩短了网络带宽的检测时间,节省了网络资源;并且,由于采用本发明实施例还可以检测到每段链路的链路带宽,因此提高了网络带宽的检测精度。另外,上述实施例初步确定出紧张链路后,可以通过再次向该紧张链路对应的路由设备发送一组探测报文,以提高网络带宽检测精度。It can be seen from the above embodiment that this embodiment only needs to deploy the network bandwidth detection function on the first network device side, and does not require the second network device to respond to each data packet sent by the first network device, thus effectively shortening the network bandwidth. The detection time saves network resources; and, since the link bandwidth of each link can be detected by adopting the embodiment of the present invention, the detection accuracy of the network bandwidth is improved. In addition, after the tense link is preliminarily determined in the above embodiment, a group of detection messages may be sent to the routing device corresponding to the tense link again, so as to improve the detection accuracy of the network bandwidth.

与本发明网络带宽检测方法的实施例相对应,本发明还提供了网络带宽检测装置及网络设备的实施例。Corresponding to the embodiments of the network bandwidth detection method of the present invention, the present invention also provides embodiments of a network bandwidth detection device and network equipment.

参见图6,为本发明网络带宽检测装置的实施例框图:Referring to Fig. 6, it is a block diagram of an embodiment of the network bandwidth detection device of the present invention:

该网络带宽检测装置包括:发送单元610、接收单元620、计算单元630和确定单元640。The apparatus for detecting network bandwidth includes: a sending unit 610 , a receiving unit 620 , a calculating unit 630 and a determining unit 640 .

其中,发送单元610,用于分别以第一速率向第二网络设备发送多组探测报文,以使所述第一网络设备与所述第二网络设备之间设置的路由设备和所述第二网络设备中的每个设备接收到一组探测报文;Wherein, the sending unit 610 is configured to send multiple groups of detection packets to the second network device at a first rate, so that the routing device set between the first network device and the second network device and the second network device Each of the two network devices receives a group of detection packets;

接收单元620,用于接收所述每个设备根据接收到的探测报文的数量返回的失效报文;A receiving unit 620, configured to receive an invalidation message returned by each device according to the number of received detection messages;

计算单元630,用于根据所述接收单元620接收到的所述每个设备返回的失效报文的数量计算所述第一网络设备与所述第二网络设备之间每段链路的链路带宽;A calculation unit 630, configured to calculate the link of each link between the first network device and the second network device according to the number of failure messages returned by the each device received by the receiving unit 620 bandwidth;

确定单元640,用于根据所述计算单元630计算的所述每段链路的链路带宽确定所述第一网络设备与所述第二网络设备之间的网络带宽。The determining unit 640 is configured to determine the network bandwidth between the first network device and the second network device according to the link bandwidth of each link calculated by the calculating unit 630 .

在一个可选的实现方式中,所述发送单元610可以包括(图6中未示出):In an optional implementation manner, the sending unit 610 may include (not shown in FIG. 6 ):

探测报文生成子单元,用于为所述每个设备生成一组网络控制报文协议ICMP探测报文,所述每个设备的一组ICMP探测报文中的生存时间TTL字段的值设置为与所述设备对应的链路的链路编号一致,所述设备对应的链路为所述设备与所述设备的上一跳设备之间的链路;Probe message generation subunit, used to generate a set of network control message protocol ICMP probe messages for each device, the value of the time-to-live TTL field in a set of ICMP probe messages of each device is set to Consistent with the link number of the link corresponding to the device, the link corresponding to the device is a link between the device and the previous hop device of the device;

探测报文发送子单元,用于分别以第一速率向所述第二网络设备发送为所述每个设备生成的一组ICMP探测报文。A detection packet sending subunit, configured to respectively send a group of ICMP detection packets generated for each device to the second network device at a first rate.

在另一个可选的实现方式中,所述计算单元630可以包括(图6中未示出):In another optional implementation manner, the computing unit 630 may include (not shown in FIG. 6 ):

丢失报文计算子单元,用于将向所述每个设备发送的一组探测报文的数量减去所述设备返回的失效报文的数量,获得所述设备对应的链路上的丢失报文数量;A lost message calculation subunit, configured to subtract the number of invalid messages returned by the device from the number of a group of detection messages sent to each device to obtain the lost message on the link corresponding to the device number of documents;

链路带宽确定子单元,用于将所述丢失报文数量除以所述发送的一组探测报文的数量后与所述第一速率相乘,得到第一乘积,将所述第一速率与所述第一乘积的差值确定为所述设备对应的链路的链路带宽。A link bandwidth determining subunit, configured to divide the number of lost packets by the number of a group of probe packets sent and multiply it by the first rate to obtain a first product, and divide the first rate The difference with the first product is determined as the link bandwidth of the link corresponding to the device.

在另一个可选的实现方式中,所述确定单元640,可以具体用于从所述每段链路的链路带宽中获得最小的链路带宽,将所述最小的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。In another optional implementation manner, the determining unit 640 may be specifically configured to obtain the minimum link bandwidth from the link bandwidth of each link, and determine the minimum link bandwidth as the The network bandwidth between the first network device and the second network device.

在另一个可选的实现方式中,所述确定单元640可以包括(图6中未示出):In another optional implementation manner, the determining unit 640 may include (not shown in FIG. 6 ):

最小带宽获得子单元,用于从所述每段链路的链路带宽中获得最小的链路带宽;a minimum bandwidth obtaining subunit, configured to obtain the minimum link bandwidth from the link bandwidths of each link;

探测报文重生子单元,用于为所述最小的链路带宽对应的第一设备重新生成一组探测报文,重新生成的所述一组探测报文中包含的报文数量大于所述第一设备已接收到的所述第一网络设备发送的一组探测报文中包含的报文数量;The detection message regenerating subunit is configured to regenerate a group of detection messages for the first device corresponding to the minimum link bandwidth, and the number of messages contained in the regenerated group of detection messages is greater than that of the first device. The number of packets contained in a group of detection packets sent by the first network device that a device has received;

探测报文重发子单元,用于向所述第一设备发送所述重新生成的一组探测报文;A detection message resending subunit, configured to send the regenerated group of detection messages to the first device;

失效报文接收子单元,用于接收所述第一设备根据接收到的探测报文的数量返回的第一失效报文;An invalidation message receiving subunit, configured to receive the first invalidation message returned by the first device according to the number of received detection messages;

网络带宽确定子单元,用于将根据所述第一失效报文的数量计算的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。A network bandwidth determining subunit, configured to determine the link bandwidth calculated according to the number of the first failure packets as the network bandwidth between the first network device and the second network device.

参见图7,为本发明网络设备的实施例框图:Referring to Figure 7, it is a block diagram of an embodiment of a network device of the present invention:

该网络设备作为与第二网络设备通信的第一网络设备,包括:总线710,以及通过所述总线710连接的网络接口720、发送器730、接收器740和处理器750。As the first network device communicating with the second network device, the network device includes: a bus 710 , and a network interface 720 , a transmitter 730 , a receiver 740 and a processor 750 connected through the bus 710 .

其中,所述网络接口720,用于连接网络中的路由设备;Wherein, the network interface 720 is used to connect to routing devices in the network;

所述发送器730,用于通过所述网络接口720分别以第一速率向第二网络设备发送多组探测报文,以使所述第一网络设备与所述第二网络设备之间设置的路由设备和所述第二网络设备中的每个设备接收到一组探测报文;The sender 730 is configured to send multiple groups of detection packets to the second network device at a first rate through the network interface 720, so that the set between the first network device and the second network device Each of the routing device and the second network device receives a group of detection packets;

所述接收器740,用于接收所述每个设备根据接收到的探测报文的数量返回的失效报文;The receiver 740 is configured to receive an invalidation message returned by each device according to the number of received detection messages;

所述处理器750,用于根据所述每个设备返回的失效报文的数量计算所述第一网络设备与所述第二网络设备之间每段链路的链路带宽,并根据所述每段链路的链路带宽确定所述第一网络设备与所述第二网络设备之间的网络带宽。The processor 750 is configured to calculate the link bandwidth of each link between the first network device and the second network device according to the number of failure packets returned by each device, and according to the The link bandwidth of each link determines the network bandwidth between the first network device and the second network device.

在一个可选的实现方式中:In an alternative implementation:

所述处理器750,还可以用于为所述每个设备生成一组网络控制报文协议ICMP探测报文,所述每个设备的一组ICMP探测报文中的生存时间TTL字段的值设置为与所述设备对应的链路的链路编号一致,所述设备对应的链路为所述设备与所述设备的上一跳设备之间的链路;The processor 750 may also be configured to generate a group of network control message protocol ICMP detection messages for each device, and set the value of the time-to-live TTL field in a group of ICMP detection messages of each device to To be consistent with the link number of the link corresponding to the device, the link corresponding to the device is a link between the device and the previous hop device of the device;

所述发送器730,可以具体用于通过所述网络接口720分别以第一速率向所述第二网络设备发送为所述每个设备生成的一组ICMP探测报文。The sender 730 may be specifically configured to respectively send a group of ICMP detection packets generated for each device to the second network device at a first rate through the network interface 720 .

在另一个可选的实现方式中:In another alternative implementation:

所述处理器750,可以具体用于将向所述每个设备发送的一组探测报文的数量减去所述设备返回的失效报文的数量,获得所述设备对应的链路上的丢失报文数量,将所述丢失报文数量除以所述发送的一组探测报文的数量后与所述第一速率相乘,得到第一乘积,将所述第一速率与所述第一乘积的差值确定为所述设备对应的链路的链路带宽。The processor 750 may be specifically configured to subtract the number of failure messages returned by the device from the number of a group of detection messages sent to each device to obtain the loss rate on the link corresponding to the device. number of packets, divide the number of lost packets by the number of a group of detection packets sent and multiply by the first rate to obtain a first product, and divide the first rate by the first The difference of the products is determined as the link bandwidth of the link corresponding to the device.

在另一个可选的实现方式中:In another alternative implementation:

所述处理器750,可以具体用于从所述每段链路的链路带宽中获得最小的链路带宽,将所述最小的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。The processor 750 may be specifically configured to obtain a minimum link bandwidth from the link bandwidths of each link, and determine the minimum link bandwidth as the link between the first network device and the second network device. Network bandwidth between network devices.

在另一个可选的实现方式中:In another alternative implementation:

所述处理器750,还可以用于从所述每段链路的链路带宽中获得最小的链路带宽,为所述最小的链路带宽对应的第一设备重新生成一组探测报文,重新生成的所述一组探测报文中包含的报文数量大于所述第一设备已接收到的所述第一网络设备发送的一组探测报文中包含的报文数量;The processor 750 may also be configured to obtain a minimum link bandwidth from the link bandwidths of each link, and regenerate a set of detection packets for the first device corresponding to the minimum link bandwidth, The number of packets included in the regenerated group of detection packets is greater than the number of packets included in the group of detection packets sent by the first network device that has been received by the first device;

所述发送器730,还还用于通过所述网络接口720向所述第一设备发送所述重新生成的一组探测报文;The sender 730 is further configured to send the regenerated group of detection packets to the first device through the network interface 720;

所述接收器740,还可以用于接收所述第一设备根据接收到的探测报文的数量返回的第一失效报文;The receiver 740 may also be configured to receive a first failure message returned by the first device according to the number of received detection messages;

所述处理器750,还可以用于将根据所述第一失效报文的数量计算的链路带宽确定为所述第一网络设备与所述第二网络设备之间的网络带宽。The processor 750 may be further configured to determine the link bandwidth calculated according to the number of the first failure packets as the network bandwidth between the first network device and the second network device.

由上述实施例可见,第一网络设备分别以第一速率向第二网络设备发送多组探测报文,以使第一网络设备与第二网络设备之间设置的路由设备和第二网络设备中的每个设备接收到一组探测报文,接收每个设备根据接收到的探测报文的数量返回的失效报文,根据每个设备返回的失效报文的数量计算第一网络设备与第二网络设备之间每段链路的链路带宽,并根据每段链路的链路带宽确定第一网络设备与第二网络设备之间的网络带宽。本发明实施例只需要在第一网络设备侧部署网络带宽检测功能,且无需第二网络设备对第一网络设备发出的每个数据包都进行响应,因此有效缩短了网络带宽的检测时间,节省了网络资源;并且,由于采用本发明实施例还可以检测到每段链路的链路带宽,因此提高了网络带宽的检测精度。It can be seen from the above embodiments that the first network device sends multiple groups of detection packets to the second network device at the first rate, so that the routing device and the second network device set between the first network device and the second network device Each device in the network receives a group of detection packets, receives the invalidation packets returned by each device according to the number of received detection packets, and calculates the first network device and the second network device according to the number of invalidation packets returned by each device. link bandwidth of each link between the network devices, and determine the network bandwidth between the first network device and the second network device according to the link bandwidth of each link. The embodiment of the present invention only needs to deploy the network bandwidth detection function on the first network device side, and does not require the second network device to respond to each data packet sent by the first network device, thus effectively shortening the detection time of the network bandwidth and saving Network resources are reduced; and, since the link bandwidth of each link can be detected by adopting the embodiment of the present invention, the detection accuracy of the network bandwidth is improved.

本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technologies in the embodiments of the present invention can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the essence of the technical solutions in the embodiments of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM , magnetic disk, optical disk, etc., including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the related parts, please refer to the part of the description of the method embodiment.

以上所述的本发明实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的保护范围之内。The embodiments of the present invention described above are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (24)

CN201310137241.6A2013-04-192013-04-19Network bandwidth detection method, device and the network equipmentExpired - Fee RelatedCN103259696B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201310137241.6ACN103259696B (en)2013-04-192013-04-19Network bandwidth detection method, device and the network equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201310137241.6ACN103259696B (en)2013-04-192013-04-19Network bandwidth detection method, device and the network equipment

Publications (2)

Publication NumberPublication Date
CN103259696A CN103259696A (en)2013-08-21
CN103259696Btrue CN103259696B (en)2016-12-28

Family

ID=48963411

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201310137241.6AExpired - Fee RelatedCN103259696B (en)2013-04-192013-04-19Network bandwidth detection method, device and the network equipment

Country Status (1)

CountryLink
CN (1)CN103259696B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105024933B (en)*2014-04-222019-01-29腾讯科技(深圳)有限公司The control method and device of request packet transmission frequency
CN105207828A (en)*2014-05-292015-12-30国基电子(上海)有限公司Router and method for router to measure uplink frequency width
US10581992B2 (en)*2016-03-302020-03-03Cisco Technology, Inc.Allocating bandwidth between network computing devices for pushing data to a client computing device
CN106060118A (en)*2016-05-172016-10-26乐视控股(北京)有限公司Data transmission method and system
CN109845193B (en)*2016-10-192021-01-29华为技术有限公司Detection method, device and system
CN106850294B (en)*2017-01-242019-07-09西安万像电子科技有限公司The methods, devices and systems of bandwidth estimation
CN106850353B (en)*2017-02-132020-02-18青岛乾元通数码科技有限公司Network bandwidth dynamic monitoring method and system
CN107508762A (en)*2017-08-172017-12-22迈普通信技术股份有限公司Network traffics transmission method and source device
CN109428784B (en)*2017-08-312021-10-15腾讯科技(深圳)有限公司Network detection method and device, computer storage medium and equipment
CN109728967A (en)*2017-10-312019-05-07迈普通信技术股份有限公司Communication quality detection method, communication equipment and system
TWI649989B (en)*2017-12-142019-02-01中華電信股份有限公司System and method of available bandwidth estimation
CN112602294B (en)*2018-08-292021-10-15华为技术有限公司 Method and device for detecting bandwidth
CN111082898B (en)2018-10-192022-08-26华为技术有限公司Message processing method and device
CN114095434B (en)*2020-07-292024-09-24华为技术有限公司Method for controlling network congestion and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1518285A (en)*2003-01-162004-08-04华为技术有限公司 A network bandwidth detection method for streaming media service
WO2007076661A1 (en)*2005-12-312007-07-12Huawei Technologies Co., Ltd.A congestion controlling method and network device for real time multicasting service.
CN101026509A (en)*2007-02-282007-08-29西南科技大学End-to-end low available bandwidth measuring method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1518285A (en)*2003-01-162004-08-04华为技术有限公司 A network bandwidth detection method for streaming media service
WO2007076661A1 (en)*2005-12-312007-07-12Huawei Technologies Co., Ltd.A congestion controlling method and network device for real time multicasting service.
CN101026509A (en)*2007-02-282007-08-29西南科技大学End-to-end low available bandwidth measuring method

Also Published As

Publication numberPublication date
CN103259696A (en)2013-08-21

Similar Documents

PublicationPublication DateTitle
CN103259696B (en)Network bandwidth detection method, device and the network equipment
CN109787868B (en)Method, system and server for selecting routing path
CN102484602B (en) A method, device and system for measuring network transmission capacity
US9426080B2 (en)Data communication apparatus, data transmission method, and computer system
WO2020207479A1 (en)Method and device for controlling network congestion
US11115308B2 (en)System and method for congestion control using time difference congestion notification
US8908540B2 (en)Efficient and loss tolerant method and mechanism for measuring available bandwidth
RU2695093C2 (en)Method for performing communication bandwidth testing from first network station to second network station in communication network, corresponding devices for executing steps of method and corresponding computer programs
CN106656679B (en) Available bandwidth measurement method
WO2018112877A1 (en)Path calculating and access request distributing methods, devices and systems
CN106067854A (en)A kind of network quality detection method and equipment
US11165671B2 (en)Performance measurement in a packet-switched communication network
KR102601348B1 (en) Data transmission method, transmission device, data reception method and receiving device
Šošić et al.Resolving poor TCP performance on high-speed long distance links—Overview and comparison of BIC, CUBIC and Hybla
CN115914081B (en)Method, device, storage medium and electronic equipment for measuring network round trip time
CN101848113A (en)Network device and method for automatically detecting uplink bandwidth of network
WO2015091022A1 (en)Probing a network
CN105611406B (en)One kind access net service provider monitors user to video server lag characteristic method
Torres-Jr et al.Packet reordering metrics to enable performance comparison in IP‐networks
Kadry et al.Modeling and simulation of out-of-order impact in TCP protocol
JP2004312725A5 (en)
Potys et al.NetInf TP: A receiver-driven protocol for ICN data transport
Ламри et al.Developing Al-ARQ module for automatic measurement of one-way data transmission delay
Aftab et al.Simulation based performance evaluation of TCP variants along with UDP flow analysis of throughput with respect to delay, buffer size and time
JP4828555B2 (en) Node device and bandwidth control method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20191217

Address after:No. 222, Yushi Road, Hecheng District, Huaihua City, Hunan Province

Patentee after:Hunan cable Huaihua Network Co.,Ltd.

Address before:200135 Shanghai City, Pudong New Area Chinese (Shanghai) free trade zone fanchun Road No. 400 Building 1 layer 3

Patentee before:Shanghai set up Mdt InfoTech Ltd.

Effective date of registration:20191217

Address after:200135 Shanghai City, Pudong New Area Chinese (Shanghai) free trade zone fanchun Road No. 400 Building 1 layer 3

Patentee after:Shanghai set up Mdt InfoTech Ltd.

Address before:518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before:HUAWEI TECHNOLOGIES Co.,Ltd.

CF01Termination of patent right due to non-payment of annual fee
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20161228

Termination date:20210419


[8]ページ先頭

©2009-2025 Movatter.jp