路由tracert(跟踪路由)(Tracert (trace routing))

跟踪路由  时间:2021-01-09  阅读:()

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

牦牛云(3.5USD/月 )阿里云国际版云服务器 1核1G40G

收到好多消息,让我聊一下阿里云国际版本,作为一个阿里云死忠粉,之前用的服务器都是阿里云国内版的VPS主机,对于现在火热的阿里云国际版,这段时间了解了下,觉得还是有很多部分可以聊的,毕竟,实名制的服务器规则导致国际版无需实名这一特点被无限放大。以前也写过几篇综合性的阿里云国际版vps的分析,其中有一点得到很多人的认同,那句是阿里云不管国内版还是国际版的IO读写速度实在不敢恭维,相对意义上的,如果在这...

JustHost,最新高性价比超便宜俄罗斯CN2 VPS云服务器终身8折优惠,最低仅8元/月起,200Mbps带宽不限流量,五大机房自助自由切换,免费更换IP,俄罗斯cn2vps怎么样,justhost云服务器速度及综合性能详细测评报告

主机参考最新消息:JustHost怎么样?JustHost服务器好不好?JustHost好不好?JustHost是一家成立于2006年的俄罗斯服务器提供商,支持支付宝付款,服务器价格便宜,200Mbps大带宽不限流量,支持免费更换5次IP,支持控制面板自由切换机房,目前JustHost有俄罗斯5个机房可以自由切换选择,最重要的还是价格真的特别便宜,最低只需要87卢布/月,约8.5元/月起!just...

SugarHosts糖果主机圣诞节促销 美国/香港虚拟主机低至6折

SugarHosts 糖果主机商我们算是比较熟悉的,早年学会建站的时候开始就用的糖果虚拟主机,目前他们家还算是为数不多提供虚拟主机的商家,有提供香港、美国、德国等虚拟主机机房。香港机房CN2速度比较快,美国机房有提供优化线路和普通线路适合外贸业务。德国欧洲机房适合欧洲业务的虚拟主机。糖果主机商一般是不会发布黑五活动的,他们在圣圣诞节促销活动是有的,我们看到糖果主机商发布的圣诞节促销虚拟主机低至6折...

跟踪路由为你推荐
.net虚拟主机.net虚拟主机空间怎么选择,国内虚拟主机哪家比较好,各有什么特色vps虚拟主机请通俗解析一下虚拟主机,VPS和云主机?它们各有什么用途?域名备案查询怎么查看域名在什么空间备案的?美国服务器托管美国服务器租用时要注意什么?海外域名什么叫海外域名?什么是虚拟主机虚拟主机是什么?虚拟主机控制面板如何利用虚拟主机控制面板对网站进行管理上海虚拟主机谁能告诉我杭州哪个公司的虚拟主机最好,机房最好是上海或浙江的.郑州虚拟主机什么是双线虚拟主机?apache虚拟主机如何用Apache配置安全虚拟主机 - PHP进阶讨论
虚拟主机提供商 草根过期域名 主机优惠码 php免费空间 亚马逊香港官网 跟踪路由命令 国外的代理服务器 广州虚拟主机 atom处理器 cdn网站加速 后门 双十二促销 密钥索引 开心online 架设代理服务器 qq空间打开很慢 linux服务器系统 卡巴斯基官方下载 vpsaa ddos攻击教程 更多