Ping Sweep: Finding Live Hosts With Bash and Nmap
Find every live host on a subnet with a bash one-liner, and when to reach for nmap -sn instead. Why a down result never means the address is free.
The first command anyone runs and the most misread result in networking. Articles tagged Ping cover options, sizing, exit codes and what a failure does and does not prove.
Find every live host on a subnet with a bash one-liner, and when to reach for nmap -sn instead. Why a down result never means the address is free.
The iputils ping flags engineers actually use: -c/-i/-q for jitter, -s/-M for MTU, -D for timestamps, and the -I flag that fixes confusing IPv6 failures.
Find the path MTU with nothing but ping, from Linux and IOS XE, against a real 1400-byte link. The 28-byte math and the PMTUD black holes that hang TCP.
Source interfaces, the DF bit, repeat counts, and the response characters (! . U M) that tell you exactly what failed. Extended ping on Cisco IOS XE, captured live.
Silent 100% loss and Destination Unreachable are different failures pointing at different problems. Every ping failure message decoded with live lab captures.
What actually happens between typing ping and the reply line, decoded field by field on a live 3-hop Cisco lab: ICMP echo, TTL, RTT, and jitter.