WO2016082588A1 - Link connectivity checking method and apparatus - Google Patents

Link connectivity checking method and apparatus Download PDF

Info

Publication number
WO2016082588A1
WO2016082588A1 PCT/CN2015/086687 CN2015086687W WO2016082588A1 WO 2016082588 A1 WO2016082588 A1 WO 2016082588A1 CN 2015086687 W CN2015086687 W CN 2015086687W WO 2016082588 A1 WO2016082588 A1 WO 2016082588A1
Authority
WO
WIPO (PCT)
Prior art keywords
icmp
destination device
message
packet
mac address
Prior art date
Application number
PCT/CN2015/086687
Other languages
French (fr)
Chinese (zh)
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 WO2016082588A1 publication Critical patent/WO2016082588A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • the present invention relates to the field of communications, and in particular to a link connectivity detection method and apparatus.
  • L2VPN Layer 2 Virtual Private Network
  • PORT+VLAN access mainly using port PORT access, PORT+VLAN access or PORT+ virtual local area network (Virtual Local Area Network) Access mode such as VLAN)+Primary Rate Interface (PRI) is used to access the L2VPN network.
  • PRI Primary Rate Interface
  • the MPLS L2VPN model consists of three parts: CE, Provider Edge (PE), and Provider (P) in the service provider network. The following is a brief description.
  • a CE device a user network edge device, has an interface directly connected to an SP (Service Provider).
  • the CE can be a device or a switch, or it can be a host.
  • the CE "perceives" the existence of the VPN and does not need to support MPLS.
  • a PE device is an edge device of a service provider network and is directly connected to the CE of the user. In an MPLS network, all processing of the VPN occurs on the PE.
  • the P device is not directly connected to the CE.
  • the P device only needs to have basic MPLS forwarding capability.
  • a CE device functions as a user network edge device, and may be a switch or a router, or directly use a base station as a CE device.
  • the base station service fails (such as service interruption, call quality degradation, or slow Internet access speed), it is necessary to provide an effective means to detect link connectivity between the base station and the PTN network access device.
  • the first L2-based scheme uses CFM MAC Ping to detect link connectivity between the base station and the access side of the PTN device, but this solution has two limitations.
  • the L3 solution uses the ping method of the Internet Control Messages Protocol (ICMP) to detect the link connectivity between the base station and the access port of the PTN device because the base station supports IP.
  • ICMP Internet Control Messages Protocol
  • the access port connected to the CE device does not normally have a Layer 3 interface. There is no routing information.
  • the ICMP packets cannot pass the normal packet sending and receiving process, and the ARP packets are not received.
  • the CPU is sent to the access device and is directly transmitted to the remote PE device through the VPN.
  • the access device cannot obtain the media access control of the user's CE device through the Address Resolution Protocol (ARP).
  • ARP Address Resolution Protocol
  • MAC address is a limitation. Therefore, this solution has restrictions on PTN network access devices.
  • the embodiment of the invention provides a link connectivity detection method and device, so as to at least solve the problem that the link connectivity between the network access device and the user equipment cannot be detected in the related art.
  • a link connectivity detection method including: sending a control message protocol ICMP message to a link destination device, where the ICMP message carries an identifier for the ICMP
  • the packet is an identifier of the packet used for pinging the connectivity of the ping link; the ICMP response packet corresponding to the media access control MAC address of the destination device is obtained; and the ICMP response packet is carried in the ICMP response packet.
  • the identifier carried in the packet if the determination result is yes, it is determined that the link with the destination device is connected.
  • the method before sending the ICMP message to the link destination device, the method further includes: acquiring the MAC address of the destination device, and sending an ICMP packet to the destination device according to the MAC address.
  • the obtaining the MAC address of the destination device includes: searching for an address resolution protocol ARP entry; and if the ARP entry is found, parsing the ARP entry to obtain a MAC address of the target device; and Or, if the ARP entry is not found, the request message for obtaining the MAC address of the destination device is sent, and the MAC address of the destination device is obtained after receiving the ARP response message.
  • the method before determining whether the identifier carried in the ICMP packet is carried in the ICMP response packet, the method further includes: determining whether the ICMP response packet is the destination device according to the ICMP packet If the result of the determination is YES, it is determined whether the ICMP response message carries the identifier carried in the ICMP message.
  • the method further includes: if the determination is negative, the device is connected to the destination device. Send a predetermined number of ICMP messages.
  • a link connectivity detecting apparatus including: a first sending module, configured to send a control message protocol ICMP message to a link destination device, where the ICMP packet
  • the identifier carries an identifier for identifying the ICMP message as a packet for pinging the connectivity of the ping link
  • the acquiring module is configured to obtain an ICMP response packet corresponding to the media access control MAC address of the destination device.
  • a determining module configured to determine whether the identifier carried in the ICMP packet is carried in the ICMP response packet, and the determining module is configured to, if the determination result is yes, the destination device The links between the links are connected.
  • the device further includes: an obtaining module, configured to acquire the MAC address of the destination device, and send an ICMP packet to the destination device according to the MAC address.
  • an obtaining module configured to acquire the MAC address of the destination device, and send an ICMP packet to the destination device according to the MAC address.
  • the obtaining module includes: an obtaining unit, configured to search for an address resolution protocol ARP entry; and a parsing unit, configured to parse the ARP entry to obtain a MAC of the target device if the ARP entry is found An address; and/or a sending unit, configured to send a request message for acquiring a MAC address of the destination device, where the ARP entry is not found, and obtain the destination device after receiving the ARP response message MAC address.
  • the device further includes: a second determining module, configured to determine whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet; if the determination result is yes And determining, in the ICMP response packet, whether the identifier carried in the ICMP packet is carried.
  • a second determining module configured to determine whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet; if the determination result is yes And determining, in the ICMP response packet, whether the identifier carried in the ICMP packet is carried.
  • the device further includes: a second sending module, configured to send a predetermined number of ICMP messages to the destination device when the determination is negative.
  • a second sending module configured to send a predetermined number of ICMP messages to the destination device when the determination is negative.
  • the control packet protocol ICMP packet is sent to the link destination device, where the ICMP packet carries the packet for identifying the ICMP packet as the ping link connectivity. And obtaining an ICMP response packet corresponding to the media access control MAC address of the destination device; determining whether the identifier carried in the ICMP packet is carried in the ICMP response packet;
  • the problem is that the link between the network access device and the user equipment cannot be detected in the related art, so that the network access device can be completed. Detection of the link with the user equipment.
  • FIG. 1 is a flowchart of a link connectivity detecting method according to an embodiment of the present invention
  • FIG. 2 is a block diagram of a link connectivity detecting apparatus according to an embodiment of the present invention.
  • FIG. 3 is a block diagram 1 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention.
  • FIG. 4 is a block diagram 2 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention.
  • Figure 5 is a block diagram 3 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention.
  • FIG. 6 is a block diagram 4 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a PTN forwarding network according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of connectivity detection of an access device to a user equipment according to an embodiment of the present invention.
  • FIG. 9 is a flowchart of access device to user equipment connectivity detection according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a link connectivity detection method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 Send a control message protocol ICMP message to the link destination device, where the ICMP message carries an identifier for identifying the ICMP message as a message for spelling ping link connectivity.
  • Step S104 Acquire an ICMP response packet corresponding to the media access control MAC address of the destination device.
  • Step S106 determining whether the identifier carried in the ICMP packet is carried in the ICMP response packet
  • Step S108 if the result of the determination is yes, it is determined that the link with the destination device is connected.
  • a control message protocol ICMP message to the link destination device, where the ICMP message carries an identifier for identifying the ICMP message as a packet for pinging the connectivity of the ping link;
  • the destination device media access control ICMP response packet corresponding to the MAC address; determining whether the ICMP response packet carries the identifier carried in the ICMP packet; and if the determination result is yes, determining the destination device
  • the links between the links are connected.
  • the MAC address of the destination device is obtained before the ICMP packet is sent to the link destination device, and the ICMP packet is sent to the destination device according to the MAC address.
  • the corresponding ARP entry is searched. If the ARP entry is found, the ARP entry is parsed to obtain the MAC address of the target device; and/or, if the ARP entry is not found, the device is configured to acquire the destination device.
  • the request message of the MAC address acquires the MAC address of the destination device after receiving the ARP reply message.
  • determining whether the ICMP response packet carries the identifier carried in the ICMP packet determining whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet; If yes, it is determined whether the identifier carried in the ICMP packet is carried in the ICMP response packet. If the determination is negative, the ICMP packet is sent to the destination device by a predetermined number of times.
  • the embodiment of the present invention provides a link connectivity detecting apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a block diagram of a link connectivity detecting apparatus according to an embodiment of the present invention. As shown in FIG. 2, the method includes: a sending module 22, an obtaining module 24, a first judging module 26, and a determining module 28, which are performed on each module. A brief description.
  • the first sending module 22 is configured to send a control message protocol ICMP message to the link destination device, where the ICMP message carries an identifier for identifying the ICMP message as a packet for pinging the connectivity of the ping link. symbol;
  • the obtaining module 24 is configured to obtain an ICMP response packet corresponding to the media access control MAC address of the destination device.
  • the first determining module 26 is configured to determine whether the identifier carried in the ICMP packet is carried in the ICMP response packet;
  • the determining module 28 is configured to be in communication with the destination device if the determination result is yes.
  • FIG. 3 is a block diagram of a link connectivity detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 3, the apparatus further includes:
  • the obtaining module 32 is configured to obtain the MAC address of the destination device, and send an ICMP packet to the destination device according to the MAC address.
  • the obtaining module 24 includes:
  • the obtaining unit 42 is configured to look up an address resolution protocol ARP entry
  • the parsing unit 44 is configured to, if the ARP entry is found, parse the ARP entry to obtain the MAC address of the target device; and/or,
  • the sending unit 46 is configured to send a request message for acquiring the MAC address of the destination device, and obtain the MAC address of the destination device after receiving the ARP response message.
  • FIG. 5 is a block diagram 3 of a link connectivity detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 5, the apparatus further includes:
  • the second determining module 52 is configured to determine whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet; if the determination result is yes, determine whether the ICMP response packet carries The identifier carried in the ICMP message.
  • FIG. 6 is a block diagram 4 of a link connectivity detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 6, the apparatus further includes:
  • the second sending module 62 is configured to send a predetermined number of ICMP messages to the destination device when the determination is negative.
  • FIG. 7 is a schematic diagram of a PTN forwarding network according to an embodiment of the present invention.
  • a common PTN forwarding network is composed of multiple CEs and multiple PEs, in order to flexibly and efficiently detect a PTN network access device to a user equipment.
  • link connectivity a new set of ICMP packet processing procedures is added at the protocol level.
  • the previous PING function is based on Layer 3 routing. Therefore, the existing IPV4 protocol stacks are based on routes to implement packet transmission and reception.
  • the new process does not go through the fourth version of the Internet Protocol Version 4 (IPV4) protocol stack, and separately processes the packet transmission and processing process, and uses a specific identifier to distinguish the common route ICMP.
  • IPV4 Internet Protocol Version 4
  • the new ICMP packet-receiving process needs to support the storage management and search of the ARP information of the user equipment. It is distinguished from the ARP processing flow of the original Layer 3 interface, based on the specified source IP address, destination IP address, and egress port. If the ARP information is found, the MAC address of the CE device is resolved. If the search fails, the ARP request is sent to trigger ARP learning.
  • IPV4 Internet Protocol Version 4
  • the access control list (ACL) of the ASIC chip is used to identify specific ICMP messages and ARP response messages to be captured on the CPU.
  • the operator specifies SIP, DIP, Port, VLAN and other information to encapsulate the ICMP Echo report.
  • the DIP is the IP address of the CE device. Before the ping, the operator needs to obtain the IP address of the CE device.
  • the source IP address (SIP) is specified by the operator and is used to indicate the IP address of the access device. The information is sent to the rule to capture the corresponding ICMP Reply message.
  • FIG. 8 is a schematic diagram of connectivity detection of an access device to a user equipment according to an embodiment of the present invention. As shown in FIG. 8, the information between the access device and the user equipment in the PTN network is completed through information interaction between the CE and the PE. Road connectivity testing.
  • FIG. 9 is a flowchart of access device-to-user device connectivity detection according to an embodiment of the present invention. As shown in FIG. 9, the method includes the following steps:
  • step S902 the device initializes an ACL rule, and the matching destination MAC address is the device local MAC address and the Ethernet type 0x0806, and the ARP reply packet is captured.
  • Step S904 the command line performs a Ping operation, and specifies information such as SIP, DIP, Port, and VLAN;
  • step S906 the ACL rule is sent, and the information such as the SIP, DIP, Port, VLAN, and IP protocol type is matched to capture the ICMP Reply message.
  • the matching SIP and DIP are opposite to those specified by the above command line.
  • step S908 the ARP entry is searched according to the source IP address, the destination IP address, and the egress port. If the ARP entry is found, the ARP request packet is sent to trigger the ARP learning.
  • Step S910 the ACL identifies that the ARP response sent by the CE device is sent to the CPU, and the protocol resolves the ARP information storage management.
  • step S912 the chip ACL module captures the ARPReply message that the CE device responds according to the rule set in step S902, and the learned ARP does not go to the original ARP learning process of the third layer, and is not sent to the chip, but only software is saved;
  • the ARP encapsulated or learned ARP encapsulates the ICMP Echo message, and sets a specific identifier to be sent to the designated port.
  • Step S914 the chip ACL module fetches the ICMP Reply message sent by the CE device to the CPU according to the set rule;
  • Step S916 The protocol parses the ICMP response packet, and determines whether the identifier is consistent with the sent identifier.
  • the platform identifies whether the packet is an ICMP response packet returned by the CE device and determines whether the identifier is consistent with the sent identifier.
  • Step S918 Performing echoing on the command line according to the judgment result. If they are consistent, it indicates that the Ping operation is successful, and the corresponding echo is performed on the command line. Repeat the operation and end the Ping operation when the command is terminated or the count reaches the specified number of times.
  • a scheme for detecting link connectivity between a PTN network access device and a user equipment can be applied to an ASIC chip, whether the CE device is a switch, a router, or a base station, as long as the support is supported. You can use this detection scheme for the ping function of the route. For the PTN access device, you do not need to delete the Layer 3 interface on the user access port or delete the access configuration of the L2VPN service. You only need to specify the relevant parameters by using the specific Ping command. Yes, it has strong scalability.
  • PE1 is the access device of the PTN network
  • CE1 is the edge device of the user network.
  • the L2VPN service is configured on PE1.
  • the access mode is PORT1+VLAN100.
  • the MAC address of the PE1 device is 0x000102030405.
  • the MAC address of the CE device is 0x000102030406.
  • the PE device is initialized with an ACL rule.
  • the matching DMAC is 0x000102030405 and the EtherType is 0x0806.
  • the ARP reply packet is sent to the CPU.
  • the PE1 device performs the Ping operation.
  • the DIP is 100.1.1.1, the SIP is 100.1.1.2, and the port is PORT1.
  • the VLAN is VLAN 100.
  • the software ARP entry is searched for according to the source IP address 100.1.1.2, the destination IP address 100.1.1.1, and the outgoing port PORT1. If the MAC address of the CE1 device is found, the ARP request packet is sent. 100.1.1.1 Corresponding MAC address.
  • the CE1 device After responding to the ARP reply, the CE1 device sends the rule that matches the above settings.
  • the chip is not sent to the software table.
  • the MAC address of the CE1 device is 0x000102030406, and the egress port is PORT1, so that the encapsulated ICMP Echo message is sent to the port PORT1.
  • the ACl rule is sent, the matching DIP is 100.1.1.2, the SIP is 100.1.1.1, the port is PORT1, and the VLAN is 100.
  • the ICMP response packet is sent to the CPU.
  • the ICMP response packet responded by the CE1 device is captured.
  • the platform protocol identifies whether it is an ICMP response and determines whether the identifier is consistent with the transmission. If it is consistent, a "! is echoed on the command line; the operation is repeated until the command is terminated or the count reaches the specified number of times.
  • modules or steps of the embodiments of the present invention can be implemented by a general computing device, which can be concentrated on a single computing device or distributed in multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from The steps shown or described are performed sequentially, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
  • the above embodiments and the preferred embodiments solve the problem that the link connectivity between the network access device and the user equipment cannot be detected in the related art, so that the link between the network access device and the user equipment can be completed. Road detection.

Landscapes

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

Abstract

Disclosed are a link connectivity checking method and apparatus. The method comprises: sending an Internet control messages protocol (ICMP) message to a destination device of a link, the ICMP message carrying an identifier used for identifying that the ICMP message is a message used for pinging the link connectivity; acquiring an ICMP response message corresponding to a media access control (MAC) address of the destination device; determining whether the ICMP response message carries the identifier carried in the ICMP message; and if the determining result is yes, determining that the link with the destination device is available. By means of the present invention, the problem in the prior art that the connectivity of a link from a network access device to a user equipment cannot be checked is solved, and accordingly, the link between the network access device and the user equipment can be checked.

Description

链路连通性检测方法及装置Link connectivity detection method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种链路连通性检测方法及装置。The present invention relates to the field of communications, and in particular to a link connectivity detection method and apparatus.
背景技术Background technique
对于用户网络边缘设备(Customer Edge,简称为CE)或分组传送网,Packet Transport Network,简称为PTN)产品中的接入层交换机,当作为IP化基站的接入设备时主要采用多协议标签交换(Multi-Protocol Label Switching,简称为MPLS)第二层虚拟专用网Layer 2Virtual Private Network,简称为L2VPN)组网,主要使用端口PORT接入、PORT+VLAN接入或PORT+虚拟局域网(Virtual Local Area Network,简称为VLAN)+基群速率接口(Primary Rate Interface,简称为PRI)等接入方式来接入L2VPN网络。For an access layer switch in a customer network edge device (Customer Edge (CE) or packet transport network, Packet Transport Network (PTN)), when used as an access device for an IP base station, it mainly adopts multi-protocol label switching. (Multi-Protocol Label Switching, referred to as MPLS) Layer 2 Virtual Private Network (L2VPN) networking, mainly using port PORT access, PORT+VLAN access or PORT+ virtual local area network (Virtual Local Area Network) Access mode such as VLAN)+Primary Rate Interface (PRI) is used to access the L2VPN network.
MPLS L2VPN模型由三部分组成:CE、服务提供商边缘设备(Provider Edge,简称为PE)和服务提供商网络中的骨干设备(Provider,简称为P),下面进行简要说明。The MPLS L2VPN model consists of three parts: CE, Provider Edge (PE), and Provider (P) in the service provider network. The following is a brief description.
CE设备,用户网络边缘设备,有接口直接与SP(Service Provider,服务提供商)相连。CE可以是设备或交换机,也可以是一台主机。CE“感知”不到VPN的存在,也不需要必须支持MPLS。A CE device, a user network edge device, has an interface directly connected to an SP (Service Provider). The CE can be a device or a switch, or it can be a host. The CE "perceives" the existence of the VPN and does not need to support MPLS.
PE设备,是服务提供商网络的边缘设备,与用户的CE直接相连。在MPLS网络中,对VPN的所有处理都发生在PE上。A PE device is an edge device of a service provider network and is directly connected to the CE of the user. In an MPLS network, all processing of the VPN occurs on the PE.
P设备,不与CE直接相连,P设备只需要具备基本MPLS转发能力。The P device is not directly connected to the CE. The P device only needs to have basic MPLS forwarding capability.
通常CE设备作为用户网络边缘设备,可以是一台交换机或路由器,也可以直接使用基站作为CE设备。当基站业务出现故障时(如业务中断、通话质量下降或上网速度变慢等),需要提供一种有效的手段来检测基站与PTN网络接入设备之间的链路连通性。Generally, a CE device functions as a user network edge device, and may be a switch or a router, or directly use a base station as a CE device. When the base station service fails (such as service interruption, call quality degradation, or slow Internet access speed), it is necessary to provide an effective means to detect link connectivity between the base station and the PTN network access device.
目前常用的检测方法有两种:第一种基于L2的方案,采用CFM的MAC Ping来检测基站和PTN设备接入侧之间的链路连通性,但这种方案有两方面的局限性,一是不能保证所有基站都支持MAC Ping检测功能,二是有时候并不知道CE设备的MAC信息,但一般会获得到IP地址信息,因此MAC Ping有一定的局限性;第二种方案是基于L3的方案,采用控制报文协议(Internet Control Messages Protocol,简称为ICMP)的Ping方式检测基站和PTN设备接入侧端口之间的链路连通性,因为基站都支持IP 的Ping功能,所以这个方案适用场景更广。但是作为L2VPN组网下的接入设备,其与CE设备相连的接入端口上一般不起三层接口,没有路由信息,ICMP报文无法走正常的收发包流程,同时ARP报文也不会在接入设备上送CPU而是直接通过VPN网络透传到远端PE设备,接入设备上无法通过地址解析协议(Address Resolution Protocol,简称为ARP)获取用户CE设备的媒体接入控制(Media Access Control,简称为MAC)地址,因此该方案对于PTN网络接入设备存在限制。Currently, there are two commonly used detection methods: the first L2-based scheme uses CFM MAC Ping to detect link connectivity between the base station and the access side of the PTN device, but this solution has two limitations. First, there is no guarantee that all base stations support the MAC Ping detection function. Second, sometimes the MAC information of the CE device is not known, but the IP address information is generally obtained, so MAC Ping has certain limitations; the second scheme is based on The L3 solution uses the ping method of the Internet Control Messages Protocol (ICMP) to detect the link connectivity between the base station and the access port of the PTN device because the base station supports IP. The Ping function, so this program is suitable for a wider range of scenarios. However, as an access device in the L2VPN network, the access port connected to the CE device does not normally have a Layer 3 interface. There is no routing information. The ICMP packets cannot pass the normal packet sending and receiving process, and the ARP packets are not received. The CPU is sent to the access device and is directly transmitted to the remote PE device through the VPN. The access device cannot obtain the media access control of the user's CE device through the Address Resolution Protocol (ARP). Access Control, referred to as MAC address, is a limitation. Therefore, this solution has restrictions on PTN network access devices.
针对相关技术中不能检测网络接入设备到用户设备之间的链路连通性的问题,目前尚未提出有效的解决方案。For the problem that the link connectivity between the network access device and the user equipment cannot be detected in the related art, an effective solution has not been proposed yet.
发明内容Summary of the invention
本发明实施例提供了一种链路连通性检测方法及装置,以至少解决相关技术中不能检测网络接入设备到用户设备之间的链路连通性的问题。The embodiment of the invention provides a link connectivity detection method and device, so as to at least solve the problem that the link connectivity between the network access device and the user equipment cannot be detected in the related art.
根据本发明实施例的一个方面,提供了一种链路连通性检测方法,包括:向链路目的设备发送控制报文协议ICMP报文,其中,所述ICMP报文携带有用于标识所述ICMP报文为用于拼Ping链路连通性的报文的标识符;获取所述目的设备媒体接入控制MAC地址对应的ICMP响应报文;判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符;在判断结果为是的情况下,确定与所述目的设备之间的链路是连通的。According to an aspect of the present invention, a link connectivity detection method is provided, including: sending a control message protocol ICMP message to a link destination device, where the ICMP message carries an identifier for the ICMP The packet is an identifier of the packet used for pinging the connectivity of the ping link; the ICMP response packet corresponding to the media access control MAC address of the destination device is obtained; and the ICMP response packet is carried in the ICMP response packet. The identifier carried in the packet; if the determination result is yes, it is determined that the link with the destination device is connected.
可选地,在向链路目的设备发送所述ICMP报文之前,还包括:获取所述目的设备的所述MAC地址,根据所述MAC地址向所述目的设备发送ICMP报文。Optionally, before sending the ICMP message to the link destination device, the method further includes: acquiring the MAC address of the destination device, and sending an ICMP packet to the destination device according to the MAC address.
可选地,获取所述目的设备的所述MAC地址包括:查找地址解析协议ARP条目;在查找到所述ARP条目的情况下,解析所述ARP条目获取所述目标设备的MAC地址;和/或,在没有查找到所述ARP条目的情况下,发送用于获取所述目的设备的MAC地址的请求消息,在接收到ARP应答消息后获取所述目的设备的MAC地址。Optionally, the obtaining the MAC address of the destination device includes: searching for an address resolution protocol ARP entry; and if the ARP entry is found, parsing the ARP entry to obtain a MAC address of the target device; and Or, if the ARP entry is not found, the request message for obtaining the MAC address of the destination device is sent, and the MAC address of the destination device is obtained after receiving the ARP response message.
可选地,在判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符之前还包括:判断所述ICMP响应报文是否为所述目的设备根据所述ICMP报文返回的ICMP应答报文;在判断结果为是的情况下,判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符。Optionally, before determining whether the identifier carried in the ICMP packet is carried in the ICMP response packet, the method further includes: determining whether the ICMP response packet is the destination device according to the ICMP packet If the result of the determination is YES, it is determined whether the ICMP response message carries the identifier carried in the ICMP message.
可选地,在判断所述ICMP响应报文是否为所述目的设备根据所述ICMP报文返回的ICMP应答报文之后,还包括:在判断为否的情况下,向链路所述目的设备发送预定次数ICMP报文。 Optionally, after determining whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet, the method further includes: if the determination is negative, the device is connected to the destination device. Send a predetermined number of ICMP messages.
根据本发明实施例的另一方面,提供了一种链路连通性检测装置,包括:第一发送模块,设置为向链路目的设备发送控制报文协议ICMP报文,其中,所述ICMP报文携带有用于标识所述ICMP报文为用于拼Ping链路连通性的报文的标识符;获取模块,设置为获取所述目的设备媒体接入控制MAC地址对应的ICMP响应报文;第一判断模块,设置为判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符;确定模块,设置为在判断结果为是的情况下,与所述目的设备之间的链路是连通的。According to another aspect of the present invention, a link connectivity detecting apparatus is provided, including: a first sending module, configured to send a control message protocol ICMP message to a link destination device, where the ICMP packet The identifier carries an identifier for identifying the ICMP message as a packet for pinging the connectivity of the ping link, and the acquiring module is configured to obtain an ICMP response packet corresponding to the media access control MAC address of the destination device. a determining module, configured to determine whether the identifier carried in the ICMP packet is carried in the ICMP response packet, and the determining module is configured to, if the determination result is yes, the destination device The links between the links are connected.
可选地,所述装置还包括:获取模块,设置为获取所述目的设备的所述MAC地址,根据所述MAC地址向所述目的设备发送ICMP报文。Optionally, the device further includes: an obtaining module, configured to acquire the MAC address of the destination device, and send an ICMP packet to the destination device according to the MAC address.
可选地,所述获取模块包括:获取单元,设置为查找地址解析协议ARP条目;解析单元,设置为在查找到所述ARP条目的情况下,解析所述ARP条目获取所述目标设备的MAC地址;和/或,发送单元,设置为在没有查找到所述ARP条目的情况下,发送用于获取所述目的设备的MAC地址的请求消息,在接收到ARP应答消息后获取所述目的设备的MAC地址。Optionally, the obtaining module includes: an obtaining unit, configured to search for an address resolution protocol ARP entry; and a parsing unit, configured to parse the ARP entry to obtain a MAC of the target device if the ARP entry is found An address; and/or a sending unit, configured to send a request message for acquiring a MAC address of the destination device, where the ARP entry is not found, and obtain the destination device after receiving the ARP response message MAC address.
可选地,所述装置还包括:第二判断模块,设置为判断所述ICMP响应报文是否为所述目的设备根据所述ICMP报文返回的ICMP应答报文;在判断结果为是的情况下,判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符。Optionally, the device further includes: a second determining module, configured to determine whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet; if the determination result is yes And determining, in the ICMP response packet, whether the identifier carried in the ICMP packet is carried.
可选地,所述装置还包括:第二发送模块,设置为在判断为否的情况下,向链路所述目的设备发送预定次数ICMP报文。Optionally, the device further includes: a second sending module, configured to send a predetermined number of ICMP messages to the destination device when the determination is negative.
通过本发明实施例,采用向链路目的设备发送控制报文协议ICMP报文,其中,所述ICMP报文携带有用于标识所述ICMP报文为用于拼Ping链路连通性的报文的标识符;获取所述目的设备媒体接入控制MAC地址对应的ICMP响应报文;判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符;在判断结果为是的情况下,确定与所述目的设备之间的链路是连通的,解决了相关技术中不能检测网络接入设备到用户设备之间的链路连通性的问题,从而可以完成网络接入设备与用户设备之间链路的检测。In the embodiment of the present invention, the control packet protocol ICMP packet is sent to the link destination device, where the ICMP packet carries the packet for identifying the ICMP packet as the ping link connectivity. And obtaining an ICMP response packet corresponding to the media access control MAC address of the destination device; determining whether the identifier carried in the ICMP packet is carried in the ICMP response packet; The problem is that the link between the network access device and the user equipment cannot be detected in the related art, so that the network access device can be completed. Detection of the link with the user equipment.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的链路连通性检测方法的流程图; 1 is a flowchart of a link connectivity detecting method according to an embodiment of the present invention;
图2是根据本发明实施例的链路连通性检测装置的框图;2 is a block diagram of a link connectivity detecting apparatus according to an embodiment of the present invention;
图3是根据本发明优选实施例的链路连通性检测装置的框图一;3 is a block diagram 1 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention;
图4是根据本发明优选实施例的链路连通性检测装置的框图二;4 is a block diagram 2 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention;
图5是根据本发明优选实施例的链路连通性检测装置的框图三;Figure 5 is a block diagram 3 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention;
图6是根据本发明优选实施例的链路连通性检测装置的框图四;6 is a block diagram 4 of a link connectivity detecting apparatus in accordance with a preferred embodiment of the present invention;
图7是根据本发明实施例的PTN转发网络的示意图;7 is a schematic diagram of a PTN forwarding network according to an embodiment of the present invention;
图8是根据本发明实施例的接入设备到用户设备连通性检测的示意图;FIG. 8 is a schematic diagram of connectivity detection of an access device to a user equipment according to an embodiment of the present invention; FIG.
图9是根据本发明实施例的接入设备到用户设备连通性检测的流程图。FIG. 9 is a flowchart of access device to user equipment connectivity detection according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种链路连通性检测方法,图1是根据本发明实施例的链路连通性检测方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a link connectivity detection method is provided. FIG. 1 is a flowchart of a link connectivity detection method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,向链路目的设备发送控制报文协议ICMP报文,其中,该ICMP报文携带有用于标识该ICMP报文为用于拼Ping链路连通性的报文的标识符;Step S102: Send a control message protocol ICMP message to the link destination device, where the ICMP message carries an identifier for identifying the ICMP message as a message for spelling ping link connectivity.
步骤S104,获取该目的设备媒体接入控制MAC地址对应的ICMP响应报文;Step S104: Acquire an ICMP response packet corresponding to the media access control MAC address of the destination device.
步骤S106,判断该ICMP响应报文中是否携带有该ICMP报文中携带的该标识符;Step S106, determining whether the identifier carried in the ICMP packet is carried in the ICMP response packet;
步骤S108,在判断结果为是的情况下,确定与该目的设备之间的链路是连通的。Step S108, if the result of the determination is yes, it is determined that the link with the destination device is connected.
通过上述步骤,向链路目的设备发送控制报文协议ICMP报文,其中,该ICMP报文携带有用于标识该ICMP报文为用于拼Ping链路连通性的报文的标识符;获取该目的设备媒体接入控制MAC地址对应的ICMP响应报文;判断该ICMP响应报文中是否携带有该ICMP报文中携带的该标识符;在判断结果为是的情况下,确定与该目的设备之间的链路是连通的。通过本发明实施例,解决了相关技术中不能检测网络接入设备到用户设备之间的链路连通性的问题,从而可以完成网络接入设备与用户设备之间链路的检测。And sending, by the foregoing step, a control message protocol ICMP message to the link destination device, where the ICMP message carries an identifier for identifying the ICMP message as a packet for pinging the connectivity of the ping link; The destination device media access control ICMP response packet corresponding to the MAC address; determining whether the ICMP response packet carries the identifier carried in the ICMP packet; and if the determination result is yes, determining the destination device The links between the links are connected. Through the embodiments of the present invention, the problem that the link connectivity between the network access device and the user equipment cannot be detected in the related art is solved, so that the detection of the link between the network access device and the user equipment can be completed.
为了更好的检测链路,在向链路目的设备发送该ICMP报文之前,获取该目的设备的该MAC地址,根据该MAC地址向该目的设备发送ICMP报文。 In order to better detect the link, the MAC address of the destination device is obtained before the ICMP packet is sent to the link destination device, and the ICMP packet is sent to the destination device according to the MAC address.
首先查找相应ARP条目,在查到该ARP条目的情况下,解析该ARP条目获取该目标设备的MAC地址;和/或,在没有查找到该ARP条目的情况下,发送用于获取该目的设备的MAC地址的请求消息,在接收到ARP应答消息后获取该目的设备的MAC地址。First, the corresponding ARP entry is searched. If the ARP entry is found, the ARP entry is parsed to obtain the MAC address of the target device; and/or, if the ARP entry is not found, the device is configured to acquire the destination device. The request message of the MAC address acquires the MAC address of the destination device after receiving the ARP reply message.
在判断该ICMP响应报文中是否携带有该ICMP报文中携带的该标识符之前,判断该ICMP响应报文是否为该目的设备根据该ICMP报文返回的ICMP应答报文;在判断结果为是的情况下,判断该ICMP响应报文中是否携带有该ICMP报文中携带的该标识符;在判断为否的情况下,向链路该目的设备发送预定次数ICMP报文。Before determining whether the ICMP response packet carries the identifier carried in the ICMP packet, determining whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet; If yes, it is determined whether the identifier carried in the ICMP packet is carried in the ICMP response packet. If the determination is negative, the ICMP packet is sent to the destination device by a predetermined number of times.
本发明实施例提供了一种链路连通性检测装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。The embodiment of the present invention provides a link connectivity detecting apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的链路连通性检测装置的框图,如图2所示,包括:发送模块22、获取模块24、第一判断模块26和确定模块28,下面对各个模块进行简要说明。2 is a block diagram of a link connectivity detecting apparatus according to an embodiment of the present invention. As shown in FIG. 2, the method includes: a sending module 22, an obtaining module 24, a first judging module 26, and a determining module 28, which are performed on each module. A brief description.
第一发送模块22,设置为向链路目的设备发送控制报文协议ICMP报文,其中,该ICMP报文携带有用于标识该ICMP报文为用于拼Ping链路连通性的报文的标识符;The first sending module 22 is configured to send a control message protocol ICMP message to the link destination device, where the ICMP message carries an identifier for identifying the ICMP message as a packet for pinging the connectivity of the ping link. symbol;
获取模块24,设置为获取该目的设备媒体接入控制MAC地址对应的ICMP响应报文;The obtaining module 24 is configured to obtain an ICMP response packet corresponding to the media access control MAC address of the destination device.
第一判断模块26,设置为判断该ICMP响应报文中是否携带有该ICMP报文中携带的该标识符;The first determining module 26 is configured to determine whether the identifier carried in the ICMP packet is carried in the ICMP response packet;
确定模块28,设置为在判断结果为是的情况下,与该目的设备之间的链路是连通的。The determining module 28 is configured to be in communication with the destination device if the determination result is yes.
图3是根据本发明优选实施例的链路连通性检测装置的框图一,如图3所示,该装置还包括:3 is a block diagram of a link connectivity detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 3, the apparatus further includes:
获取模块32,设置为获取该目的设备的该MAC地址,根据该MAC地址向该目的设备发送ICMP报文。The obtaining module 32 is configured to obtain the MAC address of the destination device, and send an ICMP packet to the destination device according to the MAC address.
图4是根据本发明优选实施例的链路连通性检测装置的框图二,如图4所示,该获取模块24包括:4 is a block diagram 2 of a link connectivity detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 4, the obtaining module 24 includes:
获取单元42,设置为查找地址解析协议ARP条目; The obtaining unit 42 is configured to look up an address resolution protocol ARP entry;
解析单元44,设置为在查找到该ARP条目的情况下,解析该ARP条目获取该目标设备的MAC地址;和/或,The parsing unit 44 is configured to, if the ARP entry is found, parse the ARP entry to obtain the MAC address of the target device; and/or,
发送单元46,设置为在查找获取到该ARP条目的情况下,发送用于获取该目的设备的MAC地址的请求消息,在接收到ARP应答消息后获取该目的设备的MAC地址。The sending unit 46 is configured to send a request message for acquiring the MAC address of the destination device, and obtain the MAC address of the destination device after receiving the ARP response message.
图5是根据本发明优选实施例的链路连通性检测装置的框图三,如图5所示,该装置还包括:FIG. 5 is a block diagram 3 of a link connectivity detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 5, the apparatus further includes:
第二判断模块52,设置为判断该ICMP响应报文是否为该目的设备根据该ICMP报文返回的ICMP应答报文;在判断结果为是的情况下,判断该ICMP响应报文中是否携带有该ICMP报文中携带的该标识符。The second determining module 52 is configured to determine whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet; if the determination result is yes, determine whether the ICMP response packet carries The identifier carried in the ICMP message.
图6是根据本发明优选实施例的链路连通性检测装置的框图四,如图6所示,该装置还包括:FIG. 6 is a block diagram 4 of a link connectivity detecting apparatus according to a preferred embodiment of the present invention. As shown in FIG. 6, the apparatus further includes:
第二发送模块62,设置为在判断为否的情况下,向链路该目的设备发送预定次数ICMP报文。The second sending module 62 is configured to send a predetermined number of ICMP messages to the destination device when the determination is negative.
下面结合可选实施例对本发明实施例进行进一步说明。The embodiments of the present invention are further described below in conjunction with the optional embodiments.
图7是根据本发明实施例的PTN转发网络的示意图,如图7所示,常见的PTN转发网络由多个CE和多个PE组成,为了灵活有效地检测PTN网络接入设备到用户设备之间的链路连通性,首先协议层面新增一套ICMP收发包处理流程,以前的PING功能是基于三层路由的,因此现有的IPV4协议栈都是基于路由来实现报文收发的。因此为了不影响路由转发,该新增流程不走第四版互联网协议(Internet Protocol Version 4,简称为IPV4)协议栈,对于收发包流程进行单独处理,使用特定的标识符来区别普通路由的ICMP报文,除此之外该新增ICMP收发包流程需要支持用户设备ARP信息的存储管理与查找,与原三层接口的ARP处理流程区分,基于指定的源IP地址、目的IP地址、出端口查找ARP信息解析出CE设备的MAC地址,查找失败时,需要主动发送ARP请求触发ARP学习。其次使用ASIC芯片的访问控制列表(Access Control List,简称为ACL)识别特定的ICMP报文和ARP应答报文将其抓上CPU,操作者指定SIP、DIP,Port,VLAN等信息封装ICMP Echo报文,其中,DIP是CE设备IP,在Ping前需要操作者获得CE设备的IP地址,源IP(Source IP,简称为SIP)由操作者指定,用来表示接入设备的IP,ACL根据这些信息下发规则抓取相应的ICMP Reply报文。图8是根据本发明实施例的接入设备到用户设备连通性检测的示意图,如图8所示,通过CE与PE之间的信息交互完成PTN网络中接入设备到用户设备之间的链路连通性检测。 FIG. 7 is a schematic diagram of a PTN forwarding network according to an embodiment of the present invention. As shown in FIG. 7, a common PTN forwarding network is composed of multiple CEs and multiple PEs, in order to flexibly and efficiently detect a PTN network access device to a user equipment. In the case of link connectivity, a new set of ICMP packet processing procedures is added at the protocol level. The previous PING function is based on Layer 3 routing. Therefore, the existing IPV4 protocol stacks are based on routes to implement packet transmission and reception. Therefore, in order not to affect the route forwarding, the new process does not go through the fourth version of the Internet Protocol Version 4 (IPV4) protocol stack, and separately processes the packet transmission and processing process, and uses a specific identifier to distinguish the common route ICMP. In addition to the packet, the new ICMP packet-receiving process needs to support the storage management and search of the ARP information of the user equipment. It is distinguished from the ARP processing flow of the original Layer 3 interface, based on the specified source IP address, destination IP address, and egress port. If the ARP information is found, the MAC address of the CE device is resolved. If the search fails, the ARP request is sent to trigger ARP learning. Secondly, the access control list (ACL) of the ASIC chip is used to identify specific ICMP messages and ARP response messages to be captured on the CPU. The operator specifies SIP, DIP, Port, VLAN and other information to encapsulate the ICMP Echo report. The DIP is the IP address of the CE device. Before the ping, the operator needs to obtain the IP address of the CE device. The source IP address (SIP) is specified by the operator and is used to indicate the IP address of the access device. The information is sent to the rule to capture the corresponding ICMP Reply message. FIG. 8 is a schematic diagram of connectivity detection of an access device to a user equipment according to an embodiment of the present invention. As shown in FIG. 8, the information between the access device and the user equipment in the PTN network is completed through information interaction between the CE and the PE. Road connectivity testing.
图9是根据本发明实施例的接入设备到用户设备连通性检测的流程图,如图9所示,包括以下步骤:FIG. 9 is a flowchart of access device-to-user device connectivity detection according to an embodiment of the present invention. As shown in FIG. 9, the method includes the following steps:
步骤S902,设备初始化下发一条ACL规则,匹配目的MAC为设备本机MAC地址及以太类型0x0806,抓取ARP Reply报文;In step S902, the device initializes an ACL rule, and the matching destination MAC address is the device local MAC address and the Ethernet type 0x0806, and the ARP reply packet is captured.
步骤S904,命令行执行Ping操作,指定SIP、DIP,Port,VLAN等信息;Step S904, the command line performs a Ping operation, and specifies information such as SIP, DIP, Port, and VLAN;
步骤S906,下发ACL规则,匹配SIP、DIP,Port,VLAN,IP协议类型等信息抓取ICMP Reply报文,此时匹配的SIP、DIP与上述命令行指定的相反;In step S906, the ACL rule is sent, and the information such as the SIP, DIP, Port, VLAN, and IP protocol type is matched to capture the ICMP Reply message. The matching SIP and DIP are opposite to those specified by the above command line.
步骤S908,根据源IP地址、目的IP地址、出端口查找ARP条目,若查找到则解析MAC信息,若查找不到ARP条目,则发送ARP请求报文触发ARP学习;In step S908, the ARP entry is searched according to the source IP address, the destination IP address, and the egress port. If the ARP entry is found, the ARP request packet is sent to trigger the ARP learning.
步骤S910,ACL识别CE设备响应的ARP应答上送CPU,协议解析ARP信息存储管理;Step S910, the ACL identifies that the ARP response sent by the CE device is sent to the CPU, and the protocol resolves the ARP information storage management.
步骤S912,芯片ACL模块根据步骤S902中设置的规则抓取CE设备响应的ARPReply报文,学习到的ARP不走原三层的ARP学习流程,不会下发到芯片,只做软件保存;根据查询或学习到的ARP封装ICMP Echo报文,同时设置特定的标识符,发送到指定端口;In step S912, the chip ACL module captures the ARPReply message that the CE device responds according to the rule set in step S902, and the learned ARP does not go to the original ARP learning process of the third layer, and is not sent to the chip, but only software is saved; The ARP encapsulated or learned ARP encapsulates the ICMP Echo message, and sets a specific identifier to be sent to the designated port.
步骤S914,芯片ACL模块根据设置的规则抓取CE设备响应的ICMP Reply报文上送CPU;Step S914, the chip ACL module fetches the ICMP Reply message sent by the CE device to the CPU according to the set rule;
步骤S916,协议解析ICMP应答报文,判断标识符与发送的是否一致,平台识别报文是否为CE设备返回的ICMP应答报文同时判断标识符与发送的是否一致;Step S916: The protocol parses the ICMP response packet, and determines whether the identifier is consistent with the sent identifier. The platform identifies whether the packet is an ICMP response packet returned by the CE device and determines whether the identifier is consistent with the sent identifier.
步骤S918,根据判断结果在命令行进行回显,如果一致则表明一次Ping操作成功,相应的在命令行进行回显。重复操作,当遇到命令终止或计数达到指定次数时结束Ping操作。Step S918: Performing echoing on the command line according to the judgment result. If they are consistent, it indicates that the Ping operation is successful, and the corresponding echo is performed on the command line. Repeat the operation and end the Ping operation when the command is terminated or the count reaches the specified number of times.
本可选实施例提出的一种PTN网络接入设备到用户设备之间的链路连通性检测的方案,该方案在ASIC芯片都可以应用上,无论CE设备是交换机、路由器还是基站,只要支持路由的Ping功能都可使用本检测方案,同时对于PTN接入设备,无需在用户接入端口上起三层接口,也不需要删除L2VPN业务的接入配置,只需使用特定Ping命令指定相关参数即可,具有较强的扩展性。A scheme for detecting link connectivity between a PTN network access device and a user equipment according to the optional embodiment, the solution can be applied to an ASIC chip, whether the CE device is a switch, a router, or a base station, as long as the support is supported. You can use this detection scheme for the ping function of the route. For the PTN access device, you do not need to delete the Layer 3 interface on the user access port or delete the access configuration of the L2VPN service. You only need to specify the relevant parameters by using the specific Ping command. Yes, it has strong scalability.
假设PE1为PTN网络的接入设备,CE1为用户网络边缘设备,如图7所示,在PE1上配置L2VPN业务,接入方式为PORT1+VLAN100接入,PE1设备MAC地址为0x000102030405,在CE1上配置VLAN100的三层接口,并配置IP地址100.1.1.1/24, 将端口1加入VLAN100,CE设备MAC地址为0x000102030406。Assume that PE1 is the access device of the PTN network, and CE1 is the edge device of the user network. As shown in Figure 7, the L2VPN service is configured on PE1. The access mode is PORT1+VLAN100. The MAC address of the PE1 device is 0x000102030405. Configure the Layer 3 interface of VLAN 100 and configure the IP address 100.1.1.1/24. Add port 1 to VLAN 100. The MAC address of the CE device is 0x000102030406.
PE设备初始化设置一条ACL规则,匹配DMAC为0x000102030405、EtherType为0x0806将ARP应答报文上送CPU;在PE1设备上执行Ping操作,指定DIP为100.1.1.1,SIP为100.1.1.2,端口为PORT1,VLAN为VLAN100,根据源IP地址100.1.1.2、目的IP地址100.1.1.1、出端口PORT1查找软件ARP条目,若查找到则解析出CE1设备的MAC信息,若查找不到则发送ARP请求报文请求100.1.1.1对应的MAC地址,CE1设备响应ARP应答后,匹配上述设置的规则上送,学习到ARP后不下发芯片只保存至软件表。根据上述得到的ARP解析到CE1设备的MAC地址为0x000102030406,出端口为PORT1,以此封装ICMP Echo报文发送至端口PORT1。The PE device is initialized with an ACL rule. The matching DMAC is 0x000102030405 and the EtherType is 0x0806. The ARP reply packet is sent to the CPU. The PE1 device performs the Ping operation. The DIP is 100.1.1.1, the SIP is 100.1.1.2, and the port is PORT1. The VLAN is VLAN 100. The software ARP entry is searched for according to the source IP address 100.1.1.2, the destination IP address 100.1.1.1, and the outgoing port PORT1. If the MAC address of the CE1 device is found, the ARP request packet is sent. 100.1.1.1 Corresponding MAC address. After responding to the ARP reply, the CE1 device sends the rule that matches the above settings. After the ARP is learned, the chip is not sent to the software table. According to the ARP obtained above, the MAC address of the CE1 device is 0x000102030406, and the egress port is PORT1, so that the encapsulated ICMP Echo message is sent to the port PORT1.
下发ACl规则,匹配DIP为100.1.1.2,SIP为100.1.1.1,端口为PORT1,VLAN为100将ICMP应答报文上送CPU;根据设置的ACL规则抓取CE1设备响应的ICMP应答报文,平台协议识别是否为ICMP应答并判断标识符与发送的是否一致,如果一致则在命令行回显一个”!”;重复操作,直至命令终止或计数达到指定次数。The ACl rule is sent, the matching DIP is 100.1.1.2, the SIP is 100.1.1.1, the port is PORT1, and the VLAN is 100. The ICMP response packet is sent to the CPU. According to the set ACL rule, the ICMP response packet responded by the CE1 device is captured. The platform protocol identifies whether it is an ICMP response and determines whether the identifier is consistent with the transmission. If it is consistent, a "!" is echoed on the command line; the operation is repeated until the command is terminated or the count reaches the specified number of times.
显然,本领域的技术人员应该明白,上述的本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the embodiments of the present invention can be implemented by a general computing device, which can be concentrated on a single computing device or distributed in multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from The steps shown or described are performed sequentially, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
如上所述,通过上述实施例及优选实施方式,解决了相关技术中不能检测网络接入设备到用户设备之间的链路连通性的问题,从而可以完成网络接入设备与用户设备之间链路的检测。 As described above, the above embodiments and the preferred embodiments solve the problem that the link connectivity between the network access device and the user equipment cannot be detected in the related art, so that the link between the network access device and the user equipment can be completed. Road detection.

Claims (10)

  1. 一种链路连通性检测方法,包括:A link connectivity detection method includes:
    向链路目的设备发送控制报文协议ICMP报文,其中,所述ICMP报文携带有用于标识所述ICMP报文为用于拼Ping链路连通性的报文的标识符;Sending a control message protocol ICMP message to the link destination device, where the ICMP message carries an identifier for identifying the ICMP message as a message for spelling ping link connectivity;
    获取所述目的设备媒体接入控制MAC地址对应的ICMP响应报文;Obtaining an ICMP response packet corresponding to the media access control MAC address of the destination device;
    判断所述ICMP响应报文中是否携带有所述ICM报文中携带的所述标识符;Determining whether the identifier carried in the ICM packet is carried in the ICMP response packet;
    在判断结果为是的情况下,确定与所述目的设备之间的链路是连通的。In the case where the determination result is yes, it is determined that the link with the destination device is connected.
  2. 根据权利要求1所述的方法,其中,在向链路目的设备发送所述ICMP报文之前,还包括:The method of claim 1, wherein before the sending the ICMP message to the link destination device, the method further includes:
    获取所述目的设备的所述MAC地址,根据所述MAC地址向所述目的设备发送ICM报文。Obtaining the MAC address of the destination device, and sending an ICM packet to the destination device according to the MAC address.
  3. 根据权利要求2所述的方法,其中,获取所述目的设备的所述MAC地址包括:The method of claim 2, wherein obtaining the MAC address of the destination device comprises:
    查找地址解析协议ARP条目;Find the address resolution protocol ARP entry;
    在查找到所述ARP条目的情况下,解析所述ARP条目获取所述目标设备的MAC地址;和/或,In the case that the ARP entry is found, parsing the ARP entry to obtain a MAC address of the target device; and/or,
    在没有查找到所述ARP条目的情况下,发送用于获取所述目的设备的MAC地址的请求消息,在接收到ARP应答消息后获取所述目的设备的MAC地址。If the ARP entry is not found, the request message for obtaining the MAC address of the destination device is sent, and the MAC address of the destination device is obtained after receiving the ARP response message.
  4. 根据权利要求1所述的方法,其中,在判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符之前还包括:The method according to claim 1, wherein before determining whether the ICMP response message carries the identifier carried in the ICMP message, the method further includes:
    判断所述ICMP响应报文是否为所述目的设备根据所述ICMP报文返回的ICMP应答报文;Determining whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet;
    在判断结果为是的情况下,判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符。If the result of the determination is yes, it is determined whether the identifier carried in the ICMP packet is carried in the ICMP response packet.
  5. 根据权利要求4中所述的方法,其中,在判断所述ICMP响应报文是否为所述目的设备根据所述ICMP报文返回的ICMP应答报文之后,还包括:The method according to claim 4, wherein after determining whether the ICMP response message is an ICMP response message returned by the destination device according to the ICMP message, the method further includes:
    在判断为否的情况下,向链路所述目的设备发送预定次数ICMP报文。If the determination is no, the predetermined number of ICMP messages are sent to the destination device of the link.
  6. 一种链路连通性检测装置,包括:A link connectivity detecting apparatus includes:
    第一发送模块,设置为向链路目的设备发送控制报文协议ICMP报文,其中, 所述ICMP报文携带有用于标识所述ICMP报文为用于拼Ping链路连通性的报文的标识符;The first sending module is configured to send a control message protocol ICMP message to the link destination device, where The ICMP message carries an identifier for identifying the ICMP message as a message for spelling ping link connectivity;
    获取模块,设置为获取所述目的设备媒体接入控制MAC地址对应的ICMP响应报文;An acquiring module, configured to obtain an ICMP response packet corresponding to the media access control MAC address of the destination device;
    第一判断模块,设置为判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符;The first determining module is configured to determine whether the identifier carried in the ICMP packet is carried in the ICMP response packet;
    确定模块,设置为在判断结果为是的情况下,与所述目的设备之间的链路是连通的。The determining module is configured to be in a communication with the destination device if the determination result is yes.
  7. 根据权利要求6所述的装置,其中,所述装置还包括:The apparatus of claim 6 wherein said apparatus further comprises:
    获取模块,设置为获取所述目的设备的所述MAC地址,根据所述MAC地址向所述目的设备发送ICMP报文。The obtaining module is configured to obtain the MAC address of the destination device, and send an ICMP packet to the destination device according to the MAC address.
  8. 根据权利要求7所述的装置,其中,所述获取模块包括:The apparatus of claim 7, wherein the obtaining module comprises:
    获取单元,设置为查找地址解析协议ARP条目;Get the unit, set to look up the address resolution protocol ARP entry;
    解析单元,设置为在查找到所述ARP条目的情况下,解析所述ARP条目获取所述目标设备的MAC地址;和/或,a parsing unit, configured to parse the ARP entry to obtain a MAC address of the target device if the ARP entry is found; and/or,
    发送单元,设置为在没有查找到所述ARP条目的情况下,发送用于获取所述目的设备的MAC地址的请求消息,在接收到ARP应答消息后获取所述目的设备的MAC地址。And a sending unit, configured to send a request message for acquiring a MAC address of the destination device, and obtain a MAC address of the destination device after receiving the ARP response message, if the ARP entry is not found.
  9. 根据权利要求6所述的装置,其中,所述装置还包括:The apparatus of claim 6 wherein said apparatus further comprises:
    第二判断模块,设置为判断所述ICMP响应报文是否为所述目的设备根据所述ICMP报文返回的ICMP应答报文;在判断结果为是的情况下,判断所述ICMP响应报文中是否携带有所述ICMP报文中携带的所述标识符。The second judging module is configured to determine whether the ICMP response packet is an ICMP response packet returned by the destination device according to the ICMP packet, and if the judgment result is yes, determine the ICMP response packet. Whether the identifier carried in the ICMP message is carried.
  10. 根据权利要求9中所述的装置,其中,所述装置还包括:The device of claim 9 wherein said device further comprises:
    第二发送模块,设置为在判断为否的情况下,向链路所述目的设备发送预定次数ICMP报文。 The second sending module is configured to send a predetermined number of ICMP messages to the destination device when the determination is negative.
PCT/CN2015/086687 2014-11-26 2015-08-11 Link connectivity checking method and apparatus WO2016082588A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410693837.9 2014-11-26
CN201410693837.9A CN105634857A (en) 2014-11-26 2014-11-26 Link connectivity detecting method and device

Publications (1)

Publication Number Publication Date
WO2016082588A1 true WO2016082588A1 (en) 2016-06-02

Family

ID=56049387

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/086687 WO2016082588A1 (en) 2014-11-26 2015-08-11 Link connectivity checking method and apparatus

Country Status (2)

Country Link
CN (1) CN105634857A (en)
WO (1) WO2016082588A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270602A (en) * 2016-12-30 2018-07-10 中兴通讯股份有限公司 A kind of detection method of data link, apparatus and system
CN110661643A (en) * 2018-06-29 2020-01-07 瞻博网络公司 Performance monitoring support for CFM on EVPN
CN112311905A (en) * 2019-07-29 2021-02-02 烽火通信科技股份有限公司 Method and equipment for realizing dynamic ARP learning
CN114024870A (en) * 2021-11-12 2022-02-08 中国工商银行股份有限公司 Network connectivity detection method and system
CN114079620A (en) * 2020-08-06 2022-02-22 北京国基科技股份有限公司 Method and device for determining online state of network equipment
WO2022057431A1 (en) * 2020-09-18 2022-03-24 华为技术有限公司 Network simulation method and apparatus, device, and computer readable storage medium
CN114629822A (en) * 2022-04-18 2022-06-14 北京小米移动软件有限公司 Link detection method and device, electronic equipment and storage medium
CN114629820A (en) * 2022-03-25 2022-06-14 阿里巴巴(中国)有限公司 Network connectivity detection method, device, equipment and medium
CN114629816A (en) * 2022-03-14 2022-06-14 京东科技信息技术有限公司 Method and system for detecting public network IP network state

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429625B (en) * 2017-02-13 2021-10-15 中兴通讯股份有限公司 Method and device for realizing fault diagnosis
CN107547505B (en) * 2017-06-21 2020-04-03 新华三技术有限公司 Message processing method and device
CN110248347B (en) * 2019-06-28 2022-03-15 Oppo广东移动通信有限公司 Call abnormity detection method, device, equipment and storage medium
CN112653587B (en) * 2019-10-12 2022-10-21 北京奇艺世纪科技有限公司 Network connectivity state detection method and device
CN110912760B (en) * 2019-12-30 2022-11-01 杭州迪普科技股份有限公司 Link state detection method and device
CN115499489B (en) * 2022-11-16 2023-02-28 苏州浪潮智能科技有限公司 Method, device, equipment and readable medium for managing sub-network in link

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070223456A1 (en) * 2006-03-23 2007-09-27 Fujitsu Limited Switching apparatus
CN101179506A (en) * 2007-11-26 2008-05-14 中兴通讯股份有限公司 Method for private network terminal to detect public network terminal
CN102177681A (en) * 2011-04-21 2011-09-07 华为技术有限公司 Fault detection method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006127201A (en) * 2004-10-29 2006-05-18 Hitachi Ltd Storage system and conduction confirmation method
CN101325522B (en) * 2008-08-01 2011-08-24 中国电信股份有限公司 Method and system for detecting end-to-end connectivity of telecommunication grade ether private wire
CN102946260B (en) * 2012-12-04 2014-08-13 湖南大学 Automatic meter reading system and communication link quality detecting method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070223456A1 (en) * 2006-03-23 2007-09-27 Fujitsu Limited Switching apparatus
CN101179506A (en) * 2007-11-26 2008-05-14 中兴通讯股份有限公司 Method for private network terminal to detect public network terminal
CN102177681A (en) * 2011-04-21 2011-09-07 华为技术有限公司 Fault detection method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHEN, CHENGWEI: "Principle and the Achievement of Ping", INFORMATION TECHNOLOGY, 30 June 2005 (2005-06-30), pages 70 and 71 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270602B (en) * 2016-12-30 2022-07-08 中兴通讯股份有限公司 Method, device and system for detecting data link
CN108270602A (en) * 2016-12-30 2018-07-10 中兴通讯股份有限公司 A kind of detection method of data link, apparatus and system
CN110661643A (en) * 2018-06-29 2020-01-07 瞻博网络公司 Performance monitoring support for CFM on EVPN
CN110661643B (en) * 2018-06-29 2021-05-07 瞻博网络公司 Method, network device and medium for network management
CN112311905A (en) * 2019-07-29 2021-02-02 烽火通信科技股份有限公司 Method and equipment for realizing dynamic ARP learning
CN112311905B (en) * 2019-07-29 2022-11-25 烽火通信科技股份有限公司 Method and equipment for realizing dynamic ARP learning
CN114079620B (en) * 2020-08-06 2024-02-27 北京国基科技股份有限公司 Method and device for determining online state of network equipment
CN114079620A (en) * 2020-08-06 2022-02-22 北京国基科技股份有限公司 Method and device for determining online state of network equipment
WO2022057431A1 (en) * 2020-09-18 2022-03-24 华为技术有限公司 Network simulation method and apparatus, device, and computer readable storage medium
CN114024870B (en) * 2021-11-12 2023-05-16 中国工商银行股份有限公司 Network connectivity detection method and system
CN114024870A (en) * 2021-11-12 2022-02-08 中国工商银行股份有限公司 Network connectivity detection method and system
CN114629816A (en) * 2022-03-14 2022-06-14 京东科技信息技术有限公司 Method and system for detecting public network IP network state
CN114629816B (en) * 2022-03-14 2023-11-03 京东科技信息技术有限公司 Public network IP network state detection method and system
CN114629820A (en) * 2022-03-25 2022-06-14 阿里巴巴(中国)有限公司 Network connectivity detection method, device, equipment and medium
CN114629820B (en) * 2022-03-25 2023-09-12 阿里巴巴(中国)有限公司 Network connectivity detection method, device, equipment and medium
CN114629822A (en) * 2022-04-18 2022-06-14 北京小米移动软件有限公司 Link detection method and device, electronic equipment and storage medium
CN114629822B (en) * 2022-04-18 2024-06-11 北京小米移动软件有限公司 Link detection method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105634857A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
WO2016082588A1 (en) Link connectivity checking method and apparatus
CN108234235B (en) Method, network device and computer-readable storage medium for data monitoring
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US10382309B2 (en) Method and apparatus for tracing paths in service function chains
US9363178B2 (en) Method, apparatus, and system for supporting flexible lookup keys in software-defined networks
US9497107B1 (en) Seamless path monitoring and rapid fault isolation using bidirectional forwarding detection in a network environment
CN107078963B (en) Route tracing in virtual extensible local area networks
CN113411260B (en) Method and device for sending data message in IPv6 network
US20130254356A1 (en) Systems and methods for recovery from network changes
WO2016041379A1 (en) Method and apparatus for implementing nni ping
WO2015180292A1 (en) Method and apparatus for detecting user network interface connectivity of virtual private network
EP2557731B1 (en) Method and system for independently implementing fault location by intermediate node
CN103475583B (en) The method and apparatus for removing medium education forwarding-table item
CN104579954A (en) Message cross-domain forwarding method and device as well as communication device
WO2017201521A1 (en) Troubleshooting multi-layered networks using datapath analysis
WO2017000802A1 (en) Service fault location method and device
WO2014019348A1 (en) Method, device and system for operation, management and maintenance of oam configuration
WO2015184771A1 (en) Method and node device for operation, administration, and maintenance of service function chaining
US11522792B2 (en) Method for discovering forwarding path and related device thereof
CN109274588A (en) The processing method and processing device of IP packet
WO2015070614A1 (en) Method and device for detecting connectivity of user side interfaces of l2vpn
CN108400911B (en) Device and method for realizing Micro-BFD protocol
WO2016044990A1 (en) Method and apparatus for determining network topology, and centralized network state information storage device
US9154409B2 (en) Method for debugging private VLAN
WO2015024523A1 (en) Ip bearer network failure determining method and system

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: 15863033

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: 15863033

Country of ref document: EP

Kind code of ref document: A1