Ravi Sir's Cards › AWS
ping vs nc
This comparison card contrasts ping and nc. ping is described as checks the host (ICMP). nc is described as checks a TCP port. The card pairs ping with is the box up?, and nc with is the app reachable?
Read card text
What this card says
Network
ping
Checks the host (ICMP).
nc
Checks a TCP port.
Key points
Can be blocked by firewall.
Tests the real service.
Example
ping -c 3 web1
Use when
Is the box up?
Is the app reachable?