CN106789438A - A kind of device connectivity detection method and device - Google Patents

A kind of device connectivity detection method and device Download PDF

Info

Publication number
CN106789438A
CN106789438A CN201611248762.9A CN201611248762A CN106789438A CN 106789438 A CN106789438 A CN 106789438A CN 201611248762 A CN201611248762 A CN 201611248762A CN 106789438 A CN106789438 A CN 106789438A
Authority
CN
China
Prior art keywords
purpose equipment
icmp
equal
link
cost
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611248762.9A
Other languages
Chinese (zh)
Inventor
王冠聪
王朝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201611248762.9A priority Critical patent/CN106789438A/en
Publication of CN106789438A publication Critical patent/CN106789438A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results

Abstract

The application provides a kind of device connectivity detection method and device, and methods described includes:ICMP Request messages are built based on the PING orders for receiving;The ICMP Request messages are sent to the purpose equipment by all equal-cost links based on preset strategy, and determines whether connect with the network link between the purpose equipment based on whether the purpose equipment returns to ICMP Reply messages;Whether the PING results connected with the network link between the purpose equipment are exported by default user interface.Because the application sends ICMP Request messages by all links between the network equipment and purpose equipment, therefore, as long as locally with there is the link that connects in the link of the purpose equipment, can just be communicated with purpose equipment, will not be because of selection faulty link after PING requests are sent, the state to network link does the judgement for making mistake.

Description

A kind of device connectivity detection method and device
Technical field
The application is related to communication technical field, more particularly to a kind of device connectivity detection method and device.
Background technology
PING (Packet Internet Groper, the Internet packets survey meter) is ICMP (Internet Control Message Protocol, Internet Control Message Protocol) an important application, for check network it is whether unimpeded or detection network Speed, can help customer analysis and judge network failure.The network equipment sends ICMP to a specific purpose equipment Request messages, receiving the equipment of the ICMP Request messages can return to ICMP Reply messages.If network equipment energy The ICMP Reply messages of purpose equipment return are enough received, illustrates that the network between the network equipment and purpose equipment is in connected state State.
In the prior art, when there is equal-cost route between the network equipment and purpose equipment, if a certain bar equivalence road By link break down, the network equipment selected in the case where the link failure is not known the link send echo request message, PING time-out can then be caused, now the network equipment can make the obstructed false judgment of network link between purpose equipment;And Purpose equipment is after ICMP Request messages are received, if the link broken down in selection equal-cost route returns to ICMP Reply messages, then can equally make the network equipment do the judgement for making mistake.
The content of the invention
In view of this, the application provides a kind of device connectivity detection method and device, is used to solve prior art in net When there is equal-cost route between network equipment and purpose equipment, the network equipment may be to the state of network link after sending PING requests Do the problem of the judgement for making mistake.
Specifically, the application is achieved by the following technical solution:
A kind of device connectivity detection method, is applied to the network equipment, exists between the network equipment and purpose equipment A plurality of equal-cost link, including:
ICMP Request messages are built based on the PING orders for receiving;
The ICMP Request messages are sent to the purpose equipment by all equal-cost links based on preset strategy, and Determine when whether returning to ICMP Reply messages based on the purpose equipment and whether the network link between the purpose equipment Connection;
Whether the ping results connected with the network link between the purpose equipment are exported by default user interface.
In the device connectivity detection method, it is described based on preset strategy by all equal-cost links to the purpose Equipment sends the ICMP Request messages, and determine when whether returning to ICMP Reply messages based on the purpose equipment with Whether the network link between the purpose equipment connects, including:
All equal-cost links between traversal and the purpose equipment, are set to the purpose respectively by each bar equal-cost link Preparation send the ICMP Request messages;
After ICMP Request messages are sent by any equal-cost link, if receiving purpose equipment default super When the time in return ICMP Reply messages, it is determined that with the network link between the purpose equipment be in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment respectively, still failed The ICMP Reply messages that the purpose equipment is returned are received in the default time-out time, it is determined that set with the purpose There is failure in the network link between standby.
In the device connectivity detection method, it is described based on preset strategy by all equal-cost links to the purpose Equipment sends the ICMP Request messages, and determine when whether returning to ICMP Reply messages based on the purpose equipment with Whether the network link between the purpose equipment connects, including:
Based on all equal-cost links between the purpose equipment, the ICMP is sent simultaneously to the purpose equipment Request messages;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that with institute The network link stated between purpose equipment is in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment simultaneously, still failed The ICMP Reply messages that the purpose equipment is returned are received in the default time-out time, it is determined that set with the purpose There is failure in the network link between standby.
In the device connectivity detection method, also include:
The equal-cost link that user specifies is determined based on the PING orders for receiving;
The ICMP Request messages are sent to the purpose equipment based on the equal-cost link that user specifies;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that the chain Road is in connected state.
In the device connectivity detection method, also include:
When receiving the ICMP Request messages that the purpose equipment sends, search and ICMP Request reports The corresponding equal-cost route of receiving port and source IP of text, and ICMP is returned to the purpose equipment based on the equal-cost route for finding Reply messages;Or, corresponding with the source MAC of ICMP Request messages IP address is searched, using the IP address as next The corresponding equal-cost route of source IP lookup for combining the ICMP Request messages is jumped, and based on the equal-cost route for finding to institute State purpose equipment and return to ICMP Reply messages.
In the device connectivity detection method, the PING results of output include corresponding to each equal-cost link Outgoing interface information.
A kind of device connectivity detection device, is applied to the network equipment, exists between the network equipment and purpose equipment A plurality of equal-cost link, including:
Construction unit, for building ICMP Request messages based on the PING orders for receiving;
Transmitting element, for sending the ICMP to the purpose equipment by all equal-cost links based on preset strategy Request messages, and determine and the purpose equipment between based on whether the purpose equipment returns to ICMP Reply messages Whether network link connects;
Whether output unit, the network link for being exported by default user interface and between the purpose equipment is connected Logical PING results.
In the device connectivity detection device, the transmitting element is further used for:
All equal-cost links between traversal and the purpose equipment, are set to the purpose respectively by each bar equal-cost link Preparation send the ICMP Request messages;
After ICMP Request messages are sent by any equal-cost link, if receiving purpose equipment default super When the time in return ICMP Reply messages, it is determined that with the network link between the purpose equipment be in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment respectively, still failed The ICMP Reply messages that the purpose equipment is returned are received in the default time-out time, it is determined that set with the purpose There is failure in the network link between standby.
In the device connectivity detection device, the transmitting element is further used for:
Based on all equal-cost links between the purpose equipment, the ICMP is sent simultaneously to the purpose equipment Request messages;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that with institute The network link stated between purpose equipment is in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment simultaneously, still failed The ICMP Reply messages that the purpose equipment is returned are received in the default time-out time, it is determined that set with the purpose There is failure in the network link between standby.
In the device connectivity detection device, the transmitting element is further used for:
The equal-cost link that user specifies is determined based on the PING orders for receiving;
The ICMP Request messages are sent to the purpose equipment based on the equal-cost link that user specifies;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that the chain Road is in connected state.
In the device connectivity detection device, described device also includes:
The transmitting element, is further used for receiving the ICMP Request messages that the purpose equipment sends When, equal-cost route corresponding with the receiving port and source IP of the ICMP Request messages is searched, and based on the equivalence for finding It route and returns to ICMP Reply messages to the purpose equipment;Or, search corresponding with the source MAC of the ICMP Request messages IP address, the source IP that the IP address is combined into the ICMP Request messages as next-hop searches corresponding road of equal value By, and ICMP Reply messages are returned to the purpose equipment based on the equal-cost route for finding.
In the device connectivity detection device, the PING results of output include corresponding to each equal-cost link Outgoing interface information.
In the embodiment of the present application, the network equipment is based on the PING orders for receiving, and builds ICMP Request messages, so Preset strategy is based on afterwards, and ICMP Request messages, and base are sent by all equal-cost links locally between purpose equipment It is with the network link between the purpose equipment locally in the ICMP Reply messages the determination whether purpose equipment returns It is no in connected state, then exported by default user interface and whether connected with the network link between the purpose equipment PING results.Reported because the embodiment of the present application sends ICMP Request by all links locally between purpose equipment Text, therefore, as long as locally with there is the link that connects in the link of the purpose equipment, it is possible to led to purpose equipment Letter, will not be because of selection faulty link after PING requests are sent, and the state to network link does the judgement for making mistake.
Brief description of the drawings
Fig. 1 is a kind of frame construction drawing of device connectivity detection shown in the application;
Fig. 2 is the frame construction drawing of another device connectivity detection shown in the application;
Fig. 3 is a kind of flow chart of the device connectivity detection method shown in the application;
Fig. 4 is a kind of embodiment block diagram of the device connectivity detection device shown in the application;
Fig. 5 is a kind of hardware structure diagram of the device connectivity detection device shown in the application.
Specific embodiment
In order that those skilled in the art more fully understand the technical scheme in the embodiment of the present invention, and make of the invention real Applying the above-mentioned purpose of example, feature and advantage can be more obvious understandable, below in conjunction with the accompanying drawings to prior art and the present invention Technical scheme in embodiment is described in further detail.
The PING orders that the network equipment can be based on receiving build ICMP Request messages, are then forwarded to purpose and set It is standby, to determine whether network link locally between purpose equipment connects.If existed between the network equipment and purpose equipment During a plurality of equal-cost link, the network equipment sends ICMP Request messages it is possible that following two situation to purpose equipment:
It is a kind of frame construction drawing of device connectivity detection shown in the application, as shown in figure 1, network sets referring to Fig. 1 It is standby to there are 3 equal-cost links with purpose equipment, respectively through router A, router B and router C.Wherein, the network equipment with There is open circuit, router B and mesh between router B and purpose equipment in the network link between purpose equipment by router B Equipment cannot be communicated.
In this case, if the network equipment is when ICMP Request messages are sent, according to default equal-cost route Routing Algorithm select by router B link, then ICMP Request messages cannot be sent to purpose equipment through router B, Therefore purpose equipment will not return to ICMP Reply messages to the network equipment.The network equipment after default time-out time is reached, Due to not receiving ICMP Reply messages, judge that the network link locally with purpose equipment is off.
It is the frame construction drawing of another device connectivity detection shown in the application, as shown in Fig. 2 network referring to Fig. 2 There are 3 equal-cost links in equipment, with purpose equipment respectively through router A, router B and router C.Wherein, the network equipment There is open circuit between the network equipment and router B by the network link of router B between purpose equipment, router B and The network equipment cannot be communicated.
In this case, if network equipment selection sends ICMP Request messages, mesh by the link of router A Equipment can receive ICMP Request messages.Purpose equipment to the network equipment return ICMP Reply when, if root According to default equal-cost route Routing Algorithm selection by router B link, then ICMP Reply messages cannot be sent out through router B Deliver to the network equipment.The network equipment, due to not receiving ICMP Reply messages, judges this after default time-out time is reached Ground is off with the network link of purpose equipment.
It can be seen that, when there is a plurality of equal-cost link between the network equipment and purpose equipment, the network equipment is based on prior art ICMP Request messages are sent, and whether the net between the determination of ICMP Reply messages and purpose equipment is returned to purpose equipment The strategy whether network link connects, may make network equipment do the judgement for making mistake.
To solve the above problems, the technical scheme of the embodiment of the present application exists many between the network equipment and purpose equipment In the case of bar equal-cost link, ICMP Request messages are sent to purpose equipment by all equal-cost links, evaded and having set During standby connective detection, because of the link broken down in selection equal-cost link, and cause to make the connected state of network link The risk of erroneous judgement.
It is a kind of flow chart of the device connectivity detection method shown in the application, the executive agent of the method referring to Fig. 3 It is the network equipment, the described method comprises the following steps:
Step 301:ICMP Request messages are built based on the PING orders for receiving.
Step 302:The ICMP is sent to the purpose equipment by all equal-cost links based on preset strategy Request messages, and determine and the purpose equipment between based on whether the purpose equipment returns to ICMP Reply messages Whether network link connects.
Step 303:Exported by default user interface and whether connected with the network link between the purpose equipment PING results.
In the embodiment of the present application, in the connectedness for needing the network link between detection network equipment and purpose equipment When, user can on network devices be input into PING orders.The network equipment is based on the PING orders for receiving, and builds ICMP Request messages.
After the completion of above-mentioned ICMP Request messages structure, the network equipment can be based on preset strategy by locally and mesh Equipment between all equal-cost links, above-mentioned ICMP Request messages are sent to purpose equipment, to determine locally and purpose Whether the network link between equipment connects.
In the embodiment of the present application, the network equipment can based on the mode that preset strategy sends above-mentioned ICMP Request messages To there is following several embodiments:
In a kind of implementation method for showing, the network equipment can travel through all equal-cost links and purpose equipment between, Then above-mentioned ICMP Request messages are sent to purpose equipment by each bar equal-cost link respectively.The network equipment is by any After equal-cost link sends above-mentioned ICMP Request messages, default time-out time is waited, if in default time-out time Receive the ICMP Reply messages of purpose equipment return, it is determined that the equal-cost link is in connected state.
If in default time-out time, the network equipment is not received by the icmp packet of purpose equipment return, then really The fixed equal-cost link is off, and now, the network equipment can select other equal-cost link to send ICMP Request Message, until all of equal-cost link is all sent.
If after all equal-cost links send ICMP Request messages to purpose equipment respectively, the network equipment is all the time Fail to receive the ICMP Reply that purpose equipment is returned in the default time-out time after ICMP Request messages send Message, then can determine that the network link locally between purpose equipment has failure.
In the another embodiment for showing, the network equipment can be based on all equivalences locally between purpose equipment Link, above-mentioned ICMP Request messages are sent to purpose equipment simultaneously.
The network equipment waits default super after above-mentioned ICMP Request messages are sent simultaneously by all equal-cost links When the time, if in default time-out time, the network equipment does not receive ICMP Reply messages from any equal-cost link, Then determine that the network link locally between purpose equipment has failure.
If in default time-out time, the network equipment can receive ICMP from least one equal-cost link Reply messages, it is determined that connected during the equal-cost link that can receive ICMP Reply messages, locally between purpose equipment Network link is in connected state.
In the embodiment of the present application, the equal-cost link that the network equipment can also be specified by user sends to purpose equipment ICMP Request messages.In this case, comprising the equivalence specified in the PING orders that user is input on network devices The information of link, wherein, the information of equal-cost link can include outgoing interface IP address, outgoing interface or next-hop.When user is defeated The PING orders for entering include any in above-mentioned three, then the PING orders that network equipment can be based on receiving determine user The equal-cost link specified.
The network equipment is it is determined that after the equal-cost link specified of user, ICMP is sent according to the chain road direction purpose equipment Request messages, wait default time-out time, if in default time-out time, receiving purpose equipment return ICMP Reply messages, it is determined that the equal-cost link that user specifies is in connected state.If in default time-out time, begun The ICMP Reply messages of purpose equipment return are not received eventually, it is determined that the equal-cost link that user specifies breaks down.
In the embodiment of the present application, if purpose equipment is based on the PING orders for receiving, ICMP Request reports are built Text sends to the network equipment, after the network equipment receives ICMP Request messages, the ICMP Request messages can be parsed first, Obtain the source IP and purpose IP of the ICMP Request messages.If above-mentioned purpose IP is local IP address, this is illustrated ICMP Request messages have been arrived at, at this point it is possible to the source IP of the ICMP Request messages and purpose IP are exchanged, Assembling ICMP Reply messages.
To avoid situation as shown in Figure 2, network equipment prioritizing selection by receive the ICMP Request messages etc. Valency chain road direction purpose equipment sends ICMP Reply messages.
In a kind of implementation method for showing, after the network equipment receives ICMP Request messages, if the ICMP The purpose IP of Request messages is local IP address, and interface message table is searched according to purpose IP, obtains and receives the ICMP The port numbers of the receiving port of Request messages;Wherein, above-mentioned interface message table includes the port numbers and receiving terminal of receiving port The mapping relations of the IP address of mouth.The network equipment can be based on longest match principle, and preferential acquisition in the routing table corresponds to and is somebody's turn to do The mask-length of the source IP of the icmp packet network segment most long, and it is also identical with receiving port according to outgoing interface, determine route table items. It is exactly wherein between the network equipment and purpose equipment in equal-cost link that the route table items are corresponding, then according to the routing table The corresponding equal-cost link of item sends ICMP Reply messages to purpose equipment.Purpose equipment is receiving network equipment transmission After ICMP Reply messages, it may be determined that network link between the two is in connected state.
In the another embodiment for showing, after the network equipment receives ICMP Request messages, this can be parsed ICMP Request messages, obtain the MAC Address of the ICMP Request messages, are then searched according to the MAC Address local ARP, obtains the corresponding IP address of the MAC Address.The network equipment can be based on longest match principle, in the routing table preferentially The mask-length of the source IP for corresponding to the ICMP Request messages network segment most long is obtained, and according to next-hop and MAC ground The corresponding IP address in location is also identical, determines route table items.It is exactly between the network equipment and purpose equipment etc. that the route table items are corresponding Wherein one in valency link, ICMP Reply messages to purpose is then sent according to the corresponding equal-cost link of the route table items and is set It is standby.Purpose equipment is after the ICMP Reply messages for receiving network equipment transmission, it may be determined that network link between the two In connected state.
If the network equipment does not find the equal-cost link for receiving the ICMP Request messages, can be based on existing Equal-cost route Routing Algorithm in technical scheme, selects one, so in the equal-cost link between the network equipment and purpose equipment The equal-cost link according to selection sends ICMP Reply messages to purpose equipment afterwards.Purpose equipment is receiving network equipment transmission ICMP Reply messages after, it may be determined that network link between the two be in connected state.
In the embodiment of the present application, the network equipment is it is determined that locally whether the network link between purpose equipment connects Afterwards, whether the PING results connected with the network link between the purpose equipment can be exported in default user interface. Wherein, the outgoing interface information corresponding to each equal-cost link can be included in the above-mentioned PING results of output.User can be from going out to connect The equal-cost link in connected state is known clearly in message breath.
In sum, for when there is a plurality of equal-cost link between network equipment and purpose equipment, the network equipment is based on Prior art performs PING orders, may do the judgement for making mistake to the connectedness of network link, in the embodiment of the present application, The network equipment receive PING orders build ICMP Request messages after, based on it is default strategy by all equal-cost links To purpose equipment send ICMP Request messages, then with purpose equipment whether return ICMP Reply messages determine locally with Whether the network link between purpose equipment connects, and output includes the PING results of the outgoing interface information of equal-cost link.
Because the embodiment of the present application sends ICMP Request messages by all links locally between purpose equipment, Therefore, if locally with there is the link that connects in the link of the purpose equipment, it is possible to communicated with purpose equipment, no Can be because of selection faulty link after PING requests are sent, the state to network link does the judgement for making mistake.
Embodiment with the application device connectivity detection method is corresponding, present invention also provides for performing above-mentioned side The embodiment of the device of method embodiment.
It is a kind of embodiment block diagram of the device connectivity detection device shown in the application referring to Fig. 4:
As shown in figure 4, the device connectivity detection device 40 includes:
Construction unit 410, for building ICMP Request messages based on the PING orders for receiving.
Transmitting element 420, for sending described to the purpose equipment by all equal-cost links based on preset strategy ICMP Request messages, and based on the purpose equipment whether return ICMP Reply messages determine and the purpose equipment it Between network link whether connect.
Output unit 430, the network link for being exported by default user interface and between the purpose equipment is The PING results of no connection.
In this example, the transmitting element 420, is further used for:
All equal-cost links between traversal and the purpose equipment, are set to the purpose respectively by each bar equal-cost link Preparation send the ICMP Request messages;
After ICMP Request messages are sent by any equal-cost link, if receiving purpose equipment default super When the time in return ICMP Reply messages, it is determined that with the network link between the purpose equipment be in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment respectively, still failed The ICMP Reply messages that the purpose equipment is returned are received in the default time-out time, it is determined that set with the purpose There is failure in the network link between standby.
In this example, the transmitting element 420, is further used for:
Based on all equal-cost links between the purpose equipment, the ICMP is sent simultaneously to the purpose equipment Request messages;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that with institute The network link stated between purpose equipment is in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment simultaneously, still failed The ICMP Reply messages that the purpose equipment is returned are received in the default time-out time, it is determined that set with the purpose There is failure in the network link between standby.
In this example, the transmitting element 420, is further used for:
The equal-cost link that user specifies is determined based on the PING orders for receiving;
The ICMP Request messages are sent to the purpose equipment based on the equal-cost link that user specifies;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that the chain Road is in connected state.
In this example, the transmitting element 420, is further used for:
When receiving the ICMP Request messages that the purpose equipment sends, search and ICMP Request reports The corresponding equal-cost route of receiving port and source IP of text, and ICMP is returned to the purpose equipment based on the equal-cost route for finding Reply messages;Or, corresponding with the source MAC of ICMP Request messages IP address is searched, using the IP address as next The corresponding equal-cost route of source IP lookup for combining the ICMP Request messages is jumped, and based on the equal-cost route for finding to institute State purpose equipment and return to ICMP Reply messages.
In this example, the PING results of output include corresponding to the outgoing interface information of each equal-cost link.
The embodiment of the application device connectivity detection device can be using on network devices.Device embodiment can lead to Cross software realization, it is also possible to realized by way of hardware or software and hardware combining.As a example by implemented in software, as a logic Device in meaning, is to be referred to corresponding computer program in nonvolatile memory by the processor of the network equipment where it Order runs what is formed in reading internal memory.From for hardware view, as shown in figure 5, being the application device connectivity detection device A kind of hardware structure diagram of the place network equipment, except the processor shown in Fig. 5, internal memory, network interface and non-volatile deposits Outside reservoir, the network equipment in embodiment where device is gone back generally according to the actual functional capability of the device connectivity detection device Other hardware can be included, this is repeated no more.
The function of unit and the implementation process of effect correspond to step in specifically referring to the above method in said apparatus Implementation process, will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is referring to method reality Apply the part explanation of example.Device embodiment described above is only schematical, wherein described as separating component The unit of explanation can be or may not be physically separate, and the part shown as unit can be or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Selection some or all of module therein is needed to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, is not used to limit the application, all essences in the application Within god and principle, any modification, equivalent substitution and improvements done etc. should be included within the scope of the application protection.

Claims (12)

1. a kind of device connectivity detection method, is applied to the network equipment, exists between the network equipment and purpose equipment many Bar equal-cost link, it is characterised in that including:
ICMP Request messages are built based on the PING orders for receiving;
The ICMP Request messages are sent to the purpose equipment by all equal-cost links based on preset strategy, and is based on Whether whether the purpose equipment returns to ICMP Reply messages determines connect with the network link between the purpose equipment;
Whether the PING results connected with the network link between the purpose equipment are exported by default user interface.
2. method according to claim 1, it is characterised in that it is described based on preset strategy by all equal-cost links to institute State purpose equipment and send the ICMP Request messages, and when whether returning to ICMP Reply messages based on the purpose equipment It is determined that whether connected with the network link between the purpose equipment, including:
All equal-cost links between traversal and the purpose equipment, are sent out to the purpose equipment respectively by each bar equal-cost link Send the ICMP Request messages;
After ICMP Request messages are sent by any equal-cost link, if receiving purpose equipment when default overtime The ICMP Reply messages of interior return, it is determined that be in connected state with the network link between the purpose equipment;
If after all equal-cost links send ICMP Request messages to the purpose equipment respectively, still failed described The ICMP Reply messages that the purpose equipment is returned are received in default time-out time, it is determined that with the purpose equipment it Between network link there is failure.
3. method according to claim 1, it is characterised in that it is described based on preset strategy by all equal-cost links to institute State purpose equipment and send the ICMP Request messages, and when whether returning to ICMP Reply messages based on the purpose equipment It is determined that whether connected with the network link between the purpose equipment, including:
Based on all equal-cost links between the purpose equipment, the ICMP is sent simultaneously to the purpose equipment Request messages;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that with the mesh Equipment between network link be in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment simultaneously, still failed described The ICMP Reply messages that the purpose equipment is returned are received in default time-out time, it is determined that with the purpose equipment it Between network link there is failure.
4. according to the method in claim 2 or 3, it is characterised in that methods described also includes:
The equal-cost link that user specifies is determined based on the PING orders for receiving;
The ICMP Request messages are sent to the purpose equipment based on the equal-cost link that user specifies;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that at the link In connected state.
5. method according to claim 1, it is characterised in that methods described also includes:
When receiving the ICMP Request messages that the purpose equipment sends, search and the ICMP Request messages Receiving port and the corresponding equal-cost route of source IP, and ICMP is returned to the purpose equipment based on the equal-cost route for finding Reply messages;Or, corresponding with the source MAC of ICMP Request messages IP address is searched, using the IP address as next The corresponding equal-cost route of source IP lookup for combining the ICMP Request messages is jumped, and based on the equal-cost route for finding to institute State purpose equipment and return to ICMP Reply messages.
6. method according to claim 1, it is characterised in that the PING results of output include corresponding to each equivalence The outgoing interface information of link.
7. a kind of device connectivity detection device, is applied to the network equipment, exists between the network equipment and purpose equipment many Bar equal-cost link, it is characterised in that including:
Construction unit, for building ICMP Request messages based on the PING orders for receiving;
Transmitting element, for sending the ICMP to the purpose equipment by all equal-cost links based on preset strategy Request messages, and determine and the purpose equipment between based on whether the purpose equipment returns to ICMP Reply messages Whether network link connects;
Whether output unit, connected for being exported by default user interface with the network link between the purpose equipment PING results.
8. device according to claim 7, it is characterised in that the transmitting element, is further used for:
All equal-cost links between traversal and the purpose equipment, are sent out to the purpose equipment respectively by each bar equal-cost link Send the ICMP Request messages;
After ICMP Request messages are sent by any equal-cost link, if receiving purpose equipment when default overtime The ICMP Reply messages of interior return, it is determined that be in connected state with the network link between the purpose equipment;
If after all equal-cost links send ICMP Request messages to the purpose equipment respectively, still failed described The ICMP Reply messages that the purpose equipment is returned are received in default time-out time, it is determined that with the purpose equipment it Between network link there is failure.
9. device according to claim 7, it is characterised in that the transmitting element, is further used for:
Based on all equal-cost links between the purpose equipment, the ICMP is sent simultaneously to the purpose equipment Request messages;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that with the mesh Equipment between network link be in connected state;
If after all equal-cost links send ICMP Request messages to the purpose equipment simultaneously, still failed described The ICMP Reply messages that the purpose equipment is returned are received in default time-out time, it is determined that with the purpose equipment it Between network link there is failure.
10. device according to claim 8 or claim 9, it is characterised in that the transmitting element, is further used for:
The equal-cost link that user specifies is determined based on the PING orders for receiving;
The ICMP Request messages are sent to the purpose equipment based on the equal-cost link that user specifies;
If receive the purpose equipment returns to ICMP Reply messages in default time-out time, it is determined that at the link In connected state.
11. devices according to claim 7, it is characterised in that described device also includes:
The transmitting element, when being further used for receiving the ICMP Request messages of the purpose equipment transmission, looks into Look for equal-cost route corresponding with the receiving port and source IP of the ICMP Request messages, and based on the equal-cost route for finding to The purpose equipment returns to ICMP Reply messages;Or, search IP ground corresponding with the source MAC of the ICMP Request messages Location, the source IP that the IP address is combined into the icmp packet as next-hop searches corresponding equal-cost route, and based on finding Equal-cost route to the purpose equipment return ICMP Reply messages.
12. devices according to claim 7, it is characterised in that the PING results of output are included corresponding to each etc. The outgoing interface information of valency link.
CN201611248762.9A 2016-12-29 2016-12-29 A kind of device connectivity detection method and device Pending CN106789438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611248762.9A CN106789438A (en) 2016-12-29 2016-12-29 A kind of device connectivity detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611248762.9A CN106789438A (en) 2016-12-29 2016-12-29 A kind of device connectivity detection method and device

Publications (1)

Publication Number Publication Date
CN106789438A true CN106789438A (en) 2017-05-31

Family

ID=58927610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611248762.9A Pending CN106789438A (en) 2016-12-29 2016-12-29 A kind of device connectivity detection method and device

Country Status (1)

Country Link
CN (1) CN106789438A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465610A (en) * 2017-09-04 2017-12-12 长沙曙通信息科技有限公司 A kind of exchange network link safeguards implementation method automatically
CN108809759A (en) * 2018-05-29 2018-11-13 新华三技术有限公司 Detect the method, apparatus and router of link state
CN109120449A (en) * 2018-08-28 2019-01-01 新华三技术有限公司 A kind of detection method and device of link failure
CN112804769A (en) * 2021-02-25 2021-05-14 北京小米移动软件有限公司 Method, device and storage medium for connecting network
CN113746691A (en) * 2021-07-15 2021-12-03 清华大学 ICMP speed limit-based remote IPv6 node mutual connectivity measurement method
CN115333992A (en) * 2022-08-11 2022-11-11 四川灵通电讯有限公司 Link resource optimization method based on standard PRP protocol

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1815970A (en) * 2005-02-01 2006-08-09 华为技术有限公司 Method for detecting network chain fault and positioning said fault
CN101114994A (en) * 2006-07-28 2008-01-30 中兴通讯股份有限公司 Method for detecting connectivity of multi-protocol label switching virtual private network
CN102255775A (en) * 2011-07-18 2011-11-23 中兴通讯股份有限公司 Route tracing method, apparatus thereof, and system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1815970A (en) * 2005-02-01 2006-08-09 华为技术有限公司 Method for detecting network chain fault and positioning said fault
CN101114994A (en) * 2006-07-28 2008-01-30 中兴通讯股份有限公司 Method for detecting connectivity of multi-protocol label switching virtual private network
CN102255775A (en) * 2011-07-18 2011-11-23 中兴通讯股份有限公司 Route tracing method, apparatus thereof, and system thereof

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465610A (en) * 2017-09-04 2017-12-12 长沙曙通信息科技有限公司 A kind of exchange network link safeguards implementation method automatically
CN108809759A (en) * 2018-05-29 2018-11-13 新华三技术有限公司 Detect the method, apparatus and router of link state
CN109120449A (en) * 2018-08-28 2019-01-01 新华三技术有限公司 A kind of detection method and device of link failure
CN112804769A (en) * 2021-02-25 2021-05-14 北京小米移动软件有限公司 Method, device and storage medium for connecting network
CN112804769B (en) * 2021-02-25 2023-08-22 北京小米移动软件有限公司 Method, device and storage medium for connecting network
CN113746691A (en) * 2021-07-15 2021-12-03 清华大学 ICMP speed limit-based remote IPv6 node mutual connectivity measurement method
CN115333992A (en) * 2022-08-11 2022-11-11 四川灵通电讯有限公司 Link resource optimization method based on standard PRP protocol
CN115333992B (en) * 2022-08-11 2024-01-23 四川灵通电讯有限公司 Link resource optimization method based on standard PRP protocol

Similar Documents

Publication Publication Date Title
CN106789438A (en) A kind of device connectivity detection method and device
US9118587B2 (en) Network multi-path discovery
CN103401726B (en) Network path detection method and device, system
US8117301B2 (en) Determining connectivity status for unnumbered interfaces of a target network device
US11368357B2 (en) Service fault locating method and apparatus
US20040240440A1 (en) Virtual network addresses
US8165038B2 (en) Network physical connection inference for IP tunnels
US9942138B2 (en) Method and device for policy based routing
CN107819677A (en) A kind of message forwarding method and device
CN108683632A (en) Firewall security policy method of adjustment and device
EP4002769A1 (en) System and method for evaluating transmission performance related to network node and related device
CN105577413A (en) OAM (Operation, Administration and Management) message processing method and device
JP7124206B2 (en) Packet processing methods and gateway devices
EP3767900A1 (en) Method for discovering forwarding path, and related device thereof
US7881207B2 (en) Method and system for loop-back and continue in packet-based network
CN107659436A (en) A kind of method and device for preventing service disconnection
CN109412851B (en) Link layer path detection method, device and system
US20230155933A1 (en) BIER OAM Detection Method, Device, and System
CN114268578B (en) Data transmission method, device, equipment and storage medium for switching line
CN108833282A (en) Data forwarding method, system, device and SDN switch
CN104168132A (en) Fault diagnosis method, equipment and system
Cisco Troubleshooting Internetworking Systems
Cisco Troubleshooting ISO CLNS Connectivity
US20220337515A1 (en) Routing Information Processing Method and Apparatus
CN112291148B (en) Method for detecting BFD forwarding path quality through BFD ping

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531

RJ01 Rejection of invention patent application after publication