Ping an IP address

Table of contents:

Ping an IP address
Ping an IP address
Anonim

With the ping command you can test the connection speed between your computer and another computer on a network. You can use it to say something about the strength of the connection, the distance and the delay time. Follow the steps in this article if you want to use the ping command.

Steps

Method 1 of 4: Ping on Windows, Mac OS X, or Linux

Ping an IP Address Step 1

Step 1. Open a command window

Each operating system has its own version of a so-called 'command line' program with which you can execute the ping command, among other things. The ping command works almost the same on all operating systems.

  • On Windows this program is called 'Command Prompt'. Click Start and enter "cmd" in the text box. Windows 8 users can simply type "cmd" when they are at the Start screen. Press enter to open a Command Prompt window.

  • On Mac OSX, the program is called 'Terminal'. Go to Applications > Utilities > Terminal. Select Terminal.

  • On Linux, open a Telnet/Terminal window. You can usually find it in the Accessories folder within the Applications folder
  • In Ubuntu, use the shortcut Ctrl + alt=""Image" + T to open a Terminal window.</h3" />

Ping an IP Address Step 2

Step 2. Type the ping command

type ping or ping.

  • A hostname is usually a website address. Replace with the website or server you want to ping. For example, to ping WikiHow's web server, type ping www.wikihow.com.

  • An IP address is the location of a computer on a network, locally or on the Internet. If you know the IP address, replace with the IP address. For example, if you want to ping the IP address 192.168.1.1 you would type ping 192.168.1.1.

  • To make your computer ping itself, type ping 127.0.0.1.

    Ping an IP Address Step 3

    Step 3. Press Enter to see the ping result

    The results are displayed under the current command. Later on, we tell you how to interpret the outcome.

    Method 2 of 4: Ping with Network Utility (Mac OSX)

    569520 4

    Step 1. Open the Network Utility

    Go to Applications > Utilities > Network Utility.

    569520 5

    Step #2. Click on the Ping tab menu

    Enter the network address you want to ping.

    • A hostname is usually a website address. For example, to ping WikiHow's web server, type www.wikihow.com.

    • An IP address is the location of a computer on a network, locally or on the Internet. For example, if you want to ping the IP address 192.168.1.1 you would type 192.168.1.1.

      569520 6

      Step 3. Indicate how many pings you want to send

      You can usually get a good reading with 4-6 pings. Click the 'Ping' button when you are done, the result will be shown in the bottom window.

      Method 3 of 4: Interpreting the ping results

      Ping an IP Address Step 7

      Step 1. Read the first line

      On the first line you can read what the command does. It repeats the entered address and tells you how much data is sent. For example:

      Pinging www.wikihow.com [173.203.142.5] with 32 bites of data:

      Ping an IP Address Step 8

      Step 2. Read the 'body' of the results

      A successful ping command will return lines stating how long it took for the address to respond. TTL indicates the number of 'hops' that occurred during the sending of the packets. The lower the number, the more routers the packets have passed. 'Time' shows how many milliseconds it took to connect:

      Reply from 173.203.142.5: bytes=32 time=102ms TTL=48

      Reply from 173.203.142.5: bytes=32 time=105ms TTL=48

      Reply from 173.203.142.5: bytes=32 time=105ms TTL=48

      Reply from 173.203.142.5: bytes=32 time=108ms TTL=48

      If the ping does not stop automatically, press CTRL + C

      Ping an IP Address Step 9

      Step 3. Read the summary

      When the ping is complete, a summary of the results is displayed. 'Lost packets' means that the connection to the address is not reliable and data was lost during the ping. The summary also shows the average time of the connection:

      Ping statistics for 173.203.142.5:

      Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milliseconds:

      Minimum = 102ms, Maximum = 108ms, Average = 105ms

      Method 4 of 4: What to do in case of failed ping commands

      Ping an IP Address Step 10

      Step 1. Check your command

      A common error message is:

      Ping request could not find host www.wkkihow.com. Please check the name and try again.

      The bottom line is that you misspelled the hostname.

      • Type everything again and pay attention to the spelling. If that doesn't solve the problem, it's a good idea to try another well-known hostname, such as www.google.com. If that gives the result "Unknown Host", the problem is most likely in the address of the DNS server.

      • Ping the IP address instead of the hostname (eg 172.203.142.5). If that works, it means that the address you are using for the DNS server is incorrect or that the host is not reachable.

        Ping an IP Address Step 11

        Step 2. Check the connection

        Another error message looks something like this:

        sendto: No route to host

        This may mean that the address of the 'gateway' is incorrect or that the connection of your computer is not OK.

        • Ping 127.0.0.1: that is the address of your own computer. If that doesn't work either, your network adapter's TCP/IP settings are not configured properly.

        • Check the wireless connection or your computer's connection to your router, especially if it worked fine before.

        • Usually there are lights near the network ports on your computer to indicate whether the connection is OK and to indicate that data is being transferred. The ping command sends a packet every second, so you should see the light blinking while pinging.

        • Look at the indicator lights on your router and especially at the light that shows that the connection to your computer is correct. If you see an error light, you have to follow the cable from your computer to the router. Check if everything is in order. Call your internet provider if you can't figure it out.

          Tips

          • Why do we actually use the ping command? Ping (named after the echolocation systems in submarines) uses the simplest type of packet. The answer is provided by the communication part of the operating system (TCP/IP). It doesn't require any programs to run at all, you don't need access to files, and it has virtually no impact on other activities. However, all hardware, gateways, routes, firewalls, DNS servers, and hosts must work properly. If you can't reach the host through a browser or other program, but you can ping the host successfully, the problem is most likely not with you.
          • You can optionally adjust the ping settings. Here are a few options:

            • -t: Ping until the ping is stopped manually (CTRL + C).
            • -w: Timeout. Allows you to adjust the timeout (in milliseconds). The default value is 1,000 (1 second timeout).
            • -n: Number. Determines the number of echo requests to send. By default, this number is 4.
            • -a: Convert addresses to hostnames.
            • -l: Size. Size of the send buffer.
            • -f: Set do not fragment flag.
            • -i: TTL. Time to live (time).
            • -v: TOS. Service type.
            • -r: number. Save route for number of hops.
            • -s: number. Show time for number of hops.
            • -j: host list. Non-strict source route along list of hosts.
            • -k: host list. Strict source route along list of hosts.
            • -?: Help. Use this option for a full list of ping options.

          Sources

Popular by topic