Many of the network protocols and devices have built-in functionalities to help protect against issues. These functionalities are known as error detection and error recovery. Error detection is the ability of a protocol or program to determine that something went wrong. Error recovery is the ability of a protocol or program to attempt to fix it. However, errors still pop up, misconfigurations occur, and hardware breaks down even with all of these safeguards in place. On this page, I am sharing the most common techniques and tools when troubleshooting network issues.
Ping (or ping) is the most commonly known network troubleshooting command and is available for all operating systems with networking capabilities.
Ping sends an ICMP echo request to a host computer over an IP network. If the host is reachable, it sends back an ICMP echo reply, and reports the time it took to reach the host and other data such as errors or packet loss.
To use the ping command, go to the command prompt and enter ‘ping’ followed by the IP address or the URL. For example:
ping www.facebook.com
As the name suggests, tracert or traceroute traces the route between a source and the destination. It reports back the IP addresses of all the routers involved.
It is available in most operating systems. In some implementations, the command is traceroute, and in others, it is tracert. Like ping, tracert also works using ICMP routers.
To use the tool on Linux systems, open the terminal and type traceroute followed by the hostname (URL or IP address).
In Windows systems, type tracert followed by hostname. For example:
tracert www.wikipedia.com
Pathping combines the functionality of tracert and ping and is used to find routers that may be causing issues in your network. The tool was developed by Microsoft and is available only on Windows systems.
Pathping sends packets to the final destination and the routers on the way and reports the latency and packet loss in every hop. Just like tracert or ping, to use the command, just type pathping followed by the URL or the IP address in the command prompt.
ipconfig and ifconfig are tools used to determine the TCP/IP network configuration of Windows or macOS systems and Linux systems, respectively. The command displays the IP address, subnet mask, and the default gateway bound to each adapter.
To use the command on a Windows system, head to the command prompt and type ipconfig.
In Linux systems type ifconfig.
nslookup is a network administration tool used to diagnose DNS issues. The tool looks up DNS records and how they map to IP addresses. It also has further options to look up the domain admin's email address, serial number, and other information. The tool is available for Windows, Linux, and ReactOS systems.
To use the tool, simply type nslookup followed by the domain name. For example:
nslookup www.google.com
netstat is another command-line tool to find the network statistics for your entire infrastructure. It displays the network connections for TCP, routing tables, and the network protocols used. The tool is available on almost all systems, including Windows, macOS, Linux, and IBM OS.
To use the protocol, go to the command prompt and type netstat.