CN102739462B - Test message sending method and device - Google Patents

Test message sending method and device Download PDF

Info

Publication number
CN102739462B
CN102739462B CN201110088580.0A CN201110088580A CN102739462B CN 102739462 B CN102739462 B CN 102739462B CN 201110088580 A CN201110088580 A CN 201110088580A CN 102739462 B CN102739462 B CN 102739462B
Authority
CN
China
Prior art keywords
routing device
test packet
routing
ttl
setting identification
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.)
Active
Application number
CN201110088580.0A
Other languages
Chinese (zh)
Other versions
CN102739462A (en
Inventor
黄璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group 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 China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201110088580.0A priority Critical patent/CN102739462B/en
Publication of CN102739462A publication Critical patent/CN102739462A/en
Application granted granted Critical
Publication of CN102739462B publication Critical patent/CN102739462B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a test message sending method and a device. The method mainly comprises: a first routing device receives a first test message sent by a source host or forwarded by a second routing device from the source host; the first routing device determines a routing network segment of a destination host address carried by the first test message and a mark is added and set; when a forwarding condition that carried TTL of the first test message is more than 1 and a third routing device as a next hop of the first routing device can be reached is determined to be met by the first routing device, the first test message is forwarded to the third routing device; and if the first routing device determines that the carried TTL of the first test message is more than 1 and that the third routing device as the next hop of the first routing device cannot be reached, the first test message is abandoned. By adopting the technical scheme to send the test message, the source host can locate a fault position in the routing path.

Description

A kind of sending method of test packet and device
Technical field
The present invention relates to network communication technology field, particularly relate to a kind of sending method and device of test packet.
Background technology
Along with the develop rapidly of ICT (information and communication technology), computer network has become the indispensable part of people.Once network communication is broken down, work may be caused to paralyse state, the work of people and life are sustained a loss.Therefore, when network failure, how to orient abort situation fast and effectively, be that industry is sought and expects the problem of solution always.
Route tracking (Traceroute) technology be commonly used to detect data message from source host to destination host the routed path of process, and detect the routed path arriving destination host address and whether can reach.At present, Traceroute technology sends the routed path of mode detection resources main frame to destination host of test packet to destination host mainly through source host, the test packet used can for the purpose of User Datagram Protocol (the User Datagram Protocol of port numbers exception, be called for short UDP) data message (as arranged destination slogan super large), also can be Internet Control Message Protocol (Internet Control Message Protocol) Internet, be called for short ICMP) acknowledges requests message.Be described by the main process of Traceroute technology for detection source host to the routed path of destination host below in conjunction with Fig. 1, figure 1 show the routed path between source host 1 to destination host 2, the IP address that hypothesis goal main frame is corresponding is 1.1.1.1, the routing device that will experience to destination host 2 from source host 1 comprises: routing device A, routing device B, routing device C and routing device D, wherein, the down hop of the routing table of the sensing destination host preserved in routing device A is routing device B, the down hop of the routing table of the sensing destination host preserved in routing device B is routing device C, the down hop of the routing table of the sensing destination host preserved in routing device C is routing device D.
As shown in Figure 2, the routed path between detection resources main frame 1 to destination host 2, mainly comprises the steps:
It is that the test packet of 1 is to destination host 2 that step 201, source host 1 send a life span (Time To Live is called for short TTL).
After step 202, first the routing device A processing this test packet receive this test packet, the TTL carried is subtracted 1 and obtain the test packet that TTL is 0, abandon this test packet, and send the icmp packet of TTL time-out to source host 1 in this test packet.
The icmp packet of the TTL time-out that step 203, source host 1 send according to routing device A, obtains the address of this routing device A.
The address of routing device A preserved by step 204, source host 1, and to send a TTL to routing device A be the test packet of 2, obtains the address of routing device B.
In this step 204, after test packet arrives routing device A, the TTL of this test packet is subtracted 1 and obtains the test packet that TTL is 1 by routing device A, and the test packet that this TTL is 1 according to the routing table of preserving by this routing device A is transmitted to routing device B; It is after the test packet of 1 that routing device B receives this TTL, the TTL of this test packet is subtracted 1 and obtain the test packet that TTL is 0, abandon this test packet, and send the icmp packet of a TTL time-out, the icmp packet of this TTL time-out arrives source host 1 by routing device A, the icmp packet of this TTL time-out that source host 1 sends according to routing device B, obtains the address of this routing device B.
The address of routing device B preserved by step 205, source host 1, and to send a TTL to routing device A be the test packet of 3, obtains the address of routing device C.
The concrete processing procedure of this step 205 is substantially identical with the concrete processing procedure of above-mentioned steps 204, namely after test packet arrives routing device A, the TTL of this test packet is subtracted 1 and obtains the test packet that TTL is 2 by routing device A, and the test packet that this TTL is 2 according to the routing table of preserving by this routing device A is transmitted to routing device B; It is after the test packet of 2 that routing device B receives this TTL, the TTL of test packet is subtracted 1 and obtains the test packet that TTL is 1, and the test packet that this TTL is 1 according to the routing table of preserving by this routing device B is further transmitted to routing device C; It is after the test packet of 1 that routing device C receives this TTL, the TTL of this test packet is subtracted 1 and obtain the test packet that TTL is 0, routing device C abandons this test packet, and send the icmp packet of a TTL time-out, the icmp packet of this TTL time-out arrives source host 1 by routing device B, routing device A, the icmp packet of the TTL time-out that source host 1 sends according to routing device C, obtains the address of routing device C.
The address of the routing device C obtained preserved by step 206, source host 1, and sending a TTL to routing device A is the test packet of 4, obtains the address of routing device D.
The concrete processing procedure of this step 206 is substantially identical with the concrete processing procedure of above-mentioned steps 204, namely after test packet arrives routing device A, the TTL of this test packet is subtracted 1 and obtains the test packet that TTL is 3 by routing device A, and the test packet that this TTL is 3 according to the routing table of preserving by this routing device A is transmitted to routing device B; It is after the test packet of 3 that routing device B receives this TTL, the TTL of this test packet is subtracted 1 obtain TTL be the test of 2 according to message, the test packet that this TTL is 2 according to the routing table of preserving by this routing device B is transmitted to routing device C; It is after the test packet of 2 that routing device C receives this TTL, the TTL of this test packet is subtracted 1 and obtains the test packet that TTL is 1, and the test packet that this TTL is 1 according to the routing table of preserving by this routing device C is transmitted to routing device D; It is after the test packet of 1 that routing device D receives this TTL, the TTL of this test packet is subtracted 1 and obtain the test packet that TTL is 0, routing device D abandons this test packet, and send the icmp packet of a TTL time-out, the icmp packet of this TTL time-out is by after routing device C, routing device B, routing device A arrival source host 1, the icmp packet of this TTL time-out that source host 1 sends according to routing device D, obtains the address of routing device D.
The address of routing device D preserved by step 207, source host 1, to routing device A send a TTL be the test packet of 5 to destination host 2, and receive the feedback information of destination host 2 for the test packet received.
In this step 207, if test packet is the UDP message message of port numbers super large, after then destination host 2 receives this message, because any one application program of destination host does not all use this port numbers, the icmp packet that destination host can produce the inaccessible mistake of port sends to source host 1 as feedback information; If test packet is ICMP acknowledges requests message, after destination host 2 receives this message, send a normal ICMP response message to source host 1.
By above-mentioned flow process, source host 1 can preserve arrive destination host 2 routed path on the address of each routing device, thus determine that data message arrives the routed path of destination host 2.
In IP route network, when the routed path occurring that link failure (or other fault) causes arriving certain destination host address is unreachable, this routed path can lose efficacy at the whole network, and whether source host can be able to be reached by this routed path of Traceroute technology for detection.Particularly, suppose that the routing device D in Fig. 1 breaks down, then routing device C can issue route break message at the whole network, the route network segment pointing to this destination host address in routing table is set to lose efficacy by each routing device (as routing device A and routing device B) receiving route break message, like this, when whether source host 1 needs routed path destination address 2 being detected can reach, detection messages can be sent to destination host 2, because the route network segment pointing to the destination address of this message is set to invalid, then this detection messages can directly abandon by routing device A, and follow-up forwarding can not be carried out, also corresponding information can not be fed back to source host 1, in this case, source host 1 does not receive routing device A feedack in setting duration, then determine that the routed path of destination host 2 is unreachable.
According to technique scheme, source host 1 can only detect that the routed path arriving destination host 2 is unreachable, but cannot detect abort situation specifically appears at which link of routed path, therefore, source host cannot orient the position that routed path breaks down.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of sending method and device of test packet, and adopt this technical scheme to carry out the transmission of test packet, source host can orient the abort situation on routed path.
The embodiment of the present invention is achieved through the following technical solutions:
According to an aspect of the embodiment of the present invention, provide a kind of sending method of test packet, comprising:
First routing device receives and to be sent by source host or by first test packet from described source host of secondary route device forwards; Wherein, if described first test packet is by described secondary route device forwards, to be then described source host send described first test packet after receiving the message response of described first routing device for the life span TTL time-out fed back with the second test packet that described first test packet has identical destination host address;
First routing device determines that the route network segment arriving the destination host address that described first test packet carries is added setting identification, wherein, to be used to indicate the destination host address arrived by the described route network segment unreachable and be used to indicate described first test packet and continue to be forwarded when satisfied forwarding condition for described setting identification;
First routing device determine described first test packet meet the TTL carried be greater than 1 and the forwarding condition that can reach as the 3rd routing device of described first routing device down hop time, described first test packet is transmitted to described 3rd routing device;
First routing device determine TTL that described first test packet carries be greater than 1 and unreachable as the 3rd routing device of described first routing device down hop time, abandon described first test packet.
According to another aspect of the embodiment of the present invention, additionally provide a kind of dispensing device of test packet, comprising:
Test packet receiving element, to be sent by source host or by first test packet from described source host of secondary route device forwards for receiving; Wherein, if described first test packet is by described secondary route device forwards, to be then described source host send described first test packet after receiving the message response of the first routing device for the life span TTL time-out fed back with the second test packet that described first test packet has identical destination host address;
Setting identification recognition unit, for determining that the route network segment arriving the destination host address that described first test packet carries is added setting identification, wherein, to be used to indicate the destination host address arrived by the described route network segment unreachable and be used to indicate described first test packet and continue to be forwarded when satisfied forwarding condition for described setting identification;
Test packet processing unit, for determine described first test packet meet the TTL carried be greater than 1 and the forwarding condition that can reach as the 3rd routing device of described first routing device down hop time, described first test packet is transmitted to described 3rd routing device; And, determine TTL that described first test packet carries be greater than 1 and unreachable as the 3rd routing device of described first routing device down hop time, abandon described first test packet.
According to another aspect of the embodiment of the present invention, additionally provide a kind of routing device comprising the dispensing device of above-mentioned test packet.
By at least one technical scheme above-mentioned that the embodiment of the present invention provides, first routing device receive to be sent by source host or by secondary route device forwards from after the first test packet of this source host, determine that the route network segment arriving the destination host address that this first test packet carries is added setting identification, wherein, it is unreachable that this setting identification is used to indicate the destination host address arrived by this route network segment, and be used to indicate this first test packet and continue to be forwarded when satisfied forwarding condition, first routing device is determining that this first test packet meets the TTL carried and is greater than 1, and during the forwarding condition that can reach as the 3rd routing device of this first routing device down hop, the 3rd routing device is given by this first test packet repeating, first routing device is determining that the TTL that this first test packet carries is greater than 1, and it is unreachable as the 3rd routing device of this first routing device down hop, then abandon this first test packet.This technical scheme and prior art provide when occurring that destination host address receives the test packet that source host sends first routing device time unreachable directly abandons compared with the scheme of this test packet, technical solution of the present invention can be unreachable in destination host address, and the TTL of this first test packet is greater than 1, when down hop routing device can reach, continue to forward this first test packet, when the TTL of this first test packet is greater than 1 and down hop routing device is unreachable, just abandon this first test packet, now, because the first test packet is dropped when TTL is greater than 1, source host cannot receive the message response of the TTL time-out for this first test packet, if this first test packet is sent by source host, then can determine as the link failure after this source host between the first first routing device of jumping and its down hop routing device, if this first test packet is forwarded by the second test packet, send after receiving the message response of the first routing device for the TTL time-out fed back with the second test packet that this first test packet has identical destination host address because this first test packet is source host, namely represent that the link before the first routing device is all normal, thus source host can determine the link failure between this first routing device and its down hop routing device.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from specification, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write specification, claims and accompanying drawing and obtain.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for specification, is used from explanation the present invention, is not construed as limiting the invention with the embodiment of the present invention one.In the accompanying drawings:
Fig. 1 for background technology provide by the schematic diagram of Traceroute technology for detection source host to the routed path of destination host;
The flow chart of the routed path between the detection resources main frame 1 that Fig. 2 provides for background technology to destination host 2;
The transmission flow figure of the test packet that Fig. 3 provides for the embodiment of the present invention one;
The flow chart for this unreachable routing device interpolation setting identification that Fig. 4 provides for the embodiment of the present invention one;
The flow chart utilizing traceroute fault point that Fig. 5 provides for the embodiment of the present invention one;
The dispensing device schematic diagram of the test packet that Fig. 6 provides for the embodiment of the present invention two;
The dispensing device schematic diagram of another test packet that Fig. 7 provides for the embodiment of the present invention two;
The dispensing device schematic diagram of another test packet that Fig. 8 provides for the embodiment of the present invention two.
Embodiment
The implementation of the abort situation on routed path can be oriented in order to provide source host, embodiments provide a kind of sending method and device of test packet, below in conjunction with Figure of description, the preferred embodiments of the present invention are described, be to be understood that, preferred embodiment described herein, only for instruction and explanation of the present invention, is not intended to limit the present invention.And when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
The route network segment in various embodiments of the present invention, refers to the object IP network section that this routing device in route table items can reach, and is an address section.A usual route table items comprises the information such as object IP network section, next hop address, cost, priority, for determining the message repeating of router.
Embodiment one
The embodiment of the present invention one provides a kind of sending method of test packet, the sending method of this test packet can be implemented in routing device, by implementing the sending method of this test packet in routing device, source host can be made to determine abort situation on routed path.
As shown in Figure 3, the transmission flow of the test packet that the embodiment of the present invention one provides, mainly comprises the steps:
Step 301, the first routing device receive and to be sent by source host or by first test packet from described source host of secondary route device forwards.
In this step, if this first test packet is by secondary route device forwards, to be then source host send this first test packet after receiving the message response of the first routing device for the TTL time-out fed back with the second test packet that this first test packet has identical destination host address.
Step 302, the first routing device determine that the route network segment arriving the destination host address that this first test packet carries is added setting identification.
In this step, it is unreachable and be used to indicate this first test packet and continue to be forwarded when satisfied forwarding condition that setting identification is used to indicate destination host address that the route network segment by being added setting identification arrives.
Step 303, judge whether this first test packet meets forwarding condition, if so, perform step 304, if not, perform step 305.
In this step, the first test packet meets forwarding condition, and namely this first test packet meets the TTL carried and is greater than 1 and the forwarding condition that can reach as the 3rd routing device of this first routing device down hop.
Step 304, this first test packet is transmitted to the 3rd routing device.
In this step, after the first test packet is transmitted to the 3rd routing device, the 3rd routing device adopts the mode identical with the processing mode that this first routing device adopts to process this first test packet, determines to continue forward this first test packet or abandon.
Step 305, abandon this first test packet.
In this step 305, a kind of situation not meeting forwarding condition is: the TTL that this first test packet carries is greater than 1 and the 3rd routing device as the first routing device down hop is unreachable, in this case, first routing device needs to abandon this first test packet, so far, the transmission flow of the first test packet is terminated.
In the technical scheme that the embodiment of the present invention provides, the another kind of situation not meeting forwarding condition is: the TTL that this first test packet carries equals 1, in this case, the first routing device needs to abandon this first test packet, and feeds back the message response of TTL time-out to source host.
Be described mainly for the handling process of routing device side to test packet above, according to the technique scheme that the embodiment of the present invention provides, routing device is when carrying out the forwarding of test packet, if the route network segment identifying the destination address arriving test packet has been added setting identification, determine that the destination host address that the route network segment being added setting identification by this arrives is unreachable according to this setting identification, this first routing device still processes this test packet according to normal flow, namely continue when this test packet meets forwarding condition to forward this test packet, compared with the unreachable scheme directly abandoning test packet in routing device determination destination host address receiving this test packet with prior art first, technical solution of the present invention can by determining the abort situation on routed path to the forwarding of this test packet, namely unreachable in destination host address, and the TTL of this first test packet is greater than 1, when down hop routing device can reach, continue to forward this first test packet, when the TTL of this first test packet is greater than 1 and down hop routing device is unreachable, just abandon this first test packet, now, because the first test packet is dropped when TTL is greater than 1, source host cannot receive the message response of the TTL time-out for this first test packet, if this first test packet is sent by source host, then can determine as the link failure after this source host between the first first routing device of jumping and its down hop the 3rd routing device, if this first test packet is forwarded by the second test packet, send after receiving the message response of the first routing device for the TTL time-out fed back with the second test packet that this first test packet has identical destination host address because this first test packet is source host, namely represent that the link before the first routing device is all normal, thus source host can determine the link failure between this first routing device and its down hop the 3rd routing device.
The process of unreachable routing device interpolation setting identification is described in the embodiment of the present invention below in conjunction with Fig. 4.
As shown in Figure 4, when the 3rd routing device of the first routing device determination down hop is unreachable, the route network segment corresponding to the destination host address by the 3rd routing device arrival adds the flow process of setting identification, mainly comprises the steps:
Step 401, the first routing device route network segment in the routing table corresponding to the destination host address by the 3rd routing device arrival adds setting identification.
Step 402, the first routing device forward to each routing device on the routed path arriving destination host address the routing network segment information being added setting identification.
By this step 402, the each routing device receiving the routing network segment information being added setting identification can preserve the routing network segment information that this is added setting identification in respective routing table, in practical application, this information also can not be preserved and be stored in the routing table and separately.
In this step 402, first routing device forwards to each routing device on the routed path arriving this destination host address the process being added the routing network segment information of setting identification, send to the secondary route equipment of its upper hop the routing network segment information that this is added setting identification primarily of the first routing device, then continued to forward to the routing device of its upper hop by secondary route equipment.
So far, flow process terminates.
In above-mentioned flow process, the destination host address that setting identification is mainly used in the route network segment arrival identified by being added setting identification is unreachable, and be used to indicate the routing device receiving test packet continue when this test packet meets forwarding condition forward this test packet, this setting identification can be held consultation at the transmitting terminal of test packet and receiving terminal and be determined, or determined by unified management equipment, then this setting identification is issued between the routing device in the whole network, to make each routing device after identifying this setting identification, can determine that the routing device being added this setting identification is unreachable, but it is different from the existing processing mode directly abandoning test packet, need to continue to forward this test packet according to normal flow.In a concrete implementation, in order to reduce the change to agreement, this setting identification can be set to maximum cost cost value, in above-mentioned steps 402, it can be (the route network segment, maximum cost value) that first routing device forwards to each routing device on this routed path the form being added the routing network segment information of setting identification.Should be appreciated that and a citing is only for the form of the routing network segment information adding setting identification herein, in practical application, can set flexibly.
The flow process that Fig. 4 is corresponding is performed by the upper hop routing device of the routing device that there is routing failure usually, and in order to successfully determine the abort situation on routed path, above-mentioned flow process can the first routing device receive to be sent by source host or by first test packet from source host of secondary route device forwards before perform.
According to the above-mentioned flow process that the embodiment of the present invention provides, when routing device breaks down, the upper hop routing device of this routing device can notify that the routing device in the whole network upgrades routing table (preserving the routing network segment information being added setting identification in the routing table) in time, to detect this routing device broken down in time when equipment Inspection.
Further, after fault route is repaired, first routing device can also carry out the deletion of setting identification, namely the route network segment of this first routing device corresponding to the destination host address by the 3rd routing device arrival adds setting identification, and after being added the routing network segment information of setting identification to each routing device forwarding on routed path, also perform following steps further:
First routing device is when determining can reach as the 3rd routing device of the first routing device down hop, delete the setting identification that the route network segment corresponding to the destination host address for being arrived by the 3rd routing device is added, and delete to each routing device forwarding on routed path the instruction that this is added the routing network segment information of setting identification, be used to indicate each routing device will be added setting identification routing network segment information deletion in routing table.
According to the above-mentioned flow process that the embodiment of the present invention provides, after the fault recovery of routing device, the upper hop routing device of this routing device can notify that the routing device in the whole network upgrades routing table (deleting the routing network segment information of the setting identification be added preserved) in time, to make this routing device come into operation in time after fault recovery, improve the utilance of equipment.
The test packet related in the embodiment of the present invention mainly for detection of the abort situation on routed path, this test packet can for the purpose of the UDP message message of port numbers exception, also can be ICMP acknowledges requests message.
In order to understand the technique scheme that the embodiment of the present invention one provides better, this embodiment one gives the flow process of carrying out test packet forwarding in conjunction with embody rule scene, specific as follows:
This embody rule scene adopts the application scenarios shown in Fig. 1, namely the IP address that destination host is corresponding is 1.1.1.1, the routing device that will experience to destination host 2 from source host 1 comprises: routing device A, routing device B, routing device C and routing device D, wherein, the down hop of the routing table of the sensing destination host preserved in routing device A is routing device B, the down hop of the routing table of the sensing destination host preserved in routing device B is routing device C, and the down hop of the routing table of the sensing destination host preserved in routing device C is routing device D.
Suppose that routing device D breaks down, namely when the link between routing device C and routing device D is unreachable, then the routing device C as this routing device D upper hop can send the routing network segment information (the routing network segment information as maximum cost value) carrying setting identification.The route network segment supposing corresponding destination host address 1.1.1.1 is 1.0.0.0/8, then routing device C issues the information of (1.0.0.0/8, cost=maximum) to the whole network.
Receive routing device (the routing device A in Fig. 1 of the routing network segment information that with the addition of setting identification, routing device B), this routing device A and routing device B is when follow-up transmitted test message, if determine, the route network segment arriving test packet destination address has been added setting identification, then normal forward process is carried out to test packet, if the TTL=1 of test packet, routing device A or B then receiving test packet abandons test packet, and the message response of a TTL time-out is sent to source host, if TTL > 1, routing device A or B then receiving test packet forwards this test packet to down hop, for the normal data message of other non-test messages by discard processing (avoiding general data flow to carry out invalid forwarding).
When test packet arrives the failed routing device C of direct-connected down hop routing device, if TTL=1, then routing device C responds the message response of TTL time-out to source host, if TTL > 1, then this routing device C abandons this test packet.
Utilize the process of traceroute fault point in conjunction with above-mentioned application scenarios, as shown in Figure 5, mainly comprise:
Step 501, source host 1 send the test packet of TTL=1, and receive the message response that routing device A feeds back for this test packet.
In this step, after test packet arrives routing device A, the TTL carried in this test packet is subtracted 1 and obtains the test packet that TTL is 0 by routing device A, abandons this test packet, and sends the icmp packet of TTL time-out to source host 1.
After step 502, source host 1 receive the message response that routing device A sends, sending a TTL to routing device A is the test packet of 2, and receives the message response that routing device B feeds back for this test packet.
In this step, after test packet arrives routing device A, the TTL of this test packet is subtracted 1 and obtains the test packet that TTL is 1 by routing device A, the test packet that this TTL is 1 according to the routing table of preserving by this routing device A is transmitted to routing device B, the TTL carried in this test packet is subtracted 1 and obtains the test packet that TTL is 0 by routing device B, abandon this test packet, and send the icmp packet of TTL time-out to source host 1.
After step 503, source host 1 receive the message response that routing device B sends, sending a TTL to routing device A is the test packet of 3, and receives the message response that routing device C feeds back for this test packet.
In this step, after test packet arrives routing device A, the TTL of this test packet is subtracted 1 and obtains the test packet that TTL is 2 by routing device A, and the test packet that this TTL is 2 according to the routing table of preserving by this routing device A is transmitted to routing device B; It is after the test packet of 2 that routing device B receives this TTL, the TTL of test packet is subtracted 1 and obtains the test packet that TTL is 1, and the test packet that this TTL is 1 according to the routing table of preserving by this routing device B is further transmitted to routing device C; It is after the test packet of 1 that routing device C receives this TTL, and the TTL of this test packet is subtracted 1 and obtain the test packet that TTL is 0, routing device C abandons this test packet, and sends the icmp packet of a TTL time-out to source host 1.
After step 504, source host 1 receive the message response of routing device C transmission, sending a TTL to routing device A is the test packet of 4, does not receive the message response for this test packet in setting-up time, determines that routing device breaks down.
After test packet arrives routing device A, the TTL of this test packet is subtracted 1 and obtains the test packet that TTL is 3 by routing device A, and the test packet that this TTL is 3 according to the routing table of preserving by this routing device A is transmitted to routing device B; It is after the test packet of 3 that routing device B receives this TTL, the TTL of this test packet is subtracted 1 obtain TTL be the test of 2 according to message, the test packet that this TTL is 2 according to the routing table of preserving by this routing device B is transmitted to routing device C; It is after the test packet of 2 that routing device C receives this TTL, determines routing device D fault, then abandons this test packet.Then source host 1 cannot receive the message response that routing device is the test packet feedback of 4 for this TTL, can determine that routing device D breaks down (because can determine that routing device A, B and C are all normal by step 401 to step 403) thus.
So far, flow process terminates.
The technique scheme that the embodiment of the present invention provides is applicable in the process of carrying out routed path fault detect, namely above-mentioned process is carried out to test packet, if normal data message, then because routed path exists fault, then first routing device receiving normal data message directly abandons this normal data message.
Embodiment two
Corresponding with the sending method flow process of the test packet that above-described embodiment one provides, the embodiment of the present invention two provides a kind of dispensing device of test packet, the dispensing device of this test packet can be arranged in routing device, by the dispensing device of this test packet in routing device, source host can be made to determine abort situation on routed path.
As shown in Figure 6, the dispensing device of the test packet that this embodiment two provides, mainly comprises:
Test packet receiving element 601, setting identification recognition unit 602 and test packet processing unit 603;
Wherein:
Test packet receiving element 601, to be sent by source host or by first test packet from source host of secondary route device forwards for receiving; Wherein, if the first test packet is by secondary route device forwards, to be then source host send the first test packet after receiving the message response of the first routing device for the life span TTL time-out fed back with the second test packet that the first test packet has identical destination host address;
Setting identification recognition unit 602, for determining that the route network segment arriving the destination host address that described first test packet carries is added setting identification, wherein, to be used to indicate the destination host address arrived by the described route network segment unreachable and be used to indicate described first test packet and continue to be forwarded when satisfied forwarding condition for described setting identification;
Test packet processing unit 603, for determine the first test packet meet the TTL carried be greater than 1 and the forwarding condition that can reach as the 3rd routing device of the first routing device down hop time, the first test packet is transmitted to the 3rd routing device; And, determine TTL that the first test packet carries be greater than 1 and unreachable as the 3rd routing device of the first routing device down hop time, abandon the first test packet.
In the preferred implementation that the embodiment of the present invention two provides, the test packet processing unit 603 that Fig. 6 shown device comprises, also for:
When the TTL determining that the first test packet carries equals 1, abandon the first test packet, and feed back the message response of TTL time-out to source host.
As shown in Figure 7, in the preferred implementation that the embodiment of the present invention two provides, Fig. 6 shown device can also comprise:
Setting identification adding device 604, to be sent by source host or before the first test packet from described source host by secondary route device forwards for receiving at described test packet receiving element, when determining that the 3rd routing device as described first routing device down hop is unreachable, the route network segment corresponding to the destination host address that arrived by described 3rd routing device adds described setting identification; And forward to each routing device on the routed path arriving described destination host address the routing network segment information being added described setting identification.
As shown in Figure 8, in the preferred implementation that the embodiment of the present invention two provides, Fig. 7 shown device can also comprise:
Setting identification delete cells 605, for adding described setting identification at the route network segment of described setting identification adding device corresponding to the destination host address by described 3rd routing device arrival, and after being added the routing network segment information of described setting identification to each routing device forwarding on described routed path, when determining can reach as the 3rd routing device of described first routing device down hop, delete the described setting identification that the route network segment corresponding to the destination host address for being arrived by described 3rd routing device is added; And forward to each routing device on described routed path the instruction being added the routing network segment information of described setting identification described in deletion.
Should be appreciated that the logical partitioning that unit that the dispensing device of above test packet comprises is only the function that realizes according to this device and carries out, in practical application, superposition or the fractionation of said units can be carried out.And the sending method flow process one_to_one corresponding of the function that the dispensing device of the test packet that this embodiment two provides realizes and the test packet that above-described embodiment one provides, for the handling process specifically that this device realizes, be described in detail in above-described embodiment one, be not described in detail herein.
Further, the dispensing device of the test packet in the present embodiment two also has the functional module that can realize embodiment one scheme, repeats no more herein.
Embodiment three
The embodiment of the present invention three provides a kind of routing device, this routing device comprises the dispensing device of the test packet that above-described embodiment two provides, above-described embodiment two has been described in detail the function that the dispensing device of test packet realizes, and is no longer described in detail the routing device that this comprises the dispensing device of the test packet that above-described embodiment two provides herein.
By at least one technical scheme above-mentioned that the embodiment of the present invention provides, first routing device receive to be sent by source host or by secondary route device forwards from after the first test packet of this source host, determine that the route network segment arriving the destination host address that this first test packet carries is added setting identification, wherein, it is unreachable that this setting identification is used to indicate the destination host address arrived by this route network segment, and be used to indicate this first test packet and continue to be forwarded when satisfied forwarding condition, first routing device is determining that this first test packet meets the TTL carried and is greater than 1, and during the forwarding condition that can reach as the 3rd routing device of this first routing device down hop, the 3rd routing device is given by this first test packet repeating, first routing device is determining that the TTL that this first test packet carries is greater than 1, and it is unreachable as the 3rd routing device of this first routing device down hop, then abandon this first test packet.This technical scheme and prior art provide when occurring that destination host address receives the test packet that source host sends first routing device time unreachable directly abandons compared with the scheme of this test packet, technical solution of the present invention can be unreachable in destination host address, and the TTL of this first test packet is greater than 1, when down hop routing device can reach, continue to forward this first test packet, when the TTL of this first test packet is greater than 1 and down hop routing device is unreachable, just abandon this first test packet, now, because the first test packet is dropped when TTL is greater than 1, source host cannot receive the message response of the TTL time-out for this first test packet, if this first test packet is sent by source host, then can determine as the link failure after this source host between the first first routing device of jumping and its down hop routing device, if this first test packet is forwarded by the second test packet, send after receiving the message response of the first routing device for the TTL time-out fed back with the second test packet that this first test packet has identical destination host address because this first test packet is source host, namely represent that the link before the first routing device is all normal, thus source host can determine the link failure between this first routing device and its down hop routing device.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (11)

1. a sending method for test packet, is characterized in that, comprising:
First routing device receives and to be sent by source host or by first test packet from described source host of secondary route device forwards; Wherein, if described first test packet is by described secondary route device forwards, to be then described source host send described first test packet after receiving the message response of described first routing device for the life span TTL time-out fed back with the second test packet that described first test packet has identical destination host address;
First routing device determines that the route network segment arriving the destination host address that described first test packet carries is added setting identification, wherein, to be used to indicate the destination host address arrived by the described route network segment unreachable and be used to indicate described first test packet and continue to be forwarded when satisfied forwarding condition for described setting identification;
First routing device determine described first test packet meet the TTL carried be greater than 1 and the forwarding condition that can reach as the 3rd routing device of described first routing device down hop time, described first test packet is transmitted to described 3rd routing device;
First routing device determine TTL that described first test packet carries be greater than 1 and unreachable as the 3rd routing device of described first routing device down hop time, abandon described first test packet.
2. the method for claim 1, is characterized in that, also comprises:
First routing device, when the TTL determining that described first test packet carries equals 1, abandons described first test packet, and feeds back the message response of TTL time-out to described source host.
3. method as claimed in claim 1 or 2, it is characterized in that, described test packet comprises:
The User Datagram Protocol data message of destination slogan exception; Or
Internet Control Message Protocol acknowledges requests message.
4. the method for claim 1, is characterized in that, the first routing device receives and to be sent by source host or before the first test packet from described source host by secondary route device forwards, also comprise:
First routing device when determining that the 3rd routing device as described first routing device down hop is unreachable, for the route network segment arrived corresponding to destination host address by described 3rd routing device adds described setting identification; And
The routing network segment information being added described setting identification is forwarded to each routing device on the routed path arriving described destination host address.
5. method as claimed in claim 4, it is characterized in that, first routing device is for adding described setting identification by the route network segment corresponding to described 3rd routing device arrival destination host address, and after being added the routing network segment information of described setting identification to each routing device forwarding on described routed path, also comprise:
First routing device, when determining can reach as the 3rd routing device of described first routing device down hop, deletes the described setting identification added for being arrived the route network segment corresponding to destination host address by described 3rd routing device; And
The instruction being added the routing network segment information of described setting identification described in deletion is forwarded to each routing device on described routed path.
6. the method for claim 1, is characterized in that, described setting identification is maximum cost cost value.
7. a dispensing device for test packet, is characterized in that, comprising:
Test packet receiving element, to be sent by source host or by first test packet from described source host of secondary route device forwards for receiving; Wherein, if described first test packet is by described secondary route device forwards, to be then described source host send described first test packet after receiving the message response of the first routing device for the life span TTL time-out fed back with the second test packet that described first test packet has identical destination host address;
Setting identification recognition unit, for determining that the route network segment arriving the destination host address that described first test packet carries is added setting identification, wherein, to be used to indicate the destination host address arrived by the described route network segment unreachable and be used to indicate described first test packet and continue to be forwarded when satisfied forwarding condition for described setting identification;
Test packet processing unit, for determine described first test packet meet the TTL carried be greater than 1 and the forwarding condition that can reach as the 3rd routing device of described first routing device down hop time, described first test packet is transmitted to described 3rd routing device; And, determine TTL that described first test packet carries be greater than 1 and unreachable as the 3rd routing device of described first routing device down hop time, abandon described first test packet.
8. device as claimed in claim 7, is characterized in that, described test packet processing unit, also for:
When the TTL determining that described first test packet carries equals 1, abandon described first test packet, and feed back the message response of TTL time-out to described source host.
9. device as claimed in claim 7, is characterized in that, also comprise:
Setting identification adding device, to be sent by source host or before the first test packet from described source host by secondary route device forwards for receiving at described test packet receiving element, when determining that the 3rd routing device as described first routing device down hop is unreachable, for the route network segment arrived corresponding to destination host address by described 3rd routing device adds described setting identification; And forward to each routing device on the routed path arriving described destination host address the routing network segment information being added described setting identification.
10. device as claimed in claim 9, is characterized in that, also comprise:
Setting identification delete cells, for adding described setting identification at the route network segment of described setting identification adding device corresponding to the destination host address by described 3rd routing device arrival, and after being added the routing network segment information of described setting identification to each routing device forwarding on described routed path, when determining can reach as the 3rd routing device of described first routing device down hop, delete the described setting identification added for being arrived the route network segment corresponding to destination host address by described 3rd routing device; And forward to each routing device on described routed path the instruction being added the routing network segment information of described setting identification described in deletion.
11. 1 kinds of routing devices, is characterized in that, comprise the dispensing device of the test packet described in any one of claim 7 to 10.
CN201110088580.0A 2011-04-08 2011-04-08 Test message sending method and device Active CN102739462B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110088580.0A CN102739462B (en) 2011-04-08 2011-04-08 Test message sending method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110088580.0A CN102739462B (en) 2011-04-08 2011-04-08 Test message sending method and device

Publications (2)

Publication Number Publication Date
CN102739462A CN102739462A (en) 2012-10-17
CN102739462B true CN102739462B (en) 2014-12-31

Family

ID=46994292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110088580.0A Active CN102739462B (en) 2011-04-08 2011-04-08 Test message sending method and device

Country Status (1)

Country Link
CN (1) CN102739462B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103138988B (en) * 2013-02-06 2017-01-18 北京德瑞塔时代网络技术有限公司 Positioning treatment method and positioning treatment device of network faults
CN111683006B (en) * 2015-09-22 2023-12-08 华为技术有限公司 Method for processing message and network equipment thereof
CN106301955B (en) * 2016-09-27 2021-01-29 新华三技术有限公司 Message processing method and device
CN107959595B (en) * 2016-10-14 2020-10-27 腾讯科技(深圳)有限公司 Method, device and system for anomaly detection
CN107659949B (en) * 2017-09-26 2021-07-23 台州市吉吉知识产权运营有限公司 Wireless router cloud service function interface test method and system
CN110572293B (en) * 2018-06-06 2023-02-14 华为技术有限公司 Data message detection method, equipment and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471822A (en) * 2007-12-29 2009-07-01 华为技术有限公司 Method and system for locating network fault
CN101945018A (en) * 2010-08-30 2011-01-12 北京星网锐捷网络技术有限公司 Node detection method and device and central node of network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785735B2 (en) * 1999-11-12 2004-08-31 Cisco Technology Inc. Determining a path through a managed network
US8880724B2 (en) * 2008-01-31 2014-11-04 Cisco Technology, Inc. Event triggered traceroute for optimized routing in a computer network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471822A (en) * 2007-12-29 2009-07-01 华为技术有限公司 Method and system for locating network fault
CN101945018A (en) * 2010-08-30 2011-01-12 北京星网锐捷网络技术有限公司 Node detection method and device and central node of network

Also Published As

Publication number Publication date
CN102739462A (en) 2012-10-17

Similar Documents

Publication Publication Date Title
US10581700B2 (en) Service flow processing method, apparatus, and device
CN102739462B (en) Test message sending method and device
US11588703B2 (en) Systems and methods for determining a topology of a network comprising a plurality of intermediary devices and paths
EP3086510A1 (en) Service chain management method, system and device
US20140254600A1 (en) Transmission system, transmission apparatus, and transmission method
CN108206753B (en) Method, device and system for detecting time delay
CN113411260B (en) Method and device for sending data message in IPv6 network
CN106656857B (en) Message speed limiting method and device
CN105337785A (en) Path connectivity detection method and device
JP5363658B1 (en) RELAY DEVICE, RELAY DEVICE CONTROL METHOD, AND NETWORK SYSTEM
CN109981323B (en) Method and network equipment for detecting multicast path state of data link layer
CN102571492B (en) Method and device for detecting failure of routing equipment
CN101425942A (en) Method, apparatus and system for bidirectional forwarding detection implementation
US9942138B2 (en) Method and device for policy based routing
CN102340451A (en) Trace route testing method, system, device and equipment
CN103117930B (en) The detection method of static routing configuration and device
CN111801911B (en) Traffic function chain congestion tracking
CN106656615B (en) Message processing method and device based on TRACERT command
US9313090B2 (en) Tunnel fault detection method and traffic engineering node
EP3291486B1 (en) Selective transmission of bidirectional forwarding detection (bfd) messages for verifying multicast connectivity
CN107528929B (en) ARP (Address resolution protocol) entry processing method and device
US9560058B2 (en) Monitoring device and monitoring method
US10320661B2 (en) Communication device and communication method
CN105634842A (en) Method and system for detecting bandwidth, and devices
JP5771656B2 (en) Relay device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant