As an example, suppose you are performing a traceroute between two computers with two routers between the source and destination systems as in the diagram below.
When you issue the command
traceroute workstation2, the
traceroute command will first send out a UDP datagram with a TTL of 1.
Router 1 will decrement the TTL, at which point it becomes 0, so router 1 sends
an ICMP "time exceeded" datagram back to workstation 1. Workstation 1 then
sends another datagram to workstation 2, but this time with a TTL of 2. Router
1 is the first hop on the path to workstation 2 and it decrements the TTL
and sends it on to router 2 which also decrements the TTL at which point it
is now 0, so router 2 sends back a "time exceeded" datagram to workstation 1.
Then workstation 1 sends a datagram with a TTL of 3. This time the TTL is
decremented to 2 at router 1 and then to 1 at router 2, which sends the
datagram on to workstation 2, which is the destination system that will send
a reply back to workstation 1. On Microsoft Windows systems, the tracert
command uses a similar process except it sends ICMP echo requests, instead of
UDP packets to a high-numbered port.
Another tool available for use on Microsoft Windows systems is tcproute. Tcproute sends TCP packets to port 80 on the destination system, increasing the TTL value by one with each packet sent, so the tool is similar to the process employed by traceroute on Unix, Linux, or OS X systems, though it is using TCP rather than UDP and is using a destination port of 80, the default port used by web servers for Hypertext Transfer Protocol (HTTP) traffic.
You will need WinPcap installed on your system in order to be able to run tcproute, so if it isn't installed, download and install it. You can check to see if it is already installed, by going to the Windows Control Panel, selecting Programs, then clicking on Uninstall a program under Programs and Features, and then scrolling through the list of installed programs. Note: if you have the free packet analyzer Wireshark on the system, you will already have WinPcap on the system.
To use tcproute on a Microsoft Windows system, after you have downloaded the
zip file, extract its contents to a folder of your choosing, e.g., you
C:\Program Files (X86)\tcproute as it is a
program. You then need to open a command prompt window to run the program.
If you don't know how to do so, see
Obtaining a Command Prompt on a
Windows 8 System.
In a command prompt window, you can type
to see information on how to use the progam and the options it supports.
c:\Program Files (x86)\Network\tcproute>tcproute --help Usage: tcproute.exe [-?][-l][-i INTERFACE#][-p PORT] target Options: -? Get this help screen -v Display version information -l List available interfaces -i INT# Specify an interface (otherwise you have to pick from the list) -p PORT Specify a TCP port to connect to -d Disable DNS lookup -h num Maximum of 'num' hops (maximum TTL) -w ms Wait 'ms' milliseconds for a response -r # Retry # times if a hop times out --http Send an HTTP request once we get a connection target The IP address or domain name of the target --debug Debug mode, prints stuff for bug reports -x redact ip/domain output Manual (Override) Options: --local-ip or --lip Manually set the local IP address. (format) XXX.XXX.XXX.XXX --local-mac or --lmac Manually set the local MAC address. (format) XX:XX:XX:XX:XX:XX:XX (colons only) --gateway-mac or --gwmac Manually set the gateway's MAC address (format) XX:XX:XX:XX:XX:XX:XX (colons only) tcproute.exe 0.9 by Eli Fulkerson, Sep 2 2015 See http://www.elifulkerson.com/projects/tcproute.php for updates. c:\Program Files (x86)\Network\tcproute>
To trace the network path to a host system, you can type a command like
tcproute www.example.com. But if you don't specify the network
interface to use on the source system, tcproute will prompt you to select
one. You can specify the network interface with the
E.g., in the example below, I'm using interface 3 on the system and the
destination system, which is a web server is only two hops away from the
c:\Program Files (x86)\Network\tcproute>tcproute -i 3 192.168.2.5 Ensuring gateway address (192.168.1.1) is in arp... OK! Using the following values: --------------------------- Local IP: 192.168.1.10 Local MAC: 50:E5:49:D8:13:37 Gateway MAC: 00:10:DB:0C:7D:D4 Remote IP: 192.168.2.5 Tracing route to 192.168.2.5:80 1 51 ms binary.midland.local [192.168.1.1] TimeExceeded 2 19 ms 192.168.2.5:80 Synchronize, Acknowledgment (port open) c:\Program Files (x86)\Network\tcproute>