Master Network Connectivity Checks: Essential Linux & Windows Tools Explained
This guide walks you through practical methods for verifying physical links, testing reachability, tracing routes, checking HTTP/HTTPS access, probing TCP/UDP ports, inspecting local sockets, and validating DNS using common Linux and Windows command‑line utilities such as ethtool, ping, tracepath, wget, curl, nc, telnet, nmap, netstat, ss and dig.
Physical Link Check
Use ethtool to inspect the physical connection status of a network interface. The command ethtool <device_name> displays a Link detected field; yes indicates a healthy link.
Network Reachability
ping
The ping command tests connectivity between the local host and a remote host. Important output fields include:
icmp_seq – sequence number of the sent packet
ttl – Time To Live, decremented by each router
time – round‑trip time in milliseconds
rtt – round‑trip time
min / avg / max – minimum, average, and maximum RTT
mdev – standard deviation of RTT, indicating stability
On Linux you can bind the ping to a specific interface with the -I (capital i) option; on Windows the -S option specifies the source address.
Linux example: ping -I eth0 8.8.8.8 Windows example:
ping -S 192.168.1.10 8.8.8.8Path Tracing
tracepath
tracepathworks like traceroute but provides a simpler, more concise output. It shows each hop the packets traverse and helps locate where a connection fails.
Example:
tracepath -n 192.168.1.241Interpretation notes:
"[LOCALHOST] pmtu 1500" – the first detection point (local machine)
"no reply" – no response from a hop, possibly due to firewall filtering
HTTP/HTTPS Connectivity
wget
Use wget to test URL reachability without downloading content by adding the --spider option. The -S flag shows server response headers.
curl
Check a URL with curl by requesting only the headers using -I. Adding -f makes curl fail silently on HTTP errors, outputting only a short error message.
TCP/UDP Port Checks
nc (netcat)
Netcat probes TCP or UDP connectivity.
TCP check (scan mode, no data transfer): nc -zv remote_host port UDP check (requires -u and may need manual termination with Ctrl+C):
echo test | nc -uv remote_host porttelnet
Simple TCP port test:
telnet remote_host portnmap
Powerful scanner for port states and OS detection. Common states:
open – service listening
closed – no service
filtered – probe blocked by firewall
Basic scan: nmap 192.168.0.104 Scan specific ports: nmap -p 80,443 remote_host ACK scan ( -sA) determines firewall presence without revealing open ports.
Local Socket Inspection
netstat and ss
Both tools display active connections, listening sockets, and associated processes.
Common options (identical for netstat and ss): -a – show all sockets -t – TCP sockets -u – UDP sockets -n – numeric addresses (no DNS lookup) -l – listening sockets only -p – show owning process
netstat -a netstat -tn netstat -un netstat -ln netstat -tulnpThe ss command uses the same flags and provides additional columns such as State , Recv‑Q , Send‑Q , Local Address:Port , Peer Address:Port , and Process .
DNS Availability
Verify DNS resolution with dig, host, or nslookup. Example: dig www.baidu.com Specify a DNS server using @:
dig www.baidu.com @180.76.76.76Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
