This article explains how to ping an IP address for a device. The goal of pinging a device is to find out if a device is reachable at a particular IP address.
Ping is a computer network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the round-trip time for messages sent from the originating host to a destination computer.
A device on a computer network should respond to a echo request (ping) with an echo reply (pong) confirming it is online. This reply should come within milliseconds. If a reply does not come it is said to have "timed out" because the predefined wait time for a reply has been exceeded. If no reply is seen we typically assume that no device is present at, or assigned with, that IP address.
For the purposes of this article we will use a computer running Windows 7. Other Microsoft operating systems since Windows XP will use approximately the same procedure.
Connection is made via an Ethernet cable either directly between your computer's NIC and the Biamp device via a crossover cable, or via a network switch to a Biamp device on a network. Either connection type will allow you to Ping the device's presumed address and see if a device responds from that location.
Begin by going to the Windows start menu.
Type the letters "cmd" into the Search box and hit Enter.
This will ask the Windows OS to run cmd.exe, commonly referred to as the "Command Prompt" interface. The following window should open on your desktop.
The Command Prompt allows various commands and queries to be sent to the system. For a Biamp device with the default IP address you will use the command "ping 192.168.1.101". If the device is at a different IP address, replace 192.168.1.101 with the address you are trying to poll.
After you hit Enter the request will be sent 4 times, generating either a time out failure or a reply with round trip statistics.
To try again, hit the UP arrow key once to refresh the last command, then Enter.
Failures can present in a few ways, here is what you might expect to see back:
Two Ping failures are shown with slightly different feedback but no response from the intended device.
Check the cabling, ensure the physical path to the device is sound, and try again.
4 responses with good, quick response times.
Use the command "ping 192.168.1.101 -t" to initiate a continuous ping. Again, replace the IP address with one specific to your device as needed. The -t can be placed before or after the IP address.
Interrupt the pings with Ctrl-Break to see statistics on the captures.
Stop the pings with Ctrl-C.
"ping –t 192.168.1.101 >PingLog.txt" will output the ping results to a txt file called “PingLog.txt”, it will not show a scrolling trace in the cmd prompt window. It will be placed in the C:\Users\username directory. Change the file name so each is unique. Pings will happen once a second. control-C will end the ping and close the file.
Things you can ping
Ping is not limited to nearby hardware, you can also ping websites.
A ping to google.com
Or ping your own NIC.
Note that the maximum round trip time for your own NIC is typically about 0ms.
Ping a range of IP addresses
In some situations you need to ping a device but don't know where it lies within the subnet range. This method can help narrow down the list of addresses being used.
In Windows, open the command prompt (Windows start menu > Search > type "cmd")
Fast ping time
From the command prompt, type....
for /l %i in (1,1,254) do @ping 192.168.1.%i -w 10 -n 1 | find "Reply"
This will ping all addresses from 192.168.1.1 to 192.168.1.254 one time each, wait 10ms for a reply (more than enough time on a local network) and show only the addresses that replied.
- Change the IP address after @ping to reflect your network's IP range.
- Syntax for for /l is (start,step,end) if you want to change the range to scan.
- The -w 10 tells it to only wait 10 ms for a reply before moving on. If your network is slow you will have to increase this value or take it out all together, although this will make it very slow.
- The vertical line character before find is typed as shift-\ on the Windows keyboard.
Also, note that the Windows find is case sensitive, so make sure you capitalize "Reply" or you won't get any output. Optionally you can just type "eply" and it will automatically add the capital R in the response.
Longer ping time
This is the same as above, with the -w variable changed to allow a 100ms reply window.
for /l %i in (1,1,254) do @ping 192.168.1.%i -w 100 -n 1 | find "Reply"
This will ping all addresses from 192.168.1.1 to 192.168.1.254 one time each, wait 100ms for a reply and show only the addresses that replied.
Ping from a specific NIC
To specify the source interface to use, use the -s option. (You use the interface number, not the IP address). To identify the NIC interface number use the command "netsh int ipv4 show interfaces"
To force IPv4 or IPv6, use -4 or -6.
To ping 192.168.0.1 using ipv4 from interface 1, use the command "ping -4 192.168.0.1 -s 1"