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
HostKvm是一家成立于2013年的国外主机服务商,主要提供基于KVM架构的VPS主机,可选数据中心包括日本、新加坡、韩国、美国、中国香港等多个地区机房,均为国内直连或优化线路,延迟较低,适合建站或者远程办公等。目前商家发布了夏季特别促销活动,针对香港国际/韩国机房VPS主机提供7折优惠码,其他机房全场8折,优惠后2GB内存套餐月付5.95美元起。下面分别列出几款主机套餐配置信息。套餐:韩国KR...
NameSilo是通过之前的感恩节优惠活动中认识到这家注册商的,于是今天早上花了点时间专门了解了NameSilo优惠码和商家的详细信息。该商家只销售域名,他们家的域名销售价格还是中规中矩的,没有像godaddy域名标价和使用优惠之后的价格悬殊很大,而且其特色就是该域名平台提供免费的域名停放、免费隐私保护等功能。namesilo新注册域名价格列表,NameSilo官方网站:www.namesilo....
优惠码50SSDOFF 首月5折50WHTSSD 年付5折15OFF 85折优惠,可循环使用荷兰VPSCPU内存SSD带宽IPv4价格购买1核1G50G1Gbps/3TB1个$ 9.10/月链接2核2G80G1Gbps/5TB1个$ 12.70/月链接2核3G100G1Gbps/7TB1个$ 16.30/月链接3核4G150G1Gbps/10TB1个$ 18.10/月链接阿联酋VPSCPU内存SS...