IP route tracking Command (Tracert)

Source: Internet
Author: User

The Tracert (trace route) is the routing trace utility that determines the path taken by IP datagram access targets. The Tracert command uses the IP lifetime (TTL) field and ICMP error messages to determine routes from one host to another host on the network.

Tracert Working principle

The Tracert diagnostics determine the route to the destination by sending an Internet Control Message Protocol (ICMP) response packet to the destination with different IP time to live (TTL) values. Requires that each router on the path decrements at least 1 of the TTL on the packet before forwarding the packet. The TTL on the packet is reduced to 0 o'clock, and the router should send the "ICMP timed out" message back to the source system.

Tracert sends a response packet with a TTL of 1 and increments the TTL by 1 in each subsequent send process until the target response or TTL reaches its maximum value to determine the route. Route is determined by examining the "ICMP timed out" message sent back by the intermediary router. Some routers discard the TTL-expired packets without asking, which is not visible in the Tracert utility.

The Tracert command prints a list of the near-end router interfaces in the path that returns the ICMP timeout message in order. 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.1,192.168.0.0 network 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

2 ms Ms 192.168.0.1

3 ms-Mobile MS 172.16.0.99

Trace complete.

Solve problems with Tracert

You can use the TRACERT command to determine where the packet will stop 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 problem with the router configuration, or the 192.168.10.0 network does not exist (the wrong IP address).

C:/>tracert 192.168.10.99

Tracing route to 192.168.10.99 over a maximum of hops

1 10.0.0.1 reportsestination net unreachable.

Trace complete.

The Tracert utility is useful for solving large network problems and can take several paths to the same point.

Tracert Command line Options

The Tracert command supports a variety of options, as shown in the following table.

tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] Target_name

Options
Describe

-D
Specifies that the IP address is not resolved to the host name.

-H Maximum_hops
Specifies the metric to track the route to a host called Target_name.

-j host-list
Specifies the list of router interfaces in the path used by the Tracert utility packet.

-W Timeout
Waits for the number of milliseconds that the timeout specifies for each reply.

Target_name
The name or IP address of the target host.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.