[Cmd command]: tracert

Source: Internet
Author: User

How tracert works

By sending "Internet Control Message Protocol (ICMP)" response packets with different TTL values to the target, the tracert diagnostic program determines the route adopted by the target. Each vro on the path must at least decrease the TTL of the data packet by 1 before forwarding the data packet. When the TTL value on the data packet is reduced to 0, the router should send the "ICMP timeout" message back to the source system. Tracert sends a response packet whose TTL is 1, and increases TTL by 1 in each subsequent sending process until the target response or TTL reaches the maximum value to determine the route. Check the ICMP timeout message sent back by the Intermediate router to determine the route. Some routers directly discard TTL expired data packets without asking, which is not seen in the tracert utility.

[Edit this section]

Tracert command

Print out the list of nearby router interfaces in the path that returns the "ICMP timeout" message in sequence. If the-D option is used, the tracert utility does not query DNS on each IP address. In the following example, data packets must pass through two routers (10.0.0.1 and 192.168.0.1) to reach host 172.16.0.99. The default gateway of the host is 10.0.0.1, And the IP address of the router on the 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 30 hops 1 2 S 3 S 2 S 10, 0.0, 1 2 75 MS 83 MS 88 MS 192.168.0.1 3 73 MS 79 MS 93 MS 172.16.0.99 trace complete.

[Edit this section]

Use tracert to solve the problem

You can use the tracert command to determine the stop position of a data packet on the network. In the following example, the default gateway determines that there is no valid path for the host 192.168.10.99. This may be due to a vro configuration problem, 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 30 hops 1 10.0.0.1 reports: Destination net unreachable. trace complete. the tracert utility is very useful for solving large network problems. In this case, several paths can be taken to reach the same point.

[Edit this section]

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 timeout] target_name option description-D specifies that the IP address is not resolved to the host name. -H maximum_hops specifies the number of hops to track the route of the host called target_name. -J host-List specifies the list of router interfaces in the path used by the tracert utility package. -W Timeout: the number of milliseconds specified for each reply. The target host name or IP address of target_name. When we cannot access the target device through the network, the network administrator needs to determine what went wrong. The problem may not only occur on the final destination device, but also on the intermediate router that forwards data packets. There are three methods to detect which transit routers a data packet goes through from the source point to the destination. These three methods are: Route Detection Based on record routing options, UDP-based route detection, route Detection Based on ICMP echo request. Each of the three methods can be used to detect the intermediate routers through which a data packet arrives at the destination device, but the implementation process is completely different.

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.