Linux Answers Magazine: The Humble Ping

“Experienced users of Unix/Linux or even (Yuch!) Wintel will
probably know, so forgive me, but keep reading. Ping is a
little tool which lets you test the IP network link between your
computer and somewhere else. It tells you the speed of a link, the
reliability and in fact whether it works at all. It can also tell
you if your nameserver (DNS) configuration is working
thus, whether www.yahoo.com is actually going to mean anything to
your computer, and if so, whether you can access it. It will even
tell you if that remote server has crashed. It is also a good way
of bringing up demand-dial ppp links and keeping timeouts from
happening. You can even have it crash a fileserver.”

“A lot of us use dial on demand internet links, which timeout
after a given time. Sometimes, like when you are waiting for an
e-mail, you don’t want this. Try issuing the command “ping -i 10
www.yahoo.com”. This will cause your computer to send a data packet
across the Internet to yahoo every ten seconds until you press
control-c and kill ping. This means the link stays open. If you
want to stop ping automatically after a given time, you can use the
count option again. If I want the link to stay open for at least a
minute, that is 6 times 10 seconds, so I use “ping -l10 -c6
www.yahoo.com”. This command will cause ping to sit there and keep
that link open. After 1 minute, it stops.”

Complete Story