ping


ping

Tests TCP/IP connectivity with a remote host.

Syntax

 ping [-t] [-a] [-n   number   ] [-l   bytes   ] [-f] [-i   TTL   ] [-v   TOS   ] [-r   number   ]  [-s   hops   ] [ [-j   hostlist   ]  [-k   hostlist   ] ] [-w   msec   ]   host   [...] 

Options

-t

Continues pinging the host until interrupted using Ctrl-C.

-a

Resolves IP addresses to hostnames.

-n number

Specifies the number of ICMP ECHO packets to send. (The default is four packets.)

-l bytes

Indicates number of bytes in each ECHO packet. (The default is 32 bytes, and the maximum is 65,527 bytes.)

-f

Sets the Do Not Fragment flag in the packets to prevent them from being fragmented by routers along the route.

-i TTL

Sets the time-to-live field in the packets.

-v TOS

Sets the Type of Service field in the packets.

-r number

Records the route of the outgoing packet and the returning packet in the Record Route field. (The minimum number of hosts you can specify is one, and the maximum is nine.)

-s hops

Specifies the timestamp for the number of hops specified by number.

-j hostlist

Routes packets using the specified list of remote hosts (up to nine). Consecutive hosts can be separated by intermediate gateways (loose source routing).

-k hostlist

Routes packets using the specified list of remote hosts (up to nine). Consecutive hosts can't be separated by intermediate gateways (loose source routing).

-w msec

Specifies timeout interval in milliseconds .

host

Indicates IP address or hostname of remote host(s) being ping ed.

Examples

ping a remote host:

  ping www.gov.mb.ca  Pinging www.gov.mb.ca [198.163.12.46] with 32 bytes of data:     Reply from 198.163.12.46: bytes=32 time=140ms TTL=250 Reply from 198.163.12.46: bytes=32 time=130ms TTL=250 Reply from 198.163.12.46: bytes=32 time=120ms TTL=250 Reply from 198.163.12.46: bytes=32 time=110ms TTL=250     Ping statistics for 198.163.12.46: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 110ms, Maximum =  140ms, Average =  125ms 

Notes

  • By default, ping sequentially sends four 32-byte ICMP ECHO packets to the remote host and waits one second for a reply.

  • If you can ping the remote host by IP address but not by hostname, there is probably a DNS problem.

See Also

pathping , TCP/IP , tracert



Windows Server 2003 in a Nutshell
Windows Server 2003 in a Nutshell
ISBN: 0596004044
EAN: 2147483647
Year: 2003
Pages: 415
Authors: Mitch Tulloch

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net