How to Use ping and tracert to Test a Network Connection in Windows
You want to check whether your PC can actually reach a router, server or website — and if not, find out where the connection is breaking down.
Why: ping is the primary command for testing IP connectivity: it sends small ICMP echo requests and shows the replies and round-trip times. tracert lists responding hops along a probed path. Some routers do not respond, and a failed probe does not identify the exact fault by itself. Compare these clues with the service you are trying to reach.
Step 1: Open a command prompt and test with ping
Press Win + R, type cmd, and press Enter. Ping a well-known site:
ping www.microsoft.com
A healthy result looks like this — four replies with times in milliseconds:
Reply from 23.x.x.x: bytes=32 time=24ms TTL=118
Reply from 23.x.x.x: bytes=32 time=22ms TTL=118
- Replies mean your PC reached the destination and got an answer.
- Request timed out means no reply came back. On its own this isn’t always a fault — some hosts and firewalls block ping on purpose — but combined with the tests below it tells you where to look.
- If pinging an IP address works but pinging a name doesn’t, you have a name-resolution (DNS) problem, not a connection problem.
Useful options (the addresses below are examples; use the target you intend to test):
- Continuous requests; press Ctrl + C to stop:
ping -t 192.168.1.1
- Ten requests:
ping -n 10 192.168.1.1
- Request reverse name resolution:
ping -a 192.168.1.20
Step 2: Work outward — local IP, then gateway, then internet
Test in this order so you isolate the break point. First find your gateway:
ipconfig
Note your active adapter’s IPv4 Address and Default Gateway. Loopback can be tested directly:
ping 127.0.0.1
Then ping your own adapter address and the gateway address from ipconfig. For example, only on a network where the adapter is 192.168.1.20 and the gateway is 192.168.1.1:
ping 192.168.1.20
ping 192.168.1.1
Finally, try an external address:
ping 8.8.8.8
A failed echo request is a clue, not proof that that device or the ISP is broken: ICMP may be blocked or deprioritized. Compare it with actual web/application connectivity and DNS queries. Pinging your own address does not establish that the physical link can reach another device.
Step 3: Trace the path with tracert
When a remote site is slow or unreachable but your gateway is fine, trace the route:
tracert www.microsoft.com
Each numbered line is one hop (router) on the way out, with three round-trip times:
1 1 ms 1 ms <1 ms 192.168.1.1
2 11 ms 13 ms 6 ms 10.x.x.x
...
17 58 ms 51 ms 52 ms 23.x.x.x
Trace complete.
- A row of asterisks (
*) means that hop didn’t reply within the timeout. A single starred hop in the middle is often just a router that ignores trace packets — not a fault. - If the trace consistently stops, investigate the path alongside actual service tests. The first nonresponding hop may be filtering probes rather than dropping application traffic.
Speed it up by skipping name lookups:
tracert -d www.microsoft.com
FAQ
Do I need to run these as administrator? No — ping and tracert work from a normal command prompt.
ping says “Request timed out” but the site loads in my browser. That’s normal — many servers and firewalls block ICMP ping while still serving web traffic. Use tracert or just the browser to confirm the site is actually reachable.
What’s the difference between tracert and pathping? tracert shows the path once; pathping runs longer and reports latency and packet loss at each hop, which is better for chasing intermittent slowdowns.
Sources: Microsoft Learn — ping · Microsoft Learn — tracert · Microsoft Learn — Guidance for troubleshooting TCP/IP communication