Traveling Through a Network: Ping and Traceroute


Ping commands send 4 packets of 32 bytes to the destination router IP.
Similar to using the ping command, traceroute sends three packets of data to each router along the path to your destination IP with each router counted as a hop.  
Both commands were sent to the following domains: google.com; austrailia.gov.au; gov.uk 
google.com - ping









Ping command for google.com resulted in and average travel time of 76ms with zero packet loss. 
google.com - traceroute












Traceroute to google.com resulted in 11 successful hops with no timeouts and no significant latency along the route. Average time to destination IP is 69ms 
 australia.gov.au -ping







Ping command for austrailia.gov.au resulted in an average travel time of 66ms with zero packet loss. 
australia.gov.au - traceroute

















Traceroute to austrailia.gov.au resulted in 18 successful hops with 7 request time outs, but the latency was still low getting to the destination IP. Average time to destination IP is 52ms.  
gov.uk - ping








The ping command for gov.uk resulted in an average travel time of 72ms with zero packet loss. 
gov.uk - traceroute












Traceroute to gov.uk resulted in 12 successful hops with no timeouts and low latency to the destination IP. Average time to destination IP is 50ms. 
There appeared to be an issue with my Verizon Fios home network that returns 2 hop results when using the traceroute command. The first is to the home router followed by the destination IP. There are forums on this issue, but that would be getting away from the assignment. I turned on the mobile hotspot on my phone and tethered it to my laptop for all the above traceroute results. 
2 hop traceroute result










I think having to switch to my mobile hotspot made this exercise more interesting. I noticed in the traceroute examples that first 7 hops were my phone’s IP (172.20.10.1) followed by six private 10.x.x.x addresses. I assume since I was using my phone as a hotspot that these are T-Mobile's routers routing my traffic through their internal network until it went to the external routers. I believe the hop count would have lower if the traceroutes would have been successful on my home network.  In addition to google.com, I ran ping and traceroute commands on australia.gov.au (Australian government site) and gov.uk (United Kingdom government site).  
Average roundtrip ping/traceroute times and hops for all domains: 





Surprisingly, the slowest roundtrip time in for my queries were to google.com. I would attribute this to the amount of traffic that Google receives, but the response time was still relatively fast. The main difference was the number of hops it took to reach the destination. Google did have the fewest number of hops at 11, followed by gov.uk at 12, and lastly australia.gov.au with 18. Geographical location did affect the number of hops it took to reach a destination, but it did not seem to have an impact on the speed to reach a destination.  
You can use ping and traceroute to troubleshoot network connection issues between your computer and a destination IP. Using the ping command will let you know if that IP is reachable, if there is packet loss, and the average roundtrip time between your computer and that IP address. If you discover there are slow speed, packet loss, or connection timeouts, use traceroute to find where along the path there is an issue. Traceroute pings every router along the path to your destination IP, returning the roundtrip travel time between each router and your computer. If you are not reaching the destination IP, traceroute will show you if there is an issue with a router along the path that is slowing/failing the connection, or if the connection is failing at the destination IP itself (Inmotion Hosting, 2019). There are many reasons that ping/traceroute commands could fail. Two common reasons are that the destination IP is down, or there is a firewall rule blocking that IP address. If your firewall is blocking the IP address, the commands will fail prior to reaching out to any external routers, usually after the first hop depending on where the firewall is in your network.  If the IP is down, the command will fail at the destination IP. 
Reference: 
Inmotion Hosting. (2019, December 31). How to read a traceroute. Inmotion Hosting.  

Comments

Popular Posts