\[Editor's Note: Email your IIS and Site Server solutions (400 words or less) to R2R at [email protected] We'll edit submissions for style, grammar, and length. If we print your contribution, you'll get $100.\]
The Tracert utility (short for trace route), installed as part of Windows NT and Windows 9x, is one of the most interesting and fun commands in my utility arsenal. A systems administrator uses Tracert to watch the routing in an enterprise. I use Tracert to see the routes my packets take when going from one computer to another over either the Internet or my intranet. In my daily work, I find that the command helps me find bottlenecks in my network or misconfigured routings. Using Tracert is like playing spy: It's fun to follow packets' hops as they travel around the world.
Tracert sends out a series of packets, and each arrives successively one hop closer to the final destination. Tracert sends a packet on the network toward its destination. When the packet gets to a routing point, the router returns the location's address. Then Tracert sends the next packet, which goes past the first routing point to the second one; and so on. Tracert gives you a table showing the route your packets took to get to a specified location.
You send Internet Control Message Protocol (ICMP) echo packets with a Time to Live (TTL) value to a specific destination. Each router along the packet's route decrements TTL by at least 1 before forwarding it. The net effect is that TTL provides a hop count. When TTL reaches 0, the router sends an ICMP Time Exceeded message to the sending system. Tracert sends the first echo packet with a TTL of 1 and increments TTL by 1 for each subsequent transmission until the destination responds or TTL reaches its maximum. To determine how long the message took, look at the ICMP Time Exceeded message that each router sent back.
Tracert takes the following form:
tracert \[-d\] \[-h maximum_hops\] \[-j host-list\] \[-w timeout\] target_name
- -d suppresses the resolution of host names
- -h maximum_hops sets the maximum number of hops allowed before terminating trace
- -j host-list lets you specify a loose source route (no predetermined route, only a starting point—your machine—and an end point) along a host list (containing the names of the host servers that the router returned)
- -w timeout is the maximum time allowed for each reply before the trace times out
- target_name is the destination computer that you want to trace the route to
What most people don't realize is that you can use Tracert as effectively on an internal network as you can to trace routing on the Internet. By watching a Tracert table build on an internal network you can resolve bottlenecks and establish a better set of routing tables. Try it out; the places those packets have been will surely amaze you.