Home > Commands N-Z > Commands P

PING


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Test a network connection - if successful, ping returns the ip address.


Syntax

PING [-4] [-6] [-a] [-f] [-i TTL] [-j host_list | -k host_list] [-l size] [-n count] [-R] [-r count] [-S source_address] [-s count] [-t] [-v TOS] [-w timeout] destination_host


Parameters
destination_host (NT3.5)
The name of the remote host.

Switches
-4 (NT2003)
Specifies to use IPv4. Not required to identify the target host with an IPv4 address. It is only required to identify the target host by name.
-6 (NT2003)
Specifies to use IPv6. Not required to identify the target host with an IPv6 address. It is only required to identify the target host by name.
-a (NT3.5)
Resolve addresses to hostnames.
-f (NT3.5)
Set Don't Fragment flag in packet.
-i TTL (NT3.5)
Time To Live.
-j host_list (NT3.5)
Loose source route along host_list.
-k host_list (NT3.5)
Strict source route along host_list.
-l size (NT3.5)
Send buffer size.
-n count (NT3.5)
Number of echo requests to send.
-r count (NT3.5)
Record route for count hops.
-R (NT2003)
Specifies that the round-trip path is traced (available on IPv6 only).
-s count (NT3.5)
Timestamp for count hops.
-S source_address (NT2003)
Specifies the source address to use (available on IPv6 only).
-t (NT3.5)
Ping the destination host until interrupted.
-v TOS (NT3.5)
Type Of Service.
-w timeout (NT3.5)
Timeout in milliseconds to wait for each reply.

Related

TRACERT - Trace route to a remote host.
IPCONFIG - IP Configuration.
PATHPING - Route Tracing tool NT2000.
Equivalent Linux BASH commands:
ping - ?
trace - Find the IP address of a remote host.


Notes

none.


Examples
    PING -n 1 -w 7500 Server_06

    PING -w 7500 MyHost |find "TTL=" || ECHO MyHost found

    PING -n 5 -w 7500 www.microsoft.com

Errorlevels
Availability
External
DOS
none
Windows
none
Windows NT
NT3.5 NT4 NT2000 NTXP NT2003