How to Ping an IP Address: 11 Steps

Table of contents:

How to Ping an IP Address: 11 Steps
How to Ping an IP Address: 11 Steps
Anonim

The 'Ping' command is a great tool for quickly identifying any problems on our local network. It is generally used to test the connection between two nodes (hosts) of a local network, a wide area network or any internet address anywhere in the world. The instructions for performing a ping test vary according to the operating system of the computer used, let's see them together.

Steps

Part 1 of 4: Ping on Windows, Mac OS X and Linux

Ping an IP Address Step 1
Ping an IP Address Step 1

Step 1. Open a 'Command Prompt' or 'Terminal' window

All operating systems have a command line interface which allows you, among other things, to execute the 'Ping' command. The ping command works identically on all operating systems.

  • If you are using Windows, go to the 'Command Prompt' window. Select the 'Start' menu and type 'cmd' in the Windows 'Search' field. Windows 8 users can type the command 'cmd' while viewing the 'Start' menu interface. Pressing enter will open the command prompt window.
  • If you are using Mac OS X, access the 'Terminal' window. Go to the 'Applications' folder, select the Utilities item, then choose the 'Terminal' icon.
  • If you are using Linux, open a Telnet / Terminal window. Most often it is located in the 'Accessories' folder in the 'Applications' directory.

    To access the Ubuntu 'Terminal' window, you can use the 'Ctrl + Alt + T' hotkey combination

Ping an IP Address Step 2
Ping an IP Address Step 2

Step 2. Type your 'Ping' command

You will need to type the following command 'ping'. Alternatively, you can use the 'ping' command.

  • The 'host name' parameter is usually represented by a website address. Substitute the web address or name of the server you want to 'ping' for the parameter. For example, to ping the main wikihow website you would type 'ping www.wikihow.com' (without quotes).
  • An IP address, on the other hand, represents a single computer located on a local network, a geographic network or the web. If you know the IP address you want to 'ping', substitute it for the parameter. For example, to ping the address '192.168.1.1', you will need to type the command 'ping 192.168.1.1'.
  • If you want your computer to ping its network card, you will need to use the following command 'ping 127.0.0.1'.
Ping an IP Address Step 3
Ping an IP Address Step 3

Step 3. Press 'Enter' to view the test result

The command output will be displayed just below the current command line. Proceed to the section of this guide on analyzing ping results to understand how to interpret them.

Part 2 of 4: Ping Using Network Utility on Mac OS X

569520 4
569520 4

Step 1. Start the 'Network Utilities' application. Go to the 'Applications' folder, select the Utilities item first, then the Network Utilities item

569520 5
569520 5

Step 2. Select the 'Ping' tab and type in the network node name or IP address you want to test

  • Normally the host name is represented by a website address. For example, to ping the Wikihow Italy website, type 'it.wikihow.com'.
  • An IP address, on the other hand, represents a single computer located on a local network, a geographic network or the web. For example, to ping the address '192.168.1.1', you will need to type the address '192.168.1.1' in the related field.
569520 6
569520 6

Step 3. Set the number of ping requests you want to be sent

Normally an optimal value is between 4-6 requests. When you are ready, press the 'Ping' button, the test result will be displayed at the bottom of the window.

Part 3 of 4: Analyze the results

Ping an IP Address Step 7
Ping an IP Address Step 7

Step 1. The first line of our results describes what the ping is going to do

You will find repeated the address to be tested and the number of data packets sent. Eg:

Running Ping prod.fastly.net [199.27.77.192] with 32 bytes of data:

Ping an IP Address Step 8
Ping an IP Address Step 8

Step 2. Read the body of the results obtained

A successful ping will show on the screen the time needed to receive the response. The 'TTL' parameter represents the number of network nodes (hops) that have been traversed to reach the destination. The fewer the number of 'hops', the greater the number of routers the data packets have passed through. The 'time' parameter represents the time taken (in milliseconds) by the data packets to arrive at their destination and come back with the response:

Reply from 199.27.77.192: bytes = 32 time = 101ms TTL = 54

Reply from 199.27.77.192: bytes = 32 time = 101ms TTL = 54

Reply from 199.27.77.192: bytes = 32 time = 105ms TTL = 54

Reply from 199.27.77.192: bytes = 32 time = 99ms TTL = 54

You may need to use the key combination 'CTRL + C' to stop the execution of the 'ping' command

Ping an IP Address Step 9
Ping an IP Address Step 9

Step 3. Read the test result

The last lines of text displayed summarize the test results. The 'Packets lost' parameter identifies that the connection with the tested address failed and that packets were lost during the transfer. Other significant data are also shown such as the average time it takes to establish a connection:

Ping Statistics for 199.27.76.129:

Packets: Transmitted = 4, Received = 4, Lost = 0 (0% lost), Approximate round trip time in milliseconds:

Minimum = 109ms, Maximum = 128ms, Average = 114ms

Part 4 of 4: Solutions in Case the Ping Fail

Ping an IP Address Step 10
Ping an IP Address Step 10

Step 1. Check the correctness of the data entered

One of the most common errors is the following:

Unable to find host. Verify that the name is correct and try again.

If you get this message, it is possible that you have typed the host name incorrectly.

  • Try again. If the error persists, perform the ping test again using a known and working host, such as a search engine. If the result is 'Unknown Host', the problem will most likely be due to the DNS Server (or domain name server) specified in your computer's network configuration.
  • Ping test using an IP address instead of using the host name (e.g. 173.203.142.5). If the test is successful, most likely the DNS server you are using is not available at the moment or you have incorrectly typed its IP address in the network card configuration.
Ping an IP Address Step 11
Ping an IP Address Step 11

Step 2. Check the status of your connection

Another classic error message is the following:

Destination host unreachable

. This means that the gateway address is incorrect or that your computer's network connection is not configured correctly or is not working.

  • Ping your network card at '127.0.0.1'. If the test fails, your computer's TCP / IP subsystem is malfunctioning and your network card needs to be reconfigured.
  • Check your Wi-Fi, or cable connection between your computer and the router, especially if everything previously worked fine.
  • Most computer network cards are equipped with two LEDs, one of them indicates the presence of a connection, the other flashes when data is being transmitted or received. Check that during the ping test one of the two lights is flashing, indicating that the data is being transferred.
  • Visually check that your router is also working correctly with the help of the LEDs that indicate the adsl connection and the network connection to your computer. If the LEDs indicate a malfunction, start by making sure that the connection problem is not between the router and your computer; if not, contact your internet provider's technical support.

Advice

  • Why would you want to use Ping? Ping is a very powerful tool for network diagnostics, and the simplest network package is used for its operation. Ping does not occupy resources, does not interact with the operating system, does not impact other programs that may be running, does not use the hard disk and does not require prior configuration, all the work is performed by the TCP / IP communication subsystem. When in the presence of working network devices (gateway, router, firewall and dns server) and a successful ping test you cannot view your favorite website, you can rest assured, most likely the problem is with the website you are looking for. to view and not yours.
  • When to use ping? Like all diagnostic tools it is best to use ping within a properly configured and functioning network to understand how it actually works. You can ping your computer's network card using the following command 'ping -c5 127.0.0.1'. Use ping to check the correct functioning of your equipment and configuration, especially in cases where you are configuring your computer for the first time, you want to change the network configuration or if you are unable to browse the web.
  • The ping command can be run with various options, here are a few:

    • -n Ping test the specified number of times. This option is useful if we have scripts that periodically run network connectivity tests.
    • -t ping continues to run tests until manually stopped ([ctrl] -C).
    • -w sets the time (in milliseconds) after which, in the absence of a response from the host, the data packet is declared lost. This option is used to highlight excessive latency problems, especially when working with cellular or satellite networks.
    • -a in the results displays the name of the IP address we tested.
    • -j or -k allow you to specify a precise host path that the test packet must travel to reach its destination.
    • -l allows you to change the size of the data packet with which the test will be performed.
    • -f prevents data packet fragmentation.
    • -? to view all available options and a brief description for each.
    • -c. A precise number of packets are sent, after which the command is terminated. Alternatively, to terminate the execution of the ping command, you can use the key combination 'Ctrl + C'. This option is useful if we have scripts that periodically run network connectivity tests.
    • -r track the routing path that network packets sent by the ping command have followed. The host receiving your ping may not provide the requested information.

Recommended: