You are on page 1of 4

Ping syntax

 Windows Vista, 7, and 8 syntaxes.

 Windows XP and lower syntax.

Windows Vista, 7, and 8 syntax


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

Options:

-t Pings the specified host until stopped.


To see statistics and continue - Type Control-Break;
To stop - press Ctrl+C.
-a Resolve addresses to hostnames.
-n Count number of echo requests to send.
-l size Send a buffer size.
-f Set a don't fragment flag in the packet (IPv4-only).
-i TTL time to live.
-v TOS type of service (IPv4-only. This setting is deprecated and has no effect on the typ
header).
-r count Record route for count hops (IPv4-only).
-s count Timestamp for count hops (IPv4-only).
-j host-list Loose source route along the host-list (IPv4-only).
-k host-list Strict source route along the host-list (IPv4-only).
-w Timeout in milliseconds to wait for each reply.
timeout
-R Use routing header to test reverse route also (IPv6-only).
Per RFC 5095 the use of this routing header is deprecated. Some systems may drop ec
used.
-S srcaddr Source address to use.
-4 Force using IPv4.
-6 Force using IPv6.

Windows XP 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

Options:

-t Pings the specified host until stopped.


To see statistics and continue - Type Control-Break;
To stop - press Ctrl+C.
-a Resolves addresses to hostnames.
-n count Number of echo requests to send.
-l size Send a buffer size.
-f Set 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 Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.

Examples
ping localhost
Pings the localhost, which helps determine
if the computer can send information out
and receive the information back from
itself.

Note

The command above does not send information over the network, but can indicate if
the card can respond.

ping computerhope.com

Ping supports the ability to ping an


Internet address. In the example above,
we pinged "computerhope.com" and as
can be seen, received four responses back.
If we couldn't reach the server or the
server was blocking our request, we would
have lost all four packets.

ping 216.58.216.164
Allows you to ping another computer
where <216.58.216.164> can be the IP
address of the computer you want to ping.
If you do not get a reply, or get lost
packets, you have a problem with your
network, which is a cable issues, network
card issues, drivers, router, switch, or
other network problems.

You might also like