What pinging does and why you need it
Pinging an IP address sends a small test packet to another device on your network or the internet and waits for a response. If the device answers, you know it is reachable and online. If it does not answer, you know there is a connection problem — either the device is offline, the network path is broken, or a firewall is blocking the ping.
Pinging is one of the fastest ways to troubleshoot a network that is not working the way you expect. Before you spend time reconfiguring a router or calling your internet provider, a ping tells you whether the problem is on your side or theirs, and whether a specific device is actually connected.
You do not need special software or permissions. Ping is built into Windows, macOS, and Linux. It takes seconds to run and costs nothing.
Key Takeaways
- Ping is a built-in tool on every computer that tests whether another device is reachable by sending a test packet and waiting for a response.
- On Windows, open Command Prompt and type ping 8.8.8.8 (or any IP address) to test connectivity to that device or server.
- On macOS and Linux, open Terminal and use the same ping command, but press Ctrl+C to stop it after a few seconds because it runs continuously.
- A successful ping shows response times in milliseconds; no response usually means the device is offline, unreachable, or blocking ping traffic.
- Ping your router's IP address first to test your local network, then ping an external address like 8.8.8.8 to test your internet connection.
How to ping on Windows
Open Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. You will see a black window with a blinking cursor.
Type ping followed by a space and the IP address you want to test. For example, to test your internet connection, type ping 8.8.8.8 (Google's public DNS server) and press Enter. To test a device on your home network, type ping 192.168.1.100 (or whatever that device's IP address is) and press Enter.
Windows will send four ping packets by default and show you the results when ready. Each line shows the response time in milliseconds. If all four packets get a response, the device is reachable. If you see "Request timed out" for all four, the device is not responding.
Close Command Prompt by typing exit and pressing Enter, or just close the window.
How to ping on macOS and Linux
Open Terminal. On macOS, press Command+Space, type terminal, and press Enter. On Linux, right-click the desktop or look for Terminal in your applications menu.
Type ping followed by a space and the IP address. For example, ping 8.8.8.8 or ping 192.168.1.1 (your router). Press Enter.
Unlike Windows, ping on macOS and Linux runs continuously until you stop it. Watch the first few lines to see if responses are coming back. If you see response times, the device is reachable. If you see "no answer" or "unreachable", the device is not responding. Press Ctrl+C to stop the ping and return to the command prompt.
What the results mean
A successful ping shows four pieces of information: the number of bytes sent, the response time in milliseconds, the time-to-live (TTL) number, and whether all packets were received. You do not need to understand TTL — just look at whether you got responses and how fast they came back.
Response times under 50 milliseconds are normal for devices on your home network. Response times between 50 and 150 milliseconds are normal for internet servers. If response times are much higher — 500 milliseconds or more — your connection is slow or congested, but the device is still reachable.
If you see "Request timed out" or "no answer" for all four packets, the device is either offline, not connected to the network, or has a firewall rule that blocks ping traffic. If you see some responses and some timeouts, the connection is unstable.
Ping your router first, then the internet
When your network is not working, ping in this order: first your router, then an external server. This tells you where the problem is.
Find your router's IP address by opening Command Prompt or Terminal and typing ipconfig (Windows) or ifconfig (macOS and Linux). Look for the line that says "Default Gateway" — that is your router. Ping that address. If your router does not respond, your local network is broken. If your router responds, your local network is working.
Next, ping a public server like 8.8.8.8 (Google DNS) or 1.1.1.1 (Cloudflare DNS). If your router responds but these do not, your internet connection is down. If both respond, your network is working normally.
When ping does not work even though the device is online
Some devices and networks block ping traffic intentionally. A firewall on the device itself, a firewall on your router, or a firewall at your internet provider can all prevent ping from working even when the device is online and working.
If you cannot ping a device but you can still reach it another way — for example, you can open its web interface in a browser or connect to it over WiFi — then ping is just blocked, not the connection itself. This is not a problem; it just means ping cannot be used to test that particular device.
If you cannot ping your router and you cannot reach anything else either, restart your router by unplugging it for 30 seconds, plugging it back in, and waiting two minutes for it to fully start up. Then try pinging again.
Ping and security
Ping itself is safe to use on your own network and to public servers. It sends only a tiny test packet and does not transfer files or passwords.
However, do not ping random IP addresses on the internet without a reason. Pinging an address you do not own or have permission to test can be seen as a network scan, and some networks will block or report repeated pings from unknown sources.
On your home network, you can ping any device you own. If you are troubleshooting a network problem and need to ping a device that belongs to someone else, ask their permission first.
Frequently Asked Questions
What is the difference between ping and tracert?
Ping tests whether a single device is reachable. Tracert (or traceroute on macOS and Linux) shows the path your data takes to reach that device, including every router in between. Use ping first to see if a device is reachable, then use tracert if you need to see where the connection is breaking down.
Can I ping a website instead of an IP address?
Yes. Type ping google.com instead of ping 8.8.8.8, and your computer will look up the IP address and ping it. This works the same way as pinging an IP directly.
Why does my ping show very high response times?
High response times (over 500 milliseconds) usually mean your internet connection is congested or you are far from the server you are pinging. Check whether other devices on your network are using a lot of bandwidth. If local pings are fast but internet pings are slow, your internet connection is the bottleneck.
Does ping use a lot of data?
No. Each ping packet is about 32 bytes, and four pings use about 128 bytes total. You will not notice any impact on your data usage or your internet bill.
What if I want to ping continuously instead of just four times?
On Windows, type ping -t 192.168.1.1 to ping continuously. Press Ctrl+C to stop. On macOS and Linux, ping runs continuously by default, so just press Ctrl+C when you want to stop.