Tracert is a Windows based command-line tool that can be used to trace the path that an Internet Protocol (IP) packet takes to reach its destination from a source. It determines the path taken to a destination by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination with incrementally increasing Time to Live (TTL) field values. The TTL is often called as a hop count. The path displayed is the list of near-side router interfaces of the routers in the path between a source host and a destination. Tracert uses the IP TTL field in ICMP Echo Requests and ICMP Time Exceeded messages to determine the path from a source to a destination through an IP internetwork. When the TTL on a packet reaches 0, the router should send an ICMP Time Exceeded message back to the source computer.
How does Tracert Works
Tracert determines the route by sending the first echo packet with a TTL of 1 and then waiting for an ICMP Time Exceeded message. The TTL values of the Tracert packets start with an initial value of one; the TTL of each trace after the first is incremented by one. A packet sent out by Tracert travels one hop further on each successive trip. The route is determined by examining the ICMP Time Exceeded messages sent back by intermediate routers.
Syntax
Code:
tracert [-d] [-h MaximumHops] [-j HostList] [-w Timeout] [TargetName]
Parameters
-d : Prevents tracert from attempting to resolve the IP addresses of intermediate routers to their names. This can speed up the display of tracert results.
-h MaximumHops : Specifies the maximum number of hops in the path to search for the target (destination). The default is 30 hops.
-j HostList : Specifies that Echo Request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in HostList. With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The HostList is a series of IP addresses (in dotted decimal notation) separated by spaces.
-w Timeout : Specifies the amount of time in milliseconds to wait for the ICMP Time Exceeded or Echo Reply message corresponding to a given Echo Request message to be received. If not received within the time-out, an asterisk (*) is displayed. The default time-out is 4000 (4 seconds).
TargetName : Specifies the destination, identified either by IP address or host name.
Bookmarks