Operations 13 min read

Essential Network Troubleshooting Commands: Ping, Traceroute, tcpdump, nmap and More

This guide presents essential Linux network troubleshooting commands—including ping, traceroute, nslookup, tcpdump, fping, tc traffic‑control, and nmap—along with practical examples and usage tips for testing connectivity, analyzing packets, and scanning hosts and services.

Raymond Ops
Raymond Ops
Raymond Ops
Essential Network Troubleshooting Commands: Ping, Traceroute, tcpdump, nmap and More

Testing network connectivity and diagnostics on Linux using common command‑line tools.

Basic commands:

ping
ip route
route
traceroute
tracepath
mtr
nslookup
host
dig
tcpdump
wireshark
nmap
netcat (nc)
tc

Example of traffic control with tc:

tc qdisc add dev eth0 root netem loss 50%
tc qdisc add dev eth0 root netem delay 1000ms
tc qdisc show dev eth0
tc qdisc del

fping

fping sends ICMP probes to multiple hosts efficiently. It supports specifying a list of hosts or a file and is faster than ping for many targets. Install via EPEL on CentOS.

# yum -y install fping
# fping 10.0.0.7
# fping -g 10.0.0.0/24

tcpdump

tcpdump captures network packets with powerful filtering options. Common syntax and parameters are listed, e.g., -i eth0, -nn, -c 100, and saving to a file.

tcpdump -i eth0 -nn icmp and src host 10.0.0.6 and dst host 10.0.0.7
tcpdump -c 100 -w ./target.cap

nmap

nmap scans remote hosts and ports, offering many scan types such as SYN (-sS), TCP connect (-sT), UDP (-sU), OS detection (-O), and version detection (-sV). Example commands illustrate host discovery, port scanning, and aggressive scanning.

# nmap -sS 10.0.0.1
# nmap -sU 10.0.0.1
# nmap -O 10.0.0.1
# nmap -A 10.0.0.1
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 troubleshootinglinux-commandstcpdumpnmapfpingtc traffic control
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.