Troubleshooting Connectivity using Ping, Telnet, and Traceroute Commands
In the domain of network troubleshooting, three commands frequently stand as the initial line of defense: ‘ping,’ ‘telnet,’ and ‘traceroute.’ These commands are indispensable tools in the toolkit of both novice and experienced network administrators, offering valuable insights into network connectivity and performance.
When attempting to diagnose network issues or confirm the operational status of a server, you can utilize the following methods using the command prompt.
Ping
ping [ipaddr]
- Use the ‘ping’ command to ascertain the smooth operation of the network.
- It’s worth noting that firewalls may disable the ‘ping’ command as a preventive measure against malicious attacks.
ping 192.168.0.xxx
ping www.sample.com
If the server is up and running and the network connection is functioning properly, you should be able to see a response from the server.
Telnet
telnet [ipaddr] [port]
- If the ‘ping’ command is disabled, this alternative can be utilized.
- It’s crucial to note that the transmission is not encrypted. Therefore, sensitive data (such as passwords and personal information) may also be blocked by the server due to security concerns.
telnet 192.168.0.xxx 22 #Remember to add the port number
telnet www.sample.com 80
If the port is accessible, you should be able to see SSH protocol information and a blank screen, indicating a successful connection.
Traceroute (Linux), tracert (Windows)
traceroute [ipaddr]
- ‘traceroute’ is a command that traces the path taken by packets through a network.
- It’s important to note that the path taken may vary each time.
- This command helps identify which node is causing issues.
- For Windows systems, the traceroute command is replaced with ‘tracert’.
traceroute 192.168.0.xxx
traceroute www.sample.com
If the connection is successful, the nodes that the packet passes through will be listed.