[go: up one dir, main page]

WO2017000566A1 - 一种获取设备接口mru值的方法及装置 - Google Patents

一种获取设备接口mru值的方法及装置 Download PDF

Info

Publication number
WO2017000566A1
WO2017000566A1 PCT/CN2016/074275 CN2016074275W WO2017000566A1 WO 2017000566 A1 WO2017000566 A1 WO 2017000566A1 CN 2016074275 W CN2016074275 W CN 2016074275W WO 2017000566 A1 WO2017000566 A1 WO 2017000566A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual link
value
udp packet
mru
icmp
Prior art date
Application number
PCT/CN2016/074275
Other languages
English (en)
French (fr)
Inventor
何建军
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017000566A1 publication Critical patent/WO2017000566A1/zh

Links

Images

Definitions

  • This document relates to, but is not limited to, dynamic routing technology, and more particularly to a method and apparatus for obtaining a Maximum Receive Unit (MRU) value of a device interface.
  • MRU Maximum Receive Unit
  • the dynamic routing protocol mainly includes a distance vector routing algorithm and a link state routing algorithm.
  • Distance vector routing algorithms include Routing Information Protocol (RIP) and Border Gateway Protocol (BGP).
  • Link state routing algorithms include Open Shortest Path First (OSPF) and intermediate systems.
  • OSPF Open Shortest Path First
  • ISIS Intermediate System-to-Intermediate System
  • each router maintains a table listing the currently known best paths to each destination, which are constantly updated by exchanging information between neighbors. Ultimately each router has the best path to reach each destination.
  • the distance vector routing algorithm has certain shortcomings, for example, when the network topology changes, the distance vector routing algorithm takes too long to converge to the state, and thus the link state routing algorithm gradually emerges.
  • the neighbors are discovered by sending and receiving HELLO packets, and the link state database (LSDB, Link State Database) is synchronized between the neighbors. After the LSDB synchronization is completed, the local router uses the LSDB to construct the shortest path first. (SPF, Shortest Path First) tree, which finally calculates the best path to reach each destination address.
  • SPF Shortest Path First
  • FIG. 1 is a schematic diagram of a virtual link neighbor in the related art. As shown in FIG. 1 , a virtual link neighbor is between router 1 and router 3.
  • the sender and receiver receive the Maximum Transmission Unit (MTU) value and the maximum receiving unit (MRU, Maximum) through the database digest (DD, Database Description) message.
  • MTU Maximum Transmission Unit
  • MRU Maximum receiving unit
  • DD Database Description
  • the sending end sends the DD packet to the receiving end; the receiving end receives the DD packet, and if it is determined that the value of the MTU field of the interface in the DD packet is greater than the MRU value of the receiving interface, If the value of the MTU field of the DD packet is less than or equal to the MRU value of the receiving interface, the DD packet is returned to the sending end, and the DD packet is received by the sending end. After that, the LSDB is synchronized.
  • the MTU field of the interface in the DD packet sent by the sending end to the receiving end is the MTU value of the transmitting end, and the MTU value and the MRU value between the transmitting end and the receiving end are implemented.
  • the MTU field of the interface in the DD packet sent by the sender to the receiver is 0.
  • the negotiation between the MTU and the MRU cannot be implemented between the sender and the receiver.
  • the receiving end cannot receive the packet from the transmitting end.
  • the router 3 is in the process of performing the LSDB synchronization. It may not be able to receive the packets sent by Router 1.
  • the embodiment of the invention provides a method and a device for acquiring an MRU value of a device interface, which can implement negotiation between an MTU value and an MRU value.
  • the method of the present invention provides a method for obtaining a maximum receiving unit MRU value of a device interface, including:
  • the virtual link source device sends a user datagram protocol UDP packet with a lifetime TTL of 1 to the next hop device on the virtual link.
  • the destination Internet Protocol IP address of the UDP packet is the IP address of the virtual link neighbor.
  • the virtual link source device When the virtual link source device receives the Internet Control Message Protocol (ICMP) timeout error packet, it saves the unused field MRU value in the ICMP timeout error packet and continues to send the TTL ratio to its next hop device on the virtual link.
  • ICMP Internet Control Message Protocol
  • the method further includes: when the source device of the virtual link receives the ICMP destination unreachable packet,
  • the minimum value of the MRU value of all the unused fields is obtained.
  • the minimum value of the obtained MRU value is smaller than the MTU value of the maximum transmission unit of the virtual link outbound interface, and the MTU value of the outbound interface of the virtual link is reconfigured.
  • the MTU value of the interface for reconfiguring the virtual link of the virtual link includes:
  • the MTU value of the virtual link out interface is configured to be less than or equal to a minimum value of the obtained MRU value.
  • the embodiment of the present invention further provides a method for obtaining a maximum receiving unit MRU value of a device interface, including:
  • the next hop device on the virtual link of the virtual link source device receives the UDP packet sent by the source device of the virtual link, and calculates the difference between the TTL and the lifetime of the UDP packet.
  • the virtual link source When the next hop device on the virtual link of the virtual link source device determines that the calculated difference is 0, and the destination Internet Protocol IP address in the UDP packet is not its own IP address, the virtual link source is used.
  • the device sends an Internet Control Message Protocol (ICMP) timeout error message.
  • ICMP Internet Control Message Protocol
  • the unused field in the ICMP timeout error message is the maximum receiving unit MRU value of the receiving interface.
  • the method further includes: determining, by the next hop device on the virtual link of the virtual link source device, that the calculated difference is 0, and the destination IP address in the UDP packet When it is its own IP address,
  • the device When the next hop device on the virtual link of the virtual link source device determines that the destination port number in the UDP packet does not exist, the device sends an ICMP destination unreachable message to the virtual link source device.
  • the unused field in the ICMP destination unreachable packet is the MRU value of the receiving interface.
  • the method further includes: when the next hop device on the virtual link of the virtual link source device determines that the calculated difference is not 0,
  • the next hop device on the virtual link of the virtual link source device forwards the UDP packet to the next hop device on the virtual link; wherein the TTL of the forwarded UDP packet is calculated. The difference.
  • the embodiment of the present invention further provides a virtual link source device, including: a first sending module, a first receiving module, and a storage module;
  • the first sending module is configured to send a user datagram protocol UDP packet with a TTL of 1 to the next hop device of the virtual link; and when the storage module saves the unused field MRU value in the ICMP timeout error packet, the continuation The next hop device on the virtual link sends a UDP packet whose TTL is 1 greater than the TTL of the UDP packet sent last time.
  • the first receiving module is configured to receive an ICMP timeout error message
  • the storage module is configured to: when the first receiving module receives the ICMP timeout error message, save the unused field MRU value in the ICMP timeout error message;
  • the destination IP address of the UDP packet is the IP address of the virtual link neighbor.
  • the first receiving module is further configured to:
  • the storage module is further configured to:
  • the virtual chain source device further includes a configuration module:
  • the configuration module is configured to obtain the minimum value of the MRU value of all unused fields, and determine that the minimum value obtained is smaller than the MTU value of the maximum transmission unit of the virtual link outbound interface, and reconfigure the MTU value of the outbound interface of the virtual link.
  • the configuration module is set to:
  • the embodiment of the present invention further provides a device on a virtual link, including: a second receiving module and a second sending module;
  • the second receiving module is configured to receive the UDP packet
  • the second sending module calculates the difference between the TTL and the lifetime of the UDP packet, and determines that the calculated difference is 0, and the destination Internet Protocol IP address in the UDP packet is not its own IP address.
  • the source device of the virtual link sends an ICMP timeout error packet.
  • the unused field in the ICMP timeout error packet is the maximum receiving unit MRU value of the receiving interface.
  • the second sending module is further configured to:
  • the end device sends an ICMP destination unreachable packet.
  • the unused field in the ICMP destination unreachable packet is the MRU value of the receiving interface.
  • the second sending module is further configured to:
  • the UDP packet is forwarded to the next hop device of the virtual link.
  • the TTL of the forwarded UDP packet is the calculated difference.
  • the technical solution provided by the present invention includes: the virtual link source device sends a UDP packet with a TTL of 1 to the next hop device of the virtual link; wherein the destination IP address of the UDP packet is The IP address of the virtual link neighbor; when the sender receives the ICMP timeout error packet, it saves the unused field MRU value in the ICMP timeout error packet and continues to send the TTL ratio to the next hop device on the virtual link.
  • the virtual link source device obtains the MRU value of the receiving interface of other devices on the virtual link by using UDP packets, and implements negotiation between the MTU value and the MRU value.
  • FIG. 1 is a schematic diagram of a virtual link neighbor in the related art
  • FIG. 2 is a flowchart of a method for obtaining an MRU value of a device interface according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a virtual chain source device according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a device on a virtual link according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for obtaining a device interface MRU value, including:
  • Step 200 The virtual link source device sends the lifetime to the next hop device on the virtual link.
  • TTL Time To Live
  • UDP User Datagram Protocol
  • the destination Internet Protocol (IP) address of the UDP packet is the IP address of the virtual link neighbor.
  • IP Internet Protocol
  • the destination port number of the UDP packet is a value that is not used by a general application, such as a value above 30000.
  • the virtual link source device can send a UDP packet to the next hop device on the virtual link by using a route tracking (TraceRoute) application, which is a well-known technology and is not used by those skilled in the art.
  • route tracking TraceRoute
  • the scope of protection of the present invention is limited and will not be described herein.
  • the IP address of the virtual link neighbor is forwarded to the TraceRoute application when the TraceRoute application is invoked.
  • Step 201 The next hop device on the virtual link of the virtual link source device receives the UDP packet sent by the source device of the virtual link, and calculates the difference between the TTL and the UDP packet.
  • Step 202 When the next hop device on the virtual link of the virtual link source device determines that the calculated difference is 0, and the IP address in the UDP packet is not its own IP address, the virtual link source device Sends an Internet Control Message Protocol (ICMP) timeout error message.
  • ICMP Internet Control Message Protocol
  • the unused field in the ICMP timeout error packet is the MRU value of the receiving interface.
  • Table 1 shows the structure of an ICMP timeout error message or an ICMP destination unreachable message. As shown in Table 1, an ICMP timeout error message or an ICMP destination unreachable message has an unused field of 4 bytes in length.
  • Step 203 When the source device of the virtual link receives the ICMP timeout error packet, save the unused field MRU value in the ICMP timeout error packet, and continue to the next hop of the virtual link.
  • the device sends UDP packets with a TTL greater than the TTL of the last UDP packet sent.
  • the method of the embodiment of the present invention further includes: when the next hop device on the virtual link of the virtual link source device determines that the calculated difference is 0, and the destination IP address in the UDP packet is its own IP address,
  • the next hop device on the virtual link of the virtual link source device sends an ICMP destination unreachable packet to the source device of the virtual link when it determines that the destination port number in the UDP packet does not exist.
  • the unused field in the ICMP destination unreachable packet is the MRU value of the receiving interface.
  • the method of the embodiment of the present invention further includes: when receiving the ICMP destination unreachable packet, the source device of the virtual chain saves the unused field MRU value in the ICMP destination unreachable packet; and obtains all unused unused field MRUs. The minimum value of the value is determined. The minimum value of the obtained MRU value is smaller than the MTU value of the outbound interface of the virtual link.
  • the MTU value of the outbound interface of the virtual link is configured to: set the MTU value of the outbound interface of the virtual link to be less than or equal to the minimum value of the obtained MRU value.
  • the method of the embodiment of the present invention further includes: when the next hop device on the virtual link of the virtual link source device determines that the calculated difference is not 0,
  • the next hop device on the virtual link of the virtual link source device forwards the UDP packet to the next hop device.
  • the TTL of the forwarded UDP packet is the calculated difference.
  • the virtual link source device obtains the MRU value of the receiving interface of other devices on the virtual link by using UDP packets, and implements negotiation between the MTU value and the MRU value.
  • the steps 200 and 203 are performed by the virtual chain source device, and the UDP packet transmission and the ICMP timeout error packet can be executed through the transceiver of the virtual chain source device.
  • the TTL setting is performed; the unused field MRU value in the ICMP timeout error message is stored through the storage medium.
  • the step 201 and the step 202 are performed by the next hop device on the virtual link of the virtual link source device, and the UDP packet can be received by the transceiver on the next hop device on the virtual link of the virtual link source device.
  • the processor performs the calculation of the difference, the calculated difference of 0, and the judgment of whether the IP address in the UDP packet is its own IP address.
  • an embodiment of the present invention further provides a virtual link source device, including: a first sending module, a first receiving module, and a storage module;
  • the first sending module is configured to send a UDP packet with a TTL of 1 to the next hop device of the virtual link; when the storage module saves the unused field MRU value in the ICMP timeout error packet, the continuation is performed on the virtual link.
  • the next hop device of the UDP packet whose TTL is 1 greater than the TTL of the UDP packet sent last time;
  • the first receiving module is configured to receive an ICMP timeout error message
  • the storage module is configured to: when receiving the ICMP timeout error message, the first receiving module saves the unused field MRU value in the ICMP timeout error message, and sends a notification message to the first sending module;
  • the destination IP address of the UDP packet is the IP address of the virtual link neighbor.
  • the first receiving module is further configured to:
  • the storage module is also set to:
  • the unused field MRU value in the ICMP destination unreachable message is saved.
  • the virtual link source device also includes a configuration module:
  • the configuration module is configured to obtain the minimum value of the MRU value of all the unused fields, and determine that the minimum value obtained is smaller than the MTU value of the outbound interface of the virtual link.
  • the configuration module is set to:
  • an embodiment of the present invention further provides a device on a virtual link, including: a second receiving module and a second sending module;
  • the second receiving module is configured to receive the UDP packet
  • the second sending module is configured to calculate a difference between the TTL and the UDP packet, and determine that the calculated difference is 0, and the destination IP address in the UDP packet is not its own IP address, and the virtual chain source is The end device sends an ICMP timeout error message.
  • the unused field in the ICMP timeout error message is the maximum receiving unit MRU value of the receiving interface.
  • the device on the virtual link in the embodiment of the present invention includes: a next hop device on the virtual link of the virtual link source device.
  • the second sending module is further configured to:
  • the ICMP destination unreachable report is sent to the virtual chain source device.
  • the unused field in the ICMP destination unreachable message is the MRU value of the receiving interface.
  • the second sending module is further configured to:
  • the UDP packet is forwarded to the next hop device of the virtual link.
  • the TTL of the forwarded UDP packet is the calculated difference.
  • the above technical solution implements negotiation between the MTU value and the MRU value.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种获取设备接口最大接收单元MRU值的方法,包括:虚链源端设备向虚拟链路上自身的下一跳设备发送生存时间TTL为1的用户数据报协议UDP报文;其中,UDP报文的目的互联网协议IP地址为虚链邻居的IP地址;当发送端接收到因特网控制报文协议ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值,并继续向虚拟链路上自身的下一跳设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文。通过本发明的方案,虚链源端设备采用UDP报文获取到虚拟链路上其他设备接收接口的MRU值,实现了MTU值和MRU值之间的协商。

Description

一种获取设备接口MRU值的方法及装置 技术领域
本文涉及但不限于动态路由技术,尤指一种获取设备接口最大接收单元(MRU,Maximum Receive Unit)值的方法和装置。
背景技术
动态路由协议主要包括距离矢量路由算法和链路状态路由算法。距离矢量路由算法包括路由信息协议(RIP,Routing Information Protocol)、边界网关协议(BGP,Border Gateway Protocol);链路状态路由算法包括开放式最短路径优先(OSPF,Open Shortest Path First)、中间系统—中间系统(ISIS,Intermediate System-to-Intermediate System)。在距离矢量路由算法中,每一台路由器维护一张表,表中列举了当前已知的自身到每个目的地的最佳路径,这些表通过邻居之间的相互交换信息而不断被更新,最终每台路由器都有到达每个目的地的最佳路径。
由于距离矢量路由算法存在一定的缺点,比如当网络拓扑结构发生变化后距离矢量路由算法需要太长时间才能收敛到状态,由此逐渐出现了链路状态路由算法。在链路状态路由算法中,通过发送和接收HELLO报文来发现邻居,邻居之间进行链路状态数据库(LSDB,Link State Database)的同步,LSDB同步完成后本地路由器利用LSDB来构建最短路径优先(SPF,Shortest Path First)树,最终计算出自身到达每一个目的地址的最佳路径。
其中,OSPF协议既可以在直连设备之间建立邻居关系,也可以跨越多台设备在非直连设备之间建立邻居关系,即虚链邻居。图1为相关技术中虚链邻居的示意图,如图1所示,路由器1和路由器3之间为虚链邻居。
在邻居之间进行LSDB的同步之前,发送端和接收端之间会通过数据库摘要(DD,Database Description)报文来进行最大传输单元(MTU,Maximum Transmission Unit)值和最大接收单元(MRU,Maximum Receive Unit)值的协商。具体地,发送端将DD报文发送给接收端;接收端接收到DD报文,如果判断出DD报文中的接口MTU字段的值大于自身接收接口的MRU值, 则结束本流程,不进行LSDB的同步;如果判断出DD报文中的接口MTU字段的值小于或等于自身接收接口的MRU值,则向发送端返回DD报文,发送端接收到DD报文后,进行LSDB的同步。
上述过程中,对于直连设备,发送端向接收端(即发送端的邻居)发送的DD报文中的接口MTU字段为发送端的MTU值,实现了发送端和接收端之间MTU值和MRU值的协商。对于虚链邻居,由于发送端向接收端发送的DD报文中的接口MTU字段为0,发送端和接收端之间无法实现MTU值和MRU值之间的协商,从而有可能导致发送端和接收端在进行LSDB的同步过程中,接收端无法接收发送端的报文。仍以图1的虚链邻居为例,如果路由器1的接口1的MTU值大于路由器2的接口2的MRU值或路由器3的接口3的MRU值,则在进行LSDB的同步过程中,路由器3可能无法接收路由器1发送的报文。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种获取设备接口MRU值的方法和装置,能够实现MTU值和MRU值之间的协商。
其中,本发明实施例提供一种获取设备接口最大接收单元MRU值的方法,包括:
虚链源端设备向虚拟链路上自身的下一跳设备发送生存时间TTL为1的用户数据报协议UDP报文;其中,UDP报文的目的互联网协议IP地址为虚链邻居的IP地址;
当虚链源端设备接收到因特网控制报文协议ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值,并继续向虚拟链路上自身的下一跳设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文。
可选的,所述方法还包括:当所述虚链源端设备接收到ICMP目的不可达报文时,
保存所述ICMP目的不可达报文中的未使用字段MRU值;
获取保存的所有未使用字段MRU值的最小值,判断出获得的MRU值的最小值小于自身虚链出接口的最大传输单元MTU值,重新配置自身虚链出接口的MTU值。
可选的,所述重新配置自身虚链出接口的MTU值包括:
将所述自身虚链出接口的MTU值配置为小于或等于所述获得的MRU值的最小值。
本发明实施例还提出了一种获取设备接口的最大接收单元MRU值的方法,包括:
处于虚链源端设备的虚拟链路上的下一跳设备接收虚链源端设备发送的UDP报文,计算UDP报文的生存时间TTL和1之间的差值;
当处于虚链源端设备的虚拟链路上的下一跳设备判断出计算得到的差值为0,且UDP报文中的目的互联网协议IP地址不是自身的IP地址时,向虚链源端设备发送因特网控制报文协议ICMP超时差错报文;其中,ICMP超时差错报文中的未使用字段为自身接收接口的最大接收单元MRU值。
可选的,所述方法还包括:当处于虚链源端设备的虚拟链路上的下一跳设备判断出所述计算得到的差值为0,且所述UDP报文中的目的IP地址为自身的IP地址时,
所述处于虚链源端设备的虚拟链路上的下一跳设备判断出所述UDP报文中的目的端口号不存在时,向所述虚链源端设备发送ICMP目的不可达报文;其中,ICMP目的不可达报文中的未使用字段为自身接收接口的MRU值。
可选的,所述方法还包括:当处于虚链源端设备的所述虚拟链路上的下一跳设备判断出计算得到的差值不为0时,
所述处于虚链源端设备的虚拟链路上的下一跳设备向所述虚拟链路上自身的下一跳设备转发所述UDP报文;其中,转发的UDP报文的TTL为计算得到的差值。
本发明实施例还提出了一种虚链源端设备,包括:第一发送模块、第一接收模块和存储模块;其中,
第一发送模块设置为,向虚拟链路上自身的下一跳设备发送TTL为1的用户数据报协议UDP报文;存储模块保存ICMP超时差错报文中的未使用字段MRU值时,继续向虚拟链路上自身的下一跳设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文;
第一接收模块设置为,接收ICMP超时差错报文;
存储模块设置为,第一接收模块接收到ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值;
UDP报文的目的IP地址为虚链邻居的IP地址。
可选的,所述第一接收模块还设置为:
接收ICMP目的不可达报文;
所述存储模块还设置为:
保存所述ICMP目的不可达报文中的未使用字段MRU值;
所述虚链源端设备还包括配置模块:
配置模块设置为,获取保存的所有未使用字段的MRU值的最小值,判断出获得的最小值小于自身虚链出接口的最大传输单元MTU值,重新配置自身虚链出接口的MTU值。
可选的,所述配置模块是设置为:
获取保存的所有未使用字段的MRU值的最小值,判断出获得的MRU值的最小值小于自身虚链出接口的最大传输单元MTU值,将所述自身虚链出接口的MTU值配置为小于或等于所述获得的MRU值的最小值。
本发明实施例还提出了一种虚拟链路上的设备,包括:第二接收模块和第二发送模块;其中,
第二接收模块设置为,接收UDP报文;
第二发送模块,计算UDP报文的生存时间TTL和1之间的差值;判断出计算得到的差值为0,且UDP报文中的目的互联网协议IP地址不是自身的IP地址时,向虚链源端设备发送ICMP超时差错报文;ICMP超时差错报文中的未使用字段为自身接收接口的最大接收单元MRU值。
可选的,所述第二发送模块还设置为:
判断出所述计算得到的差值为0,且所述UDP报文中的目的IP地址为自身的IP地址,判断出所述UDP报文中的目的端口号不存在,向所述虚链源端设备发送ICMP目的不可达报文;其中,ICMP目的不可达报文中的未使用字段为自身接收接口的MRU值。
可选的,所述第二发送模块还设置为:
判断出计算得到的差值不为0,向所述虚拟链路上自身的下一跳设备转发所述UDP报文;其中,转发的UDP报文的TTL为计算得到的差值。
与相关技术相比,本发明提供的技术方案,包括:虚链源端设备向虚拟链路上自身的下一跳设备发送TTL为1的UDP报文;其中,UDP报文的目的IP地址为虚链邻居的IP地址;当发送端接收到ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值,并继续向虚拟链路上自身的下一跳设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文。通过本发明的方案,虚链源端设备采用UDP报文获取到虚拟链路上其他设备的接收接口的MRU值,实现了MTU值和MRU值之间的协商。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为相关技术中的虚链邻居的示意图;
图2为本发明实施例获取设备接口MRU值的方法的流程图;
图3为本发明实施例虚链源端设备的结构组成示意图;
图4为本发明实施例虚拟链路上的设备的结构组成示意图。
本发明的实施方式
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
参见图2,本发明实施例提出了一种获取设备接口MRU值的方法,包括:
步骤200、虚链源端设备向虚拟链路上自身的下一跳设备发送生存时间 (TTL,Time To Live)为1的用户数据报协议(UDP,User Datagram Protocol)报文。
本发明实施例中,UDP报文的目的互联网协议(IP,Internet Protocol)地址为虚链邻居的IP地址。
可选的,UDP报文的目的端口号为一般应用程序不使用的数值,如30000以上的数值。
可选的,虚链源端设备可以通过调用路由跟踪(TraceRoute)应用的方式来向虚拟链路上自身的下一跳设备发送UDP报文,具体实现属于本领域技术人员的公知技术,并不用于限定本发明的保护范围,这里不再赘述。
其中,在调用TraceRoute应用时,将虚链邻居的IP地址传入TraceRoute应用中。
步骤201、处于虚链源端设备的虚拟链路上的下一跳设备接收虚链源端设备发送的UDP报文,计算UDP报文的TTL和1之间的差值。
步骤202、当处于虚链源端设备的虚拟链路上的下一跳设备判断出计算得到的差值为0,且UDP报文中IP地址不是自身的IP地址时,向虚链源端设备发送因特网控制报文协议(ICMP,Internet Control Message Protocol)超时差错报文。
可选的,ICMP超时差错报文中的未使用字段为自身接收接口的MRU值。
表1为ICMP超时差错报文或ICMP目的不可达报文的结构示意图,如表1所示,ICMP超时差错报文或ICMP目的不可达报文中有4个字节长度的未使用字段。
Figure PCTCN2016074275-appb-000001
表1
步骤203、当虚链源端设备接收到ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值,并继续向虚拟链路上自身的下一跳 设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文。
本发明实施例方法还包括:处于虚链源端设备的虚拟链路上的下一跳设备判断出计算得到的差值为0,且UDP报文中的目的IP地址为自身的IP地址时,
处于虚链源端设备的虚拟链路上的下一跳设备判断出UDP报文中的目的端口号不存在时,向虚链源端设备发送ICMP目的不可达报文;
可选的,ICMP目的不可达报文中的未使用字段为自身接收接口的MRU值;
可选的,本发明实施例方法还包括:虚链源端设备接收到ICMP目的不可达报文时,保存ICMP目的不可达报文中的未使用字段MRU值;获取保存的所有未使用字段MRU值的最小值,判断出获得的MRU值的最小值小于自身虚链出接口的MTU值,重新配置自身虚链出接口的MTU值。
其中,判断UDP报文中的目的端口号是否存在属于本领域技术人员的公知技术,并不用于限定本发明的保护范围,这里不再赘述。
可选的,重新配置自身虚链出接口的MTU值包括:将自身虚链出接口的MTU值配置为小于或等于获得的MRU值的最小值。
本发明实施例方法还包括:当处于虚链源端设备的虚拟链路上的下一跳设备判断出计算得到的差值不为0时,
处于虚链源端设备的虚拟链路上的下一跳设备向自身的下一跳设备转发UDP报文;其中,转发的UDP报文的TTL为计算得到的差值。
通过本发明实施例的方案,虚链源端设备采用UDP报文获取到虚拟链路上其他设备的接收接口MRU值,实现了MTU值和MRU值之间的协商。
需要说明的是,本发明实施例中,步骤200、203由虚链源端设备执行,可以通过虚链源端设备的收发装置执行UDP报文的发送和ICMP超时差错报文,通过中央处理器执行TTL的设置;通过存储介质存储ICMP超时差错报文中的未使用字段MRU值。步骤201和步骤202由处于虚链源端设备的虚拟链路上的下一跳设备执行,可以通过处于虚链源端设备的虚拟链路上的下一跳设备上的收发装置接收UDP报文、发送ICMP超时差错报文,通过中央 处理器进行差值的计算、计算得到的差值为0的判断,及UDP报文中IP地址是否是自身的IP地址的判断。
参见图3,本发明实施例还提出了一种虚链源端设备,包括:第一发送模块、第一接收模块和存储模块;其中,
第一发送模块设置为,向虚拟链路上自身的下一跳设备发送TTL为1的UDP报文;存储模块保存ICMP超时差错报文中的未使用字段MRU值时,继续向虚拟链路上自身的下一跳设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文;
第一接收模块设置为,接收到ICMP超时差错报文;
存储模块设置为,第一接收模块接收到ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值,向第一发送模块发送通知消息;
UDP报文的目的IP地址为虚链邻居的IP地址。
本发明实施例的虚链源端设备中,第一接收模块还设置为:
接收到ICMP目的不可达报文;
存储模块还设置为:
保存ICMP目的不可达报文中的未使用字段MRU值;
虚链源端设备还包括配置模块:
配置模块设置为,获取保存的所有未使用字段MRU值的最小值,判断出获得的最小值小于自身虚链出接口的MTU值,重新配置自身虚链出接口的MTU值。
本发明实施例的虚链源端设备中,配置模块是设置为:
获取保存的所有未使用字段MRU值的最小值,判断出获得的MRU值的最小值小于自身虚链出接口的最大传输单元MTU值,将自身虚链出接口的MTU值配置为小于或等于获得的MRU值的最小值。
参见图4,本发明实施例还提出了一种虚拟链路上的设备,包括:第二接收模块和第二发送模块;其中,
第二接收模块设置为,接收UDP报文;
第二发送模块设置为,计算UDP报文的TTL和1之间的差值;判断出计算得到的差值为0,且UDP报文中的目的IP地址不是自身的IP地址,向虚链源端设备发送ICMP超时差错报文;
ICMP超时差错报文中的未使用字段为自身接收接口的最大接收单元MRU值。
需要说明的是,本发明实施例虚拟链路上的设备包括:处于虚链源端设备的虚拟链路上的下一跳设备。
本发明实施例的虚拟链路上的设备中,第二发送模块还设置为:
判断出计算得到的差值为0,且UDP报文中的目的IP地址为自身的IP地址,判断出UDP报文中的目的端口号不存在,向虚链源端设备发送ICMP目的不可达报文,其中,ICMP目的不可达报文中的未使用字段为自身接收接口的MRU值。
本发明实施例的虚拟链路上的设备中,第二发送模块还设置为:
判断出计算得到的差值不为0,向虚拟链路上自身的下一跳设备转发UDP报文;其中,转发的UDP报文的TTL为计算得到的差值。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的每个模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。”
虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本 申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。
工业实用性
上述技术方案实现了MTU值和MRU值之间的协商。

Claims (13)

  1. 一种获取设备接口最大接收单元MRU值的方法,包括:
    虚链源端设备向虚拟链路上自身的下一跳设备发送生存时间TTL为1的用户数据报协议UDP报文;其中,UDP报文的目的互联网协议IP地址为虚链邻居的IP地址;
    当虚链源端设备接收到因特网控制报文协议ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值,并继续向虚拟链路上自身的下一跳设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文。
  2. 根据权利要求1所述的方法,所述方法还包括:所述虚链源端设备接收到ICMP目的不可达报文时,
    保存所述ICMP目的不可达报文中的未使用字段MRU值;
    获取保存的所有未使用字段MRU值的最小值,判断出获得的MRU值的最小值小于自身虚链出接口的最大传输单元MTU值,重新配置自身虚链出接口的MTU值。
  3. 根据权利要求2所述的方法,其中,所述重新配置自身虚链出接口的MTU值包括:
    将所述自身虚链出接口的MTU值配置为小于或等于所述获得的MRU值的最小值。
  4. 一种获取设备接口的最大接收单元MRU值的方法,包括:
    处于虚链源端设备的虚拟链路上的下一跳设备接收虚链源端设备发送的UDP报文,计算UDP报文的生存时间和1之间的差值;
    当处于虚链源端设备的虚拟链路上的下一跳设备判断出计算得到的差值为0,且UDP报文中的目的互联网协议IP地址不是自身的IP地址时,向虚链源端设备发送因特网控制报文协议ICMP超时差错报文;
    所述ICMP超时差错报文中的未使用字段为自身接收接口的最大接收单元MRU值。
  5. 根据权利要求4所述的方法,所述方法还包括:当所述处于虚链源端 设备的虚拟链路上的下一跳设备判断出所述计算得到的差值为0,且所述UDP报文中的目的IP地址为自身的IP地址时,
    所述处于虚链源端设备的虚拟链路上的下一跳设备判断出所述UDP报文中的目的端口号不存在时,向所述虚链源端设备发送ICMP目的不可达报文;
    其中,ICMP目的不可达报文中的未使用字段为自身接收接口的MRU值。
  6. 根据权利要求4或5所述的方法,所述方法还包括:所述处于虚链源端设备的虚拟链路上的下一跳设备判断出计算得到的差值不为0时,
    所述处于虚链源端设备的虚拟链路上的下一跳设备向自身的下一跳设备转发所述UDP报文;其中,转发的UDP报文的TTL为计算得到的所述差值。
  7. 一种虚链源端设备,包括:第一发送模块、第一接收模块和存储模块;其中,
    第一发送模块设置为,向虚拟链路上自身的下一跳设备发送TTL为1的UDP报文;存储模块保存ICMP超时差错报文中的未使用字段MRU值时,继续向虚拟链路上自身的下一跳设备发送TTL比上一次发送的UDP报文的TTL大1的UDP报文;
    第一接收模块设置为,接收ICMP超时差错报文;
    存储模块设置为,第一接收模块接收到ICMP超时差错报文时,保存ICMP超时差错报文中的未使用字段MRU值,向第一发送模块发送通知消息;
    UDP报文的目的IP地址为虚链邻居的IP地址。
  8. 根据权利要求7所述的虚链源端设备,所述第一接收模块还设置为:
    接收ICMP目的不可达报文;
    所述存储模块还设置为:
    保存所述ICMP目的不可达报文中的未使用字段MRU值;
    所述虚链源端设备还包括配置模块:
    配置模块设置为,获取保存的所有未使用字段的MRU值的最小值,判断出获得的最小值小于自身虚链出接口的最大传输单元MTU值,重新配置 自身虚链出接口的MTU值。
  9. 根据权利要求8所述的虚链源端设备,其中,所述配置模块是设置为:
    获取保存的所有未使用字段的MRU值的最小值,判断出获得的MRU值的最小值小于自身虚链出接口的最大传输单元MTU值,将所述自身虚链出接口的MTU值配置为小于或等于所述获得的MRU值的最小值。
  10. 一种虚拟链路上的设备,其特征在于,包括:第二接收模块和第二发送模块;其中,
    第二接收模块设置为,接收UDP报文;
    第二发送模块设置为,计算UDP报文的生存时间TTL和1之间的差值;判断出计算得到的差值为0,且UDP报文中的目的IP地址不是自身的IP地址时,向虚链源端设备发送ICMP超时差错报文;
    所述ICMP超时差错报文中的未使用字段为自身接收接口的最大接收单元MRU值。
  11. 根据权利要求10所述的虚拟链路上的设备,所述第二发送模块还设置为:
    判断出计算得到的所述差值为0,且所述UDP报文中的目的IP地址为自身的IP地址,判断出所述UDP报文中的目的端口号不存在,向所述虚链源端设备发送ICMP目的不可达报文;
    所述ICMP目的不可达报文中的未使用字段为自身接收接口的MRU值。
  12. 根据权利要求10或11所述的虚拟链路上的设备,所述第二发送模块还设置为:
    判断出计算得到的差值不为0,向所述自身的下一跳设备转发所述UDP报文;
    所述转发的UDP报文的TTL为计算得到的所述差值。
  13. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1~6中任一项所述的方法。
PCT/CN2016/074275 2015-07-01 2016-02-22 一种获取设备接口mru值的方法及装置 WO2017000566A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510379027.0 2015-07-01
CN201510379027.0A CN106330706A (zh) 2015-07-01 2015-07-01 一种获取设备接口mru值的方法和装置

Publications (1)

Publication Number Publication Date
WO2017000566A1 true WO2017000566A1 (zh) 2017-01-05

Family

ID=57607707

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/074275 WO2017000566A1 (zh) 2015-07-01 2016-02-22 一种获取设备接口mru值的方法及装置

Country Status (2)

Country Link
CN (1) CN106330706A (zh)
WO (1) WO2017000566A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191066A (zh) * 2019-06-14 2019-08-30 迈普通信技术股份有限公司 一种确定最大传输单元pmtu的方法、设备及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109347670B (zh) * 2018-10-24 2021-09-28 杭州数梦工场科技有限公司 路径追踪方法及装置、电子设备、存储介质
CN112995025B (zh) * 2021-02-05 2023-02-28 杭州迪普科技股份有限公司 路径追踪方法、装置、设备及计算机可读存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1536832A (zh) * 2003-04-04 2004-10-13 华为技术有限公司 在二层虚拟专用网络中处理超长报文的方法
WO2014050091A1 (en) * 2012-09-26 2014-04-03 Nec Corporation Communication system, communication method, information processing apparatus, communication control method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100375433C (zh) * 2003-11-13 2008-03-12 中兴通讯股份有限公司 动态发现IPsec隧道PMTU的方法
CN101510849B (zh) * 2009-03-18 2011-05-18 中国电信股份有限公司 获取传输路径上节点传输信息的方法和系统
US8121135B2 (en) * 2009-06-23 2012-02-21 Juniper Networks, Inc. Discovering path maximum transmission unit size
CN101695048B (zh) * 2009-10-29 2012-05-30 福建星网锐捷网络有限公司 隧道最大传输单元的发现处理方法与装置、路由器
CN103475596B (zh) * 2013-08-30 2016-08-17 广州市动景计算机科技有限公司 基于mtu值的中间件与移动终端的数据传输方法及系统

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1536832A (zh) * 2003-04-04 2004-10-13 华为技术有限公司 在二层虚拟专用网络中处理超长报文的方法
WO2014050091A1 (en) * 2012-09-26 2014-04-03 Nec Corporation Communication system, communication method, information processing apparatus, communication control method, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIE, XIREN, COMPUTER NETWORK, 31 January 2008 (2008-01-31) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191066A (zh) * 2019-06-14 2019-08-30 迈普通信技术股份有限公司 一种确定最大传输单元pmtu的方法、设备及系统

Also Published As

Publication number Publication date
CN106330706A (zh) 2017-01-11

Similar Documents

Publication Publication Date Title
CN107409093B (zh) 网络环境中针对路由反射器客户端的自动最优路由反射器根地址分配和快速故障转移
JP6250825B2 (ja) データネットワークに最大冗長木(maximally redundant tree)をデプロイする方法およびシステム
EP2869512B1 (en) Dynamic area filtering for link-state routing protocols
US10791053B2 (en) Service function chain SFC-based communication method, and apparatus
JP6047229B2 (ja) 情報中心ネットワークにおける名前ベースの近隣探索及びマルチホップサービス探索
US9668160B2 (en) Topology discovery based on SCTP/X2 snooping
CN106375231A (zh) 一种流量切换方法、设备及系统
US8667174B2 (en) Method and system for survival of data plane through a total control plane failure
CN104486236B (zh) 负载分担的方法和路由设备
CN105577543A (zh) 基于性能的路由方法和设备
CN105323163A (zh) 基于isis的路由计算方法及装置
US11805047B2 (en) Method and apparatus for controlling network traffic path
EP3157211B1 (en) Isis-based flooding method and device
WO2018036453A1 (zh) 一种sfc网络中同步拓扑信息的方法及路由网元
WO2017000566A1 (zh) 一种获取设备接口mru值的方法及装置
EP3166263B1 (en) Routing calculation method and device for trill isis
CN108075981B (zh) 一种链路状态数据包的传输方法及路由节点
US20160277283A1 (en) Calculating a shortest path first tree
WO2022160666A1 (zh) 一种信息泛洪方法及设备
WO2016078347A1 (zh) 一种trill网络分发树选择方法和trill网络节点

Legal Events

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

Ref document number: 16816931

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16816931

Country of ref document: EP

Kind code of ref document: A1