Ping cli reference

ping

ping {<ip-addr> | ipv4 <ip4-addr> | ipv6 <ip6-addr>} [ipv4 <ip4-addr> | ipv6 <ip6-addr>] [source <interface>] [size <pktsize:60>] [interval <sec:1>] [repeat <cnt:5>] [table-id <id:0>] [burst <count:1>] [verbose]

This command sends an ICMP ECHO_REQUEST to network hosts. The address can be an IPv4 or IPv6 address (or both at the same time).

Example of how ping an IPv4 address:

ping 172.16.1.2 source GigabitEthernet2/0/0 repeat 2

64 bytes from 172.16.1.2: icmp_seq=1 ttl=64 time=.1090 ms
64 bytes from 172.16.1.2: icmp_seq=2 ttl=64 time=.0914 ms

Statistics: 2 sent, 2 received, 0% packet loss

Example of how ping both an IPv4 address and IPv6 address at the same time:

ping 172.16.1.2 ipv6 fe80::24a5:f6ff:fe9c:3a36 source GigabitEthernet2/0/0 repeat 2 verbose

Adjacency index: 10, sw_if_index: 1
Adj: ip6-discover-neighbor
Adj Interface: 0
Forced set interface: 1
Adjacency index: 0, sw_if_index: 4294967295
Adj: ip4-miss
Adj Interface: 0
Forced set interface: 1
Source address: 172.16.1.1
64 bytes from 172.16.1.2: icmp_seq=1 ttl=64 time=.1899 ms
Adjacency index: 10, sw_if_index: 1
Adj: ip6-discover-neighbor
Adj Interface: 0
Forced set interface: 1
Adjacency index: 0, sw_if_index: 4294967295
Adj: ip4-miss
Adj Interface: 0
Forced set interface: 1
Source address: 172.16.1.1
64 bytes from 172.16.1.2: icmp_seq=2 ttl=64 time=.0910 ms

Statistics: 4 sent, 2 received, 50% packet loss

Declaration: ping_command src/plugins/ping/ping.c line 1584

Implementation: ping_ip_address