ping <host> interface <host> <option>
Specifies an interface that the device must use as the source address.
- 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.
- 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 on every ping, while the device 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.
- Suppresses 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.
Use the ping host interface command when pinging IPv6 link-local address.
When the ping command is interrupted by typing <Ctrl>+c, a brief statistical summary is displayed.
This example shows how to test whether an IPv4 interface is reachable.
vyatta@vyatta:~$ ping 184.108.40.206 interface dp0s6 PING 220.127.116.11 (18.104.22.168) from 22.214.171.124 dp0s6: 56(84) bytes of data. 64 bytes from 126.96.36.199: icmp_req=1 ttl=64 time=1.66 ms ^C --- 188.8.131.52 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.664/1.664/1.664/0.000 ms
This example shows how to test whether an IPv4 address is reachable using the specified interface address.
vyatta@vyatta:~$ ping 184.108.40.206 interface 220.127.116.11 PING 18.104.22.168 (22.214.171.124) from 126.96.36.199 : 56(84) bytes of data. 64 bytes from 188.8.131.52: icmp_req=1 ttl=64 time=1.02 ms ^C
This example shows how to test whether an IPv6 interface is reachable.
vyatta@vyatta:~$ ping 2012:dead::2 interface 2012:dead::1 PING 2012:dead::2(2012:dead::2) from 2012:dead::1 : 56 data bytes 64 bytes from 2012:dead::2: icmp_seq=1 ttl=64 time=3.04 ms 64 bytes from 2012:dead::2: icmp_seq=2 ttl=64 time=1.01 ms ^C --- 2012:dead::2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 1.012/2.027/3.043/1.016 ms