Ping

Ping is an administration utility used to test the connectivity between two network IP devices.

Ping functions by sending an Internet Control Message Protocol (ICMP) echo request to the specified remote host and waiting for an ICMP reply from that host. Using this method, ping also determines the time interval between when the echo request is sent and when the echo reply is received. This interval is called round-trip time.

At the end of the test, ping displays the minimum, maximum, and average round-trip times, and the standard deviation of the mean. Besides the round-trip time, ping can also measure the rate of packet loss. This is determined by the number of received echo replies over the number of sent echo requests. It is displayed as a percentage.

Reference

Command

ping <ip address> [source <source address> | interface <interface name> [count {<number>}] [interval <seconds> ] [size <bytes> ] [timeout <seconds> ]

Description

Polls or “pings” to see if the specified host is reachable

Parameters

ip address The IP address (ipv4/ipv6) of the host to ping.

source ip address Source IP address to use

interface interface name Interface to use count packets Count of ping request

size bytes Specifies the number of data bytes to be sent

timeout seconds Time to wait for a response, in seconds

Mode

EXEC

Example

pbnoscli# ping 192.168.0.98
ping 192.168.0.98
PING 192.168.0.98 (192.168.0.98) 56(84) bytes of data.
64 bytes from 192.168.0.98: icmp_seq=1 ttl=64 time=1.05 ms
64 bytes from 192.168.0.98: icmp_seq=2 ttl=64 time=0.333 ms
^C
--- 192.168.0.98 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.333/0.691/1.050/0.359 ms
pbnoscli# ping 192.168.0.98 count 2
ping 192.168.0.98 -c 2
PING 192.168.0.98 (192.168.0.98) 56(84) bytes of data.
64 bytes from 192.168.0.98: icmp_seq=1 ttl=64 time=0.548 ms
64 bytes from 192.168.0.98: icmp_seq=2 ttl=64 time=0.497 ms
--- 192.168.0.98 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1004ms
rtt min/avg/max/mdev = 0.497/0.522/0.548/0.034 ms
pbnoscli# ping 192.168.0.98 size 100
ping 192.168.0.98 -s 100
PING 192.168.0.98 (192.168.0.98) 100(128) bytes of data.
108 bytes from 192.168.0.98: icmp_seq=1 ttl=64 time=0.548 ms
108 bytes from 192.168.0.98: icmp_seq=2 ttl=64 time=0.510 ms
108 bytes from 192.168.0.98: icmp_seq=3 ttl=64 time=0.496 ms

Last updated