Master Network Connectivity Checks: From ethtool to nmap
This guide explains how to verify physical links, test ping latency, trace routes, check HTTP/HTTPS availability with wget and curl, assess TCP/UDP ports using netcat, telnet, and nmap, inspect local connections via netstat/ss, understand TCP states, and validate DNS resolution, providing practical command examples for each step.
Physical Connection Check
ethtool
Use ethtool <device_name> to view the physical link status of a network interface. The Link detected field shows yes when the connection is healthy.
Network Connectivity Check
ping
Ping tests reachability between hosts and reports fields such as icmp_seq (packet number), ttl (time‑to‑live), time (round‑trip latency), rtt , min , avg , max , and mdev (standard deviation). Use -I <interface> on Linux or -S <source_address> on Windows to specify the sending interface.
tracepath
Similar to traceroute, tracepath shows each hop a packet traverses. It is simpler and produces concise output.
Example:
tracepath -n 192.168.1.241HTTP/HTTPS Connectivity Check
wget
Use wget --spider -S <url> to test a URL without downloading content and to display response headers.
curl
Use curl -I <url> to fetch only HTTP headers. Adding -f makes curl fail silently on HTTP errors.
TCP/UDP Connectivity Check
nc (Netcat)
Check TCP ports with nc -zv <remote_host> <port>. Use -u for UDP and -z to scan without sending data.
nc -zv remote_host portFor UDP, send a test payload:
echo test | nc -uv remote_host porttelnet
Simple TCP port check:
telnet remote_host portnmap
Use nmap <target_ip> to scan common ports. Specify ports with -p, e.g., nmap -p 80,443 remote_host. The state open means a service is listening, closed means no listener, and filtered indicates a firewall blocked the probe. ACK scans ( -sA) reveal firewall presence.
nmap 192.168.0.104Local Network Connection Inspection
netstat and ss
Both commands display active connections and listening sockets. Common options: -a: show all sockets -t: TCP only -u: UDP only -n: numeric addresses -l: listening sockets -p: show owning process
Examples:
netstat -a netstat -tn netstat -un netstat -tulnpThe ss command uses the same options.
TCP Connection States
LISTEN – service waiting for connections
ESTABLISHED – successful three‑way handshake
SYN_SENT / SYN_RECV – intermediate handshake states
FIN_WAIT_1, FIN_WAIT_2, TIME_WAIT, CLOSE_WAIT, LAST_ACK, CLOSED – termination phases
Three‑Way Handshake Process
1. SYN : client sends a SYN with its initial sequence number. 2. SYN+ACK : server replies with its own sequence number and acknowledges the client. 3. ACK : client acknowledges the server, and the connection enters ESTABLISHED state.
DNS Availability Check
Use dig , host , or nslookup to verify DNS resolution. Example: dig www.baidu.com Query a specific DNS server:
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.
Raymond Ops
Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.
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.
