You can use Ping.exe to send ICMPv6 or ICMP Echo Request messages to perform network diagnostics and test reachability for a specific destination. By default, ping queries for both IPv4 and IPv6 addresses, and uses the addresses that the operating system (OS) returns. You can override this behavior by using the –4 and –6 options.
ping [-t] [-a] [-n Count] [-l Size] [-f] [-i TTL] [-v TOS] [-r Count] [-s Count] [-j HostList] | [-k HostList]] [-w Timeout] [-R] [-S SrcAddr] [-d] [-4] [-6] TargetName
Pings the specified computer until the Ping tool is interrupted.
Resolves addresses to computer names.
- -n Count
Sends the number of Echo Request messages specified in Count. The default is 4.
- -l Size
Sends Echo Request messages that contain the amount of data specified by Size. The default is 32 bytes, and the maximum is 65,527 bytes.
Sets the Don't Fragment flag in the packet (IPv4-only).
- -i TTL
Specifies the Time to Live. This is the limit of the number of routers an IP packet may pass through before being discarded.
- -v TOS
Specifies the Type Of Service (IPv4-only).
- -r Count
Records the route for hop counts (IPv4-only).
- -s Count
Specifies the source address in the Echo Request messages. This is required for link-local destination addresses.
- -j HostList
Specifies a loose source route along the HostList (IPv4-only).
- -k HostList
Specifies a strict source route along the HostList (IPv4-only).
- -w Timeout
Specifies a time-out interval in milliseconds to wait for a reply. The default is 4000.
Specifies that the round-trip path is traced (IPv6-only).
- -S SrcAddr
Specifies the source address to use (IPv6-only).
Sends output to the debug output window in Platform Builder. If this parameter is not used, the output is sent to the console.
Specifies that IPv4 is used for the ping. This parameter is not necessary when identifying the target host with an IPv4 address, only when identifying the target host by name.
Specifies that IPv6 is used for the ping. This parameter is not necessary when identifying the target host with an IPv6 address, only when identifying the target host by name.
Specifies the destination host name.
If the target name is a link-local address, you can ping a link-local IPv6 address of the computer by typing ping Address%ScopeID, where Address is the link-local address and ScopeID is the interface index for the interface to which the link-local address is assigned. A link-local address begins with FE80.
Before forwarding the packet, each router along the path is required to decrement the TTL by one. When the TTL on a packet reaches 0, the router should send an ICMP Time Exceeded message back to the source computer and discard the packet. A packet that arrives at the final destination with a TTL of 0 is still valid because the TTL is examined after the packet is considered for local delivery.