Use the ping command in PowerShell or a command prompt to troubleshoot TCP/IP connectivity issues on a local machine or remote host. Learn what errors mean including Destination Host Unreachable and Request Timed Out, and where to start to resolve the problem. Explore ping parameters and learn what other TCP/IP command line tools are available to you.
- [Voiceover] Finding the problem when network issues arise is sometimes easy, like when an Ethernet cable has become disconnected. Sometimes it's more difficult to diagnose. Problems that occur when you can't reach a single host in a network often fall into this category. These kinds of problems can be quite frustrating, especially when network troubleshooters and other attempts to resolve the problem haven't worked. One tool for resolving problems like this is the command line tool, ping. Ping tests the connection from one computer to another to see if they can connect, and if they can't, offers up information that might help you discover why.
You can run the ping command from a command prompt. You can also run it from PowerShell. If you aren't familiar with PowerShell, it's a tool used mostly by IT professionals and enables them to perform all kinds of tasks using command-lets. Ping and other familiar tools can be used here too. Let's open it. Click inside the search box on the task bar, and type powershell. Click Windows PowerShell in the results. When using ping, the first thing you should do is to verify that your own computer's TCP/IP stack is working properly.
You do that by typing ping 127.0.0.1. This is the loop-back address. The loop-back address validates that your computer's network adapter is configured properly. I sent four packets out and I received four reply packets back, and this is what we'd expect to see. This is a successful ping. If you don't see results like this, and you get an error instead, perhaps your network card isn't working, or it isn't configured correctly, or another service is interfering with IP.
Whatever the case, you'll need to resolve the problem before moving forward. Sometimes restarting the computer can resolve the problem, and if not, you can try uninstalling and re-installing your network adapter, as we covered in a previous movie. Doing this will reset the adapter settings to their defaults. You can also use the PowerShell command-let, test-connection 127.0.0.1 to perform the same task. Here you can see the source, the destination, and the IPV4 address, as well as the IPV6 address, and how many bytes were sent and received.
Once you know your computer isn't the culprit, you can try to ping the problematic remote host. I'll ping mine. I'll type ping 192.168.1.5. You can see here that the request times out. When you receive this error, it means that no reply messages were received from the host within the default time of one second, or a thousand milliseconds. Sometimes this is caused because the network is simply too busy to push the request through, but it could be more complicated, and involve routing errors or problems with packet filtering.
To increase the amount of time ping uses, add the W option. W stands for wait. I'll type ping 192.168.1.5, type a space, a dash and a W, another space, and 5000, and press Enter. By adding 5000 here, I'm giving ping 5,000 milliseconds to get a reply, which is five seconds instead of one. If the results still show that the message times out, it may not be a network congestion issue.
Another error you might receive is destination host unreachable. There are a lot of reasons why this could happen, but the gist is that there's no route available to it. I'll ping a host that I know is disconnected. I'll type ping 10.3.25.155 and press Enter. You can see the destination host unreachable error here. This could mean that there's a problem with the routing table, default gateway, or something similar, but it could also mean that the host is turned off, or is not connected to the network.
To see more options you can use with ping, type ping, a space, a forward slash, and a question mark, and press Enter. You don't have to use all of these, or even remember them, but I do want you to know that more options are available. Continue to explore here as desired, and when you're finished, close the PowerShell Window.
Author and professor Joli Ballew shows you how to get connected, which settings to use to access different resources, and how to keep your system secure. She explains the security implications of different settings, so you can make informed decisions that help protect devices when using public networks. She also helps get the most out of the Window 10 sharing center. Lastly, she explains the native firewall rules, how to create your own inbound and outbound rules, and how to troubleshoot and modify your network connection.
Note: This course aligns to the Configure Networking domain from the Microsoft exam 70-697: Configuring Windows 10 Devices.
- Configuring IP settings and wireless network settings
- Maintaining network security
- Setting up preferences
- Troubleshooting connectivity
- Managing Windows Firewall
- Creating program rules and security rules
- Using ping, ipconfig, Tracert, and PathPing to troubleshoot