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:

<code>tracepath -n 192.168.1.241</code>
图片
图片

HTTP/HTTPS Connectivity Check

wget

Use

wget --spider -S &lt;url&gt;

to test a URL without downloading content and to display response headers.

curl

Use

curl -I &lt;url&gt;

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 &lt;remote_host&gt; &lt;port&gt;

. Use

-u

for UDP and

-z

to scan without sending data.

<code>nc -zv remote_host port</code>
图片
图片

For UDP, send a test payload:

<code>echo test | nc -uv remote_host port</code>
图片
图片

telnet

Simple TCP port check:

<code>telnet remote_host port</code>
图片
图片

nmap

Use

nmap &lt;target_ip&gt;

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.

<code>nmap 192.168.0.104</code>
图片
图片

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:

<code>netstat -a</code>
<code>netstat -tn</code>
<code>netstat -un</code>
<code>netstat -tulnp</code>

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:

<code>dig www.baidu.com</code>

Query a specific DNS server:

<code>dig www.baidu.com @180.76.76.76</code>
图片
图片
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

login 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.