路由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

DMIT(8.72美元)日本国际线路KVM月付8折起,年付5折

DMIT.io是成立于2018年的一家国外主机商,提供VPS主机和独立服务器租用,数据中心包括中国香港、美国洛杉矶和日本等,其中日本VPS是新上的节点,基于KVM架构,国际线路,1Gbps带宽,同时提供月付循环8折优惠码,或者年付一次性5折优惠码,优惠后最低每月8.72美元或者首年65.4美元起,支持使用PayPal或者支付宝等付款方式。下面列出部分日本VPS主机配置信息,价格以月付为例。CPU:...

Sharktech10Gbps带宽,不限制流量,自带5个IPv4,100G防御

Sharktech荷兰10G带宽的独立服务器月付319美元起,10Gbps共享带宽,不限制流量,自带5个IPv4,免费60Gbps的 DDoS防御,可加到100G防御。CPU内存HDD价格购买地址E3-1270v216G2T$319/月链接E3-1270v516G2T$329/月链接2*E5-2670v232G2T$389/月链接2*E5-2678v364G2T$409/月链接这里我们需要注意,默...

腾讯云2核4GB内存8M带宽 年74元

一般大厂都是通过首年才有可以享受爆款活动,然后吸引我们注册他们商家达到持续续费和购买的目的。一般只有大厂才能有这样的魄力和能力首年亏本,但是对于一般的公司和个人厂家确实难过,这几年确实看到不少的同类商家难以生存。这里我们可以看到有对应的套餐方案。不过这两个套餐都是100%CPU独享的,不是有某云商家限制CPU的。但是轻量服务器有个不好的就是带宽是较大且流量是限制的额,分别是1GB和1.2TB月流量...

跟踪路由为你推荐
云主机租用云主机到底是什么?租用以后该如何使用?买虚拟主机虚拟主机购买要注意哪些???国外空间租用国内和海外空间 域名 服务器托管 租用vps试用请问有什么网站可以提供免费vps试用的?想用它来刷一下外国pt站域名主机IDC(主机域名)是什么意思?台湾vps台湾服务器 哪里稳定速度快?海外域名我想了解一下“国内域名”,“国外域名”以及“海外服务器”这三个方面的一些知识重庆虚拟空间现在重庆那家主机空间最好?asp虚拟主机怎样查看虚拟主机是支持ASP还是PHP程序的虚拟主机99idc如何选择虚拟主机的的操作系统以及更换操作系统是注意事项
瓦工 linode日本 2017年万圣节 台湾谷歌网址 阿里云浏览器 怎样建立邮箱 酷番云 免费网页申请 华为云服务登录 登陆空间 免费的域名 中国电信测速网站 国内空间 移动王卡 架设代理服务器 cdn加速 日本小学生 压力测试工具 dns是什么意思 什么是云主机 更多