Trace route command tracert
Release date:



The tracert program allows users to track routes from one host to any other host in the world.

Tracert is implemented using ICMP messages. To determine the name and IP address of all routers between the source and destination, the tracert in the source host sends a batch of ordinary IP datagrams to the destination host. Each of these datagrams carries a UDP segment with an unreachable UDP port number. The first datagram has a TTL=1; the second datagram has a TTL=2; the third datagram has a TTL=3, and so on. The source host also starts a timer for each datagram. When the nth datagram arrives at the nth router, the nth router just observes the TTL termination of the datagram. According to the IP protocol, the router will discard the IP datagram and send a warning message to the source host. (Type: 11, code: 0). The warning message contains the name and IP address of the router. When the ICMP packet reaches the source host, the source host obtains a round-trip delay from the timer, and obtains the name and IP address of the nth router from the ICMP packet.

How does the tracert source host know when to stop sending UDP packets?

Because the source host +1s the TTL value of each datagram it sends, one of these datagrams will eventually reach the destination host along this path. The destination host does not drop the message because it has reached its final destination. How do ICMP packets be sent back to the source host?

Because the datagram contains an unreachable port number, the destination host sends an ICMP packet with the destination port unreachable (type 3, code 3) to the source host. The source host receives the special ICMP packet. At that time, it knows that it does not need to send another probe packet.

Note: The tracert client must be able to instruct the operating system to generate a UDP datagram with a specific TTL value, and must be able to be notified by its operating system of the time the ICMP message was reached.

Master the ability to use the trace route command tracert to measure routing conditions, that is, to display the path that the packet passes through to the destination host.

The basic usage of the traceroute command is to type at the command prompt.

'tracert host_name'

Or 'tracert ip_address',

Among them, tracert is the name of traceroute on the Windows operating system.


Track by up to 30 hops

To the route of []:

 1 3 ms 3 ms 3 ms

 2 2 ms 17 ms 3 ms

 3 5 ms 5 ms 2 ms

 4 5 ms 5 ms 2 ms

 5 6 ms 6 ms 5 ms

 6 * 2 ms 5 ms

 7 24 ms 21 ms 29 ms

 8 * * 57 ms

 9 * 20 ms 20 ms

10 * * 23 ms

11 21 ms 21 ms 21 ms

12 22 ms 22 ms 20 ms

13 22 ms 23 ms 23 ms

14 23 ms 22 ms 21 ms

15 20 ms 21 ms 21 ms

16 * * * Request timed out.

17 31 ms 24 ms 31 ms

18 22 ms 19 ms 19 ms