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] [-p precendence] [-R] [-r count] [-S source_address] [-s count] [-t] [-v TOS] [-w timeout] destination_host


Parameters
destination_host (NT3.1)
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.1)
Set Don't Fragment flag in packet.
-i TTL (NT3.1)
Time To Live.
-j host_list (NT3.1)
Loose source route along host_list.
-k host_list (NT3.1)
Strict source route along host_list.
-l size (NT3.1)
Send buffer size.
-n count (NT3.1)
Number of echo requests to send.
-p precendence (NT3.1 ONLY)
Set Precedence field to value specified.
-r count (NT3.1)
Record route for count hops.
-R (NT2003)
Specifies that the round-trip path is traced (available on IPv6 only).
-s (NT3.1 ONLY)
Suppresses display.
-s count (NT3.5)
Timestamp for count hops.
-S source_address (NT2003)
Specifies the source address to use (available on IPv6 only).
-t (NT3.1)
Ping the destination host until interrupted.
-v TOS (NT3.1)
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.1 NT3.5 NT3.51 NT4 NT2000 NTXP NT2003

Last Updated: 2006/12/01
Direct corrections or suggestions to: Rick Lively