tracert(跟踪路由) Tracert (trace routing)
The trace route Tracert (trace routing) is the routing trace utility used to determine the path taken by the IP datagram access target. The Tracert command determines the routing from one host to another on the network using the IP lifetime (TTL)field and the ICMP error message.
Tracert working principle
The Tracert diagnostic program determines the route to the target by responding to the packet through the Internet control message protocol (ICMP) that sends the different IP lifetime (TTL) values to the target. Each router on the path is requested to reduce the TTL on the packet by 1 at least until the packet is forwarded. When the TTL on the packet is reduced to 0, the router should send the message "ICMP has timed out" back to the source system.
Tracert sends a response packet of TTL at 1, and increments TTL by 1 in subsequent each sending process until the target response or TTL reaches its maximum value, thus routing is determined. Routing is determined by checking the message "ICMP has timed out"returned by an intermediate router. Some routers discard TTL expired packets without asking directly, which is not visible in the Tracert utility.
The Tracert command prints the list of the proximal router interfaces in the path of the returned ICMP timeout message in sequence. If you use the -d option, the Tracert utility does not query DNS on each IP address.
In the following example, the packet must pass through two routers (10.0.0. 1 and 192. 168.0. 1) to reach the host
172. 16.0.99. The default gateway for the host is the IP address of the router on the 10.0.0. 1192. 168.0.0 network and is
192. 168.0. 1.
C:\>tracert 172. 16.0.99 -d
Tracing, route, to, 172. 16.0.99, over, a, maximum, of, , hops 1, 2S, 3S, 2S, 10,0.0, 1
275 MS 83 MS 88 MS 192. 168.0. 1
373 MS 79 MS 93 MS 172. 16.0.99
Trace complete.
Solving problems with tracert
You can use the tracert command to determine the stop position of packets on the network. In the following example, the default gateway determines that the 192. 168. 10.99 host does not have a valid path. This may be a router configuration problem, or a 192. 168. 10.0 network does not exist (the wrong IP address) .
C:\>tracert 192. 168. 10.99
Trac ing, route, to, 192. 168. 10.99, over, a, maximum, of, , hops 1, 10.0.0. 1, reports:Dest ination, net, unreachable.
Trace complete.
The Tracert utility is very useful for solving large network problems, where several paths can be reached at the same point.Tracert command line options
The Tracert command supports multiple options, as shown in the following table.
Tracert, [-d] , [-h, maximum_hops], [-j, host-list], [-w,t imeout], target_name option describe
-d
Specifies that the IP address is not resolved to the host name.-h maximum_hops
Specify jump points to track the route to the host called t arget_name.
-j host-list
Specifies the list of router interfaces used in the path used by the Tracert utility packet.
-w timeout
Wait for the number of milliseconds specified by timeout for each reply.
T arg e t_nam e
The name or IP address of the target host.
When we cannot access the destination device through the network, the network administrator needs to decide what is wrong with it. Problems arise not only at the end of the destination device, but also in the intermediate routers where packets are forwarded.
There are 3 ways to detect a data packet from source to destination through which transit routers, these 3 methods are:record route option detection based on routing, UDP routing based on ICMP detection, Echo detection based on Request routing. The three approach can be used to detect a packet arriving at the destination device, which intermediate routers have passed, but the implementationprocess is quite different.Note: the key to understanding these probing methods is to be familiar with the format of IP datagrams and ICMP datagrams.1, routing detection based on Record route options (recording routing options)
This is our easiest way to understand the routing of probes.
the destination of Beijing, and how many post offices are forwarded in the middle. This process is very simple, as long as the middle post office in the forwarding letter buckle their own postmark, the letter arrived at the destination Beijing,Beijing, and then sent the letter back to me,
When I received my reply, I just read the postmark on the letter and I knew which post office it was passing through.
The Ping -R (uppercase) www.aorb.org command enables this record intermediate routing function and returns the IP address of the intermediate router.
1) the ping command is issued by the type of ICMP data at 8,when using the Ping -R, the type 8 ICMP datagram is in an IP datagram, IP datagram Options (optional) reserved to field intermediate router buckle stamp place, this place is not too large, only can accommodate 9 relay router IP address.
2) when the datagram is sent by the sending end, every passing router, the IP software of the transit router adds a IP address of the transit router to the option field of the IP datagram.
3) when the packets arrive at the destination (e.g. ,www.aorb.org) , the purpose of equipment will generate a ICMP data type is 0, the ICMP packets are encapsulated in a new IP data reported in the Options field, the new IP data reported in the copy Options field IP datagram was received in.
4) when this new IP datagram is sent back to the source sender,
you will see the IP address of some of the intermediate routers on the screen.
2 、 routing detection based on UDP protocol
Tracert is the command line tool commonly used under Windows,and corresponds to traceroute under UNIX. If you want to know your computer to the www.aorb.org after the number of router,you can enter a tracert www.aorb.org in the command line detection, the result may be returned with the same Ping -R,but it is implemented in another way. This method does not have the Options field of the IP protocol package used in the Record route options probing technology, but instead takes advantage of the TTL field in the IP protocol package.
The basic idea is this: www.aorb.org, this server sells eggplant (offers HTTP service) , also sells cucumber (provides FTP service) , but does not sell the potato (not to listen to the UDP port) . One buyer, in order to get a letter to arrive at the vegetable supplier www.aorb.org, had to go through several post offices (routers) and wrote to www.aorb.org asking about the price of potatoes.
The first step, buyers written on the envelope of the TTL positionof the number 1, when the letter reached the first post office and their adjacent, those who post the TTL value by 1,andTTL 0, the post office regulations, the TTL value is 0 letter thrown into the garbage, and then to the buyer to send a the letter called timeout letter letter letter post office name,the letter was to tell buyers who lost.
The second step, the buyer is written on the envelope TTL position number 2, when the letter arrived at the first post office and their adjacent, those who post the TTL value by 1,now the TTL value is 1, the post office regulations, the TTL value is not 0 packets need to continue forward to the next post.So this letter has been forwarded to a post office. Present a post officetoreceivethis letter, thosewhopost theTTLvalue by 1, and TTL 0, the post office regulations, the TTL value is 0 letter thrown into the garbage, and then to the buyer send a letter called timeout letter letter letter post office name,to tell the letter was buyers who lost.
Through the first step, buyers know the first transit router.Through the second step, buyers know second transit routers.Then buyers only need to constantly add TTL value 1, you can according to the above steps to find out which router in the middle.
In the third step, we assume that only two post offices arrive at the destination. Then the second step, choose buyers in the TTL value is set to 3, when the letter arrived at the first post office and their adjacent, those who post the TTL value by 1,now the TTL value is 2, the post office regulations, the TTL value is not 0 packets need to continue forward to the next post.So this letter has been forwarded to a post office. Present a post officeto receivethis letter, thosewhopost theTTLvalue by 1, and TTL 1, the post office regulations, the TTL value is not 0 packets need to continue forward to the next post, so this letter has been forwarded to a post office, but under a post office is the final destination www.aorb.org, although www.aorb.orgTTLminus 1 the result is 0, but it will not discard
it, because the destination is www.aorb.org! So www.aorb.org to deliver the IP layer of the postman delivers letters to be responsible for selling potatoes, but we began to say,www.aorb.org does not sell potatoes, then send a called end point unreachable (ICMP type 3, code 3) letter to the buyer.The fourth step, when the buyer received the type of letter that is not reached at the end of the letter, no longer on the letter asking the price of potatoes on the letter TTL plus 1,Because he already knows all the routes to the destination.The specific implementation process can be understood by the following two pictures
Http://lh3.ggpht.com/aorb.org/SN82f_rMiQI/AAAAAAAAAdo/eJPz7ihl1mw/s800/tracert.gif
Http://lh3.ggpht.com/aorb.org/SN82f4BcZkI/AAAAAAAAAdw/7l8A3fJy_y4/s800/tracert2.gif
3, routing detection based on ICMP Echo Request
The detectionway and implementation steps of UDP routing based on the detection, but the sender is not sent a UDP packet, and sends a ICMP Echo type 8 Request (echo request packet) . As with the UDP routing protocol based on detection technology, each sender will put the value of TTL plus 1, each transit routers on the TTL value by 1, if 0, then dropped to the sender sends a timeout message, if not 0, will continue to be forwarded to the next hop. The only difference is that when the datagram
reaches the final destination node, because the sender sends a Echo Request message, the receiver will correspond to a data message of type ICMP 0. Thus, when the sender receives a data message of type ICMP, 0, it is known that all routes have been queried and terminated to continue detection.
Other
Pathping
Pathping is a mixture of tracert and ping. The command line input pathping www.aorb.org, return the contents of two parts,the first part shows the destination after which the second parts display routing, each router packet loss information path.
Extended reading:
1.http://www.aorb.org/120.html
Open classification:
Computers, communications, rout ing
"Trace routing":
What is the relevant entry, I will perfect the entries in the Baidu Encyclopedia for reference only, if you need to solve specific problems
(especially in the fields of law, medicine, etc. ) , you are
BuyVM在昨天宣布上线了第四个数据中心产品:迈阿密,基于KVM架构的VPS主机,采用AMD Ryzen 3900X CPU,DDR4内存,NVMe硬盘,1Gbps带宽,不限制流量方式,最低$2/月起,支持Linux或者Windows操作系统。这是一家成立于2010年的国外主机商,提供基于KVM架构的VPS产品,数据中心除了新上的迈阿密外还包括美国拉斯维加斯、新泽西和卢森堡等,主机均为1Gbps带...
819云互联 在本月发布了一个购买香港,日本独立服务器的活动,相对之前的首月活动性价比更高,最多只能享受1个月的活动 续费价格恢复原价 是有些颇高 这次819云互联与机房是合作伙伴 本次拿到机房 活动7天内购买独立服务器后期的长期续费价格 加大力度 确实来说这次的就可以买年付或者更长时间了…本次是5个机房可供选择,独立服务器最低默认是50M带宽,不限制流量,。官网:https://ww...
Megalayer是新晋崛起的国外服务器商,成立于2019年,一直都处于稳定发展的状态,机房目前有美国机房,香港机房,菲律宾机房。其中圣何塞包括CN2或者国际线路,Megalayer商家提供了一些VPS特价套餐,譬如15M带宽CN2线路主机最低每月48元起,基于KVM架构,支持windows或者Linux操作系统。。Megalayer技术团队行业经验丰富,分别来自于蓝汛、IBM等知名企业。Mega...