Pinging a Host

On occasion you may need to find the IP address or determine the connectivity of a particular server for one reason or another.

One method to do this is called ping which is available with almost every operating system available and is traditionally a command-line program.

How to Ping in Windows XP or pre-XP

  1. Click Start
  2. Click Run
  3. Type: command (OR) cmd
  4. Press Enter
  5. Type: ping -n 1 example.com
  6. Press Enter

You should receive a response that includes the IP address for that server/host including information on the success or failure of the test packet.

How to Ping in Windows Vista/Windows 7

  1. Click on the Windows Orb
  2. In the search/run box type and run: cmd
  3. Type: ping -n 1 example.com
  4. Press Enter

You should see a response that includes the IP address for that server/host and information on the success/failure of the packet.

How to Ping in just about anything else

  1. Open a console
  2. Type: ping -c 1 example.com
  3. Press Enter

You should see a response that includes the IP of the host or server and general information on the test packet including success or failure rates.

Example:

byet@tutorials:~$ ping -c1 example.com
PING example.com (192.0.32.10) 56(84) bytes of data.
64 bytes from www.example.com (192.0.32.10): icmp_seq=1 ttl=241 time=84.7 ms

--- example.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 84.765/84.765/84.765/0.000 ms

NOTE: On free hosting and some specialized locations like MySQL servers, you may get a failure message even if the server is operational.