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

DogYun香港BGP月付14.4元主机简单测试

前些天赵容分享过DogYun(狗云)香港BGP线路AMD 5950X经典低价云服务器的信息(点击查看),刚好账户还有点余额够开个最低配,所以手贱尝试下,这些贴上简单测试信息,方便大家参考。官方网站:www.dogyun.com主机配置我搞的是最低款优惠后14.4元/月的,配置单核,512MB内存,10GB硬盘,300GB/50Mbps月流量。基本信息DogYun的VPS主机管理集成在会员中心,包括...

无忧云( 9.9元/首月),河南洛阳BGP 2核 2G,大连BGP线路 20G高防 ,

无忧云怎么样?无忧云服务器好不好?无忧云值不值得购买?无忧云,无忧云是一家成立于2017年的老牌商家旗下的服务器销售品牌,现由深圳市云上无忧网络科技有限公司运营,是正规持证IDC/ISP/IRCS商家,自营有国内雅安高防、洛阳BGP企业线路、香港CN2线路、国外服务器产品等,非常适合需要稳定的线路的用户,如游戏、企业建站业务需求和各种负载较高的项目,同时还有自营的高性能、高配置的BGP线路高防物理...

云基最高500G DDoS无视CC攻击(Yunbase),洛杉矶CN2GIA、国内外高防服务器

云基成立于2020年,目前主要提供高防海内外独立服务器用户,欢迎各类追求稳定和高防优质线路的用户。业务可选:洛杉矶CN2-GIA+高防(默认500G高防)、洛杉矶CN2-GIA(默认带50Gbps防御)、香港CN2-GIA高防(双向CN2GIA专线,突发带宽支持,15G-20G DDoS防御,无视CC)、国内高防服务器(广州移动、北京多线、石家庄BGP、保定联通、扬州BGP、厦门BGP、厦门电信、...

跟踪路由为你推荐
免费虚拟空间谁可以推荐一个比较很不错的免费虚拟空间vps主机云主机和VPS主机之间有什么区别中文域名注册查询中文域名注册怎么查询台湾vps哪个地区的VPS从大陆访问快呢。国内最好的虚拟主机国内安全性最好的虚拟主机空间商有哪些?虚拟主机评测网求推荐一些适合个人博客网站的虚拟主机的服务商大连虚拟主机大连哪些地方的网通机房好?新加坡虚拟主机请问新网的虚拟主机靠谱吗?shopex虚拟主机支持PHPwind、ShopEx等建站程序的主机什么最好?沈阳虚拟主机为什么修改了虚拟机Vmware的TCP/IP配置以后就上不了网
云南虚拟主机 代理域名备案 域名停靠一青草视频 3322动态域名 cpanel shopex空间 回程路由 e蜗牛 有益网络 免费活动 四川电信商城 视频服务器是什么 网通服务器 中国linux wordpress中文主题 申请免费空间 万网空间 lamp怎么读 广州服务器托管 美国代理服务器 更多