Traceroute, like the ping command can be used to isolate problems in our network. The ping command is a bit limited sometimes. For example, take a look at the following topology:. When we send a ping from H1 If you know the IP addresses of all routers in the path then you could ping all of these routers one by one.
What if you have no idea how many routers are in between? Above I used the tracert traceroute command on a Windows computer to trace the path from my computer to facebook. You can see all the IP addresses and hostnames of the routers in between my computer and the server that responds to www.
The response times that you see is the round trip time from my computer to the router. For each router, traceroute sends three probes.
Normally, TTL is used to prevent packets from being forwarded forever when there is a routing loop. How do we use this for traceroute? H1 will now send a second packet with a TTL of R1 will decrease the TTL from two to one, forwards it and now R2 has to drop it. R2 will respond with a TTL exceeded message.
R1 will decrease the TTL from three to two, R2 decrease it from two to one and R3 will have to drop it. R3 sends the TTL exceeded message to R1. We now know that the destination is reachable and we have learned all routers in our path. Each IP packet that we send is called a probe. Above we have two host computers. H1 is a Windows computer Above we see all routers and the destination.
For each hop, traceroute will send three IP packets. We do this to get a good average of the round trip time for each hop. We can see that this is an ICMP request.
When R1 receives this IP packet, it will respond like this:. In the capture file, you will see the two packets above three times. You should also understand the IP header fields that we discussed a while back. The server-name above is the destination name or IP address. For example, traceroute is used to find the network path from my machine to google. Each lines gives the details of interaction with each router encountered.
So we see that traceroute not only gives the IP addresses of the intermediate routers but also three round trip times for that particular router as for each router the traceroute commands fires three packets. This depicts that the required field could not be fetched. The reason can be anything from reverse DNS lookup failure to packets not hitting the target router to packets getting lost on their way back.
Traceroute provides an option through which the mapping of IP addresses with host name that traceroute tries is disabled. The following example illustrates this :. The time for which traceroute utility waits after issuing a probe can also be configured.
The -w option expects a value which the utility will take as the response time to wait for. In this example, the wait time is 0. So we see that traceroute tried 30 attempts the max hop attempts and then gave up as no ICMP packet was received in 0.
As already explained earlier, the traceroute utility sends 3 packets per hop to provide 3 round trip times. This option expects an integer which it sets as new value of number of probes per hop. So we see that after configuring the number of probes to 5, the output started showing five round trip times per hop.
Traceroute utility is flexible enough to accept the TTL value that the user wants to start the utility with. For example, I tried a normal traceroute operation and then tried a traceroute with a different TTL value.
So we see that after using the -f option with value 8, only the last 8th line from the previous output was shown.
Traceroute utilities based on TCP are also available. Traceroute is a useful tool for determining the response delays and routing loops present in a network pathway across packet switched nodes. It also helps to locate any points of failure encountered while en route to a certain destination.
However, in the Internet, Traceroute messages are often blocked by routers in various Autonomous Systems AS , making Traceroute highly inaccurate in many cases.
0コメント