Thursday, March 30, 2023

Traveling Through a Network

Ping & Traceroute Commands

Ping and traceroute are both excellent methods to test network connectivity. Ping is used for testing connectivity to a remote host. When the ping command is initiated, packets are sent over to the remote host, and if it is reachable, the host sends packets back in a reply. The ping results will show how many packets were sent and received, if any are lost, and the roundtrip time.   Traceroute is similar; however, it shows the path packets take to reach a destination. When packets attempt to travel from source to destination, they make a series of hops between multiple routers. If packets encounter a router with connectivity issues or one that does not recognize where the packets need to go, the packet will be ignored, and the request will time out. Let's take a look at a few examples, shall we? 

Example A: Ping & Traceroute to google.com 

Ping Results:  4 packets sent, 4 packets received, and 0 lost. 

Round trip times were Min-7ms, Max-12ms, and Avg-9ms.

Traceroute Results: 11 successful hops, with 11 requests timed out.



Example B: Ping & Traceroute to amazon.co.uk

Ping Results:  4 packets sent, 4 packets received, and 0 lost. 

Round trip times were Min-102ms, Max-106ms, and Avg-104ms.

Traceroute Results: 9 successful hops, with 21 requests timed out.



Example C: Ping & Traceroute to aajtak.in

Ping Results:  4 packets sent, 4 packets received, and 0 lost. 

Round trip times were Min-20ms, Max-22ms, and Avg-21ms.

Traceroute Results: 11 successful hops, with 1 request timed out.



Per the traceroutes above, the most successful was to aajtak.in, a News and Media site in India. Hops to the website were minimal, and there was only one timeout. I was surprised that those results were better than those of google.com. The traceroute to google.com returned multiple timeouts, although my ping results were the fastest of all three sites. The results for amazon.co.uk were less than favorable; however, it was not as surprising since that site had the most extended roundtrip times when pinged. It is common to receive many timeouts when a destination is far from the source, as multiple routers must route the packets to reach a destination.

Ping and traceroute can be used to troubleshoot connectivity issues when a user has problems reaching a remote host. Pinging a site can let the user know if the site is down. Traceroute will allow a user to understand where issues arise for packets on their way to the destination. Traceroute provides more detailed information as the user can tell which hop has the longest roundtrip time in milliseconds. Error messages and timeouts can occur if a website is down or there is heavy congestion on the network or within the path packets are taking to reach a destination.











No comments:

Post a Comment

Data Structures & Algorithms

 Algorithmic Design When developing a program, having a clear idea of how you want it to perform is crucial; that is where algorithmic desig...