A Brief Guide to MS DOS Ping Command

MS-DOS is one of the most popular programs by Microsoft that allows one to mend changes in the disk operating space of a computer system. The user interface allows you to do that by making use of commands like MS-DOS Ping in an interface called command prompt. This can be accessed through any system by typing CMD in the search bar.

What is Ping?

A ping is short for Packet Internet Groper. It is used when you have to verify whether or not a network data packet can be distributed to an address without errors. It is most commonly used to find out the errors in a network.


Availability

It is an external command which is available in the below mentioned Microsoft operating systems under the name of pin.exe.

Windows(95,98,ME, 2000, XP, Vista, 7,8, 10)


The syntax for Windows Vista, 7 and 8

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] [-R] [-S srcaddr] [-4] [-6 target_name

-t: This command will ping a particular host until the user stops it. You can type control-break to see the stats, to stop just press Ctrl+c.

-a: This command resolves the addresses to hostnames.

-n: To know the count of echo requests to send

-l size: This shall send the buffer size

-f: For IPv4 protocol only, this command sets a don’t-fragment-flag in the packet

-i: Time to live

-v: TOS type of service(IPv4 only, it does not affect the type of service field in the IP header)

-r count: It is for recording the count hops (IPv4 only)

-s count: A time-stamp for count hops (IPv4 only)

-j host-list: A Loose source route along with the host list (IPv4 only)

-k host-list: A strict source route along the host-list (IPv4 only)

-w timeout: The timeout in milliseconds to wait for each reply

-R: This is for the user who wishes to test the reverse route using routing header(IPv6-only). Per RFC 5095, the use for routing header has been deprecated. At times, a few systems may drop echo requests if this header is used.

-S: srcaddr: source address to use 

-4: Force using IPv4

-6: Force using IPv6


Windows CP and Lower Syntax

ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list

-t: It will ping the specified host until manually stopped by the user. Like above if you wish to see the stats and continue, just go ahead and type control break. To stop, you can type Ctrl+C.

-a: It resolves addresses to hostnames.

-n count: Number of echo requests to send

-l size: A command to send buffer size

-f: Sets the don’t-fragment-flag in the packet

-I TTL: Time to live

-v TOS: Type of service

-r count: Record route for count hops

-s count: Timestamp for count hops

-j host-list: A loose source route alongside host-list

-k host-list: A strict source route along with host-list

-w timeout: A timeout in a millisecond to wait for each reply


Examples

Ping localhost

When you use this command, you will get to know if the system can send information out or receive information all by itself.

Note: The above may not send any information over the network, instead it shall show you if the card can respond or not.

Ping google.com

Ping as a command can check any internet address. In the above image, we can see how when we pinged google.com, we have seen four responses come back in each line. 

In case we couldn’t reach the server or the server was not able to pick up our request. We should know that we have lost all four packets.

Ping 216.58.216.163

Each system in a network has an address so when you wish to connect to a different system, ping helps you there too. You can directly use the command followed by the address such as <216.58.216.163> in case you receive no reply from the other system. 

This may happen if the packets are lost or when you have some issue with the network. It can be anything like network card issues, drivers, routers, switches, or cable issues. Find the fix and try again.


FAQ

Is there a continuous ping option?

The below form of ping can be used as a continuous ping unless you cancel it by pressing Ctrl+C
Ping <address> -t

When I ping the IP address doesn’t look right?

As the protocols change and new form starts coming like the latest IPv6, you may see that the IP address looks something like this [fe80::51c1:5214:a18e:8dec%12] when earlier it uses to look like this {192.168.1.7}. 

To get the IPv4 IP address, you can use the following command
Ping <hostname> -4

If this quick tutorial and step-by-step guide helped you learn more about Microsoft’s MS-DOS Ping command, comment below for feedback on your experience.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top