A ping is a small question sent to another machine: are you there? A machine that's up usually answers each one.
New command
ping -c
Sends count pings, then stops and sums up. Without -c, ping goes on until you press Ctrl+C.
Usageping -c count machine
text
learner@ops:~$ ping -c 3 web
PING web (10.0.0.10) 56(84) bytes of data. ← web is 10.0.0.10
64 bytes from web (10.0.0.10): icmp_seq=1 ttl=64 time=0.153 ms ← an answer
…
3 packets transmitted, 3 received, 0% packet loss, time 2028ms ← all 3 came backtime is the round trip, there and back, in milliseconds. When nothing answers:
text
learner@ops:~$ ping -c 3 10.0.0.99
PING 10.0.0.99 (10.0.0.99) 56(84) bytes of data.
From 10.0.0.5 icmp_seq=1 Destination Host Unreachable ← ops itself reporting
…
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2066ms100% packet loss means no answer came back, not why. Destination Host Unreachable, from your own address 10.0.0.5, means nothing on the office network answered for that address: no machine there, or it's off. A machine that's up but set to ignore pings gives 100% loss with no From lines.
Objectives
- Ping
webanddb. Which one doesn't answer? - Which address does ping use for
db?