Traceroute

The traceroute utility is another useful network utility. It enables you to trace the route taken by a packet from your machine to a remote host.

Note that if traceroute doesn’t work on your VM, you may:

  • Add the -I option: traceroute -I [ip]
  • Or, use results from tracert (assuming Windows is your host OS).

Here is an example of the output produced when traceroute is used to trace the route taken by a packet to www.mit.edu:

The first line of the traceroute output describes what the command is set for.

  • It lists the destination system (e9566.dscb.akamaiedge.net), destination IP address (184.50.104.236), and the maximum number of hops that will be used in the traceroute (30).

The remainder of the output shows information on each hop, where each line is a reply from (typically) a router, in the path between the sender and the final destination.

It is important to note that the number of hops isn’t an important factor that affects latency.

Each of these lines begins with a host (e.g router) IP on the route from your computer to www.mit.edu, followed by the round-trip time (RTT) for 3 packets sent to that host.

For more information about traceroute, you can look up its manual page by running man traceroute from the command line.

Task 4

TASK 4: Find out how traceroute works. You will need this to answer several questions on eDimension.

Hint: traceroute sends a UDP packet to the destination host’s (highly likely) unusable port, with increasing TTL. The routers that reduces the TTL to 0 will send an ICMP TTL Exceeded reply. The end host will send an ICMP Port unreachable reply.

Route Asymmetries

The route taken to send a packet from your machine to the remote host machine is not always the same with the route taken to send a packet from the remote machine back to you.

In this exercise, you will run traceroute in two opposite directions. First, you will run traceroute on a remote host to see the route taken to your network. Then, you will also run traceroute from your computer to see the route taken to that host.

Task 5

TASK 5: Find out your computer’s public IP address. (Hint: You can use a website like this, or search for “what is my ip” using Google’s search engine.)

Task 6

TASK 6: Visit this link in your web browser.

  • Enter your computer’s public IP address,
  • Select the “from Location”, and follow the steps shown in site for at least three locations namely: New York, Amsterdam, Tokyo.
  • Then, click “Start Test” to start a traceroute to your computer.
  • Take a screenshot of the output

If the output shows that the packet does not reach your IP (request timed out), think about a reason or two on why this is so.

Task 7

TASK 7: After traceroute finishes running, you should be able to view the route taken from specified locations to your network.

  • Record the IP address of the first hop (hop 1), which will be used in the next step.

In the screenshot below, that will be 31.204.145.131 for example.

You’re free to use other similar sites if the site suggested above is blocked in your network, or if you have two devices with different IPs (e.g: one uses VPN), then you can also traceroute each other’s IP addresses.

You can check who that remote host is using the command whois [ip address], for instance, 31.204.145.131 is indeed described as being in Tokyo.

Task 8

TASK 8: On your computer, run traceroute using the IP address recorded in the previous step as the remote destination.

For instance,

Final Thoughts

Is there anything unusual in the output of Task 8? Are the same routers traversed in both directions?

If no, why so?