Ping
Ping is of limited usefulness today because most new computers drop Ping requests (which use ICMP). Therefore, you might ping a computer that is connected to the network but not receive any response. Additionally, a computer might respond to Ping requests even if a firewall is dropping all other traffic-misleading you into thinking that you had connectivity.
However, Ping is still the best tool to easily monitor network connectivity on an ongoing basis. After using PathPing to identify network hosts that respond to ICMP requests, you can use Ping to constantly submit Ping requests and thereby easily determine whether you currently have connectivity to the host. If you are experiencing intermittent connectivity problems, a Ping loop will indicate whether your connection is active at any given time.
To start a Ping loop, run the following command.
ping -t hostname
Replies indicate that the packet was sent successfully, while Request Timed Out messages indicate that the computer did not receive a response from the remote host. The following example indicates how to monitor the connection to a host at the IP address 192.168.1.1.
ping -t 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data: Reply from 192.168.1.1: bytes=32 time=1ms TTL=64 Reply from 192.168.1.1: bytes=32 time<1ms TTL=64 Reply from 192.168.1.1: bytes=32 time<1ms TTL=64 Reply from 192.168.1.1: bytes=32 time<1ms TTL=64 Request timed out. Request timed out. Request timed out. Request timed out. Request timed out. Reply from 192.168.1.1: bytes=32 time<1ms TTL=64 Request timed out. Request timed out. Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Note that Ping loops provide only an approximate estimation of connectivity. Ping packets will occasionally be dropped even if connectivity is constant. Additionally, because Ping sends requests sooner if a reply is received than if the reply times out, you cannot use the ratio of replies to time-out errors as a useful indication of network uptime.
If you want to use Ping from a Windows PowerShell script, use the Test-Connection cmdlet. The functionality is almost identical to Ping, with the added benefit of being able to specify the -Source parameter to initiate the ICMP requests from a remote computer.
In this tutorial:
- Troubleshooting Network Issues
- Tools for Troubleshooting
- Table-1 Network Troubleshooting Tools
- Arp
- How to Identify a Problem with the ARP Cacher
- How to Clear the ARP Cache
- Event Viewer
- IPConfig
- Nblookup
- Nbtstat
- Net
- How to View Shared Folders on the Local Computer
- How to View Shared Folders on Another Computer
- Netstat
- Network Monitor
- Nslookup
- Verifying that the Default DNS Server Resolves Correctly
- Verifying that a Specific DNS Server Resolves Correctly
- Verifying Specific Types of Addresses
- Using TCP for DNS Lookups
- PathPing
- PathPing Output
- Routing Loops
- Performance Problems
- Possible Connectivity Issues
- No Connectivity Issues
- Performance Monitor
- Data Collector Sets
- Windows Resource Monitor
- Ping
- PortQry
- Identifying the TCP Port for a Service
- Windows 7 Testing Service Connectivity
- Determining Available Remote Management Protocols
- Why PortQry Is Great
- Route
- Task Manager
- TCPView
- Telnet Client
- Testing Service Connectivity
- Test TCP
- Windows Network Diagnostics
- The Process of Troubleshooting Network Problems
- How to Troubleshoot Network Connectivity Problems
- How to Troubleshoot Application Connectivity Problems
- Default Port Assignments for Common Services and Tasks
- How to Troubleshoot Name Resolution Problems
- How to Verify Connectivity to a DNS Server
- How to Use the Hosts File
- How to Troubleshoot Performance Problems and Intermittent Connectivity Issues
- How to Troubleshoot Joining or Logging on to a Domain
- How to Verify Requirements for Joining a Domain
- How to Troubleshoot Network Discovery
- How to Troubleshoot File and Printer Sharing
- How to Troubleshoot File and Printer Sharing from the Client
- How to Troubleshoot File and Printer Sharing from the Server
- How to Troubleshoot Wireless Networks
- Network Diagnostics
- How to Troubleshoot Firewall Problems