Operations 12 min read

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.

Raymond Ops
Raymond Ops
Raymond Ops
Master Network Connectivity Checks: From ethtool to nmap

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.241
图片
图片

HTTP/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 port
图片
图片

For UDP, send a test payload:

echo test | nc -uv remote_host port
图片
图片

telnet

Simple TCP port check:

telnet remote_host port
图片
图片

nmap

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.104
图片
图片

Local 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 -tulnp

The 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.76
图片
图片
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

network troubleshootingpingLinuxnetstatethtoolnmapconnectivity tools
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.