Movatterモバイル変換


[0]ホーム

URL:


CN107171882A - Detect the method, apparatus and system of equal cost multipath routing function - Google Patents

Detect the method, apparatus and system of equal cost multipath routing function
Download PDF

Info

Publication number
CN107171882A
CN107171882ACN201610130616.XACN201610130616ACN107171882ACN 107171882 ACN107171882 ACN 107171882ACN 201610130616 ACN201610130616 ACN 201610130616ACN 107171882 ACN107171882 ACN 107171882A
Authority
CN
China
Prior art keywords
network
address
node
detection
network node
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.)
Granted
Application number
CN201610130616.XA
Other languages
Chinese (zh)
Other versions
CN107171882B (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.)
Huawei Technologies Co 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 CN201610130616.XApriorityCriticalpatent/CN107171882B/en
Publication of CN107171882ApublicationCriticalpatent/CN107171882A/en
Application grantedgrantedCritical
Publication of CN107171882BpublicationCriticalpatent/CN107171882B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请提供一种检测ECMP功能的方法,网络检测设备生成N个包括相同标签栈、TTL、源IP地址和目的IP地址,以及互不相同端口组的检测报文,所述标签栈中包括M个链路标签,所述TTL的值为M+1,N大于等于待检测网络节点到目的IP地址的等价路径的数量;所述网络检测设备根据所述标签栈栈顶的链路标签发送所述N个检测报文,并接收与所述N个检测报文对应的N个通知消息,根据所述N个通知消息和预设比值范围可以确定所述待检测网络节点的ECMP功能是否正确,从而快速定位故障。

The present application provides a method for detecting the ECMP function. The network detection device generates N detection messages including the same label stack, TTL, source IP address and destination IP address, and different port groups. The label stack includes M link labels, the value of the TTL is M+1, and N is greater than or equal to the number of equal-cost paths from the network node to be detected to the destination IP address; the network detection device sends according to the link label at the top of the label stack The N detection messages, and receiving N notification messages corresponding to the N detection messages, and determining whether the ECMP function of the network node to be detected is correct according to the N notification messages and a preset ratio range , so as to quickly locate the fault.

Description

Translated fromChinese
检测等价多路径路由功能的方法、设备和系统Method, device and system for detecting equal-cost multi-path routing function

技术领域technical field

本发明涉及通信技术领域,尤其涉及检测等价多路径路由(equal-costmulti-path routing,简称ECMP)功能的方法、设备和系统。The present invention relates to the technical field of communications, and in particular to a method, device and system for detecting an equal-cost multi-path routing (ECMP for short) function.

背景技术Background technique

网际协议(Internet Protocol,缩写IP)网络中可能存在多条路径能够到达同一IP地址,传统的路由技术只能利用一条路径转发报文,其它路径处于备份状态或无效状态。而ECMP技术可以并行使用多条路径,增加传输带宽,提高网络传输效率。但在实际网络运行过程中,可能由于网络设备的ECMP功能不正确,没有充分利用多条等价路径,导致出现网络拥塞、延时、丢包等问题。In an Internet Protocol (Internet Protocol, IP for short) network, there may be multiple paths to reach the same IP address. Traditional routing technology can only use one path to forward packets, and other paths are in backup or invalid state. The ECMP technology can use multiple paths in parallel to increase transmission bandwidth and improve network transmission efficiency. However, in the actual network operation process, the ECMP function of the network device may not be correct, and multiple equal-cost paths may not be fully utilized, resulting in network congestion, delay, packet loss and other problems.

发明内容Contents of the invention

本发明实施例提供了一种检测等价多路径路由功能的方法、装置和设备,能够检测网络设备的ECMP功能是否正确。Embodiments of the present invention provide a method, device and equipment for detecting the equivalent cost multipath routing function, which can detect whether the ECMP function of the network equipment is correct.

第一方面,提供一种检测ECMP功能的方法,包括:网络检测设备根据目的IP地址和网络拓扑信息生成N个包括标签栈、TTL、源IP地址、所述目的IP地址和端口组的检测报文;所述端口组包括源端口号和目的端口号;所述标签栈中包括M个链路标签,所述TTL的值为M的基础上加1,也即,M+1;所述源IP地址为所述网络检测设备的IP地址,其中,M为所述网络检测设备到待检测网络节点的跳数,M≥1,N≥K,K为所述待检测网络节点至所述待检测IP地址的等价路径的数量,K≥2,M、N和K为正整数;所述N个检测报文的标签栈相同,TTL相同,源IP地址相同,目的IP地址相同;所述N个检测报文中任意两个检测报文的端口组互不相同;所述网络检测设备根据所述标签栈栈顶的链路标签发送所述N个检测报文;所述网络检测设备接收与所述N个检测报文对应的N个通知消息,N个通知消息中包括所述待检测网络节点在不同等价路径上的下一跳,即不同反馈节点,的IP地址;所述网络检测设备根据所述N个通知消息和预设比值范围确定所述待检测网络节点的ECMP功能是否正确。In the first aspect, a method for detecting an ECMP function is provided, including: a network detection device generates N detection reports including a label stack, TTL, source IP address, the destination IP address and port group according to the destination IP address and network topology information The port group includes a source port number and a destination port number; the label stack includes M link labels, and the TTL value is M plus 1, that is, M+1; the source The IP address is the IP address of the network detection device, where M is the number of hops from the network detection device to the network node to be detected, M≥1, N≥K, and K is the number of hops from the network node to be detected to the network node to be detected. The number of equal-cost paths to detect IP addresses, K≥2, M, N and K are positive integers; the label stacks of the N detection messages are the same, the TTL is the same, the source IP address is the same, and the destination IP address is the same; The port groups of any two detection messages in the N detection messages are different from each other; the network detection device sends the N detection messages according to the link label at the top of the label stack; the network detection device receives N notification messages corresponding to the N detection messages, where the N notification messages include the IP addresses of the next hops of the network nodes to be detected on different equal-cost paths, that is, different feedback nodes; The detection device determines whether the ECMP function of the network node to be detected is correct according to the N notification messages and the preset ratio range.

这样,网络检测设备生成的N个检测报文包括相同标签栈和相同TTL,使得N个检测报文在转发过程中经过相同跳数,在标签转发过程中都走指定转发路径,保证了N个检测报文在待检测网络节点被按照转发表并通过ECMP功能转发到不同等价路径上,触发所述待检测网络节点在不同等价路径上的下一跳,在TTL的值为0时发送通知消息给所述网络检测设备;所述网络检测设备根据收到的与N个检测报文对应的N个通知消息,就可以快速判断出所述待检测网络节点的ECMP功能是否正确。In this way, the N detection packets generated by the network detection device include the same label stack and the same TTL, so that the N detection packets go through the same The detection message is forwarded to different equal-cost paths through the ECMP function according to the forwarding table at the network node to be detected, triggers the next hop of the network node to be detected on different equal-cost paths, and is sent when the TTL value is 0 A notification message is sent to the network detection device; the network detection device can quickly determine whether the ECMP function of the network node to be detected is correct according to the received N notification messages corresponding to the N detection messages.

所述网络检测设备具体可以记录所述N个通知消息中不同源地址对应的通知消息的数量;判断所述N个通知消息中不同源地址对应的通知消息的数量之间的比值是否满足所述预设比值范围,以确定所述待检测网络节点的ECMP功能是否正确。换言之,不同源地址对应的(即,不同反馈节点发送的)通知消息的数量,反映了不同等价路径上经过的检测报文的数量。这样,通过不同源地址对应的通知消息的数量之间的比值,就可以判断N个检测报文是否在多条等价路径之间均匀分配,具体来说就是按照预设比值范围在各条等价路径上转发。The network detection device may specifically record the number of notification messages corresponding to different source addresses in the N notification messages; determine whether the ratio between the numbers of notification messages corresponding to different source addresses in the N notification messages satisfies the A preset ratio range is used to determine whether the ECMP function of the network node to be detected is correct. In other words, the number of notification messages corresponding to different source addresses (that is, sent by different feedback nodes) reflects the number of detection messages passing on different equal-cost paths. In this way, through the ratio between the number of notification messages corresponding to different source addresses, it can be judged whether the N detection packets are evenly distributed among multiple equal-cost paths. forwarded on the price path.

可选地,所述N个通知消息中包括第一通知消息和第二通知消息;所述第一通知消息中包括第一反馈节点的IP地址,所述第二通知消息中包括第二反馈节点的IP地址;所述网络检测设备接收与所述N个检测报文对应的N个通知消息,包括:Optionally, the N notification messages include a first notification message and a second notification message; the first notification message includes the IP address of the first feedback node, and the second notification message includes the second feedback node IP address; the network detection device receives N notification messages corresponding to the N detection messages, including:

所述网络检测设备接收所述第一通知消息和第二通知消息,所述第一通知消息用于通知所述网络检测设备:所述第一反馈节点收到所述待检测网络节点发送的检测报文,所述第一反馈节点为所述待检测网络节点在第一等价路径上的下一跳,所述第一等价路径为所述待检测网络节点至所述目的IP地址的K条等价路径中的一条;The network detection device receives the first notification message and the second notification message, and the first notification message is used to notify the network detection device that: the first feedback node receives the detection message sent by the network node to be detected. message, the first feedback node is the next hop of the network node to be detected on the first equal-cost path, and the first equal-cost path is the K link from the network node to be detected to the destination IP address one of the equivalent paths;

所述第二通知消息用于通知所述网络检测设备:所述第二反馈节点收到所述待检测网络节点发送的检测报文,所述第二反馈节点为所述待检测网络节点在第二等价路径上的下一跳,所述第二等价路径为所述K等价路径中的另一条。The second notification message is used to notify the network detection device that: the second feedback node receives the detection message sent by the network node to be detected, and the second feedback node is the network node to be detected at the The next hop on the second equivalent path, where the second equivalent path is another one of the K equivalent paths.

可选地,所述第一反馈节点接收所述待检测网络节点转发的第一检测报文;所述第一反馈节点将所述第一检测报文中的TTL的值减去1,并在确定所述第一检测报文中的TTL的值为0时发送所述第一通知消息;所述第二反馈节点接收所述待检测网络节点转发的第二检测报文;所述第二反馈节点将所述第二检测报文中的TTL的值减去1,并在确定所述第二检测报文中的TTL的值为0时发送所述第二通知消息。Optionally, the first feedback node receives the first detection packet forwarded by the network node to be detected; the first feedback node subtracts 1 from the TTL value in the first detection packet, and Sending the first notification message when it is determined that the TTL value in the first detection message is 0; the second feedback node receives the second detection message forwarded by the network node to be detected; the second feedback The node subtracts 1 from the TTL value in the second detection packet, and sends the second notification message when it is determined that the TTL value in the second detection packet is 0.

由于待检测网络节点至所述目的IP地址至少存在两条等价路径,因此收到的N个通知消息中,至少包括第一反馈节点发送的第一通知消息和第二反馈节点发送的第二通知消息。当然,如果出现收到的通知消息均来自一个反馈节点,很显然所述待检测网络节点的ECMP功能不正确,可能是ECMP功能错误,也可能所述待检测网络节点没有实现该ECMP功能。Since there are at least two equivalent paths from the network node to be detected to the destination IP address, the received N notification messages at least include the first notification message sent by the first feedback node and the second notification message sent by the second feedback node. notification message. Of course, if the received notification messages all come from a feedback node, it is obvious that the ECMP function of the network node to be detected is incorrect, which may be an error in the ECMP function, or the network node to be detected may not implement the ECMP function.

所述网络检测设备具体可以根据所述网络拓扑信息,确定所述网络检测设备到所述待检测网络节点的跳数(M)以及每一跳的链路标签,并确定所述待检测网络节点至所述目的IP地址的等价路径的数量(K);根据所述等价路径的数量(K)、所述跳数(M)以及每一跳的链路标签,生成所述N个检测报文。网络检测设备在生成检测报文时,将TTL的值设为特定值,即所述网络检测设备到待检测网络节点的跳数加1,就可以保证所述检测报文在待检测网络节点的下一跳(即反馈节点)处理时,因TTL为0向所述网络检测设备发送通知消息。Specifically, the network detection device may determine the number of hops (M) from the network detection device to the network node to be detected and the link label of each hop according to the network topology information, and determine the network node to be detected The number (K) of equal-cost paths to the destination IP address; generate the N detections according to the number (K) of the equal-cost paths, the number of hops (M) and the link label of each hop message. When the network detection device generates a detection message, the value of the TTL is set to a specific value, that is, the number of hops from the network detection device to the network node to be detected is increased by 1, so that the detection message can be guaranteed to be in the network node to be detected. When the next hop (that is, the feedback node) is processing, a notification message is sent to the network detection device because the TTL is 0.

可选地,在所述网络检测设备生成所述N个检测报文之前,所述网络检测设备获取所述网络拓扑信息,所述网络拓扑信息包括:所述网络检测设备到所述目的IP地址的转发路径以及所述转发路径上每一跳的路由信息;具体包括所述网络检测设备至所述待检测网络节点的每一跳的链路标签,以及所述待检测网络节点至所述目的IP地址的K条等价路径。Optionally, before the network detection device generates the N detection packets, the network detection device obtains the network topology information, and the network topology information includes: the network detection device to the destination IP address The forwarding path and the routing information of each hop on the forwarding path; specifically including the link label of each hop from the network detection device to the network node to be detected, and the link label from the network node to be detected to the destination K equivalent paths to an IP address.

第二方面,提供一种检测ECMP功能的方法,包括:网络节点接收第一检测报文,所述第一检测报文中包括标签栈、TTL、源IP地址、目的IP地址和第一端口组;所述标签栈中包括M个链路标签,所述TTL的值为M+1,M为大于等于1的正整数,所述源IP地址为网络检测设备的IP地址;所述网络节点弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;所述网络节点确定所述标签栈为空时,根据所述目的IP地址和所述网络节点的转发表确定所述网络节点至所述目的IP地址存在K条等价路径;所述网络节点使用ECMP功能,选择所述K条等价路径中的第一等价路径转发所述第一检测报文。第一反馈节点接收所述第一检测报文,将所述TTL的值减去1;所述第一反馈节点为所述网络节点在所述第一等价路径上的下一跳;所述第一反馈节点确定所述TTL的值为0,并向所述网络检测设备发送第一通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。In a second aspect, a method for detecting an ECMP function is provided, including: a network node receives a first detection message, and the first detection message includes a label stack, a TTL, a source IP address, a destination IP address, and a first port group ; The label stack includes M link labels, the value of the TTL is M+1, M is a positive integer greater than or equal to 1, and the source IP address is the IP address of the network detection device; the network node pops up the link label at the top of the label stack, and subtract 1 from the value of the TTL; when the network node determines that the label stack is empty, determine according to the destination IP address and the forwarding table of the network node There are K equivalent paths from the network node to the destination IP address; the network node selects a first equivalent path among the K equivalent paths by using an ECMP function to forward the first detection message. The first feedback node receives the first detection message, and subtracts 1 from the TTL value; the first feedback node is the next hop of the network node on the first equal-cost path; the The first feedback node determines that the value of the TTL is 0, and sends a first notification message to the network detection device, so that the network detection device determines whether the ECMP function of the network node is correct.

这样,通过包括相同标签栈和相同TTL值的N个检测报文,指定检测报文的标签转发路径和跳数,使得检测报文在待检测网络节点根据转发表通过ECMP转发到各条等价路径上,并利用TTL逐跳减1、TTL的值为0触发不同等价路径上的下一跳,例如,第一反馈节点和第二反馈节点,分别向网络检测设备发送通知消息。这样,网络检测设备根据收到的与N个检测报文对应的N个通知消息,例如,分别统计来自第一反馈节点和第二反馈节点的通知消息的数量,可以知道各条等价路径上转发的检测报文的数量,从而可以快速判断所述待检测网络节点的ECMP功能是否有问题,提高了故障定位的效率。In this way, by including N detection packets with the same label stack and the same TTL value, the label forwarding path and hop count of the detection packets are specified, so that the detection packets are forwarded to each equivalent network node through ECMP according to the forwarding table at the network node to be detected. On the path, TTL is decreased by 1 hop by hop, and the value of TTL is 0 to trigger the next hop on different equivalent paths. For example, the first feedback node and the second feedback node send notification messages to the network detection device respectively. In this way, according to the received N notification messages corresponding to the N detection messages, the network detection device, for example, counts the number of notification messages from the first feedback node and the second feedback node respectively, and can know the number of notification messages on each equivalent path. The number of detection messages forwarded can quickly determine whether there is a problem with the ECMP function of the network node to be detected, thereby improving the efficiency of fault location.

所述网络节点具体可以根据所述源IP地址、所述目的IP地址、所述第一端口组进行哈希计算;并根据哈希计算的第一结果确定所述第一等价路径转发所述第一检测报文,其中,所述第一结果指向所述第一等价路径。Specifically, the network node may perform hash calculation according to the source IP address, the destination IP address, and the first port group; and determine the first equivalent path to forward the A first detection message, wherein the first result points to the first equivalent path.

所述方法还可以包括:所述网络节点接收第二检测报文,所述第二检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第二端口组;所述网络节点弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;所述网络节点确定所述标签栈为空时,根据所述目的IP地址和所述网络节点的转发表确定所述网络节点存在K条等价路径;所述网络节点使用ECMP功能,选择所述K条等价路径中的第二等价路径转发所述第二检测报文。第二反馈节点接收所述第二检测报文,将所述TTL的值减去1;所述第二反馈节点为所述网络节点在所述第二等价路径上的下一跳;所述第二反馈节点确定所述TTL的值为0,并向所述网络检测设备发送第二通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The method may further include: the network node receiving a second detection message, the second detection message including the label stack, the TTL, the source IP address, the destination IP address, and the second port group; the network node pops the link label at the top of the label stack, and subtracts 1 from the value of the TTL; when the network node determines that the label stack is empty, according to the destination IP address and The forwarding table of the network node determines that there are K equivalent paths in the network node; the network node uses the ECMP function to select a second equivalent path in the K equivalent paths to forward the second detection message . The second feedback node receives the second detection message, and subtracts 1 from the value of the TTL; the second feedback node is the next hop of the network node on the second equal-cost path; the The second feedback node determines that the value of the TTL is 0, and sends a second notification message to the network detection device, so that the network detection device determines whether the ECMP function of the network node is correct.

所述网络节点具体可以根据所述源IP地址、所述目的IP地址、所述第二端口组进行哈希计算;并根据哈希计算的第二结果确定所述第二等价路径转发所述第二检测报文,其中,所述第二结果指向所述第二等价路径。Specifically, the network node may perform hash calculation according to the source IP address, the destination IP address, and the second port group; and determine the second equivalent path forwarding the A second detection message, wherein the second result points to the second equivalent path.

第三方面,提供一种网络检测设备,所述网络检测设备具有实现上述第一方面方法中网络检测设备的功能,所述功能可以通过检测装置实现,所述检测装置可以通过硬件实现,也可以通过硬件执行相应的软件实现,所述硬件或软件可以包括一个或多个与上述功能相对应的模块。In the third aspect, a network detection device is provided, the network detection device has the function of realizing the network detection device in the method of the first aspect above, the function can be realized by a detection device, and the detection device can be realized by hardware, or can The corresponding software is implemented by hardware, and the hardware or software may include one or more modules corresponding to the above functions.

第三方面的一种可能的实现中,所述检测装置包括:In a possible implementation of the third aspect, the detection device includes:

报文生成模块,用于根据目的IP地址和网络拓扑信息生成N个包括标签栈、TTL、源IP地址、所述目的IP地址和端口组的检测报文;所述端口组包括源端口号和目的端口号;所述标签栈中包括M个链路标签,所述TTL的值为M+1,所述源IP地址为所述网络检测设备的IP地址,其中,M为所述网络检测设备到待检测网络节点的跳数,M≥1,N≥K,K为待检测网络节点至所述目的IP地址的等价路径的数量,K≥2,M、N和K为正整数;所述N个检测报文的标签栈相同,TTL相同,源IP地址相同,目的IP地址相同;所述N个检测报文中任意两个检测报文的端口组互不相同;Message generating module, for generating N detection messages including label stack, TTL, source IP address, described destination IP address and port group according to destination IP address and network topology information; Said port group includes source port number and destination port number; the label stack includes M link labels, the TTL value is M+1, and the source IP address is the IP address of the network detection device, where M is the network detection device The number of hops to the network node to be detected, M≥1, N≥K, K is the number of equal-cost paths from the network node to be detected to the destination IP address, K≥2, M, N and K are positive integers; The label stacks of the N detection messages are the same, the TTL is the same, the source IP address is the same, and the destination IP address is the same; the port groups of any two detection messages in the N detection messages are different from each other;

发送模块,用于根据所述标签栈栈顶的链路标签发送所述N个检测报文;A sending module, configured to send the N detection messages according to the link label at the top of the label stack;

接收模块,用于与所述N个检测报文对应的N个通知消息;A receiving module, used for N notification messages corresponding to the N detection messages;

确定模块,用于根据所述N个通知消息和预设比值范围确定所述待检测网络节点的ECMP功能是否正确。A determining module, configured to determine whether the ECMP function of the network node to be detected is correct according to the N notification messages and a preset ratio range.

所述确定模块具体可以记录所述N个通知消息中不同源地址对应的通知消息的数量;判断所述N个通知消息中不同源地址对应的通知消息的数量之间的比值是否满足所述预设比值范围,以确定所述待检测网络节点的ECMP功能是否正确。The determination module may specifically record the number of notification messages corresponding to different source addresses in the N notification messages; determine whether the ratio between the numbers of notification messages corresponding to different source addresses in the N notification messages meets the predetermined A ratio range is set to determine whether the ECMP function of the network node to be detected is correct.

可选地,所述N个通知消息中包括第一通知消息和第二通知消息;所述第一通知消息中包括第一反馈节点的IP地址;所述第二通知消息中包括第二反馈节点的IP地址;所述接收模块具体用于:接收所述第一通知消息和第二通知消息,所述第一通知消息用于通知所述网络检测设备:所述第一反馈节点收到所述待检测网络节点转发的检测报文,所述第一反馈节点为所述待检测网络节点在第一等价路径上的下一跳节点,所述第一等价路径为所述K等价路径中的一条;所述第二通知消息用于通知所述网络检测设备:所述第二反馈节点收到所述待检测网络节点转发的检测报文,所述第二反馈节点为所述待检测网络节点在第二等价路径上的下一跳节点,所述第二等价路径为所述K等价路径中的另一条。所述第一通知消息为所述第一反馈节点在所述TTL的值为0时发送;所述第二通知消息为所述第二反馈节点在所述TTL的值为0时发送。Optionally, the N notification messages include a first notification message and a second notification message; the first notification message includes the IP address of the first feedback node; the second notification message includes the second feedback node IP address; the receiving module is specifically configured to: receive the first notification message and the second notification message, and the first notification message is used to notify the network detection device that the first feedback node receives the The detection message forwarded by the network node to be detected, the first feedback node is the next-hop node of the network node to be detected on the first equal-cost path, and the first equal-cost path is the K equivalent path one of them; the second notification message is used to notify the network detection device that: the second feedback node receives the detection message forwarded by the network node to be detected, and the second feedback node is the network node to be detected A next-hop node of the network node on the second equal-cost path, where the second equal-cost path is another one of the K equivalent paths. The first notification message is sent by the first feedback node when the TTL value is 0; the second notification message is sent by the second feedback node when the TTL value is 0.

所述报文生成模块,具体可以根据所述目的IP地址和所述网络拓扑信息,确定所述网络检测设备到所述目的IP地址的转发路径以及所述转发路径上的所述待检测网络节点;根据所述网络拓扑信息,确定所述网络检测设备到所述待检测网络节点的跳数M以及每一跳的链路标签,并确定所述待检测网络节点至所述目的IP地址的等价路径的数量K;根据所述等价路径的数量K、所述跳数M以及每一跳的链路标签,生成所述N个检测报文。所述网络拓扑信息包括所述转发路径以及所述转发路径上每一跳的路由信息。The packet generating module may specifically determine a forwarding path from the network detection device to the destination IP address and the network nodes to be detected on the forwarding path according to the destination IP address and the network topology information ; According to the network topology information, determine the number of hops M from the network detection device to the network node to be detected and the link label of each hop, and determine the distance between the network node to be detected and the destination IP address The number K of cost paths; generating the N detection messages according to the number K of equal cost paths, the number of hops M, and the link label of each hop. The network topology information includes the forwarding path and routing information of each hop on the forwarding path.

第三方面的另一种可能的实现方式中,所述网络检测设备包括:处理器和存储器;所述存储器,用于保存网络拓扑信息,所述网络拓扑信息包括所述网络检测设备到目的IP地址的转发路径以及所述转发路径上每一跳的路由信息;In another possible implementation manner of the third aspect, the network detection device includes: a processor and a memory; the memory is configured to save network topology information, and the network topology information includes The forwarding path of the address and the routing information of each hop on the forwarding path;

所述处理器,用于根据所述目的IP地址和所述网络拓扑信息生成N个检测报文,每个检测报文包括标签栈、生存时间TTL、源IP地址、所述目的IP地址和端口组;所述端口组包括源端口号和目的端口号;所述标签栈中包括M个链路标签,所述TTL的值为M+1,所述源IP地址为所述网络检测设备的IP地址,其中,M为所述网络检测设备到待检测网络节点的跳数,M≥1,N≥K,K为待检测网络节点至所述待检测IP地址的等价路径的数量,K≥2,M、N和K为正整数;所述N个检测报文的标签栈相同,所述N个检测报文的TTL相同,所述N个检测报文的源IP地址相同,所述N个检测报文的目的IP地址相同;所述N个检测报文中任意两个检测报文的端口组互不相同;The processor is configured to generate N detection packets according to the destination IP address and the network topology information, each detection packet includes a label stack, a time-to-live TTL, a source IP address, the destination IP address and a port group; the port group includes a source port number and a destination port number; the label stack includes M link labels, the value of the TTL is M+1, and the source IP address is the IP of the network detection device Address, where M is the number of hops from the network detection device to the network node to be detected, M≥1, N≥K, K is the number of equivalent paths from the network node to be detected to the IP address to be detected, K≥ 2. M, N and K are positive integers; the label stacks of the N detection messages are the same, the TTLs of the N detection messages are the same, the source IP addresses of the N detection messages are the same, and the N The destination IP addresses of the detection messages are the same; the port groups of any two detection messages in the N detection messages are different from each other;

所述处理器,还用于根据所述标签栈栈顶的链路标签发送所述N个检测报文,并接收与所述N个检测报文对应的N个通知消息;根据所述N个通知消息和预设比值范围确定所述待检测网络节点的ECMP功能是否正确。The processor is further configured to send the N detection messages according to the link label at the top of the label stack, and receive N notification messages corresponding to the N detection messages; according to the N The notification message and the preset ratio range determine whether the ECMP function of the network node to be detected is correct.

可选地,所述处理器具体用于记录所述N个通知消息中不同源地址对应的通知消息的数量;判断所述N个通知消息中不同源地址对应的通知消息的数量之间的比值是否满足所述预设比值范围,以确定所述待检测网络节点的ECMP功能是否正确。Optionally, the processor is specifically configured to record the number of notification messages corresponding to different source addresses in the N notification messages; determine the ratio between the number of notification messages corresponding to different source addresses in the N notification messages Whether the preset ratio range is satisfied is to determine whether the ECMP function of the network node to be detected is correct.

可选地,所述N个通知消息中包括第一通知消息和第二通知消息;所述第一通知消息中包括第一反馈节点的IP地址;所述第二通知消息中包括第二反馈节点的IP地址;Optionally, the N notification messages include a first notification message and a second notification message; the first notification message includes the IP address of the first feedback node; the second notification message includes the second feedback node IP address;

所述处理器具体用于接收所述第一通知消息和第二通知消息,所述第一通知消息用于通知所述网络检测设备:所述第一反馈节点收到所述待检测网络节点转发的检测报文,所述第一反馈节点为所述待检测网络节点在第一等价路径上的下一跳节点,所述第一等价路径为所述K等价路径中的一条;所述第二通知消息用于通知所述网络检测设备:所述第二反馈节点收到所述待检测网络节点转发的检测报文,所述第二反馈节点为所述待检测网络节点在第二等价路径上的下一跳节点,所述第二等价路径为所述K等价路径中的另一条。所述第一通知消息为所述第一反馈节点在所述TTL的值为0时发送;所述第二通知消息为所述第二反馈节点在所述TTL的值为0时发送。The processor is specifically configured to receive the first notification message and the second notification message, and the first notification message is used to notify the network detection device that: the first feedback node receives the message forwarded by the network node to be detected. detection message, the first feedback node is the next hop node of the network node to be detected on the first equal-cost path, and the first equal-cost path is one of the K equivalent paths; The second notification message is used to notify the network detection device: the second feedback node receives the detection message forwarded by the network node to be detected, and the second feedback node is the network node to be detected in the second The next hop node on the equivalent path, the second equivalent path is another one of the K equivalent paths. The first notification message is sent by the first feedback node when the TTL value is 0; the second notification message is sent by the second feedback node when the TTL value is 0.

可选地,所述处理器具体根据所述目的IP地址和所述网络拓扑信息,确定所述转发路径以及所述待检测网络节点;根据所述网络拓扑信息,确定所述网络检测设备到所述待检测网络节点的跳数(M)以及每一跳的链路标签,并确定所述待检测网络节点至所述目的IP地址的等价路径的数量(K);根据所述等价路径的数量(K)、所述跳数(M)以及每一跳的链路标签,生成所述N个检测报文。Optionally, the processor specifically determines the forwarding path and the network node to be detected according to the destination IP address and the network topology information; determines the network detection device to the network node according to the network topology information. Describe the number of hops (M) of the network node to be detected and the link label of each hop, and determine the quantity (K) of the equivalent path from the network node to be detected to the destination IP address; according to the equivalent path The number (K), the number of hops (M) and the link label of each hop to generate the N detection messages.

第四方面,提供一种网络节点,所述网络节点具有实现上述第二方面方法中网络节点(包括待检测网络节点,中间网络节点等)的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现,所述硬件或软件可以包括一个或多个与上述功能相对应的模块。In the fourth aspect, a network node is provided, and the network node has the function of realizing the network node (including the network node to be detected, the intermediate network node, etc.) in the method of the second aspect above, and the function can be realized by hardware, or by Hardware executes corresponding software implementation, and the hardware or software may include one or more modules corresponding to the above functions.

一种可能的实现中,所述网络节点包括接收模块,报文处理模块和转发模块;In a possible implementation, the network node includes a receiving module, a message processing module and a forwarding module;

所述接收模块,用于接收接收第一检测报文,所述第一检测报文中包括标签栈、TTL、源IP地址、目的IP地址和第一端口组;其中,所述标签栈中包括M个链路标签,所述TTL的值为M+1,M为大于等于1的正整数,所述源IP地址为网络检测设备的IP地址;The receiving module is configured to receive a first detection message, the first detection message includes a label stack, TTL, source IP address, destination IP address and a first port group; wherein, the label stack includes M link labels, the value of the TTL is M+1, M is a positive integer greater than or equal to 1, and the source IP address is the IP address of the network detection device;

所述报文处理模块,用于弹出所述标签栈栈顶的链路标签,将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空时(此时,所述网络节点为待检测网络节点),根据所述目的IP地址和所述网络节点的转发表确定所述网络节点至所述目的IP地址存在K条等价路径,则使用ECMP功能为所述第一检测报文选择所述K条等价路径中的第一等价路径;The message processing module is used to pop up the link label at the top of the label stack, and subtract 1 from the value of the TTL; judge whether the label stack is empty; when it is determined that the label stack is empty ( At this point, the network node is a network node to be detected), and according to the forwarding table of the destination IP address and the network node, it is determined that there are K equivalent paths from the network node to the destination IP address, then the ECMP function is used selecting a first equivalent path among the K equivalent paths for the first detection message;

所述转发模块,用于向所述报文处理模块选择出的所述第一等价路径转发所述第一检测报文。The forwarding module is configured to forward the first detection message to the first equal-cost path selected by the message processing module.

第一反馈节点接收所述第一检测报文,将所述TTL的值减去1,所述第一反馈节点为所述网络节点在所述第一等价路径上的下一跳。所述第一反馈节点确定所述TTL的值为0时向所述网络检测设备发送第一通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The first feedback node receives the first detection message, and subtracts 1 from the value of the TTL, and the first feedback node is the next hop of the network node on the first equal-cost path. When the first feedback node determines that the TTL value is 0, it sends a first notification message to the network detection device, so that the network detection device determines whether the ECMP function of the network node is correct.

所述报文处理模块,具体根据所述源IP地址、所述目的IP地址、所述第一端口组,进行哈希计算;并根据哈希计算的结果,确定所述第一等价路径用于转发所述第一检测报文,其中,所述哈希计算的结果指向所述第一等价路径。The message processing module performs hash calculation according to the source IP address, the destination IP address, and the first port group; and determines the first equivalent path according to the result of the hash calculation. For forwarding the first detection message, wherein the result of the hash calculation points to the first equal-cost path.

所述转发模块,还用于当所述报文处理模块确定所述标签栈不为空时,根据所述标签栈栈顶的链路标签,转发所述第一检测报文。此时,所述网络节点为中间网络节点,对所述第一检测报文继续进行标签转发,直至发送给待检测网络节点。The forwarding module is further configured to forward the first detection message according to the link label at the top of the label stack when the message processing module determines that the label stack is not empty. At this time, the network node is an intermediate network node, and continues to forward the label of the first detection message until it is sent to the network node to be detected.

所述接收模块还用于接收第二检测报文,所述第二检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第二端口组。相应地,所述报文处理模块,还用于对所述第二检测报文进行如下处理:弹出所述标签栈栈顶的链路标签,将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空时(此时,所述网络节点为待检测网络节点),根据所述目的IP地址和所述网络节点的转发表确定所述网络节点至所述目的IP地址存在所述K条等价路径,则使用ECMP功能为所述第二检测报文选择所述K条等价路径中的第二等价路径。所述转发模块,还用于向所述报文处理模块选择出的所述第二等价路径转发所述第二检测报文。The receiving module is further configured to receive a second detection message, the second detection message includes the label stack, the TTL, the source IP address, the destination IP address and a second port group. Correspondingly, the message processing module is further configured to perform the following processing on the second detection message: pop the link label at the top of the label stack, and subtract 1 from the value of the TTL; whether the label stack is empty; when it is determined that the label stack is empty (at this time, the network node is a network node to be detected), determine the network node to If the K equivalent paths exist for the destination IP address, the ECMP function is used to select a second equivalent path in the K equivalent paths for the second detection message. The forwarding module is further configured to forward the second detection message to the second equal-cost path selected by the message processing module.

第二反馈节点接收所述第二检测报文,将所述TTL的值减去1,所述第二反馈节点为所述网络节点在所述第二等价路径上的下一跳。所述第二反馈节点确定所述TTL的值为0时向所述网络检测设备发送第二通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The second feedback node receives the second detection message, and subtracts 1 from the value of the TTL, and the second feedback node is the next hop of the network node on the second equal-cost path. When the second feedback node determines that the TTL value is 0, it sends a second notification message to the network detection device, so that the network detection device determines whether the ECMP function of the network node is correct.

另一种可能的实现中,所述网络节点包括处理器和存储器;进一步还包括通信接口;所述处理器,所述存储器和所述通信接口之间可以通过总线相互连接;In another possible implementation, the network node includes a processor and a memory; further includes a communication interface; the processor, the memory, and the communication interface may be connected to each other through a bus;

所述存储器,用于存储所述网络节点的转发表;所述处理器,用于接收第一检测报文,所述第一检测报文中包括标签栈、TTL、源IP地址、目的IP地址和第一端口组;弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空时,根据所述目的IP地址和所述转发表确定所述网络节点至所述目的IP地址存在K条等价路径,则使用ECMP功能,选择所述K条等价路径中的第一等价路径转发所述第一检测报文。The memory is configured to store the forwarding table of the network node; the processor is configured to receive a first detection message, and the first detection message includes a label stack, TTL, source IP address, and destination IP address and the first port group; pop up the link label at the top of the label stack, and subtract 1 from the value of the TTL; judge whether the label stack is empty; when it is determined that the label stack is empty, according to the The destination IP address and the forwarding table determine that there are K equivalent paths from the network node to the destination IP address, then use the ECMP function to select the first equivalent path in the K equivalent paths to forward the The first detection packet.

第一反馈节点接收所述第一检测报文,将所述TTL的值减去1;所述第一反馈节点为所述网络节点在所述第一等价路径上的下一跳;所述第一反馈节点确定所述TTL的值为0,并向所述网络检测设备发送第一通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The first feedback node receives the first detection message, and subtracts 1 from the TTL value; the first feedback node is the next hop of the network node on the first equal-cost path; the The first feedback node determines that the value of the TTL is 0, and sends a first notification message to the network detection device, so that the network detection device determines whether the ECMP function of the network node is correct.

所述处理器,还用于当确定所述标签栈不为空时,根据所述标签栈栈顶的链路标签,转发所述检测报文。此时,所述网络节点为中间网络节点,对所述检测报文继续进行标签转发,直至发送给待检测网络节点。The processor is further configured to forward the detection message according to the link label at the top of the label stack when it is determined that the label stack is not empty. At this time, the network node is an intermediate network node, and continues to forward the label of the detection message until it is sent to the network node to be detected.

所述处理器,具体根据所述源IP地址、所述目的IP地址、所述第一端口组,进行哈希计算;并根据哈希计算的结果,确定所述第一等价路径用于转发所述第一检测报文,其中,所述哈希计算的结果指向所述第一等价路径。The processor performs hash calculation according to the source IP address, the destination IP address, and the first port group; and determines the first equal-cost path for forwarding according to the result of the hash calculation. In the first detection message, the result of the hash calculation points to the first equivalent path.

所述处理器,还用于接收第二检测报文,所述第二检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第二端口组;并对所述第二检测报文进行如下处理:弹出所述标签栈栈顶的链路标签,将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空时,根据所述目的IP地址和所述网络节点的转发表确定存在K条等价路径,则使用ECMP功能选择所述K条等价路径中的第二等价路径转发所述第二检测报文。The processor is further configured to receive a second detection message, where the second detection message includes the label stack, the TTL, the source IP address, the destination IP address, and a second port group; And the second detection message is processed as follows: the link label at the top of the label stack is popped up, and the value of the TTL is subtracted by 1; it is judged whether the label stack is empty; when it is determined that the label stack When it is empty, determine that there are K equivalent paths according to the forwarding table of the destination IP address and the network node, then use the ECMP function to select the second equivalent path in the K equivalent paths to forward the second Detect packets.

第二反馈节点接收所述第二检测报文,将所述TTL的值减去1,所述第二反馈节点为所述网络节点在所述第二等价路径上的下一跳。所述第二反馈节点确定所述TTL的值为0,则向所述网络检测设备发送第二通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The second feedback node receives the second detection message, and subtracts 1 from the value of the TTL, and the second feedback node is the next hop of the network node on the second equal-cost path. The second feedback node determines that the value of the TTL is 0, and then sends a second notification message to the network detection device, so that the network detection device determines whether the ECMP function of the network node is correct.

第五方面,提供了一种检测ECMP功能的方法,包括:网络检测设备根据目的IP地址和网络拓扑信息生成N个检测报文,每个检测报文包括标签栈、生存时间TTL、源IP地址、所述目的IP地址和端口组;所述端口组包括源端口号和目的端口号,所述标签栈中包括M个链路标签,所述TTL的值大于等于M+2,所述源IP地址为所述网络检测设备的IP地址,其中,M为所述网络检测设备到待检测网络节点的跳数,M≥1,N≥K,K为所述待检测网络节点至所述目的IP地址的等价路径的数量,K≥2,M、N和K为正整数;所述N个检测报文的标签栈相同,所述N个检测报文的TTL相同,所述N个检测报文的源IP地址相同,所述N个检测报文的目的IP地址相同;所述N个检测报文中任意两个检测报文的端口组互不相同;所述网络检测设备根据所述标签栈栈顶的链路标签发送所述N个检测报文;所述网络检测设备接收与所述N个检测报文对应的N个通知消息;所述网络检测设备根据所述N个通知消息和预设比值范围确定所述待检测网络节点的ECMP功能是否正确。In the fifth aspect, a method for detecting ECMP functions is provided, including: a network detection device generates N detection packets according to the destination IP address and network topology information, and each detection packet includes a label stack, a time-to-live TTL, and a source IP address , the destination IP address and port group; the port group includes a source port number and a destination port number, the label stack includes M link labels, the value of the TTL is greater than or equal to M+2, and the source IP The address is the IP address of the network detection device, where M is the number of hops from the network detection device to the network node to be detected, M≥1, N≥K, and K is the IP address from the network node to be detected to the destination IP The number of equivalent paths of the address, K≥2, M, N and K are positive integers; the label stacks of the N detection messages are the same, the TTLs of the N detection messages are the same, and the N detection messages The source IP addresses of the text are the same, and the destination IP addresses of the N detection messages are the same; the port groups of any two detection messages in the N detection messages are different from each other; the network detection device according to the label The link label at the top of the stack sends the N detection messages; the network detection device receives N notification messages corresponding to the N detection messages; the network detection device receives the N notification messages according to the N notification messages and The preset ratio range determines whether the ECMP function of the network node to be detected is correct.

这样,当待检测网络节点至所述目的IP地址的等价路径上的存在多个节点时,不限定TTL的值为M+1,也就是不限定必须待检测网络节点在各条等价路径上的下一跳向网络检测设备发送通知消息。例如,可以设定TTL的值为M+2,使得所述待检测网络节点在各条等价路径上的下一跳的下一跳因TTL为0向网络检测设备发送通知消息。由于网络检测设备有网络拓扑信息,因此可以在生成检测报文的时候,设定特定的TTL来保证仍然由各条等价路径上的节点反馈通知消息,这样仍然可以根据来自不同等价路径上反馈节点发送的通知消息,判断待检测网络节点的ECMP功能是否正确。In this way, when there are multiple nodes on the equivalent path from the network node to be detected to the destination IP address, the value of TTL is not limited to M+1, that is, it is not limited that the network node to be detected must be on each equivalent path The next hop on the network sends a notification message to the network detection device. For example, the value of TTL may be set to M+2, so that the next hop of the next hop of the network node to be detected on each equal-cost path sends a notification message to the network detection device because the TTL is 0. Since the network detection device has network topology information, it can set a specific TTL when generating the detection message to ensure that the nodes on each equal-cost path still feed back the notification message, so that it can still be based on the information from different equal-cost paths. The notification message sent by the feedback node is used to determine whether the ECMP function of the network node to be detected is correct.

可选地,所述N个通知消息中包括第一通知消息和第二通知消息;所述第一通知消息中包括第一反馈节点的IP地址;所述第二通知消息中包括第二反馈节点的IP地址;所述网络检测设备接收与所述N个检测报文对应的N个通知消息,包括:Optionally, the N notification messages include a first notification message and a second notification message; the first notification message includes the IP address of the first feedback node; the second notification message includes the second feedback node IP address; the network detection device receives N notification messages corresponding to the N detection messages, including:

所述网络检测设备接收所述第一通知消息,所述第一通知消息用于通知所述网络检测设备:所述第一反馈节点收到检测报文,所述第一反馈节点为所述待检测网络节点至所述目的IP地址的第一等价路径上的节点;The network detection device receives the first notification message, and the first notification message is used to notify the network detection device that: the first feedback node receives a detection message, and the first feedback node is the waiting detecting nodes on the first equal-cost path from the network node to the destination IP address;

所述网络检测设备接收第二通知消息,所述第二通知消息用于通知所述网络检测设备:所述第二反馈节点收到检测报文,所述第二反馈节点为所述待检测网络节点至所述目的IP地址的第二等价路径上的节点。The network detection device receives a second notification message, and the second notification message is used to notify the network detection device that: the second feedback node receives a detection message, and the second feedback node is the network to be detected Nodes on the second equal-cost path from the node to the destination IP address.

第六方面,提供一种网络检测设备,所述网络检测设备具有实现上述第五方面方法中网络检测设备的功能,所述功能可以通过检测装置实现,所述检测装置可以通过硬件实现,也可以通过硬件执行相应的软件实现,所述硬件或软件可以包括一个或多个与上述功能相对应的模块。A sixth aspect provides a network detection device, the network detection device has the function of implementing the network detection device in the method of the fifth aspect above, the function can be realized by a detection device, and the detection device can be realized by hardware, or can The corresponding software is implemented by hardware, and the hardware or software may include one or more modules corresponding to the above functions.

第七方面,提供了一种检测ECMP功能的方法,包括:网络节点接收第一检测报文,所述第一检测报文中包括标签栈、TTL、源IP地址、目的IP地址和第一端口组;所述标签栈中包括M个链路标签,所述TTL的值大于等于M+2,M为大于等于1的正整数,所述源IP地址为网络检测设备的IP地址;所述网络节点弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;所述网络节点确定所述标签栈为空时,根据所述目的IP地址和所述网络节点的转发表确定所述网络节点至所述目的IP地址存在K条等价路径;所述网络节点使用ECMP功能,选择所述K条等价路径中的第一等价路径转发所述第一检测报文。第一反馈节点接收所述第一检测报文,将所述TTL的值减去1;所述第一反馈节点确定所述TTL的值为0时,向所述网络检测设备发送第一通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确,所述第一反馈节点为所述第一等价路径上的节点。In a seventh aspect, a method for detecting an ECMP function is provided, including: a network node receives a first detection message, and the first detection message includes a label stack, a TTL, a source IP address, a destination IP address, and a first port group; the label stack includes M link labels, the value of the TTL is greater than or equal to M+2, M is a positive integer greater than or equal to 1, and the source IP address is the IP address of the network detection device; the network The node pops up the link label at the top of the label stack, and subtracts 1 from the value of the TTL; when the network node determines that the label stack is empty, it Publishing to determine that there are K equivalent paths from the network node to the destination IP address; the network node uses the ECMP function to select the first equivalent path among the K equivalent paths to forward the first detection message . The first feedback node receives the first detection message, and subtracts 1 from the TTL value; when the first feedback node determines that the TTL value is 0, sends a first notification message to the network detection device , so that the network detection device determines whether the ECMP function of the network node is correct, and the first feedback node is a node on the first equal-cost path.

这样,当待检测网络节点至所述目的IP地址的等价路径上的存在多个节点时,通过将TTL的值设定为大于等于M+2的正整数,使得各条等价路径上除所述待检测网络节点的下一跳之外的节点因TTL为0向网络检测设备发送通知消息。例如,设定TTL的值为M+2,使得所述待检测网络节点在各条等价路径上的下一跳的下一跳因TTL为0向网络检测设备发送通知消息。由于网络检测设备有网络拓扑信息,因此在生成检测报文的时候,可以根据等价路径上节点的数量,设定特定的TTL来保证由各条等价路径上除所述待检测网络节点的下一跳之外的节点反馈通知消息,这样仍然可以根据来自不同等价路径上反馈节点发送的通知消息,判断待检测网络节点的ECMP功能是否正确。In this way, when there are multiple nodes on the equivalent path from the network node to be detected to the destination IP address, by setting the value of TTL to a positive integer greater than or equal to M+2, all equal-cost paths except Nodes other than the next hop of the network node to be detected send a notification message to the network detection device because the TTL is 0. For example, the value of TTL is set to M+2, so that the next hop of the next hop of the network node to be detected on each equal-cost path sends a notification message to the network detection device because the TTL is 0. Since the network detection device has network topology information, when generating a detection message, a specific TTL can be set according to the number of nodes on the equal-cost path to ensure that the network nodes to be detected are removed from each equal-cost path. Nodes other than the next hop feed back notification messages, so that it is still possible to judge whether the ECMP function of the network node to be detected is correct according to the notification messages sent by feedback nodes on different equal-cost paths.

可选地,所述方法还包括:所述网络节点接收第二检测报文,所述第二检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第二端口组;所述网络节点弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;所述网络节点确定所述标签栈为空时,根据所述目的IP地址和所述网络节点的转发表确定存在所述K条等价路径;所述网络节点使用ECMP功能,选择所述K条等价路径中的第二等价路径转发所述第二检测报文。第二反馈节点接收所述第二检测报文,将所述TTL的值减去1;所述第二反馈节点确定所述TTL的值为0时,向所述网络检测设备发送第二通知消息,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确,所述第二反馈节点为所述第二等价路径上的节点,所述第二反馈节点与所述第一反馈节点互不相同。Optionally, the method further includes: the network node receiving a second detection message, the second detection message including the label stack, the TTL, the source IP address, and the destination IP address and the second port group; the network node pops the link label at the top of the label stack, and subtracts 1 from the value of the TTL; when the network node determines that the label stack is empty, according to the purpose The IP address and the forwarding table of the network node determine that there are K equivalent paths; the network node uses the ECMP function to select a second equivalent path in the K equivalent paths to forward the second detection report arts. The second feedback node receives the second detection message, and subtracts 1 from the value of the TTL; when the second feedback node determines that the value of the TTL is 0, sends a second notification message to the network detection device , so that the network detection device determines whether the ECMP function of the network node is correct, the second feedback node is a node on the second equal-cost path, and the second feedback node interacts with the first feedback node Are not the same.

第八方面,提供一种网络节点,所述网络节点具有实现上述第七方面方法中网络节点(包括待检测网络节点,中间网络节点等)的功能,的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现,所述硬件或软件可以包括一个或多个与上述功能相对应的模块。The eighth aspect provides a network node, the network node has the function of realizing the function of the network node (including the network node to be detected, the intermediate network node, etc.) in the method of the seventh aspect above, and the function can be realized by hardware, It may also be implemented by executing corresponding software through hardware, and the hardware or software may include one or more modules corresponding to the above functions.

第九方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码中包括实现上述第一方面或第五方面的方法的指令。In a ninth aspect, a computer storage medium is provided, where program code is stored, and the program code includes instructions for implementing the method in the first aspect or the fifth aspect.

第十方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码中包括实现上述第二方面或第七方面的方法的指令。In a tenth aspect, a computer storage medium is provided, where program code is stored, and the program code includes instructions for implementing the method of the second aspect or the seventh aspect above.

第十一方面,提供一种检测ECMP功能的系统,包括网络检测设备,待检测网络节点,第一反馈节点和第二反馈节点;In an eleventh aspect, a system for detecting an ECMP function is provided, including a network detection device, a network node to be detected, a first feedback node, and a second feedback node;

所述网络检测设备,用于根据目的IP地址和网络拓扑信息生成N个包括标签栈、TTL、源IP地址、所述目的IP地址和端口组的检测报文;所述端口组包括源端口号和目的端口号;所述标签栈中包括M个链路标签,所述TTL的值为大于等于M+1,M为所述网络检测设备到所述待检测网络节点的跳数,M≥1,N≥K,K为所述待检测网络节点至所述目的IP地址的等价路径的数量,K≥2,N、M、K为正整数;所述N个检测报文的标签栈相同,TTL相同,源IP地址相同,目的IP地址相同;所述N个检测报文中任意两个检测报文的端口组互不相同;根据所述标签栈栈顶的链路标签发送所述N个检测报文;The network detection device is used to generate N detection messages including a label stack, TTL, source IP address, the destination IP address and a port group according to the destination IP address and network topology information; the port group includes a source port number and the destination port number; the label stack includes M link labels, the value of the TTL is greater than or equal to M+1, and M is the number of hops from the network detection device to the network node to be detected, and M≥1 , N≥K, K is the number of equal-cost paths from the network node to be detected to the destination IP address, K≥2, N, M, and K are positive integers; the label stacks of the N detection messages are the same , the TTL is the same, the source IP address is the same, and the destination IP address is the same; the port groups of any two detection messages in the N detection messages are different from each other; the N a detection message;

所述待检测网络节点,用于接收所述N个检测报文中的第一检测报文,所述第一检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第一端口组,弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;当确定所述标签栈为空时,根据所述目的IP地址和所述待检测网络节点的转发表确定所述待检测网络节点至所述目的IP地址存在K条等价路径;使用ECMP功能,选择所述K条等价路径中的第一等价路径转发所述第一检测报文;The network node to be detected is configured to receive a first detection message among the N detection messages, where the first detection message includes the label stack, the TTL, the source IP address, the State the purpose IP address and the first port group, pop up the link label at the top of the label stack, and subtract 1 from the value of the TTL; when it is determined that the label stack is empty, according to the purpose IP address and The forwarding table of the network node to be detected determines that there are K equivalent paths from the network node to be detected to the destination IP address; using the ECMP function, selecting the first equivalent path in the K equivalent paths to forward the The first detection message;

第一反馈节点,用于接收所述第一检测报文,将所述TTL的值减去1;在确定所述TTL的值为0时,向所述网络检测设备发送通知消息;所述第一反馈节点为所述第一等价路径上的节点;当所述TTL的值为M+1时,所述第一反馈节点为所述网络节点在所述第一等价路径上的下一跳;当所述TTL的值为M+2时,所述第一反馈节点为所述网络节点在所述第一等价路径上的下一跳的下一跳;The first feedback node is configured to receive the first detection message, and subtract 1 from the TTL value; when it is determined that the TTL value is 0, send a notification message to the network detection device; the first feedback node A feedback node is a node on the first equal-cost path; when the value of the TTL is M+1, the first feedback node is the next node of the network node on the first equal-cost path jump; when the value of the TTL is M+2, the first feedback node is the next hop of the next hop of the network node on the first equal-cost path;

所述待检测网络节点,还用于接收所述N个检测报文中的第二检测报文,所述第二检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第二端口组,弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;当确定所述标签栈为空时,根据所述目的IP地址和所述待检测网络节点的转发表确定所述待检测网络节点至所述目的IP地址存在K条等价路径;使用ECMP功能,选择所述K条等价路径中的第二等价路径转发所述第二检测报文;The network node to be detected is further configured to receive a second detection message among the N detection messages, where the second detection message includes the label stack, the TTL, the source IP address, The destination IP address and the second port group pop up the link label at the top of the label stack, and subtract 1 from the value of the TTL; when it is determined that the label stack is empty, according to the destination IP address and the forwarding table of the network node to be detected determines that there are K equivalent paths from the network node to be detected to the destination IP address; using the ECMP function, select the second equivalent path in the K equivalent paths for forwarding the second detection message;

第二反馈节点,用于接收所述第二检测报文,将所述TTL的值减去1;在确定所述TTL的值为0时,向所述网络检测设备发送通知消息;所述第二反馈节点为所述第二等价路径上的节点;当所述TTL的值为M+1时,所述第二反馈节点为所述待检测网络节点在所述第二等价路径上的下一跳;当所述TTL的值为M+2时,所述第二反馈节点为所述待检测网络节点在所述第二等价路径上的下一跳的下一跳;The second feedback node is configured to receive the second detection message, and subtract 1 from the TTL value; when it is determined that the TTL value is 0, send a notification message to the network detection device; the first The second feedback node is a node on the second equivalent path; when the value of the TTL is M+1, the second feedback node is a node of the network node to be detected on the second equivalent path next hop; when the value of the TTL is M+2, the second feedback node is the next hop of the next hop of the network node to be detected on the second equal-cost path;

所述网络检测设备,还用于接收与所述N个检测报文对应的N个通知消息,N个通知消息中包括所述待检测网络节点在不同等价路径上的节点例如,第一反馈节点和第二反馈节点,的IP地址;根据所述N个通知消息和预设比值范围确定所述待检测网络节点的ECMP功能是否正确。The network detection device is further configured to receive N notification messages corresponding to the N detection messages, and the N notification messages include nodes on different equal-cost paths of the network node to be detected, for example, the first feedback The IP addresses of the node and the second feedback node; determining whether the ECMP function of the network node to be detected is correct according to the N notification messages and the preset ratio range.

可选地,所述检测转发表的系统中还包括若干中间网络节点。在所述待检测网络节点接收所述N个检测报文之前,中间网络节点接收所述N个检测报文,弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;所述中间网络节点确定所述标签栈不为空,并根据所述标签栈栈顶的链路标签,继续转发所述N个检测报文,直至所述待检测网络节点收到所述N个检测报文。这样,通过检测报文中的特定标签栈和特定TTL值,可以控制中间网络节点仅根据链路标签对所述检测报文进行标签转发,只有在待检测网络节点,因标签栈为空,才会根据转发表使用ECMP功能选择等价路径转发所述N个检测报文。Optionally, the system for detecting forwarding tables further includes several intermediate network nodes. Before the network node to be detected receives the N detection messages, the intermediate network node receives the N detection messages, pops the link label at the top of the label stack, and subtracts the TTL value 1. The intermediate network node determines that the label stack is not empty, and continues to forward the N detection messages according to the link label at the top of the label stack until the network node to be detected receives the N detection packets. In this way, by detecting the specific label stack and specific TTL value in the message, the intermediate network node can be controlled to carry out label forwarding on the detected message only according to the link label. The ECMP function is used to select an equal-cost path to forward the N detection packets according to the forwarding table.

上述各个方面中,N可以为K的倍数。N的取值越大,检测精度越高。所述通知消息可以为网络控制报文协议(Internet Control Message Protocol,缩写ICMP)报文。In each of the above aspects, N may be a multiple of K. The larger the value of N, the higher the detection accuracy. The notification message may be an Internet Control Message Protocol (Internet Control Message Protocol, ICMP for short) message.

本申请提供的技术方案,当需要检测待检测网络节点的ECMP功能是否正确时,网络检测设备生成包括相同标签栈和相同TTL值的N个检测报文,指定检测报文的标签转发路径和跳数,并利用TTL逐跳减1、TTL的值为0时会触发待检测网络节点的下一跳,即所述反馈节点,向网络检测设备发送通知消息。这样,根据收到的与N个检测报文对应的N个通知消息,网络检测设备可以知道各条等价路径上转发的检测报文的数量,从而可以快速判断确定所述待检测网络节点的ECMP功能是否有问题,提高了故障定位的效率。In the technical solution provided by this application, when it is necessary to detect whether the ECMP function of the network node to be detected is correct, the network detection device generates N detection messages including the same label stack and the same TTL value, and specifies the label forwarding path and hop of the detection message. and use TTL to decrease by 1 hop by hop. When the TTL value is 0, it will trigger the next hop of the network node to be detected, that is, the feedback node, to send a notification message to the network detection device. In this way, according to the received N notification messages corresponding to the N detection packets, the network detection device can know the number of detection packets forwarded on each equal-cost path, so as to quickly determine the number of detection packets of the network node to be detected. Whether there is a problem with the ECMP function improves the efficiency of fault location.

附图说明Description of drawings

图1为本申请实施例提供的检测ECMP功能的系统的结构示意图;Fig. 1 is a schematic structural diagram of a system for detecting an ECMP function provided by an embodiment of the present application;

图2为本申请实施例提供的一种检测ECMP功能的方法流程图;Fig. 2 is a kind of flow chart of the method for detecting ECMP function provided by the embodiment of the present application;

图3为本申请实施例提供的检测ECMP功能的信息交互示意图;FIG. 3 is a schematic diagram of information interaction for detecting the ECMP function provided by the embodiment of the present application;

图4为本申请实施例提供的一种检测ECMP功能的检测装置的结构示意图;FIG. 4 is a schematic structural diagram of a detection device for detecting an ECMP function provided by an embodiment of the present application;

图5为本申请实施例提供的另一种检测ECMP功能的检测装置的结构示意图;5 is a schematic structural diagram of another detection device for detecting the ECMP function provided by the embodiment of the present application;

图6为本申请实施例提供的网络检测设备的结构示意图;FIG. 6 is a schematic structural diagram of a network detection device provided in an embodiment of the present application;

图7为本申请实施例提供的一种网络节点结构示意图;FIG. 7 is a schematic diagram of a network node structure provided by an embodiment of the present application;

图8为本申请实施例提供的另一种网络节点结构示意图。FIG. 8 is a schematic diagram of another network node structure provided by the embodiment of the present application.

具体实施方式detailed description

本申请提供的技术方案中,网络检测设备生成包括生存时间(time to live,缩写TTL)和链路标签的N个检测报文,通过链路标签指定传输每个检测报文的网络路径,通过TTL指定该检测报文经过的跳数,用于对待检测网络节点的ECMP功能进行检测。具体地,网络检测设备确定所述网络检测设备到所述待检测网络节点的跳数M以及每一跳的链路标签,生成N个检测报文,N大于等于所述待检测网络节点至目的IP地址的等价路径的数量K;每个检测报文中包括标签栈、TTL、源IP地址,目的IP地址和端口组;标签栈包括M个链路标签,依次为所述网络检测设备到所述待检测网络节点的M跳的链路标签,TTL的值为M的基础上至少加1,也即,TTL的值大于等于M+1。N个检测报文中的标签栈、TTL、源IP地址和目的IP地址均相同;N个检测报文的端口组互不相同。所述N个检测报文从所述网络检测设备转发至所述待检测网络节点的过程中,根据标签栈中的链路标签进行标签转发,链路标签逐跳弹出,TTL值逐跳减1,到达所述待检测网络节点后标签栈为空,因此所述待检测网络节点通过转发表和ECMP功能,将所述N个检测报文转发到不同等价路径上,触发不同等价路径上的反馈节点因TTL的值为0向所述网络检测设备发送通知消息,具体地,该通知消息可以是网络控制报文协议(InternetControl Message Protocol,缩写ICMP)报文。网络检测设备根据不同等价路径上的反馈节点发送的通知消息,判断待检测网络节点的ECMP功能是否正确。可以理解,当网络检测设备收到的与N个检测报文对应的N个通知消息,按照预设比值范围分布在待检测网络节点的多条等价路径上时,可以确定该待检测网络节点的ECMP功能正确,否则错误。In the technical solution provided by this application, the network detection device generates N detection messages including time to live (time to live, abbreviated TTL) and link labels, and specifies the network path for transmitting each detection message through the link label, and passes The TTL specifies the number of hops passed by the detection packet, and is used to detect the ECMP function of the network node to be detected. Specifically, the network detection device determines the number of hops M from the network detection device to the network node to be detected and the link label of each hop, and generates N detection messages, where N is greater than or equal to the number of hops from the network node to be detected to the destination The quantity K of the equivalent cost path of IP address; Include label stack, TTL, source IP address in each detection message, purpose IP address and port group; Label stack comprises M link labels, is described network detection equipment to For the link label of M hops of the network node to be detected, the value of TTL is at least plus 1 on the basis of M, that is, the value of TTL is greater than or equal to M+1. The label stack, TTL, source IP address, and destination IP address in the N detection packets are all the same; the port groups of the N detection packets are different from each other. In the process of forwarding the N detection messages from the network detection device to the network node to be detected, the label is forwarded according to the link label in the label stack, the link label is popped up hop by hop, and the TTL value is reduced by 1 hop by hop , the label stack is empty after arriving at the network node to be detected, so the network node to be detected forwards the N detection messages to different equivalent paths through the forwarding table and the ECMP function, triggering The feedback node sends a notification message to the network detection device because the TTL value is 0. Specifically, the notification message may be an Internet Control Message Protocol (Internet Control Message Protocol, ICMP for short) message. The network detection device judges whether the ECMP function of the network node to be detected is correct according to the notification messages sent by the feedback nodes on different equal-cost paths. It can be understood that when the N notification messages corresponding to the N detection messages received by the network detection device are distributed on multiple equivalent paths of the network node to be detected according to the preset ratio range, the network node to be detected can be determined to be The ECMP function is correct, otherwise it is wrong.

ICMP用于在主机与路由器之间传递控制信息,包括报告错误、状态信息等。ICMP报文有不同的类型,例如ICMP差错报告报文主要用于向数据通信中的源端报告错误。ICMP差错报告报文的数据区通常包括出错报文的首部,还可以包括该出错报文的前64位数据。当数据报文中TTL为0时,路由器会丢弃该数据报文,并发送类型为超时(类型值为11,代码为0)的ICMP差错报告报文给该数据报文的发送者(源端)。本申请实施例中,通知消息可以为ICMP报文,该ICMP报文就是指类型值为11、代码为0的ICMP差错报告报文。ICMP is used to transfer control information between hosts and routers, including reporting errors, status information, etc. There are different types of ICMP messages. For example, ICMP error report messages are mainly used to report errors to the source end in data communication. The data area of the ICMP error report message usually includes the header of the error message, and may also include the first 64 bits of data of the error message. When the TTL in the data message is 0, the router will discard the data message and send an ICMP error report message of type timeout (type value 11, code 0) to the sender (source end) of the data message ). In this embodiment of the present application, the notification message may be an ICMP message, and the ICMP message refers to an ICMP error report message with a type value of 11 and a code of 0.

举例来说,网络节点有2条等价路径,假定预设比值范围为1:1;网络检测设备发送12个检测报文,收到12个ICMP报文;如果网络检测设备收到的12个ICMP报文中,6个ICMP报文的源地址为网络节点的一条等价路径上的节点1,另外6个ICMP报文的源地址为网络节点的另一条等价路径上的节点2,则很显然该12个ICMP报文在该网络节点的2条等价路径之间的分布为1:1,满足预设比值范围,则确定网络节点的ECMP功能正确。如果网络检测设备收到的12个ICMP报文中,8个ICMP报文的源地址为网络节点的一条等价路径上的节点1,另外4个ICMP报文的源地址为网络节点的另一条等价路径上的节点2,则很显然该12个ICMP报文在该网络节点的2条等价路径之间的分布为2:1,不满足预设比值范围,则确定网络节点的ECMP功能不正确。For example, a network node has two equal-cost paths, assuming that the preset ratio range is 1:1; the network detection device sends 12 detection packets and receives 12 ICMP packets; if the network detection device receives 12 In the ICMP message, the source address of 6 ICMP messages is node 1 on an equivalent path of the network node, and the source address of the other 6 ICMP messages is node 2 on another equivalent path of the network node, then Obviously, the distribution of the 12 ICMP messages between the two equal-cost paths of the network node is 1:1, which satisfies the preset ratio range, and it is determined that the ECMP function of the network node is correct. If the network detection device receives 12 ICMP packets, the source address of 8 ICMP packets is node 1 on an equal-cost path of the network node, and the source address of the other 4 ICMP packets is another path of the network node. Node 2 on the equal-cost path, it is obvious that the distribution of the 12 ICMP messages between the two equal-cost paths of the network node is 2:1, if the preset ratio range is not satisfied, then the ECMP function of the network node is determined Incorrect.

再举例来说,网络节点有2条等价路径,假定预设比值范围为(1:1~1.2:1);网络检测设备发送22个检测报文,收到22个ICMP报文;如果网络检测设备收到的22个ICMP报文中,12个ICMP报文的源地址为网络节点的一条等价路径上的节点1,另外10个ICMP报文的源地址为网络节点的另一条等价路径上的节点2,则很显然该22个ICMP报文在该网络节点的2条等价路径之间分布为1.2:1,满足预设比值范围,则确定网络节点的ECMP功能正确。如果网络检测设备收到的22个ICMP报文中,13个ICMP报文的源地址为网络节点的一条等价路径上的节点1,另外9个ICMP报文的源地址为网络节点的另一条等价路径上的节点2,则很显然该22个ICMP报文在该网络节点的2条等价路径之间的分布为13:9(约1.44:1),不满足预设比值范围,则确定网络节点的ECMP功能不正确。For another example, the network node has two equal-cost paths, assuming that the preset ratio range is (1:1~1.2:1); the network detection device sends 22 detection packets and receives 22 ICMP packets; if the network Among the 22 ICMP packets received by the detection device, the source address of 12 ICMP packets is node 1 on an equivalent path of the network node, and the source address of the other 10 ICMP packets is another equivalent path of the network node. node 2 on the path, it is obvious that the 22 ICMP messages are distributed between the two equal-cost paths of the network node in a ratio of 1.2:1, which satisfies the preset ratio range, and it is determined that the ECMP function of the network node is correct. If the network detection device receives 22 ICMP packets, the source address of 13 ICMP packets is node 1 on an equal-cost path of the network node, and the source address of the other 9 ICMP packets is another path of the network node. Node 2 on the equal-cost path, it is obvious that the distribution of the 22 ICMP messages between the two equal-cost paths of the network node is 13:9 (about 1.44:1), which does not meet the preset ratio range, then Determine that the ECMP function of the network node is incorrect.

实际网络场景中,待检测网络节点可能存在不同数量的等价路径,例如,3条等价路径,4条等价路径等。本申请具体实施方式中以网络节点有2条等价路径为例说明,不作为对本申请技术方案的限定。In an actual network scenario, there may be different numbers of equal-cost paths for network nodes to be detected, for example, 3 equal-cost paths, 4 equal-cost paths, and so on. In the specific implementation manner of the present application, a network node having two equal-cost paths is used as an example for illustration, which is not intended to limit the technical solution of the present application.

本申请实施例提供的检测ECMP功能的方法可以根据需要随时使用,也可以在发往待检测IP地址的数据报文出现丢包、延时或网络拥塞,而网络正常,换言之,没有其他故障(例如,链路故障等)的情况下,用于检测网络路径上的待检测网络节点的ECMP功能是否正确。The method for detecting the ECMP function provided by the embodiment of the present application can be used at any time as needed, and packet loss, delay or network congestion can occur in the data message sent to the IP address to be detected, while the network is normal, in other words, there are no other failures ( For example, in the case of a link failure, etc.), it is used to detect whether the ECMP function of the network node to be detected on the network path is correct.

下面结合附图和具体实施方式对本申请的技术方案作详细的说明。The technical solution of the present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

图1为本申请实施例提供的一种检测ECMP功能的系统的结构示意图,该系统100中包括网络检测设备110和网络节点R1,网络节点R1至目的IP地址包括至少两条等价路径,也即网络节点R1为等价路径入口节点。图1中以两条等价路径120(R1-R2-R4)和120’(R1-R3-R4)为例,其中网络节点R1为等价路径入口节点,网络节点R4为等价路径出口节点,网络节点R2为等价路径120上的等价路径中间节点,网络节点R3为等价路径120’上的等价路径中间节点。所述系统100中还可以包括其他网络节点,例如图1中所示的R0和R5。图1中的各个网络节点(R0,R1,R2,R3,R4和R5)具体可以为路由器,交换机等设备。FIG. 1 is a schematic structural diagram of a system for detecting ECMP functions provided by an embodiment of the present application. The system 100 includes a network detection device 110 and a network node R1, and the network node R1 includes at least two equivalent paths to the destination IP address. That is, the network node R1 is the entry node of the equal-cost path. In Figure 1, two equal-cost paths 120 (R1-R2-R4) and 120' (R1-R3-R4) are taken as examples, in which the network node R1 is the entry node of the equal-cost path, and the network node R4 is the exit node of the equal-cost path , the network node R2 is an intermediate node on the equivalent path 120, and the network node R3 is an intermediate node on the equivalent path 120'. The system 100 may also include other network nodes, such as R0 and R5 shown in FIG. 1 . Each network node (R0, R1, R2, R3, R4, and R5) in FIG. 1 may specifically be a router, a switch, or other equipment.

图1所示的等价路径120和120’均只存在一个等价路径中间节点,这种情况下,网络检测设备生成的N个检测报文中,TTL的值只能设置为M+1。当然,在实际网络环境中,可能等价路径中间节点的数量大于1(图1中未示出)。假设等价路径120和120’上均存在2个等价路径中间节点,则网络检测设备生成的N个检测报文中,TTL的值可以均设置为M+1,也可以均设置为M+2。可以理解,如果存在3个等价路径中间节点,则网络检测设备生成的N个检测报文中,TTL的值可以均设置为M+1,也可以均设置为M+2,也可以均设置为M+3,以此类推。本申请实施例中,将等价路径入口节点称为待检测网络节点,网络检测设备到待检测网络节点之间的节点称为中间网络节点,将等价路径上向所述网络检测设备发送通知消息的等价路径中间节点称为反馈节点。Both the equal-cost paths 120 and 120' shown in FIG. 1 have only one intermediate node on the equal-cost path. In this case, among the N detection messages generated by the network detection device, the TTL value can only be set to M+1. Of course, in an actual network environment, it is possible that the number of intermediate nodes on the equivalent path is greater than 1 (not shown in FIG. 1 ). Assuming that there are two intermediate nodes on the equal-cost path 120 and 120', in the N detection messages generated by the network detection device, the TTL values can all be set to M+1, or both can be set to M+ 2. It can be understood that if there are 3 intermediate nodes on the equal-cost path, in the N detection messages generated by the network detection device, the TTL values can all be set to M+1, or both can be set to M+2, or both can be set to It is M+3, and so on. In the embodiment of the present application, the entry node of the equivalent path is called the network node to be detected, and the node between the network detection device and the network node to be detected is called the intermediate network node, and the notification sent to the network detection device on the equivalent path The intermediate node of the equal-cost path of the message is called the feedback node.

本申请实施例中,所述待检测网络节点至目的IP地址的每条等价路径上至少包括一个等价路径中间节点。In this embodiment of the present application, each equal-cost path from the network node to be detected to the destination IP address includes at least one equal-cost path intermediate node.

图2为本申请实施例提供的一种检测等价多路径实现的方法的流程示意图,可以检测网络节点的等价多路径实现是否正确,所述方法包括:Fig. 2 is a schematic flow diagram of a method for detecting equivalent multipath implementation provided by an embodiment of the present application, which can detect whether the equivalent multipath implementation of a network node is correct, and the method includes:

201、网络检测设备根据网络拓扑信息生成N个检测报文,所述N个检测报文中每个检测报文包括标签栈、TTL、源IP地址、目的IP地址和端口组;201. The network detection device generates N detection packets according to the network topology information, and each detection packet in the N detection packets includes a label stack, TTL, source IP address, destination IP address, and port group;

所述标签栈中包括M个链路标签,所述TTL的值大于等于M+1,优选的,所述TTL的值为M+1;其中,M为所述网络检测设备到待检测网络节点的跳数,M≥1,N≥K,K为所述待检测网络节点的等价路径的数量,K≥2,M、N和K为正整数。所述检测报文的源IP地址为所述网络检测设备的IP地址,例如1.1.1.1。所述目的IP地址通常为主机的IP地址,例如192.168.1.1。The label stack includes M link labels, the value of the TTL is greater than or equal to M+1, preferably, the value of the TTL is M+1; where M is the network detection device to the network node to be detected The number of hops, M≥1, N≥K, K is the number of equivalent paths of the network node to be detected, K≥2, M, N and K are positive integers. The source IP address of the detection message is the IP address of the network detection device, for example, 1.1.1.1. The destination IP address is usually the IP address of the host, such as 192.168.1.1.

无论所述K条等价路径中每条等价路径仅包括一个等价路径中间节点,还是包括多个等价路径中间节点,所述TTL的值均可设置为M+1,这样更简单高效。当然,如果所述K条等价路径中每条等价路径均包括两个及以上等价路径中间节点时,所述TTL的值也可以大于等于M+2,这种情况下,检测报文会被多转发一跳或几跳,反馈节点不是待检测网络节点在各条等价路径上的下一跳,但同样可以反映检测报文被发送到哪条等价路径上了,也能够解决技术问题,实现本发明目的。Regardless of whether each of the K equivalent paths includes only one equivalent path intermediate node, or includes multiple equivalent path intermediate nodes, the value of the TTL can be set to M+1, which is simpler and more efficient . Of course, if each of the K equivalent paths includes two or more intermediate nodes on the equivalent path, the value of the TTL can also be greater than or equal to M+2. In this case, the detection message It will be forwarded by one or more hops. The feedback node is not the next hop of the network node to be detected on each equal-cost path, but it can also reflect which equivalent path the detection message is sent to, and it can also solve the problem. Technical problem, realize the object of the present invention.

所述N个检测报文的标签栈相同,所述N个检测报文的TTL相同,所述N个检测报文的源IP地址相同,所述N个检测报文的目的IP地址相同。The label stacks of the N detection messages are the same, the TTLs of the N detection messages are the same, the source IP addresses of the N detection messages are the same, and the destination IP addresses of the N detection messages are the same.

所述N个检测报文中任意两个检测报文的端口组互不相同;端口组包括源端口号和目的端口号,源端口号为所述网络检测设备的通信端口的端口号;目的端口号为所述待检测IP地址对应的节点的通信端口的端口号。互不相同的端口组可以是源端口号相同,目的端口号不同;例如,6个检测报文,端口组分别为(A,B1),(A,B2),(A,B3),(A,B4),(A,B5),(A,B6)。互不相同的端口组也可以是源端口号不同,目的端口号相同;例如,6个检测报文,端口组分别为(A1,B),(A2,B),(A3,B),(A4,B),(A5,B),(A6,B)。互不相同的端口组也可以是源端口号不同,目的端口号也不同;例如,6个检测报文,端口组分别为(A1,B1),(A2,B2),(A3,B3),(A4,B4),(A5,B5),(A6,B6)。当然,互不相同的端口组也可以是部分源端口号不同,部分目的端口号不同,例如,6个检测报文,端口组分别为(A1,B1),(A2,B1),(A3,B1),(A2,B2),(A3,B2),(A3,B3)。具体实现中,只要保证任意两个检测报文的端口组之间至少有一个端口号不同即可。The port groups of any two detection messages in the N detection messages are different from each other; the port group includes a source port number and a destination port number, and the source port number is the port number of the communication port of the network detection device; the destination port The number is the port number of the communication port of the node corresponding to the IP address to be detected. Port groups that are different from each other can have the same source port number and different destination port numbers; for example, for 6 detection packets, the port groups are (A, B1), (A, B2), (A, B3), (A , B4), (A, B5), (A, B6). Port groups that are different from each other can also have different source port numbers and the same destination port number; for example, for 6 detection packets, the port groups are (A1, B), (A2, B), (A3, B), ( A4, B), (A5, B), (A6, B). Different port groups can also have different source port numbers and different destination port numbers; for example, for 6 detection packets, the port groups are (A1, B1), (A2, B2), (A3, B3), (A4, B4), (A5, B5), (A6, B6). Of course, different port groups may also have different source port numbers and different destination port numbers. For example, for 6 detection packets, the port groups are (A1, B1), (A2, B1), (A3, B1), (A2, B2), (A3, B2), (A3, B3). In a specific implementation, it only needs to ensure that at least one port number is different between any two port groups of detection packets.

具体地,所述网络检测设备根据所述目的IP地址和所述网络拓扑信息,确定所述网络检测设备到所述目的IP地址的转发路径以及所述转发路径上的所述待检测网络节点;所述网络检测设备根据网络拓扑信息,确定所述网络检测设备到待检测网络节点的跳数(M)以及每一跳的链路标签,并确定所述待检测网络节点至所述目的IP地址的等价路径的数量(K);然后所述网络检测设备根据所述等价路径的数量(K)、所述跳数(M)以及每一跳的链路标签,生成所述N个检测报文,所述N个检测报文包括相同的:标签栈、TTL、源IP地址和目的IP地址,所述N个检测报文还包括互不相同的端口组(源端口号,目的端口号)。Specifically, the network detection device determines a forwarding path from the network detection device to the destination IP address and the network node to be detected on the forwarding path according to the destination IP address and the network topology information; The network detection device determines the number of hops (M) from the network detection device to the network node to be detected and the link label of each hop according to the network topology information, and determines the number of hops from the network node to be detected to the destination IP address The number (K) of equivalent paths; then the network detection device generates the N detections according to the number (K) of the equivalent paths, the number of hops (M) and the link label of each hop message, the N detection messages include the same: label stack, TTL, source IP address and destination IP address, and the N detection messages also include different port groups (source port number, destination port number ).

所述网络拓扑信息包括:所述网络检测设备到所述目的IP地址的转发路径以及所述转发路径上每一跳的路由信息;具体来说,包括所述网络检测设备至所述待检测网络节点的每一跳的链路标签,以及所述待检测网络节点至所述目的IP地址的K条等价路径。链路标签指定了报文的单跳转发路径。所述K条等价路径,是所述转发路径中的一段。The network topology information includes: the forwarding path from the network detection device to the destination IP address and the routing information of each hop on the forwarding path; specifically, the information from the network detection device to the network to be detected A link label of each hop of the node, and K equivalent paths from the network node to be detected to the destination IP address. The link label specifies the one-hop forwarding path of the packet. The K equal-cost paths are a segment of the forwarding path.

本申请实施例中,所述网络检测设备可以先通过网络拓扑管理装置获取网络拓扑信息。所述网络拓扑管理装置可以是软件定义网络(Software-DefinedNetworking,缩写SDN)控制器。具体实现中,所述网络检测设备和所述网络拓扑管理装置可以在同一个物理设备中实现,也可以是在不同的物理设备中实现。In this embodiment of the present application, the network detection device may first obtain network topology information through a network topology management device. The network topology management device may be a software-defined network (Software-Defined Networking, SDN for short) controller. In a specific implementation, the network detection device and the network topology management apparatus may be implemented in the same physical device, or may be implemented in different physical devices.

以图1所示系统为例,网络检测设备110要确定网络中到192.168.1.1这个待检测IP地址的转发路径中网络节点R1的ECMP功能是否正确。所述网络检测设备110根据网络拓扑信息,确定网络节点R1到所述待检测IP地址存在2条等价路径,并确定所述网络检测设备110到网络节点R1的跳数为2(即,所述网络检测设备110到R0,以及R0到R1共两跳),链路标签分别为:8801和8802,所述网络检测设备110生成N(≥2)个检测报文,每个检测报文的标签栈中均包括2个链路标签:8801和8802;每个检测报文的TTL的值均为3;每个检测报文的源IP地址均为所述网络检测设备的IP地址(例如,1.1.1.1),每个检测报文的目的IP地址均为所述待检测IP地址(例如,192.168.1.1)。Taking the system shown in FIG. 1 as an example, the network detection device 110 needs to determine whether the ECMP function of the network node R1 in the forwarding path to the IP address 192.168.1.1 to be detected in the network is correct. According to the network topology information, the network detection device 110 determines that there are 2 equivalent paths from the network node R1 to the IP address to be detected, and determines that the number of hops from the network detection device 110 to the network node R1 is 2 (that is, the The network detection device 110 to R0, and R0 to R1 are two hops in total), the link labels are: 8801 and 8802 respectively, the network detection device 110 generates N (≥ 2) detection messages, each detection message All comprise 2 link labels in the label stack: 8801 and 8802; The value of the TTL of each detection message is 3; The source IP address of each detection message is the IP address of described network detection equipment (for example, 1.1.1.1), the destination IP address of each detection packet is the IP address to be detected (for example, 192.168.1.1).

202、所述网络检测设备根据所述标签栈栈顶的链路标签发送所述N个检测报文;202. The network detection device sends the N detection packets according to the link label at the top of the label stack;

标签栈的操作与通常的堆栈“后进先出”的操作一样。标签入栈是指向报文加入一个标签,使标签栈的深度加1;标签出栈是指从报文中去掉一个标签,换言之,弹出标签,使标签栈的深度减1。报文中,标签自栈底至栈顶按照自内往外的顺序封装。在报文转发过程中,决定如何转发报文的标签始终是标签栈栈顶的标签,也即报文中最外层的标签。The operation of the tag stack is the same as that of the usual stack "last in, first out". Label stacking refers to adding a label to the message, increasing the depth of the label stack by 1; label popping refers to removing a label from the message, in other words, popping a label, and decreasing the depth of the label stack by 1. In the packet, labels are encapsulated from the bottom of the stack to the top of the stack in the order from inside to outside. During the message forwarding process, the label that determines how to forward the message is always the label at the top of the label stack, that is, the outermost label in the message.

具体地,所述网络检测设备可以通过(Multiprotocol Label Switching,缩写MPLS)定义的标签转发方式实现本申请的检测转发表的方法,检测报文可以是MPLS报文,检测报文中的标签栈为MPLS标签栈。当然,也可以采用其他支持段路由(segment routing)中链路标签转发的实现方式,本申请对此不做限制。Specifically, the network detection device can realize the detection and forwarding table method of the present application through the label forwarding mode defined by (Multiprotocol Label Switching, abbreviated as MPLS), the detection message can be an MPLS message, and the label stack in the detection message is MPLS label stack. Of course, other implementations that support link label forwarding in segment routing (segment routing) may also be used, which is not limited in this application.

继续上面例子,所述网络检测设备110生成的所述N个检测报文中,每个检测报文的标签栈中自栈底至栈顶(报文自内而外)的链路标签依次为8802,8801;TTL的值为3。所述网络检测设备110根据所述标签栈栈顶的链路标签8801依次发送各个检测报文至网络节点R0。Continuing with the above example, among the N detection messages generated by the network detection device 110, the link labels from the bottom of the stack to the top of the stack (messages from the inside out) in the label stack of each detection message are 8802, 8801; the TTL value is 3. The network detection device 110 sequentially sends each detection message to the network node R0 according to the link label 8801 at the top of the label stack.

对于网络检测设备发送的N个检测报文,重复执行N次如下步骤203~207的操作:For the N detection messages sent by the network detection device, repeat the operations of steps 203 to 207 as follows N times:

203、网络节点接收所述N个检测报文中的一个检测报文,将所述检测报文中的标签栈栈顶的链路标签弹出,将所述检测报文中的TTL的值减去1;203. The network node receives one of the N detection messages, pops the link label at the top of the label stack in the detection message, and subtracts the TTL value in the detection message from 1;

网络节点每收到一个检测报文时,均是将该检测报文中标签栈栈顶的链路标签弹出并将TTL的值减去1。Each time a network node receives a detection message, it pops the link label at the top of the label stack in the detection message and subtracts 1 from the value of the TTL.

204、所述网络节点判断所述检测报文中标签栈是否为空;204. The network node judges whether the label stack in the detection message is empty;

所述网络节点在弹出所述检测报文中标签栈栈顶的链路标签之后,需要判断所述检测报文中的标签栈是否为空,以确定对所述检测报文继续进行标签转发还是根据转发表进行IP路由转发。当所述网络节点确定所述检测报文中的标签栈不为空时,即所述网络节点为中间网络节点,则继续步骤205;当所述网络节点确定所述检测报文中的标签栈为空时,即所述网络节点为待检测网络节点,则继续步骤206;After the network node pops up the link label at the top of the label stack in the detection message, it needs to judge whether the label stack in the detection message is empty, so as to determine whether to continue label forwarding or IP routing is forwarded according to the forwarding table. When the network node determines that the label stack in the detection message is not empty, that is, the network node is an intermediate network node, proceed to step 205; when the network node determines that the label stack in the detection message When it is empty, that is, the network node is a network node to be detected, proceed to step 206;

205、当所述网络节点确定所述标签栈不为空时,所述网络节点根据所述标签栈栈顶的链路标签,转发所述检测报文。205. When the network node determines that the label stack is not empty, the network node forwards the detection message according to the link label at the top of the label stack.

例如图1中网络节点R0为中间网络节点,收到检测报文处理后,标签栈不为空,继续跟进标签栈栈顶的链路标签转发检测报文。For example, the network node R0 in FIG. 1 is an intermediate network node. After receiving and processing the detection message, the label stack is not empty, and continues to follow the link label at the top of the label stack to forward the detection message.

206、当所述网络节点确定所述标签栈为空时,所述网络节点根据所述目的IP地址和所述网络节点的转发表,确定所述网络节点至所述待检测IP地址存在K条等价路径,所述网络节点使用ECMP功能选择一条等价路径转发所述检测报文;206. When the network node determines that the label stack is empty, the network node determines that there are K entries from the network node to the IP address to be detected according to the destination IP address and the forwarding table of the network node an equal-cost path, wherein the network node uses an ECMP function to select an equal-cost path to forward the detection message;

当所述网络节点确定所述标签栈为空时,所述网络节点即为待检测网络节点,例如图1中的网络节点R1,可以理解的是,此时所述TTL的值为1。所述网络节点根据所述目的IP地址和所述网络节点的转发表,并使用自己的ECMP功能,将所述检测报文转发到一条等价路径上,所述网络节点在该条等价路径上的下一跳,即为反馈节点,收到所述检测报文后,将所述TTL的值减去1,这样TTL的值为0触发所述反馈节点向所述网络检测设备发送通知消息。When the network node determines that the label stack is empty, the network node is a network node to be detected, such as the network node R1 in FIG. 1 , and it can be understood that the value of the TTL is 1 at this time. The network node forwards the detection message to an equivalent path according to the destination IP address and the forwarding table of the network node, and uses its own ECMP function, and the network node forwards the detection message on the equivalent path The next hop on the network is the feedback node. After receiving the detection message, the value of the TTL is subtracted by 1, so that the value of the TTL is 0 to trigger the feedback node to send a notification message to the network detection device .

所述网络节点使用ECMP功能,选择一条等价路径转发所述检测报文,具体包括:所述网络节点根据所述源IP地址、所述目的IP地址和所述检测报文的端口组进行哈希计算,得到哈希计算的结果,该哈希计算的结果指向一条等价路径;根据该哈希计算的结果,确定该条等价路径用于转发所述检测报文。The network node uses the ECMP function to select an equal-cost path to forward the detection message, specifically including: the network node performs hashing according to the source IP address, the destination IP address, and the port group of the detection message The calculation is performed to obtain a result of hash calculation, and the result of hash calculation points to an equivalent path; according to the result of hash calculation, it is determined that the equivalent path is used to forward the detection message.

哈希计算是利用哈希函数(hash function),也称散列函数,将任意长度的数据映射(map)为固定长度的数据。哈希计算的结果,也就是哈希函数返回的值,通常称为哈希值,哈希值通常是唯一的。Hash calculation is to use a hash function (hash function), also known as a hash function, to map (map) data of any length into data of a fixed length. The result of a hash calculation, that is, the value returned by the hash function, is usually called a hash value, and the hash value is usually unique.

所述网络节点提供的ECMP功能包括:根据四元组,即,源IP地址、目的IP地址和端口组(源端口号,目的端口号),进行哈希计算,根据哈希计算的结果确定等价路径。The ECMP function provided by the network node includes: according to the quadruple, that is, source IP address, destination IP address and port group (source port number, destination port number), perform hash calculation, determine according to the result of hash calculation, etc. price path.

所述网络节点可以根据哈希计算的结果,采用如下方式一或方式二,确定等价路径;当然还有其他实现方式,本申请对此不做限定。The network node may determine the equivalent path in the following manner 1 or 2 according to the hash calculation result; of course, there are other implementation manners, which are not limited in this application.

方式一:用所述等价路径的数量K对所述哈希计算的结果做取模运算,取模运算的结果标识一条等价路径;Mode 1: Using the quantity K of the equivalent path to perform a modulo operation on the result of the hash calculation, and the result of the modulo operation identifies an equivalent path;

方式二:根据所述哈希计算的结果查询哈希结果与等价路径的对应关系,确定与所述哈希计算的结果对应的等价路径;所述网络节点上可以预先配置所述哈希结果与等价路径的对应关系。Method 2: Query the corresponding relationship between the hash result and the equivalent path according to the result of the hash calculation, and determine the equivalent path corresponding to the result of the hash calculation; the hash can be pre-configured on the network node The corresponding relationship between the result and the equivalent path.

207、反馈节点接收所述检测报文,将所述TTL的值减去1,所述反馈节点确定所述TTL的值为0并向网络检测设备发送通知消息;207. The feedback node receives the detection message, subtracts 1 from the TTL value, and the feedback node determines that the TTL value is 0 and sends a notification message to the network detection device;

反馈节点收到所述检测报文之后,将所述TTL的值减去1,所述反馈节点确定所述TTL的值为0时向所述网络检测设备发送通知消息,例如ICMP报文,所述通知消息的源IP地址为所述反馈节点的IP地址。反馈节点为等价路径上的一个等价路径中间节点。After the feedback node receives the detection message, it subtracts 1 from the value of the TTL, and when the feedback node determines that the value of the TTL is 0, it sends a notification message, such as an ICMP message, to the network detection device. The source IP address of the notification message is the IP address of the feedback node. The feedback node is an intermediate node on the equivalent path.

这样,所述网络检测设备收到所述通知消息之后,根据所述通知消息的源IP地址就可以知道所述检测报文走的是哪条等价路径了。In this way, after the network detection device receives the notification message, it can know which equivalent path the detection message takes according to the source IP address of the notification message.

如果所述网络节点的ECMP功能正确,所述N个检测报文会被均匀分配给所述K条等价路径转发,即所述K条等价路径之间负载均衡;而如果所述网络节点的ECMP功能不正确,可能导致所述K条等价路径中的某(些)条负载过重,即大多数甚至全部的检测报文都通过所述K条等价路径中的某(些)条等价路径转发。If the ECMP function of the network node is correct, the N detection messages will be evenly distributed to the K equal-cost paths for forwarding, that is, load balancing between the K equal-cost paths; and if the network node The incorrect ECMP function may cause some (some) of the K equal-cost paths to be overloaded, that is, most or even all detection packets pass through some (some) of the K equivalent paths equal-cost path forwarding.

208、所述网络检测设备接收与所述N个检测报文对应的N个通知消息,根据所述N个通知消息和预设比值范围确定所述网络节点的ECMP功能是否正确。具体地,所述网络检测设备统计所述N个通知消息中不同源地址的通知消息的数量;例如,统计源地址为第一源IP地址的ICMP报文数量,源地址为第二源IP地址的ICMP报文数量;可选地,如果存在两条以上的等价路径,还有源地址为第三源IP地址的ICMP报文数量。然后,所述网络检测设备计算不同源地址的通知消息的数量之间的比值,并判断该比值是否满足预设比值范围;如果满足预设比值范围,换句话说,所述N个检测报文均匀分布在所述K条等价路径上转发,则可以确定所述网络节点的ECMP功能正确;如果不满足预设比值范围,则可以确定所述网络节点的ECMP功能不正确。208. The network detection device receives N notification messages corresponding to the N detection packets, and determines whether the ECMP function of the network node is correct according to the N notification messages and a preset ratio range. Specifically, the network detection device counts the number of notification messages with different source addresses in the N notification messages; for example, counts the number of ICMP packets whose source address is the first source IP address, and the source address is the second source IP address The number of ICMP packets; optionally, if there are more than two equal-cost paths, the number of ICMP packets whose source address is the third source IP address. Then, the network detection device calculates the ratio between the number of notification messages with different source addresses, and judges whether the ratio meets the preset ratio range; if it meets the preset ratio range, in other words, the N detection messages Evenly distributed and forwarded on the K equal-cost paths, it can be determined that the ECMP function of the network node is correct; if the preset ratio range is not satisfied, it can be determined that the ECMP function of the network node is incorrect.

由于每个ICMP报文会携带检测报文的首部,因此网络检测设备可以确定与N个检测报文对应的N个ICMP报文。Since each ICMP packet carries the header of the detection packet, the network detection device can determine N ICMP packets corresponding to the N detection packets.

当然,如果出现收到的通知消息均来自一个反馈节点,即源地址相同,很显然所述待检测网络节点的ECMP功能不正确,可能是ECMP功能错误,也可能所述待检测网络节点没有实现该ECMP功能。Of course, if the received notification messages all come from a feedback node, that is, the source address is the same, it is obvious that the ECMP function of the network node to be detected is incorrect, and it may be that the ECMP function is wrong, or the network node to be detected may not implement The ECMP function.

所述预设比值范围可以根据如下任意一个或多个参数的组合,结合具体应用场景来设定,对此本申请不做具体限定:The preset ratio range can be set according to a combination of any one or more of the following parameters in combination with a specific application scenario, which is not specifically limited in this application:

网络配置参数,例如,等价路径之间的预配置负载比值,例如1:1,2:3等;Network configuration parameters, for example, pre-configured load ratios between equal-cost paths, such as 1:1, 2:3, etc.;

检测精度要求,例如,高、中、低等;一般检测精度要求越高预设比值范围的跨度越小;Detection accuracy requirements, for example, high, medium, low, etc.; the higher the general detection accuracy requirements, the smaller the span of the preset ratio range;

用户需求,例如负载、带宽、时延等。User requirements, such as load, bandwidth, and delay.

举例来说,可以基于预配置负载比值,例如1:1,当检测精度要求为高时,可以设定预设比值范围为1:1~1.1:1;当检测精度为低时,可以设定预设比值范围为1:1~3:1For example, based on the preconfigured load ratio, such as 1:1, when the detection accuracy requirement is high, the preset ratio range can be set to 1:1~1.1:1; when the detection accuracy is low, you can set The preset ratio range is 1:1~3:1

N可以取值为等价路径的数量K的倍数;例如,等价路径数量为3,N可以取值为36,54,96等。N may be a multiple of the number K of equivalent paths; for example, if the number of equivalent paths is 3, N may be 36, 54, 96, etc.

N也可以根据预设比值范围的精度来确定取值。举例来说,如果预设比值范围为1:1~3:1(或者1:1~1:3),即精度要求不高,则N可以取值较小,例如48,72等;而如果预设比值范围为1:1~1.2:1(或者1:1~1:1.2),即精度要求较高,则N取值较小可能无法准确检测网络节点的ECMP功能,此时建议N取值大一些,例如220,500等。The value of N can also be determined according to the precision of the preset ratio range. For example, if the preset ratio ranges from 1:1 to 3:1 (or 1:1 to 1:3), that is, the accuracy requirement is not high, then N can take a smaller value, such as 48, 72, etc.; and if The preset ratio ranges from 1:1 to 1.2:1 (or 1:1 to 1:1.2), that is, the accuracy requirement is high, and a small value of N may not be able to accurately detect the ECMP function of the network node. At this time, it is recommended to choose N The value is larger, such as 220, 500, etc.

总的来说,为了保证检测结果的准确性,所述网络检测设备可以发送尽量多的检测报文,即,N取值较大,例如200,500,1000等。In general, in order to ensure the accuracy of the detection result, the network detection device can send as many detection packets as possible, that is, the value of N is relatively large, such as 200, 500, 1000 and so on.

本申请提供的技术方案,网络检测设备根据网络拓扑信息发送多个检测报文检测网络节点的ECMP功能是否正常,检测报文经过标签转发后,由该网络节点通过ECMP功能进行IP路由转发,转发到不同等价路径上,不同等价路径上的反馈节点因检测报文中TTL为0向网络检测设备反馈ICMP报文,然后网络检测设备可以统计收到的不同源IP地址的ICMP报文数量,从而可以判断网络节点的ECMP功能是否正确。如果收到的不同源IP地址的ICMP报文数量之间比值满足预设比值范围,则可以确定该网络节点的ECMP功能正确;否则,可以确定该网络节点的ECMP功能不正确。In the technical solution provided by this application, the network detection device sends multiple detection messages to detect whether the ECMP function of the network node is normal according to the network topology information. On different equal-cost paths, the feedback nodes on different equal-cost paths feed back ICMP packets to the network detection device because the TTL in the detection packet is 0, and then the network detection device can count the number of received ICMP packets with different source IP addresses , so that it can be judged whether the ECMP function of the network node is correct. If the ratio between the number of received ICMP packets with different source IP addresses satisfies the preset ratio range, it can be determined that the ECMP function of the network node is correct; otherwise, it can be determined that the ECMP function of the network node is incorrect.

具体地,结合图1所示的系统,本申请实施例提供了检测网络节点的ECMP功能的信息交互流程图,用于网络检测设备110对网络节点R1的ECMP功能进行检测。参见图3所示的检测ECMP功能的信息交互示意图,检测过程包括:Specifically, in combination with the system shown in FIG. 1 , the embodiment of the present application provides an information interaction flowchart for detecting the ECMP function of the network node, which is used for the network detection device 110 to detect the ECMP function of the network node R1. Referring to the schematic diagram of information interaction for detecting the ECMP function shown in Figure 3, the detection process includes:

301、网络检测设备110根据目的IP地址网络拓扑信息生成N个检测报文,所述N个检测报文中每个检测报文包括标签栈,TTL,源IP地址,所述目的IP地址和端口组;所述N个检测报文的标签栈相同、TTL相同、源IP地址相同、目的IP地址相同,端口组互不相同的;301. The network detection device 110 generates N detection packets according to the network topology information of the destination IP address, and each detection packet in the N detection packets includes a label stack, a TTL, a source IP address, the destination IP address and a port group; the label stacks of the N detection messages are the same, the TTL is the same, the source IP address is the same, the destination IP address is the same, and the port groups are different from each other;

具体地,所述网络检测设备110根据所述目的IP地址和所述网络拓扑信息,确定所述网络检测设备到所述目的IP地址的转发路径以及所述转发路径上的所述待检测网络节点;所述网络检测设备110根据网络拓扑信息,确定所述网络检测设备110到网络节点R1的跳数为2(即,所述网络检测设备110到网络节点R0,以及网络节点R0到网络节点R1共两跳),链路标签分别为:8801和8802。所述网络检测设备110生成N个检测报文,所述N个检测报文包括相同的标签栈、相同的TTL、相同的源IP地址和相同的目的IP地址,以及互不相同的端口组。如图3所示,标签栈中均包括2个链路标签,自栈底至栈顶(报文自内而外)依次为第二链路标签8802,第一链路标签8801;TTL的值均为3;源IP地址均为所述网络检测设备110的IP地址,例如1.1.1.1;各个检测报文之间的端口组,即源端口号(Sport)和目的端口号(DPort),互不相同。本申请实施例中,互不相同的端口组以目的端口号相同,源端口号互不相同为例;例如,图3所示DPort=B,Sport=A1,A2,…。Specifically, the network detection device 110 determines a forwarding path from the network detection device to the destination IP address and the network node to be detected on the forwarding path according to the destination IP address and the network topology information ; According to the network topology information, the network detection device 110 determines that the number of hops from the network detection device 110 to the network node R1 is 2 (that is, the network detection device 110 to the network node R0, and the network node R0 to the network node R1 A total of two hops), the link labels are: 8801 and 8802. The network detection device 110 generates N detection packets, and the N detection packets include the same label stack, the same TTL, the same source IP address, the same destination IP address, and different port groups. As shown in Figure 3, the label stack includes two link labels, from the bottom of the stack to the top of the stack (messages from the inside to the outside) are the second link label 8802, the first link label 8801; the value of TTL Both are 3; the source IP address is the IP address of the network detection device 110, such as 1.1.1.1; the port group between each detection message, that is, the source port number (Sport) and the destination port number (DPort), mutually Are not the same. In this embodiment of the present application, different port groups take the same destination port number and different source port numbers as an example; for example, DPort=B, Sport=A1, A2, . . . as shown in FIG. 3 .

接下来,网络检测设备会根据所述标签栈栈顶的第一链路标签(8801)发送所述N个检测报文。各个网络节点会收到所述N个检测报文,并对所述N个检测报文一一进行处理。如下步骤302~307和302’~307’是对所述N个检测报文中示例的任意两个检测报文的处理过程。Next, the network detection device sends the N detection packets according to the first link label (8801) at the top of the label stack. Each network node will receive the N detection packets, and process the N detection packets one by one. The following steps 302-307 and 302'-307' are the processing procedures for any two detection messages exemplified in the N detection messages.

302、所述网络检测设备110根据所述标签栈栈顶的第一链路标签(8801)发送第一检测报文至网络节点R0;302. The network detection device 110 sends a first detection packet to the network node R0 according to the first link label (8801) at the top of the label stack;

所述第一检测报文为所述网络检测设备110发送的N个检测报文中的一个,所述第一检测报文包括所述标签栈,所述TTL,所述源IP地址和所述目的IP地址;所述第一检测报文还包括第一端口组,例如图3所示的SPort=A1,DPort=B;The first detection message is one of the N detection messages sent by the network detection device 110, and the first detection message includes the label stack, the TTL, the source IP address and the The destination IP address; the first detection message also includes a first port group, such as SPort=A1 and DPort=B shown in Figure 3;

303、所述网络节点R0接收所述第一检测报文,弹出所述标签栈栈顶的第一链路标签(8801),并将所述TTL的值减去1;303. The network node R0 receives the first detection message, pops the first link label (8801) at the top of the label stack, and subtracts 1 from the TTL value;

所述第一检测报文经所述网络节点R0处理后,所述标签栈中包括1个链路标签,即第二链路标签8802;所述TTL的值为2。此时,所述标签栈栈顶的标签即为该第二链路标签8802。After the first detection message is processed by the network node R0, the label stack includes one link label, that is, the second link label 8802; the value of the TTL is 2. At this time, the label at the top of the label stack is the second link label 8802 .

然后所述网络节点R0需要判断所述标签栈是否为空,以确定对所述第一检测报文继续进行标签转发还是根据转发表进行IP路由转发。Then the network node R0 needs to judge whether the label stack is empty, so as to determine whether to continue to forward the label for the first detection message or to perform IP routing forwarding according to the forwarding table.

304、所述网络节点R0确定所述标签栈不为空,并根据所述标签栈栈顶的第二链路标签(8802)转发所述第一检测报文至网络节点R1;304. The network node R0 determines that the label stack is not empty, and forwards the first detection message to the network node R1 according to the second link label (8802) at the top of the label stack;

所述网络节点R0为中间网络节点。The network node R0 is an intermediate network node.

305、所述网络节点R1接收所述第一检测报文,弹出所述标签栈栈顶的第二链路标签(8802),并将所述TTL的值减去1;305. The network node R1 receives the first detection message, pops the second link label (8802) at the top of the label stack, and subtracts 1 from the TTL value;

然后所述网络节点R1需要判断所述标签栈是否为空,以确定对所述第一检测报文继续进行标签转发还是根据转发表进行IP路由转发。Then the network node R1 needs to judge whether the label stack is empty, so as to determine whether to continue to forward the label for the first detection message or to perform IP routing forwarding according to the forwarding table.

参见图3,所述第一检测报文经所述网络节点R1处理后,所述TTL的值为1,所述标签栈为空(其中没有链路标签了),所述网络节点R1为待检测网络节点,需要根据转发表对所述第一检测报文进行IP路由转发。Referring to FIG. 3, after the first detection message is processed by the network node R1, the value of the TTL is 1, the label stack is empty (there is no link label), and the network node R1 is to be To detect a network node, IP routing and forwarding of the first detection message needs to be performed according to the forwarding table.

306、所述网络节点R1确定所述标签栈为空,并根据所述目的IP地址和所述网络节点R1的转发表,确定所述网络节点R1存在2条等价路径;所述网络节点R1使用自己的ECMP功能,选择等价路径120转发所述第一检测报文;306. The network node R1 determines that the label stack is empty, and determines that there are two equivalent paths in the network node R1 according to the destination IP address and the forwarding table of the network node R1; the network node R1 Using its own ECMP function, selecting the equal-cost path 120 to forward the first detection message;

具体地,所述网络节点R1根据所述目的IP地址查询所述网络节点R1的转发表,发现存在2条到达所述目的IP地址的转发条目,即,存在2条到所述目的IP地址的等价路径。所述网络节点R1需要通过ECMP功能,确定用于转发所述第一检测报文的等价路径。Specifically, the network node R1 queries the forwarding table of the network node R1 according to the destination IP address, and finds that there are two forwarding entries to the destination IP address, that is, there are two forwarding entries to the destination IP address equivalent path. The network node R1 needs to use the ECMP function to determine an equivalent path for forwarding the first detection message.

所述网络节点R1根据所述第一检测报文中的四元组:所述源IP地址、所述目的IP地址和第一端口组,通过ECMP功能选择等价路径120转发所述第一检测报文。具体地,所述网络节点R1对所述第一检测报文中的四元组进行哈希计算,得到哈希计算的第一结果(第一哈希值),该第一结果指向等价路径120;根据该第一结果,例如用等价路径的数量K对该第一结果进行取模运算,确定等价路径120转发所述第一检测报文。The network node R1 selects the equivalent cost path 120 through the ECMP function to forward the first detection packet according to the quaternion in the first detection message: the source IP address, the destination IP address and the first port group message. Specifically, the network node R1 performs hash calculation on the quadruple in the first detection message to obtain a first hash calculation result (first hash value), and the first result points to the equivalent path 120: According to the first result, for example, perform a modulo operation on the first result with the number K of equivalent paths, and determine that the equivalent path 120 forwards the first detection message.

307、所述网络节点R2接收所述第一检测报文,将所述TTL的值减去1,所述网络节点R2确定所述TTL的值为0,并向所述网络检测设备110发送第一通知消息;307. The network node R2 receives the first detection packet, subtracts 1 from the TTL value, the network node R2 determines that the TTL value is 0, and sends the first detection packet to the network detection device 110 a notification message;

所述网络节点R2为等价路径中间节点,是所述网络节点R1(即待检测网络节点)在等价路径120上的下一跳。The network node R2 is an intermediate node of the equal-cost path, and is the next hop of the network node R1 (ie, the network node to be detected) on the equal-cost path 120 .

所述网络节点R2确定所述TTL的值为0时生成第一通知消息,发送给所述网络检测设备110;由于所述第一检测报文的源IP地址为所述网络检测设备的IP地址,因此当所述TTL的值为0时,所述网络节点R2知道需要向那个设备发送通知消息。具体地,所述网络节点R2根据所述第一检测报文,生成所述第一通知消息。例如图3所示,所述第一通知消息为第一ICMP报文,所述第一ICMP报文中包括所述网络节点R2的IP地址,所述第一ICMP报文中还包括所述第一检测报文的首部。When the network node R2 determines that the TTL value is 0, it generates a first notification message and sends it to the network detection device 110; since the source IP address of the first detection message is the IP address of the network detection device , so when the value of the TTL is 0, the network node R2 knows that it needs to send a notification message to that device. Specifically, the network node R2 generates the first notification message according to the first detection message. For example, as shown in FIG. 3, the first notification message is a first ICMP message, the first ICMP message includes the IP address of the network node R2, and the first ICMP message also includes the first ICMP message. 1. Check the header of the packet.

本申请实施例中,将网络节点R2发送的通知消息,即源地址为网络节点R2的IP地址的通知消息,均称为第一通知消息。可选地,网络节点R2对应多个不同的检测报文向网络检测设备110发送了多个第一通知消息,每个第一通知消息中携带不同的端口组。In the embodiment of the present application, the notification message sent by the network node R2, that is, the notification message whose source address is the IP address of the network node R2, is called the first notification message. Optionally, the network node R2 sends multiple first notification messages to the network detection device 110 corresponding to multiple different detection packets, and each first notification message carries a different port group.

302’、所述网络检测设备110根据所述标签栈栈顶的第一链路标签(8801)发送第二检测报文至网络节点R0;302'. The network detection device 110 sends a second detection message to the network node R0 according to the first link label (8801) at the top of the label stack;

303’、所述网络节点R0接收所述第二检测报文,弹出所述标签栈栈顶的第一链路标签(8801),并将所述TTL的值减去1;303'. The network node R0 receives the second detection message, pops the first link label (8801) at the top of the label stack, and subtracts 1 from the TTL value;

所述第二检测报文也是所述网络检测设备110发送的N个检测报文中的一个,所述第二检测报文也包括所述标签栈,所述TTL,所述源IP地址和所述目的IP地址;所述第二检测报文还包括第二端口组,例如图3所示的SPort=A2,DPort=B;The second detection packet is also one of the N detection packets sent by the network detection device 110, and the second detection packet also includes the label stack, the TTL, the source IP address and the Describe the purpose IP address; The second detection message also includes a second port group, such as SPort=A2 shown in Figure 3, DPort=B;

所述第二检测报文经所述网络节点R0处理后,所述标签栈中包括1个链路标签,即第二链路标签8802;所述TTL的值为2。此时,所述标签栈栈顶的标签即为该第二链路标签8802。After the second detection message is processed by the network node R0, the label stack includes one link label, that is, the second link label 8802; the value of the TTL is 2. At this time, the label at the top of the label stack is the second link label 8802 .

然后所述网络节点R0需要判断所述标签栈是否为空,以确定对所述第二检测报文继续进行标签转发还是根据转发表进行IP路由转发。Then the network node R0 needs to judge whether the label stack is empty, so as to determine whether to continue to forward the label for the second detection message or to perform IP routing forwarding according to the forwarding table.

304’、所述网络节点R0确定所述标签栈不为空,并根据所述标签栈栈顶的第二链路标签(8802)发送所述第二检测报文至网络节点R1;304', the network node R0 determines that the label stack is not empty, and sends the second detection message to the network node R1 according to the second link label (8802) at the top of the label stack;

305’、所述网络节点R1接收所述第二检测报文,弹出所述标签栈栈顶的第二链路标签(8802),并将所述TTL的值减去1;305'. The network node R1 receives the second detection message, pops the second link label at the top of the label stack (8802), and subtracts 1 from the TTL value;

然后所述网络节点R1需要判断所述标签栈是否为空,以确定对所述第二检测报文继续进行标签转发还是根据转发表进行IP路由转发。Then the network node R1 needs to judge whether the label stack is empty, so as to determine whether to continue to forward the label for the second detection message or to perform IP routing forwarding according to the forwarding table.

参见图3,所述第二检测报文经所述网络节点R1处理后,所述TTL的值为1,所述标签栈为空(其中没有链路标签了),所述网络节点R1,即待检测网络节点,对所述第二检测报文进行IP路由转发。Referring to FIG. 3, after the second detection message is processed by the network node R1, the value of the TTL is 1, and the label stack is empty (there is no link label), and the network node R1, namely The network node to be detected performs IP routing and forwarding on the second detection message.

306’、所述网络节点R1确定所述标签栈为空,并根据所述目的IP地址和所述网络节点R1的转发表,确定所述网络节点存在2条等价路径;所述网络节点R1使用ECMP功能,选择等价路径120’转发所述第一检测报文;306'. The network node R1 determines that the label stack is empty, and according to the destination IP address and the forwarding table of the network node R1, determines that there are two equivalent paths in the network node; the network node R1 Using the ECMP function, selecting the equal-cost path 120' to forward the first detection message;

具体地,所述网络节点R1根据所述目的IP地址查询所述网络节点R1的转发表,发现存在2条到达所述目的IP地址的转发条目,即,存在2条到所述目的IP地址的等价路径。所述网络节点R1需要使用ECMP功能为所述第二检测报文选择一条等价路径。Specifically, the network node R1 queries the forwarding table of the network node R1 according to the destination IP address, and finds that there are two forwarding entries to the destination IP address, that is, there are two forwarding entries to the destination IP address equivalent path. The network node R1 needs to use the ECMP function to select an equal-cost path for the second detection message.

具体地,所述网络节点R1根据四元组:所述源IP地址、所述目的IP地址和第二端口组,进行哈希计算,得到哈希计算的第二结果(第二哈希值),该第二结果指向等价路径120’;根据该第二结果确定等价路径120’,例如,用等价路径的数量K对该第二结果进行取模运算,确定选择该等价路径120’,然后向等价路径120’发送所述第二检测报文。Specifically, the network node R1 performs hash calculation according to the four-tuple: the source IP address, the destination IP address and the second port group, and obtains a second result (second hash value) of the hash calculation , the second result points to the equivalent path 120'; determine the equivalent path 120' according to the second result, for example, perform a modulo operation on the second result with the number K of the equivalent path, and determine to select the equivalent path 120 ', and then send the second detection message to the equivalent path 120'.

307’、所述网络节点R3接收所述第二检测报文,将所述TTL的值减去1,所述网络节点R3确定所述TTL的值为0并向所述网络检测设备110发送第二通知消息;307'. The network node R3 receives the second detection message, subtracts 1 from the TTL value, and the network node R3 determines that the TTL value is 0 and sends the second detection message to the network detection device 110 2. notification messages;

所述网络节点R3为所述网络节点R1,即待检测网络节点,在等价路径120’上的下一跳。The network node R3 is the next hop of the network node R1, that is, the network node to be detected, on the equal-cost path 120'.

所述网络节点R3确定所述TTL的值为0时根据所述第二检测报文生成第二通知消息,例如图3所示的第二ICMP报文,发送给所述网络检测设备110;由于所述第二检测报文的源IP地址为所述网络检测设备的IP地址,因此当所述TTL的值为0时,所述网络节点R3知道需要向那个设备发送第二通知消息。所述第二ICMP报文中包括所述网络节点R3的IP地址;所述第二ICMP报文还包括所述第二检测报文的首部,包括所述源IP地址和所述目的IP地址。When the network node R3 determines that the TTL value is 0, it generates a second notification message according to the second detection message, such as the second ICMP message shown in FIG. 3, and sends it to the network detection device 110; because The source IP address of the second detection message is the IP address of the network detection device, so when the value of the TTL is 0, the network node R3 knows that it needs to send the second notification message to that device. The second ICMP message includes the IP address of the network node R3; the second ICMP message also includes a header of the second detection message, including the source IP address and the destination IP address.

本申请实施例中,将网络节点R3发送的通知消息,即源地址为网络节点R2的IP地址的通知消息,均称为第二通知消息。可选地,网络节点R3对应多个不同的检测报文向网络检测设备110发送了多个第二通知消息,每个第二通知消息中携带不同的端口组。In this embodiment of the present application, the notification message sent by the network node R3, that is, the notification message whose source address is the IP address of the network node R2, is called a second notification message. Optionally, the network node R3 sends multiple second notification messages to the network detection device 110 corresponding to multiple different detection packets, and each second notification message carries a different port group.

308、所述网络检测设备110根据预设比值范围,收到的第一通知消息的数量和收到的第二通知消息的数量,判断所述网络节点R1的ECMP功能是否正确。308. The network detection device 110 determines whether the ECMP function of the network node R1 is correct according to the preset ratio range, the number of received first notification messages, and the number of received second notification messages.

本申请实施例中,将来自不同等价路径上反馈节点发送的通知消息,分别称为第一通知消息,第二通知消息;如果存在两条以上等价路径,还有第三通知消息,第四通知消息等。In this embodiment of the application, the notification messages sent from feedback nodes on different equal-cost paths are called the first notification message and the second notification message; if there are more than two equivalent paths, there is also a third notification message, the second notification message 4. Notifications, etc.

所述网络检测设备可以对应第一通知消息设置一个计数器,用于统计第一通知消息,即,源地址为网络节点R2的IP地址的通知消息,的数量。所述网络检测设备可以对应第二通知消息设置一个计数器,用于统计第二通知消息,即,源地址为网络节点R3的IP地址的通知消息的数量。The network detection device may set a counter corresponding to the first notification message for counting the number of first notification messages, that is, notification messages whose source address is the IP address of the network node R2. The network detection device may set a counter corresponding to the second notification message for counting the number of second notification messages, that is, the number of notification messages whose source address is the IP address of the network node R3.

第一通知消息的数量可以反映所述网络节点R1通过等价路径120转发的检测报文的数量;第二通知消息的数量可以反映所述网络节点R1通过等价路径120’转发的检测报文的数量。根据第一通知消息的数量与第二通知消息的数量之间的比值,可以看出所述网络节点R1的等价路径之间是否负载均衡。The number of first notification messages may reflect the number of detection packets forwarded by the network node R1 through the equivalent path 120; the number of second notification messages may reflect the detection packets forwarded by the network node R1 through the equivalent path 120' quantity. According to the ratio between the number of the first notification message and the number of the second notification message, it can be seen whether the equal-cost paths of the network node R1 are load-balanced.

具体地,所述网络检测设备110统计收到的第一通知消息的数量(即源地址为R2的IP地址的通知消息的数量)和第二通知消息的数量(即源地址为R3的IP地址的通知消息的数量),判断第一通知消息的数量与第二通知消息的数量之间的比值是否满足预设比值范围,以判断所述网络节点R1的ECMP功能是否正确。如果第一通知消息的数量与第二通知消息的数量之间的比值满足预设比值范围,则可以确定所述网络节点R1的ECMP功能正确;如果不满足预设比值范围,则可以确定所述网络节点R1的ECMP功能不正确。Specifically, the network detection device 110 counts the number of received first notification messages (that is, the number of notification messages whose source address is the IP address of R2) and the number of second notification messages (that is, the number of notification messages whose source address is the IP address of R3). number of notification messages), and judge whether the ratio between the number of first notification messages and the number of second notification messages satisfies a preset ratio range, so as to judge whether the ECMP function of the network node R1 is correct. If the ratio between the number of the first notification message and the number of the second notification message satisfies the preset ratio range, it can be determined that the ECMP function of the network node R1 is correct; if it does not meet the preset ratio range, it can be determined that the The ECMP function of network node R1 is incorrect.

可选地,第一通知消息的数量与第二通知消息的数量之间的比值越接近预配置负载比值,说明所述网络节点R1的ECMP功能的准确度越高。Optionally, the closer the ratio between the number of first notification messages and the number of second notification messages is to the preconfigured load ratio, it means that the accuracy of the ECMP function of the network node R1 is higher.

本实施例中,以N个检测报文中的TTL的值设置为M+1,由待检测网络节点在不同等价路径上的下一跳作为反馈节点发送通知消息,说明检测ECMP功能的过程。当然,如果等价路径上存在两个及以上的等价路径中间节点时,可以将N个检测报文中的TTL的值均设置为M+2,由等价路径上待检测网络节点的下一跳的下一跳(等价路径中间节点)发送通知消息;如果等价路径上存在三个及以上的等价路径中间节点时,也可以将N个检测报文中的TTL的值均设置为M+3。当然,对于等价路径上存在两个及以上的等价路径中间节点的情况,仍将N个检测报文中的TTL的值均设置为M+1,更简单高效。In this embodiment, the TTL value in the N detection messages is set to M+1, and the next hop of the network node to be detected on different equal-cost paths is used as a feedback node to send a notification message to illustrate the process of detecting the ECMP function . Certainly, if there are two or more intermediate nodes on the equal-cost path on the equal-cost path, the TTL values in the N detection messages can all be set to M+2. The next hop of one hop (the intermediate node of the equal-cost path) sends a notification message; if there are three or more intermediate nodes of the equal-cost path on the equal-cost path, the TTL values in the N detection messages can also be set For M+3. Of course, in the case where there are two or more intermediate nodes on the equivalent path, it is simpler and more efficient to still set the TTL values in the N detection messages to M+1.

本申请实施例提供的检测ECMP功能的方法,网络检测设备根据网络拓扑信息生成包括特定链路标签和特定TTL值的N个检测报文,指定检测报文的转发路径,并利用TTL逐跳减1、TTL的值为0时会触发不同等价路径上的反馈节点,向网络检测设备发送通知消息(ICMP报文)。这样网络检测设备根据来自不同等价路径上反馈节点发送的通知消息的数量,就可以检测待检测网络节点的ECMP功能是否正常,从而提高故障定位的效率。In the method for detecting the ECMP function provided by the embodiment of the present application, the network detection device generates N detection messages including specific link labels and specific TTL values according to the network topology information, specifies the forwarding path of the detection messages, and uses TTL to reduce 1. When the TTL value is 0, feedback nodes on different equal-cost paths will be triggered to send a notification message (ICMP message) to the network detection device. In this way, the network detection device can detect whether the ECMP function of the network node to be detected is normal according to the number of notification messages sent from feedback nodes on different equal-cost paths, thereby improving the efficiency of fault location.

在本申请图2和图3所示实施例提供的检测ECMP功能的方法基础上,接下来具体描述提供网络检测设备侧功能的检测装置和网络检测设备。Based on the method for detecting the ECMP function provided by the embodiment shown in FIG. 2 and FIG. 3 of the present application, the detection device and the network detection device that provide the function of the network detection device side are described in detail below.

参见图4,为本申请实施例提供的一种检测ECMP功能的检测装置400,所述检测装置400可以设置在网络检测设备中,用于实现如本申请图2和3所示实施例中所述检测ECMP功能的方法。所述检测装置400包括:Referring to FIG. 4 , a detection device 400 for detecting ECMP functions provided by an embodiment of the present application, the detection device 400 can be set in a network detection device, and is used to realize the implementation as described in the embodiments shown in FIGS. 2 and 3 of the present application. The method for detecting ECMP function is described. The detection device 400 includes:

报文生成模块401,用于根据目的IP地址和网络拓扑信息生成N个检测报文,每个检测报文包括标签栈、生存时间TTL、源网际协议IP地址、目的IP地址和端口组;所述端口组包括源端口号和目的端口号;所述标签栈中包括M个链路标签,所述TTL的值大于等于M+1,优选的,所述TTL的值为M+1;所述源IP地址为所述网络检测设备的IP地址,其中,M≥1,N≥K,K为待检测网络节点的等价路径的数量,K≥2,M、N和K为正整数;所述N个检测报文的标签栈相同,所述N个检测报文的TTL相同,所述N个检测报文的源IP地址相同,所述N个检测报文的目的IP地址相同;所述N个检测报文中任意两个检测报文的端口组互不相同;Message generation module 401 is used to generate N detection messages according to the destination IP address and network topology information, each detection message includes a label stack, time-to-live TTL, source Internet protocol IP address, destination IP address and port group; The port group includes a source port number and a destination port number; the label stack includes M link labels, and the value of the TTL is greater than or equal to M+1, preferably, the value of the TTL is M+1; the The source IP address is the IP address of the network detection device, wherein M≥1, N≥K, K is the number of equal-cost paths of network nodes to be detected, K≥2, M, N and K are positive integers; The label stacks of the N detection messages are the same, the TTLs of the N detection messages are the same, the source IP addresses of the N detection messages are the same, and the destination IP addresses of the N detection messages are the same; The port groups of any two detection packets in the N detection packets are different from each other;

发送模块402,用于根据所述标签栈栈顶的链路标签发送所述N个检测报文;A sending module 402, configured to send the N detection messages according to the link label at the top of the label stack;

接收模块403,用于接收与所述N个检测报文对应的N个通知消息;A receiving module 403, configured to receive N notification messages corresponding to the N detection messages;

确定模块404,用于根据所述N个通知消息和预设比值范围确定所述待检测网络节点的ECMP功能是否正确。A determining module 404, configured to determine whether the ECMP function of the network node to be detected is correct according to the N notification messages and a preset ratio range.

所述报文生成模块,具体用于:根据所述目的IP地址和所述网络拓扑信息,确定所述网络检测设备到所述目的IP地址的转发路径以及所述转发路径上的所述待检测网络节点;根据所述网络拓扑信息,确定所述网络检测设备到所述待检测网络节点的跳数M以及每一跳的链路标签,并确定所述待检测网络节点的等价路径的数量K;根据所述等价路径的数量K、所述跳数M以及每一跳的链路标签,生成所述N个检测报文。The packet generation module is specifically configured to: determine a forwarding path from the network detection device to the destination IP address and the to-be-detected IP address on the forwarding path according to the destination IP address and the network topology information A network node; according to the network topology information, determine the number of hops M from the network detection device to the network node to be detected and the link label of each hop, and determine the number of equivalent paths of the network node to be detected K: generating the N detection packets according to the number K of the equal-cost paths, the number of hops M, and the link label of each hop.

参见图5所示,所述检测装置400还包括拓扑获取模块405,用于获取所述网络拓扑信息,所述网络拓扑信息包括所述网络检测设备至所述目的IP地址的转发路径以及所述转发路径上每一跳的路由信息。具体包括所述网络检测设备至所述待检测网络节点的每一跳的链路标签,以及所述待检测网络节点到所述目的IP地址的K条等价路径。所述K条等价路径为所述转发路径上的一段。Referring to FIG. 5 , the detection device 400 further includes a topology acquisition module 405 configured to acquire the network topology information, the network topology information includes the forwarding path from the network detection device to the destination IP address and the Routing information for each hop on the forwarding path. It specifically includes the link label of each hop from the network detection device to the network node to be detected, and K equivalent paths from the network node to be detected to the destination IP address. The K equivalent paths are a section of the forwarding path.

所述拓扑获取模块405可以先通过网络拓扑管理装置获取网络拓扑信息。所述网络拓扑管理装置可以是SDN控制器。具体实现中,所述检测装置400和所述网络拓扑管理装置可以在同一个物理设备中实现,也可以是在不同的物理设备中实现。The topology acquisition module 405 may first acquire network topology information through a network topology management device. The network topology management device may be an SDN controller. In a specific implementation, the detection device 400 and the network topology management device may be implemented in the same physical device, or may be implemented in different physical devices.

当所述待检测网络节点收到第一检测报文(所述第一检测报文为所述N个检测报文中的任意一个)之后,所述待检测网络节点弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1。所述待检测网络节点确定所述标签栈为空(可以理解此时所述检测报文中的TTL的值为1),因此要根据转发表对所述第一检测报文进行IP路由转发;所述待检测网络节点根据所述目的IP地址和所述待检测网络节点的转发表确定存在K条等价路径到所述目的IP地址(即待检测IP地址),于是使用ECMP功能,选择所述K条等价路径中的一条等价路径转发所述第一检测报文;所述待检测网络节点在该等价路径上的下一跳节点,即反馈节点,接收所述第一检测报文,将所述TTL的值减去1,导致所述TTL的值为0触发该反馈节点向所述网络检测设备发送通知消息。After the network node to be detected receives the first detection message (the first detection message is any one of the N detection messages), the network node to be detected pops up the top of the label stack the link label, and subtract 1 from the value of the TTL. The network node to be detected determines that the label stack is empty (it can be understood that the value of the TTL in the detection message is 1 at this time), so the IP routing forwarding of the first detection message is performed according to the forwarding table; The network node to be detected determines that there are K equivalent paths to the destination IP address (i.e. the IP address to be detected) according to the destination IP address and the forwarding table of the network node to be detected, so the ECMP function is used to select the An equivalent path among the K equal-cost paths forwards the first detection message; the next hop node of the network node to be detected on the equal-cost path, that is, a feedback node, receives the first detection message In this example, the value of the TTL is subtracted by 1, so that the value of the TTL is 0 to trigger the feedback node to send a notification message to the network detection device.

所述N个通知消息中包括第一通知消息和第二通知消息;所述第一通知消息中包括第一反馈节点的IP地址,所述第二通知消息中包括第二反馈节点的IP地址。当然,如果所述待检测网络节点存在两条以上的等价路径,则还可以包括第三通知消息,所述第三通知消息中包括第三反馈节点的IP地址。The N notification messages include a first notification message and a second notification message; the first notification message includes the IP address of the first feedback node, and the second notification message includes the IP address of the second feedback node. Of course, if there are more than two equivalent paths for the network node to be detected, a third notification message may also be included, and the third notification message includes the IP address of the third feedback node.

所述接收模块具体用于:The receiving module is specifically used for:

接收所述第一通知消息,所述第一通知消息用于通知所述网络检测设备:所述第一反馈节点收到所述待检测网络节点发送的检测报文;所述第一通知消息为所述第一反馈节点在所述TTL的值为0时发送;所述第一反馈节点为第一等价路径上的节点(等价路径中间节点)。若所述第一检测报文中所述TTL的值为M+1,所述第一反馈节点为所述待检测网络节点在第一等价路径上的下一跳;若所述第一检测报文中所述TTL的值为M+2,所述第一反馈节点为所述待检测网络节点在第一等价路径上的下一跳的下一跳,以此类推。receiving the first notification message, the first notification message is used to notify the network detection device: the first feedback node receives the detection message sent by the network node to be detected; the first notification message is The first feedback node sends when the value of the TTL is 0; the first feedback node is a node on the first equal-cost path (an intermediate node on the equal-cost path). If the value of the TTL in the first detection message is M+1, the first feedback node is the next hop of the network node to be detected on the first equal-cost path; if the first detection The TTL value in the message is M+2, the first feedback node is the next hop of the next hop of the network node to be detected on the first equal-cost path, and so on.

接收第二通知消息,所述第二通知消息用于通知所述网络检测设备:所述第二反馈节点收到所述待检测网络节点发送的检测报文;所述第二通知消息为所述第二反馈节点在所述TTL的值为0时发送;所述第二反馈节点为第二等价路径上的节点(等价路径中间节点)。若所述第一检测报文中所述TTL的值为M+1,所述第二反馈节点为所述待检测网络节点在第二等价路径上的下一跳。receiving a second notification message, the second notification message is used to notify the network detection device: the second feedback node receives the detection message sent by the network node to be detected; the second notification message is the The second feedback node sends when the value of the TTL is 0; the second feedback node is a node on the second equal-cost path (an intermediate node on the equal-cost path). If the value of the TTL in the first detection message is M+1, the second feedback node is the next hop of the network node to be detected on the second equal-cost path.

所述确定模块具体用于:记录所述N个通知消息中不同源地址对应的通知消息的数量;判断所述N个通知消息中不同源地址对应的通知消息的数量之间的比值是否满足所述预设比值范围,以确定所述待检测网络节点的ECMP功能是否正确。如果不同源地址对应的通知消息的数量之间的比值在所述预设比值范围内,则可以确定所述待检测网络节点的ECMP功能正确;如果不同源地址对应的通知消息的数量之间的比值不在所述预设比值范围内,则可以确定所述待检测网络节点的ECMP功能不正确。具体地,所述确定模块记录第一通知消息(源地址为第一反馈节点的IP地址)的数量和第二通知消息(源地址为第二反馈节点的IP地址)的数量,计算第一通知消息的数量和第二通知消息的数量之间的比值,如果该比值在所述预设比值范围内,则确定所述待检测网络节点的ECMP功能正确;如果该比值不在所述预设比值范围内,则确定所述待检测网络节点的ECMP功能不正确。The determining module is specifically used to: record the number of notification messages corresponding to different source addresses in the N notification messages; determine whether the ratio between the numbers of notification messages corresponding to different source addresses in the N notification messages meets the required The preset ratio range is used to determine whether the ECMP function of the network node to be detected is correct. If the ratio between the number of notification messages corresponding to different source addresses is within the preset ratio range, it can be determined that the ECMP function of the network node to be detected is correct; if the ratio between the number of notification messages corresponding to different source addresses If the ratio is not within the preset ratio range, it can be determined that the ECMP function of the network node to be detected is incorrect. Specifically, the determination module records the quantity of the first notification message (the source address is the IP address of the first feedback node) and the quantity of the second notification message (the source address is the IP address of the second feedback node), and calculates the first notification message A ratio between the number of messages and the number of second notification messages, if the ratio is within the preset ratio range, it is determined that the ECMP function of the network node to be detected is correct; if the ratio is not within the preset ratio range , it is determined that the ECMP function of the network node to be detected is incorrect.

参见图6,为本申请实施例提供的一种网络检测设备600,用于实现如本申请图2和3所示实施例中所述检测转发表的方法。所述网络检测设备包括:处理器601,存储器602和通信接口603;Referring to FIG. 6 , a network detection device 600 provided in the embodiment of the present application is used to implement the method for detecting the forwarding table as described in the embodiment shown in FIGS. 2 and 3 of the present application. The network detection device includes: a processor 601, a memory 602 and a communication interface 603;

所述处理器601,所述存储器602和所述通信接口603之间可以通过总线604相互连接;总线604可以是外设部件互连标准(peripheral componentinterconnect,简称PCI)总线或扩展工业标准结构(extended industry standardarchitecture,简称EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 601, the memory 602 and the communication interface 603 can be connected to each other through a bus 604; the bus 604 can be a peripheral component interconnect standard (PCI for short) bus or an extended industry standard structure (extended industry standard architecture, referred to as EISA) bus and so on. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 6 , but it does not mean that there is only one bus or one type of bus.

所述存储器602,用于存储网络拓扑信息,所述网络拓扑信息包括所述网络检测设备到所述目的IP地址的转发路径以及所述转发路径上每一跳的路由信息;具体包括所述网络检测设备至所述待检测网络节点的每一跳的链路标签,以及所述待检测网络节点到所述目的IP地址的K条等价路径。The memory 602 is used to store network topology information, the network topology information includes the forwarding path from the network detection device to the destination IP address and the routing information of each hop on the forwarding path; specifically includes the network A link label of each hop from the detection device to the network node to be detected, and K equivalent paths from the network node to be detected to the destination IP address.

所述处理器601,用于根据目的IP地址和所述网络拓扑信息生成N个检测报文,所述N个检测报文中的每个检测报文包括标签栈、TTL、源IP地址、所述目的IP地址和端口组;所述端口组包括源端口号和目的端口号;所述标签栈中包括M个链路标签,所述TTL的值大于等于M+1,优选的,所述TTL的值为M+1;所述源IP地址为所述网络检测设备的IP地址,其中,M为所述网络检测设备到待检测网络节点的跳数,M≥1,N≥K,K为所述待检测网络节点至所述待检测IP地址的等价路径的数量,K≥2,M、N和K为正整数;所述N个检测报文的标签栈相同,所述N个检测报文的TTL相同,所述N个检测报文的源IP地址相同,所述N个检测报文的目的IP地址相同;所述N个检测报文中任意两个检测报文的端口组互不相同;根据所述标签栈栈顶的链路标签,发送所述N个检测报文;接收与所述N个检测报文对应的N个通知消息;根据所述N个通知消息和预设比值范围确定所述待检测网络节点的ECMP功能是否正确。The processor 601 is configured to generate N detection packets according to the destination IP address and the network topology information, each detection packet in the N detection packets includes a label stack, TTL, source IP address, all Describe the destination IP address and port group; the port group includes a source port number and a destination port number; M link labels are included in the label stack, and the value of the TTL is greater than or equal to M+1, preferably, the TTL The value of is M+1; the source IP address is the IP address of the network detection device, where M is the number of hops from the network detection device to the network node to be detected, M≥1, N≥K, and K is The number of equal-cost paths from the network node to be detected to the IP address to be detected, K≥2, M, N, and K are positive integers; the label stacks of the N detection messages are the same, and the N detection packets The TTL of the message is the same, the source IP addresses of the N detection messages are the same, and the destination IP addresses of the N detection messages are the same; the port groups of any two detection messages in the N detection messages are mutually Not the same; according to the link label at the top of the label stack, send the N detection messages; receive N notification messages corresponding to the N detection messages; according to the N notification messages and preset The ratio range determines whether the ECMP function of the network node to be detected is correct.

所述处理器601,具体用于根据所述网络拓扑信息,确定所述网络检测设备到所述待检测网络节点的跳数M以及每一跳的链路标签,并确定所述待检测网络节点的等价路径的数量K;根据所述等价路径的数量K、所述跳数M以及每一跳的链路标签,生成所述N个检测报文。The processor 601 is specifically configured to determine the number of hops M from the network detection device to the network node to be detected and the link label of each hop according to the network topology information, and determine the network node to be detected The number K of equal-cost paths; generating the N detection messages according to the number K of equal-cost paths, the number of hops M, and the link label of each hop.

所述处理器601,具体用于记录所述N个通知消息中不同源地址对应的通知消息的数量;判断所述N个通知消息中不同源地址对应的通知消息的数量之间的比值是否满足所述预设比值范围,以确定所述待检测网络节点的ECMP功能是否正确。The processor 601 is specifically configured to record the number of notification messages corresponding to different source addresses in the N notification messages; determine whether the ratio between the numbers of notification messages corresponding to different source addresses in the N notification messages satisfies The preset ratio range is used to determine whether the ECMP function of the network node to be detected is correct.

所述N个通知消息中包括第一通知消息和第二通知消息;所述第一通知消息中包括第一反馈节点的IP地址,所述第二通知消息中包括第二反馈节点的IP地址。当然,如果所述待检测网络节点存在两条以上的等价路径,则还可以包括第三通知消息,所述第三通知消息中包括第三反馈节点的IP地址。The N notification messages include a first notification message and a second notification message; the first notification message includes the IP address of the first feedback node, and the second notification message includes the IP address of the second feedback node. Of course, if there are more than two equivalent paths for the network node to be detected, a third notification message may also be included, and the third notification message includes the IP address of the third feedback node.

所述处理器601具体用于:The processor 601 is specifically used for:

接收所述第一通知消息,所述第一通知消息用于通知所述网络检测设备:所述第一反馈节点收到所述待检测网络节点发送的检测报文;所述第一通知消息为所述第一反馈节点在所述TTL的值为0时发送;所述第一反馈节点为第一等价路径上的等价路径中间节点。若所述第一检测报文中所述TTL的值为M+1,所述第一反馈节点为所述待检测网络节点在第一等价路径上的下一跳;receiving the first notification message, the first notification message is used to notify the network detection device: the first feedback node receives the detection message sent by the network node to be detected; the first notification message is The first feedback node sends when the value of the TTL is 0; the first feedback node is an intermediate node on the first equal-cost path. If the value of the TTL in the first detection message is M+1, the first feedback node is the next hop of the network node to be detected on the first equal-cost path;

接收第二通知消息,所述第二通知消息用于通知所述网络检测设备:所述第二反馈节点收到所述待检测网络节点发送的检测报文;所述第二通知消息为所述第二反馈节点在所述TTL的值为0时发送;所述第二反馈节点为第二等价路径上的等价路径中间节点。若所述第二检测报文中所述TTL的值为M+1,所述第二反馈节点为所述待检测网络节点在第二等价路径上的下一跳。receiving a second notification message, the second notification message is used to notify the network detection device: the second feedback node receives the detection message sent by the network node to be detected; the second notification message is the The second feedback node sends when the value of the TTL is 0; the second feedback node is an intermediate node on the second equal-cost path. If the value of the TTL in the second detection message is M+1, the second feedback node is the next hop of the network node to be detected on the second equal-cost path.

所述第一通知消息为所述第一反馈节点在所述TTL的值为0时发送;所述第二通知消息为所述第二反馈节点在所述TTL的值为0时发送。The first notification message is sent by the first feedback node when the TTL value is 0; the second notification message is sent by the second feedback node when the TTL value is 0.

所述处理器601,还用于获取所述网络拓扑信息。具体可以通过网络拓扑管理装置获取网络拓扑信息。所述网络拓扑管理装置可以是SDN控制器。具体实现中,所述网络检测设备和所述网络拓扑管理装置可以在同一个物理设备中实现,也可以是在不同的物理设备中实现。The processor 601 is further configured to acquire the network topology information. Specifically, the network topology information may be acquired through a network topology management device. The network topology management device may be an SDN controller. In a specific implementation, the network detection device and the network topology management apparatus may be implemented in the same physical device, or may be implemented in different physical devices.

所述存储器602可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器602也可以包括非易失性存储器(英文:non-volatile memory),例如快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,缩写:HDD)或固态硬盘(英文:solid-state drive,缩写:SSD);存储器602还可以包括上述种类的存储器的组合。The memory 602 may include a volatile memory (English: volatile memory), such as a random-access memory (English: random-access memory, abbreviated as RAM); the memory 602 may also include a non-volatile memory (English: non- volatile memory), such as flash memory (English: flash memory), hard disk (English: hard disk drive, abbreviation: HDD) or solid state drive (English: solid-state drive, abbreviation: SSD); the memory 602 can also include the above-mentioned types combination of memory.

本申请实施例中,所述通信接口603代表所述网络检测设备600与网络中其他网络节点通信的接口,可以是一个或多个,可以是光接口、电接口,或各类接口的组合。为便于表述,本申请中用通信接口603表示,并不作为对本申请技术方案的限定。In the embodiment of the present application, the communication interface 603 represents the interface through which the network detection device 600 communicates with other network nodes in the network, and there may be one or more interfaces, which may be optical interfaces, electrical interfaces, or a combination of various interfaces. For the convenience of expression, the communication interface 603 is used in this application to represent it, which is not used as a limitation to the technical solution of this application.

所述处理器601可以是中央处理器(英文:central processing unit,缩写:CPU),网络处理器(英文:network processor,缩写:NP)或者CPU和NP的组合。处理器601还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic array logic,缩写:GAL)或其任意组合。The processor 601 may be a central processing unit (English: central processing unit, abbreviated: CPU), a network processor (English: network processor, abbreviated: NP) or a combination of CPU and NP. The processor 601 may further include a hardware chip. The aforementioned hardware chip may be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviation: ASIC), a programmable logic device (English: programmable logic device, abbreviation: PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviated: CPLD), field-programmable logic gate array (English: field-programmable gate array, abbreviated: FPGA), general array logic (English: generic array logic, abbreviation: GAL) or any combination thereof.

可选地,所述存储器602还用于存储程序指令;所述处理器601可以调用存储器602中存放的程序指令,执行图2和图3所示实施例中网络检测设备的一个或多个步骤,或其中可选的实施方式,实现上述图2和图3所示的检测转发表的方法。Optionally, the memory 602 is also used to store program instructions; the processor 601 can call the program instructions stored in the memory 602 to execute one or more steps of the network detection device in the embodiment shown in FIG. 2 and FIG. 3 , or an optional implementation manner therein, implementing the methods for detecting forwarding tables shown in FIG. 2 and FIG. 3 above.

本申请实施例提供的网络检测设备通过包括特定链路标签和特定TTL值的N个检测报文,可以检测待检测网络节点的ECMP功能是否正常,从而提高故障定位的效率。The network detection device provided in the embodiment of the present application can detect whether the ECMP function of the network node to be detected is normal through N detection messages including a specific link label and a specific TTL value, thereby improving the efficiency of fault location.

在本申请图2和图3所示实施例提供的检测ECMP功能的方法基础上,接下来具体描述实现上述方法中的待检测网络节点。Based on the method for detecting the ECMP function provided by the embodiment shown in FIG. 2 and FIG. 3 of the present application, the network node to be detected in implementing the above method is described in detail below.

参见图7,为本申请实施例提供的一种网络节点700,所述网络节点700用于实现如本申请图2和3所示实施例中所述检测ECMP功能的方法。所述网络节点700包括接收模块701,报文处理模块702和转发模块703;Referring to FIG. 7 , it is a network node 700 provided in an embodiment of the present application, and the network node 700 is configured to implement the method for detecting an ECMP function as described in the embodiments shown in FIGS. 2 and 3 of the present application. The network node 700 includes a receiving module 701, a message processing module 702 and a forwarding module 703;

所述接收模块701,用于接收接收第一检测报文,所述第一检测报文中包括标签栈、TTL、源IP地址、目的IP地址和第一端口组;其中,所述标签栈中包括M个链路标签,所述TTL的值为M+1;所述源IP地址为网络检测设备的IP地址The receiving module 701 is configured to receive and receive a first detection message, the first detection message includes a label stack, TTL, source IP address, destination IP address, and a first port group; wherein, in the label stack Including M link labels, the value of the TTL is M+1; the source IP address is the IP address of the network detection device

可以理解当网络节点700收到的第一检测报文中,标签栈中仅包括一个链路标签,TTL的值为2时,所述网络节点700即为待检测网络节点。It can be understood that when the first detection message received by the network node 700 includes only one link label in the label stack and the TTL value is 2, the network node 700 is the network node to be detected.

所述报文处理模块702,用于弹出所述标签栈栈顶的链路标签,将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空(此时,所述网络节点为待检测网络节点),且根据所述目的IP地址和所述网络节点的转发表确定所述网络节点至所述目的IP地址存在K条等价路径时,使用ECMP功能为所述第一检测报文选择所述K条等价路径中的第一等价路径。The message processing module 702 is configured to pop up the link label at the top of the label stack, and subtract 1 from the value of the TTL; judge whether the label stack is empty; when it is determined that the label stack is empty ( At this point, the network node is a network node to be detected), and according to the destination IP address and the forwarding table of the network node, it is determined that there are K equivalent paths from the network node to the destination IP address, ECMP The function is to select a first equivalent path among the K equivalent paths for the first detection message.

所述报文处理模块702,具体根据所述源IP地址、所述目的IP地址、所述第一端口组,进行哈希计算,得到第一哈希值,该第一哈希值指向第一等价路径;根据该第一哈希值,例如,用等价路径的数量K对该第一哈希值进行取模运算,确定所述第一等价路径用于转发所述第一检测报文。The message processing module 702 specifically performs hash calculation according to the source IP address, the destination IP address, and the first port group to obtain a first hash value, and the first hash value points to the first an equivalent path; according to the first hash value, for example, performing a modulo operation on the first hash value with the number K of equivalent paths, and determining that the first equivalent path is used to forward the first detection report arts.

所述转发模块703,用于向所述报文处理模块702选择的所述第一等价路径转发所述第一检测报文。第一反馈节点接收所述第一检测报文,将所述TTL的值减去1,所述第一反馈节点为所述第一等价路径上的节点(等价路径中间节点)。所述第一反馈节点确定所述TTL的值为0,则向所述网络检测设备发送第一通知消息,例如,图3所示的第一ICMP报文,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The forwarding module 703 is configured to forward the first detection message to the first equal-cost path selected by the message processing module 702 . The first feedback node receives the first detection message, and subtracts 1 from the value of the TTL, and the first feedback node is a node on the first equal-cost path (an intermediate node on the equal-cost path). The first feedback node determines that the value of the TTL is 0, and then sends a first notification message to the network detection device, for example, the first ICMP message shown in Figure 3, so that the network detection device determines the Whether the ECMP function of the network node is correct.

所述转发模块703,还用于当所述报文处理模块702确定所述标签栈不为空时,根据所述标签栈栈顶的链路标签,转发所述第一检测报文。此时,所述网络节点为中间网络节点,对所述检测报文继续进行标签转发,直至发送给待检测网络节点。The forwarding module 703 is further configured to forward the first detection message according to the link label at the top of the label stack when the message processing module 702 determines that the label stack is not empty. At this time, the network node is an intermediate network node, and continues to forward the label of the detection message until it is sent to the network node to be detected.

所述接收模块701还用于接收第二检测报文,所述第二检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第二端口组。相应地,所述报文处理模块702,还用于对所述第二检测报文进行如下处理:弹出所述标签栈栈顶的链路标签,将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空时(此时,所述网络节点为待检测网络节点),根据所述目的IP地址和所述网络节点的转发表确定存在K条等价路径,则使用ECMP功能为所述第二检测报文选择所述K条等价路径中的第二等价路径。The receiving module 701 is further configured to receive a second detection message, where the second detection message includes the label stack, the TTL, the source IP address, the destination IP address, and a second port group. Correspondingly, the message processing module 702 is further configured to perform the following processing on the second detection message: pop the link label at the top of the label stack, and subtract 1 from the value of the TTL; Whether the label stack is empty; when it is determined that the label stack is empty (at this time, the network node is a network node to be detected), according to the forwarding table of the destination IP address and the network node, it is determined that there are K items, etc. If there is no cost path, the ECMP function is used to select a second equal-cost path among the K equal-cost paths for the second detection packet.

所述报文处理模块702,具体根据所述源IP地址、所述目的IP地址、所述第二端口组,进行哈希计算,得到第二哈希值,该第二哈希值指向第二等价路径;根据该第二哈希值,例如,用等价路径的数量K对该第二哈希值进行取模运算,确定所述第二等价路径用于转发所述第二检测报文。The message processing module 702 specifically performs hash calculation according to the source IP address, the destination IP address, and the second port group to obtain a second hash value, and the second hash value points to the second an equivalent path; according to the second hash value, for example, performing a modulo operation on the second hash value with the number K of the equivalent path, and determining that the second equivalent path is used to forward the second detection report arts.

所述转发模块703,还用于向所述报文处理模块702选择的所述第二等价路径转发所述第二检测报文。第二反馈节点接收所述第二检测报文,将所述TTL的值减去1,所述第二反馈节点为所述网络节点在所述第二等价路径上的下一跳。所述第二反馈节点确定所述TTL的值为0,则向所述网络检测设备发送第二通知消息,例如,图3所示的第二ICMP报文,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The forwarding module 703 is further configured to forward the second detection message to the second equal-cost path selected by the message processing module 702 . The second feedback node receives the second detection message, and subtracts 1 from the value of the TTL, and the second feedback node is the next hop of the network node on the second equal-cost path. The second feedback node determines that the TTL value is 0, and then sends a second notification message to the network detection device, for example, the second ICMP message shown in Figure 3, so that the network detection device determines the Whether the ECMP function of the network node is correct.

参见图8,为本申请实施例提供的一种网络节点800,用于实现如本申请图2和3所示实施例中所述ECMP功能的方法。所述网络节点800包括:处理器801,存储器802和通信接口803;Referring to FIG. 8 , it is a network node 800 provided in the embodiment of the present application, which is used to implement the ECMP function method described in the embodiments shown in FIGS. 2 and 3 of the present application. The network node 800 includes: a processor 801, a memory 802 and a communication interface 803;

所述处理器601,所述存储器602和所述通信接口603之间可以通过总线604相互连接;总线604可以是PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 601, the memory 602 and the communication interface 603 may be connected to each other through a bus 604; the bus 604 may be a PCI bus or an EISA bus. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 8 , but it does not mean that there is only one bus or one type of bus.

所述存储器802,用于存储所述网络节点800的转发表。The memory 802 is configured to store the forwarding table of the network node 800 .

所述处理器801,用于接收第一检测报文,所述第一检测报文中包括标签栈、TTL、源IP地址、目的IP地址和第一端口组;其中,所述标签栈中包括M个链路标签,所述TTL的值大于等于M+1,所述源IP地址为网络检测设备的IP地址,M为大于等于1的正整数;The processor 801 is configured to receive a first detection message, where the first detection message includes a label stack, a TTL, a source IP address, a destination IP address, and a first port group; wherein, the label stack includes M link labels, the value of the TTL is greater than or equal to M+1, the source IP address is the IP address of the network detection device, and M is a positive integer greater than or equal to 1;

所述处理器801,还用于弹出所述标签栈栈顶的链路标签,并将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空时(此时,所述网络节点800为待检测网络节点),根据所述目的IP地址和所述转发表确定存在K条等价路径,则使用ECMP功能,选择所述K条等价路径中的第一等价路径转发所述第一检测报文。第一反馈节点接收所述第一检测报文,将所述TTL的值减去1;所述第一反馈节点为所述第一等价路径上的节点(等价路径中间节点);所述第一反馈节点确定所述TTL的值为0,并向所述网络检测设备发送第一通知消息,例如,图3所示的第一ICMP报文,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The processor 801 is further configured to pop the link label at the top of the label stack, and subtract 1 from the value of the TTL; determine whether the label stack is empty; when it is determined that the label stack is empty (At this point, the network node 800 is a network node to be detected), determine that there are K equivalent paths according to the destination IP address and the forwarding table, then use the ECMP function to select one of the K equivalent paths The first equal-cost path forwards the first detection packet. The first feedback node receives the first detection message, and subtracts 1 from the value of the TTL; the first feedback node is a node on the first equal-cost path (an intermediate node on the equal-cost path); the The first feedback node determines that the TTL value is 0, and sends a first notification message to the network detection device, for example, the first ICMP message shown in Figure 3, so that the network detection device can determine the network node The ECMP function is correct.

所述处理器801,还用于当确定所述标签栈不为空时,根据所述标签栈栈顶的链路标签,转发所述第一检测报文。此时,所述网络节点800为中间网络节点,对所述第一检测报文继续进行标签转发,直至发送给待检测网络节点。The processor 801 is further configured to, when it is determined that the label stack is not empty, forward the first detection message according to the link label at the top of the label stack. At this time, the network node 800 is an intermediate network node, and continues to forward the label of the first detection message until it is sent to the network node to be detected.

所述处理器801,具体根据所述源IP地址、所述目的IP地址、所述第一端口组,进行哈希计算,得到第一哈希值,所述第一结果指向第一等价路径;根据所述第一哈希值,确定所述第一等价路径用于转发所述第一检测报文。The processor 801 specifically performs hash calculation according to the source IP address, the destination IP address, and the first port group to obtain a first hash value, and the first result points to a first equivalent path ; According to the first hash value, determine that the first equivalent path is used to forward the first detection packet.

所述处理器801,还用于接收第二检测报文,所述第二检测报文中包括所述标签栈、所述TTL、所述源IP地址、所述目的IP地址和第二端口组;并对所述第二检测报文进行如下处理:弹出所述标签栈栈顶的链路标签,将所述TTL的值减去1;判断所述标签栈是否为空;当确定所述标签栈为空时(此时,所述网络节点为待检测网络节点),根据所述目的IP地址和所述网络节点的转发表确定存在K条等价路径,则使用ECMP功能选择所述K条等价路径中的第二等价路径转发所述第二检测报文。第二反馈节点接收所述第二检测报文,将所述TTL的值减去1,所述第二反馈节点为所述第二等价路径上的等价路径中间节点。所述第二反馈节点确定所述TTL的值为0,则向所述网络检测设备发送第二通知消息,例如,图3所示的第二ICMP报文,以便所述网络检测设备确定所述网络节点的ECMP功能是否正确。The processor 801 is further configured to receive a second detection message, where the second detection message includes the label stack, the TTL, the source IP address, the destination IP address, and a second port group ; and the second detection message is processed as follows: the link label at the top of the label stack is popped up, and the value of the TTL is subtracted by 1; it is judged whether the label stack is empty; when the label is determined When the stack is empty (at this moment, the network node is a network node to be detected), determine that there are K equivalent paths according to the forwarding table of the destination IP address and the network node, then use the ECMP function to select the K The second equal-cost path in the equal-cost path forwards the second detection packet. The second feedback node receives the second detection message, and subtracts 1 from the value of the TTL, and the second feedback node is an intermediate node of the equal-cost path on the second equal-cost path. The second feedback node determines that the TTL value is 0, and then sends a second notification message to the network detection device, for example, the second ICMP message shown in Figure 3, so that the network detection device determines the Whether the ECMP function of the network node is correct.

所述处理器801,具体根据所述源IP地址、所述目的IP地址、所述第二端口组,进行哈希计算,得到第一哈希值,所述第一哈希值指向第一等价路径;根据所述第一哈希值,确定所述第二等价路径用于转发所述第二检测报文。The processor 801 specifically performs hash calculation according to the source IP address, the destination IP address, and the second port group to obtain a first hash value, and the first hash value points to the first etc. determining the second equal-cost path for forwarding the second detection packet according to the first hash value.

所述存储器802可以包括易失性存储器,例如RAM;存储器802也可以包括非易失性存储器,例如flash,HDD,SSD;存储器802还可以包括上述种类的存储器的组合。The memory 802 may include a volatile memory, such as RAM; the memory 802 may also include a non-volatile memory, such as flash, HDD, SSD; the memory 802 may also include a combination of the above-mentioned types of memory.

本申请实施例中,所述通信接口803代表所述网络节点800与网络中其他网络节点通信的接口,可以是一个或多个,可以是光接口、电接口,或各类接口的组合。为便于表述,本申请中用通信接口803表示,并不作为对本申请技术方案的限定。In this embodiment of the present application, the communication interface 803 represents an interface through which the network node 800 communicates with other network nodes in the network, and there may be one or more interfaces, which may be optical interfaces, electrical interfaces, or a combination of various interfaces. For the convenience of expression, it is represented by the communication interface 803 in this application, which is not used as a limitation to the technical solution of this application.

所述处理器801可以是CPU,NP,或者CPU和NP的组合;所述处理器也可以是硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。The processor 801 may be a CPU, NP, or a combination of CPU and NP; the processor may also be a hardware chip. The aforementioned hardware chip may be ASIC, PLD or a combination thereof. The above-mentioned PLD can be CPLD, FPGA, GAL or any combination thereof.

可选的,所述处理器801,还用于获取所述转发表。具体地,所述处理器801根据路由表生成所述转发表。所述存储器802还可用于存储所述路由表。所述网络节点800可以采用传统的方法得到所述路由表,在此不再赘述。Optionally, the processor 801 is further configured to acquire the forwarding table. Specifically, the processor 801 generates the forwarding table according to the routing table. The memory 802 can also be used to store the routing table. The network node 800 may obtain the routing table using a traditional method, which will not be repeated here.

可选地,所述存储器802还用于存储程序指令;所述处理器601可以调用存储器802中存放的程序指令,执行图2和图3所示实施例中网络节点的一个或多个步骤,或其中可选的实施方式,实现上述图2和图3所示的检测ECMP功能的方法。Optionally, the memory 802 is also used to store program instructions; the processor 601 can call the program instructions stored in the memory 802 to execute one or more steps of the network nodes in the embodiments shown in FIG. 2 and FIG. 3 , Or in an optional embodiment, implement the method for detecting the ECMP function shown in FIG. 2 and FIG. 3 above.

本申请实施例提供的网络节点,在收到网络检测设备发送的包括特定链路标签和特定TTL值的N个检测报文后,弹出标签栈栈顶的链路标签并将TTL的值减1。到待检测网络节点转发该N个检测报文时,由于标签栈为空,需要根据转发表使用ECMP功能为每个检测报文选择一条等价路径。待检测网络节点在各条等价路径上的下一跳,即反馈节点,收到检测报文后,将所述TTL的值减1,导致所述TTL值为0,触发反馈节点向网络检测设备发送通知消息。网络检测设备根据不同等价路径上的反馈节点发送的通知消息,就可以判断N个检测报文是否按照预设比值范围在待检测网络节点的K条等价路径之间分配,从而可以确定待检测网络节点的ECMP功能是否正常,提高了故障定位的效率。The network node provided in the embodiment of the present application, after receiving N detection messages including a specific link label and a specific TTL value sent by the network detection device, pops the link label at the top of the label stack and decrements the TTL value by 1 . When the network node to be detected forwards the N detection packets, since the label stack is empty, it is necessary to use the ECMP function to select an equivalent path for each detection packet according to the forwarding table. The next hop of the network node to be detected on each equal-cost path, that is, the feedback node, after receiving the detection message, reduces the value of the TTL by 1, causing the TTL value to be 0, and triggers the feedback node to detect The device sends a notification message. According to the notification messages sent by the feedback nodes on different equivalent paths, the network detection equipment can judge whether the N detection messages are allocated among the K equivalent paths of the network nodes to be detected according to the preset ratio range, so as to determine the Detect whether the ECMP function of the network node is normal, which improves the efficiency of fault location.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (20)

Message generation module, for N number of according to purpose Internet protocol IP address and network topological information generationDetection messages, each detection messages include label stack, life span TTL, source IP address, the purposeIP address and port set;The port set includes source port number and destination slogan, and the label stack includesM link tags, the value of the TTL is M+1, and the source IP address is the network detection deviceIP address, wherein, M is the network detection device to the hop count of network node to be detected, M >=1, N>=K, K be equative route of the network node to be detected to the purpose IP address quantity, K >=2, M, N and K is positive integer;The label stack of N number of detection messages is identical, N number of detection reportThe TTL of text is identical, and the source IP address of N number of detection messages is identical, the mesh of N number of detection messagesIP address it is identical;The port set of any two detection messages is different in N number of detection messages;
Message generation module, for N number of according to purpose Internet protocol IP address and network topological information generationDetection messages, each detection messages include label stack, life span TTL, source IP address, the purposeIP address and port set;The port set includes source port number and destination slogan, and the label stack includesM link tags, the value of the TTL is more than or equal to M+2, and the source IP address detects for the networkThe IP address of equipment, wherein, M is the network detection device to the hop count of network node to be detected, M>=1, K are the quantity of equative route of the network node to be detected to the purpose IP address, K >=2, N>=K, M, N and K are positive integer;The label stack of N number of detection messages is identical, N number of detectionThe TTL of message is identical, and the source IP address of N number of detection messages is identical, N number of detection messagesPurpose IP address is identical;The port set of any two detection messages is different in N number of detection messages;
CN201610130616.XA2016-03-082016-03-08Method, device and system for detecting equivalent multipath routing functionActiveCN107171882B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610130616.XACN107171882B (en)2016-03-082016-03-08Method, device and system for detecting equivalent multipath routing function

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610130616.XACN107171882B (en)2016-03-082016-03-08Method, device and system for detecting equivalent multipath routing function

Publications (2)

Publication NumberPublication Date
CN107171882Atrue CN107171882A (en)2017-09-15
CN107171882B CN107171882B (en)2021-02-09

Family

ID=59848648

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610130616.XAActiveCN107171882B (en)2016-03-082016-03-08Method, device and system for detecting equivalent multipath routing function

Country Status (1)

CountryLink
CN (1)CN107171882B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108111422A (en)*2017-12-292018-06-01北京明朝万达科技股份有限公司A kind of data high-speed multichannel retransmission method and device based on DPDK
CN109194575A (en)*2018-08-232019-01-11新华三技术有限公司Route selection method and device
CN109412851A (en)*2018-10-262019-03-01迈普通信技术股份有限公司Link layer path detection method, apparatus and system
CN110636001A (en)*2018-06-252019-12-31华为技术有限公司 Method and network node for sending network performance parameters, calculating network performance
CN110784378A (en)*2019-11-042020-02-11盛科网络(苏州)有限公司Method and device for realizing accurate flow balance by using TWAMP (two way operational amplifier)
CN110858810A (en)*2018-08-242020-03-03中国移动通信集团四川有限公司Network link state monitoring method, device, system and medium
CN112398732A (en)*2019-08-122021-02-23迈普通信技术股份有限公司Message processing method, device and system
CN112751727A (en)*2020-12-232021-05-04新华三技术有限公司Method for detecting link and network equipment
CN113472647A (en)*2021-06-112021-10-01新华三信息安全技术有限公司Message forwarding method and device
CN113726601A (en)*2021-08-202021-11-30苏州浪潮智能科技有限公司Network state monitoring method and related device
CN114006829A (en)*2020-07-142022-02-01瞻博网络公司Synthesizing detection parameters based on historical data
CN114205221A (en)*2020-08-262022-03-18北京华为数字技术有限公司 A kind of fault inquiry method and device
US11570285B2 (en)2017-12-272023-01-31Huawei Technologies Co., Ltd.Packet processing method, network node, and system
CN116389350A (en)*2022-12-052023-07-04京东科技信息技术有限公司Route detection method and device for data center network

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1815970A (en)*2005-02-012006-08-09华为技术有限公司Method for detecting network chain fault and positioning said fault
CN101075970A (en)*2007-07-192007-11-21杭州华三通信技术有限公司Method and apparatus for selecting router
CN102177681A (en)*2011-04-212011-09-07华为技术有限公司 Method and system for detecting faults
CN103607301A (en)*2013-11-182014-02-26杭州华三通信技术有限公司Link fault protection switching method and device under ECMP mode
US20140211794A1 (en)*2013-01-312014-07-31Daniel C. FrostSignaling Using a Time-to-Live (TTL) Field of a Packet
US20150029872A1 (en)*2013-07-242015-01-29Cisco Technology, Inc.Path-ping and ecmp-traceroute for ipv6 overlay virtualized networks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1815970A (en)*2005-02-012006-08-09华为技术有限公司Method for detecting network chain fault and positioning said fault
CN101075970A (en)*2007-07-192007-11-21杭州华三通信技术有限公司Method and apparatus for selecting router
CN102177681A (en)*2011-04-212011-09-07华为技术有限公司 Method and system for detecting faults
US20140211794A1 (en)*2013-01-312014-07-31Daniel C. FrostSignaling Using a Time-to-Live (TTL) Field of a Packet
US20150029872A1 (en)*2013-07-242015-01-29Cisco Technology, Inc.Path-ping and ecmp-traceroute for ipv6 overlay virtualized networks
CN103607301A (en)*2013-11-182014-02-26杭州华三通信技术有限公司Link fault protection switching method and device under ECMP mode

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A.BELT,A.KIRSTADTER,A.PARDICO,THOMASCSH WABE: "Resilient Routing Using MPLS and ECMP", 《2004 WORKSHOP ON HIGH PERFORMANCE SWITCHING AND ROUTING》*
田少禧,王 晟: "基于ECMP改进模型的路由优化问题的研究", 《信息通信》*

Cited By (24)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US11876883B2 (en)2017-12-272024-01-16Huawei Technologies Co., Ltd.Packet processing method, network node, and system
US11570285B2 (en)2017-12-272023-01-31Huawei Technologies Co., Ltd.Packet processing method, network node, and system
CN108111422A (en)*2017-12-292018-06-01北京明朝万达科技股份有限公司A kind of data high-speed multichannel retransmission method and device based on DPDK
CN110636001A (en)*2018-06-252019-12-31华为技术有限公司 Method and network node for sending network performance parameters, calculating network performance
US12231316B2 (en)2018-06-252025-02-18Huawei Technologies Co., Ltd.Network performance parameter sending method, network performance calculation method, and network node
US11792100B2 (en)2018-06-252023-10-17Huawei Technologies Co., Ltd.Network performance parameter sending method, network performance calculation method, and network node
CN109194575A (en)*2018-08-232019-01-11新华三技术有限公司Route selection method and device
CN109194575B (en)*2018-08-232021-08-06新华三技术有限公司Routing method and device
CN110858810A (en)*2018-08-242020-03-03中国移动通信集团四川有限公司Network link state monitoring method, device, system and medium
CN109412851B (en)*2018-10-262022-05-17迈普通信技术股份有限公司Link layer path detection method, device and system
CN109412851A (en)*2018-10-262019-03-01迈普通信技术股份有限公司Link layer path detection method, apparatus and system
CN112398732B (en)*2019-08-122023-09-12迈普通信技术股份有限公司Message processing method, device and system
CN112398732A (en)*2019-08-122021-02-23迈普通信技术股份有限公司Message processing method, device and system
CN110784378B (en)*2019-11-042021-05-04盛科网络(苏州)有限公司Method and device for realizing accurate flow balance by using TWAMP (two way operational amplifier)
CN110784378A (en)*2019-11-042020-02-11盛科网络(苏州)有限公司Method and device for realizing accurate flow balance by using TWAMP (two way operational amplifier)
CN114006829A (en)*2020-07-142022-02-01瞻博网络公司Synthesizing detection parameters based on historical data
US12255798B2 (en)2020-07-142025-03-18Juniper Networks, Inc.Synthesizing probe parameters based on historical data
CN114205221A (en)*2020-08-262022-03-18北京华为数字技术有限公司 A kind of fault inquiry method and device
CN114205221B (en)*2020-08-262024-01-02北京华为数字技术有限公司Fault query method and device
CN112751727A (en)*2020-12-232021-05-04新华三技术有限公司Method for detecting link and network equipment
CN113472647A (en)*2021-06-112021-10-01新华三信息安全技术有限公司Message forwarding method and device
CN113726601A (en)*2021-08-202021-11-30苏州浪潮智能科技有限公司Network state monitoring method and related device
CN113726601B (en)*2021-08-202023-08-08苏州浪潮智能科技有限公司 A network status monitoring method and related device
CN116389350A (en)*2022-12-052023-07-04京东科技信息技术有限公司Route detection method and device for data center network

Also Published As

Publication numberPublication date
CN107171882B (en)2021-02-09

Similar Documents

PublicationPublication DateTitle
CN107171882A (en)Detect the method, apparatus and system of equal cost multipath routing function
US10659359B2 (en)Method and device for checking forwarding tables of network routers
US8111649B1 (en)Method and apparatus for enabling a host to influence how a packet is routed through a network
Zhang et al.A Transport Layer Approach for Improving End-to-End Performance and Robustness Using Redundant Paths.
EP2589189B1 (en)Method and apparatus for dissemination of information between routers
US20220124025A1 (en)Method for forwarding packet in data center network and related apparatus
CN104852826B (en)A kind of loop detecting method and device
CN109981471A (en)A kind of method, apparatus and system for alleviating congestion
US20170195203A1 (en)Method, apparatus, and system for implementing packet loss detection
JP2021534669A (en) Packet processing method and gateway device
WO2022127698A1 (en)Congestion control method and network device
EP4398535A1 (en)Fault processing method, and related device and system
WO2011095017A1 (en)Method and routing device for implementing load sharing
CN105634776B (en) A method and device for determining a packet forwarding interface
CN101616078A (en) A method for discovering the maximum transmission unit of a path, a router and a node device
US11456943B2 (en)Packet transmission method and apparatus
CN107294743A (en)A kind of network path detection method, controller and the network equipment
CN103475507B (en)Forwarding-table item fault detection method and device
CN110519103A (en)A kind of Fault Locating Method of heterogeneous network, device and terminal
CN107786386A (en)To for verifying that the two-way converting of multicast connection detects(BFD)The selectivity transmission of message
CN104506369A (en)Packet loss position detecting method and device
CN107846291A (en)Message processing method, Fault Locating Method and the network equipment
WO2013053337A1 (en)Implementing lsp switching
US20230198897A1 (en)Method, network device, and system for controlling packet sending
KR20220007689A (en) Bit error notification method and related device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp