ping <host> count <requests> <option>
Specifies a number of ping requests that the router must send.
- The IPv4 address of the host.
- The IPv6 address of the host.
- A host being pinged. This keyword is used when the host is specified as a host name rather than as an IP address.
- The number of ping requests to send.
- Each of the following entries are considered options. These options can be issued consecutively, that is, in the same command line.
- Adaptively sets interpacket interval.
- Allows you to ping broadcast address.
- Makes a beep sound, while the router pings for host details.
- Bypasses normal routing tables during ping.
- Specifies the number of ping requests to send.
- Specifies the number of seconds before which ping expires.
- Matches the overall size of the data packet with the resultant size of the Layer 3 packet.
- Sends 100 ping requests each second.
- Specifies an interface that the device must use as the source address.
- Specifies the time in seconds for which the device must wait between ping requests.
- Specifies that the device must consider the ping request for special processing.
- Specifies the path MTU discovery strategy.
- Supress loop-back of multicast pings.
- Does not resolve domain name system (DNS) names during ping.
- Specifies the hexadecimal digit pattern to fill the packet.
- Prints only the ping summary page.
- Records the route that the packet takes.
- Specifies the number of bytes to send for a ping request.
- Displays the timestamp during ping output.
- Marks packet with specified type of service (TOS).
- Specifies the maximum packet life-time for a host.
- Displays a detailed output for the ping command.
The ping command tests whether a network host is reachable.
The ping command uses the ECHO_REQUEST datagram (ping) of the ICMP protocol to get an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams have an IP and an ICMP header, followed by a struct timeval data type and then an arbitrary number of pad bytes that are used to fill the packet.
When the ping command is interrupted by typing <Ctrl>+c, a brief statistical summary is displayed.
This example shows how to test whether www.google.com network is reachable by sending five ICMP_ECHO requests and that the router waits for five reply packets for ten seconds.
vyatta@vyatta:~$ ping www.google.com count 5 deadline 10 PING www.google.com (126.96.36.199) 56(84) bytes of data. 64 bytes from sea15s02-in-f4.1e100.net (188.8.131.52): icmp_req=2 ttl=54 time=20.0 ms From 10.18.170.201 icmp_seq=1 Destination Host Unreachable From 10.18.170.201 icmp_seq=3 Destination Host Unreachable 64 bytes from sea15s02-in-f4.1e100.net (184.108.40.206): icmp_req=4 ttl=54 time=20.1 ms --- www.google.com ping statistics --- 5 packets transmitted, 2 received, +2 errors, 60% packet loss, time 4010ms rtt min/avg/max/mdev = 20.048/20.075/20.103/0.144 ms, pipe 3
vyatta@vyatta:~$ ping www.google.com count 5