Usage of the network utilities that are available on Windows machines
Besides being the most popular network protocol used today, TCP/P also has some of the more complete tools for gathering information and checking connections.
However, even with some clever products, the standard suite of bundled TCP/IP utilities is quite sufficient and useful in most common situation. One such basic utility program that comes free with Windows is PING.
Ping is probably one of the most used utility available. Whenever a savvy user or network administrator faces a slow or unresponsive network connection, the instinct is to ping some known sites to get an idea of the network’s reliability, configuration and throughput.
Ping is a utility designed to verify a connection between two host machines by sending ICMP (Internet Control Message Protocol) packets. The utility waits a configurable period for a reply, usually in seconds, from the target host for each packet it sends. By default the Windows Ping utility sends four ICMP echo packets that consists of 32 bytes of data.
However you can use command line parameters to send more packets and even to change the size of the packets. Ping with the option -a will also resolve the IP address to a hostname, which will be shown in the first line of the status sentence.
If the DNS server of your network is your router that will do the forwarding of all DNS queries, pinging a hostname will also be responded with a IP address corresponding to the host machine.
If you are concerned that TCP/IP is not installed properly on your PC, you can also ping yourself. You can use two methods to ping your own PC – either type in the address of your PC after the ping command, or ping what’s called the loop-back address.
The loopback ping is nice if you are using a DHCP client that don’t really know what the PC’s IP address is. A destination host unreachable error response normally indicates incorrectly setup gateway or gateway information unavailable. While a request time out indicate destination is down, not available or behind a firewall.
One of the common usage of ping is doing a continuous ping with the -t while there are ways to use it in cmd or a script – e.g. automatically pinging through a subnet of ip addresses and finding which are the ‘alive’ hosts without having to use third party network tools.
We can put a single line of code to get reply from active nodes:-
for /l %l in (1,1,254) do @ping -n 1 -w 100 192.168.10.%l | find “Reply”
The bold portion of the IP block’s first 3 octet can be change to your local subnet range and the ping will go from 1 to 254 indicated in the scope above.
Reply will be similar to something like this:-
Reply from 192.168.10.1: bytes=32 time=6ms TTL=254
Reply from 192.168.10.20: bytes=32 time=7ms TTL=63
Reply from 192.168.10.53: bytes=32 time=8ms TTL=254
Reply from 192.168.10.54: bytes=32 time=7ms TTL=127
Reply from 192.168.10.55: bytes=32 time=7ms TTL=127
Reply from 192.168.10.56: bytes=32 time=7ms TTL=127
Ping is an important tool to check network connectivity and can be added to cron or scheduled tasks to monitor hosts and generate alerts to administrator of issues with sites.