Microsoft KB Archive/162326

= How to use the Tracert command-line utility to troubleshoot TCP/IP problems in Windows =

Article ID: 162326

Article Last Modified on 10/31/2006

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server
 * Microsoft Windows NT Server 3.5
 * Microsoft Windows NT Server 3.51
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Workstation 3.5
 * Microsoft Windows NT Workstation 3.51
 * Microsoft Windows NT Workstation 4.0 Developer Edition

-



This article was previously published under Q162326



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



For a Microsoft Windows XP version of this article, see 314868.



SUMMARY
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

The TRACERT (Trace Route) command is a route-tracing utility used to determine the path that an IP packet has taken to reach a destination.

Note You can run this utitily by typing tracert or tracert  at the command prompt.

This article discusses the following topics:
 * How the TRACERT command works
 * Troubleshooting with TRACERT
 * TRACERT syntax



How the TRACERT Command Works
The TRACERT diagnostic utility determines the route taken to a destination by sending Internet Control Message Protocol (ICMP) echo packets with varying IP Time-To-Live (TTL) values to the destination. Each router along the path is required to decrement the TTL on a packet by at least 1 before forwarding it, so the TTL is effectively a hop count. When the TTL on a packet reaches 0, the router should send an ICMP Time Exceeded message back to the source computer.

TRACERT determines the route by sending the first echo packet with a TTL of 1 and incrementing the TTL by 1 on each subsequent transmission until the target responds or the maximum TTL is reached. The route is determined by examining the ICMP Time Exceeded messages sent back by intermediate routers. Note that some routers silently drop packets with expired TTLs and are invisible to TRACERT.

TRACERT prints out an ordered list of the routers in the path that returned the ICMP Time Exceeded message. If the -d switch is used (telling TRACERT not to perform a DNS lookup on each IP address), the IP address of the near- side interface of the routers is reported.

In the following example, the packet must travel through two routers (157.54.48.1 and 11.1.0.67) to get to host 11.1.0.1. In this example, the default gateway is 157.54.48.1 and the IP address of the router on the 11.1.0.0 network is at 11.1.0.67.

C:\>tracert 11.1.0.1

  Tracing route to 11.1.0.1 over a maximum of 30 hops

1    2 ms     3 ms     2 ms  157.54.48.1 2   75 ms    83 ms    88 ms  11.1.0.67 3   73 ms    79 ms    93 ms  11.1.0.1

Trace complete.

Troubleshooting with TRACERT
The TRACERT command can be used to determine where a packet stopped on the network. In the following example, the default gateway has determined that there is not a valid path for the host on 22.110.0.1. There is probably a router configuration problem or the 22.110.0.0 network does not exist (a bad IP address).

C:\>tracert 22.110.0.1

  Tracing route to 22.110.0.1 over a maximum of 30 hops

1 157.54.48.1  reports: Destination net unreachable.

Trace complete.

TRACERT is useful for troubleshooting large networks where several paths can be taken to arrive at the same point, or where many intermediate systems (routers or bridges) are involved.

TRACERT Syntax
There are several command-line switches that can be used with TRACERT, but they are usually not needed for standard troubleshooting.

TRACERT syntax:

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

Parameters:

  -d Specifies to not resolve addresses to host names.

-h maximum_hops Specifies the maximum number of hops to search for target.

-j host-list Specifies loose source route along the host-list.

-w timeout Waits the number of milliseconds specified by timeout for each reply.

target_name Name or IP address of the target host. You can use the -j option to force the outgoing datagram to pass through a specific router. To use the -j option in this manner, use the IP source route option. For example, if you type tracert, you find that the used path is as follows:

*

To find the path to router4 and back to the computer, type tracert -j < > < >.

The path to router4 and back to the computer is traced. In this example, the path is typically the following: *

Additional query words: tcp/ip prodnt

Keywords: kbhowto kbinfo kbnetwork KB162326

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.