Five Examples Of The ping Utility
What is ping Utility?
Before going through some real world examples of the ping utility, let me explain what this commandline tool is and its purpose. The ping utility is used to test the reachability of a host on an Internet Protocol (IP) network. Its names comes from the active sonar method which is used to create a pulse of sound (ping) under the water and listening to echo requests from surrounding objects. This method is the best way to explain how the network ping utility works. The ping utility sends echo requests to a host and waits for an ICMP response.
Some Examples Of The ping Utility In Practice:
Find Out The Ip Address Of A Host
Sometimes you need the ip address of a host, you can use the ping tool like shown in Figure 1. Just type the ping command and after it type the hostname.
Find Out The Version Of The ping Utility You Are Using
The -V flag can be used to find out which version of the ping tool you have. Type the following command and it will display the current version of the ping utility.
As you can see from Figure 2, I am using ping utility, iputils-sss20101006.
When you ping a machine with the ‘ping host’ command, pinging doesn’t stop and you have to pres CTRL+C to stop it, or you can use the -c (count) option to send a specified number of packets. When using the -c option, after the number of packets specified by the network admin (user whatever) is sent, the pinging process stops automatically instead of pressing CTRL+C.
ping -c 13 127.0.0.1
The above command is used to send 13 packets to my localhost.
As you can see from Figure 3 i did not press CTRL+C to exit pinging,it stopped automatically.
Specify The Interval Between Packets
Did you know that ping sends a packet every second? Do you like to speed up or slow down? The -i option can be used to specify the interval between packets. Use the following commands to send packets very fast or very slow.
Send A Packet Every 0.13 Seconds
ping -i 0.13
Send A Packet Every 13 Seconds
ping -i 13
Combine the -i option with -c option
ping -c 13 -i 3
It will take 39 seconds to send 13 packets with the specified interval of 3 seconds.
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- News from Kaspersky Lab: Tor is protecting criminals : In a previous article I wrote a bit about Tor. Free browser, relays bouncing your IP all over the ...1 comment |
- Grive: An Unofficial, Open Source Linux Client For Google Drive : A couple of months before, we have featured a Linux client for Google Drive named Syncdrive, which w...0 comments |
- How To Access A LVM Drive / Partition in Ubuntu : Hey Guys, I installed Fedora on an external drive (LVM) recently and was trying to access it from U...0 comments |
- Adding and Deleting Cluster Resources (corosync pacemaker) : In our previous tutorial, we have shown you how to install corosync and pacemaker. We will show y...0 comments |
- Install Satis On Ubuntu Sever 13.10/13.04 : Satis is a simple static composer repository generator. It is used in any composer.json file as i...0 comments |
- Download 11 Community Wallpapers Chosen For Ubuntu 14.04 “Trusty Tahr”
- Ubuntu 14.04 LTS “Trusty Tahr” Default Wallpaper Revealed!
- Canonical Works with Cisco!
- Android Intercom: An Excellent Intercom App For Bikers Or Hiking Fans
- Install Google Talk Plugin In Fedora 20
- Adding and Deleting Cluster Resources (corosync pacemaker)
- News from Kaspersky Lab: Tor is protecting criminals
- Install Satis On Ubuntu Sever 13.10/13.04
- How To Access A LVM Drive / Partition in Ubuntu
- How To Disable Remember Open Files in Sublime Text 3
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .