Network basics: how to diagnose network problems (ping, traceroute, nslookup)?
Diagnosing network issues is a key skill for any specialist maintaining computer networks. When users begin to complain about a lack of internet or slow service performance, the administrator needs to step-by-step localize the malfunction using basic command-line utilities. The first step in this process is creating a clear checklist that includes checking the physical connection, basic interface configuration, creating backups of network equipment configurations, and installing current security updates. Going through such a checklist allows you to immediately filter out mundane causes of failures and reduces the number of so-called mystical problems arising from the human factor.
Three main utilities are used for in-depth connection analysis, each solving its own highly specialized task in diagnostics. The ping utility sends ICMP packets to the target node and measures the response time, which allows you to quickly check the availability of a remote server or host on the local network. If the ping does not go through or huge delays are observed, route tracing comes to the rescue. Traceroute shows the full path that packets take from your computer to the destination point by sequentially polling each intermediate router, which makes it possible to see on which exact section of the network data loss or traffic freezing occurs.
The third most important utility is nslookup, which is used to check the operation of the DNS domain name service. If websites do not open by literal addresses, but ping successfully by numerical IP addresses, the problem lies precisely in name resolution, and nslookup helps figure out which exact DNS server is responsible for the domain and whether it returns correct records. When searching for the root cause of any network problem, it is extremely useful to rely on official manufacturer documentation, study the release notes of the software being used, and try to reproduce the occurring failure on a minimal test case. Such a systematic approach guarantees fast and accurate diagnostics without chaotic and useless manipulations.