ping
Use this command to send echo messages to another host.
Note: When data packets copied to cpu due to destination lookup fail, both data packets and icmp echo request packets processed in cpu through same cpu queue and it may happen that ping fails due to congestion. In such cases, to check connectivity, please use interactive ping command and update tos value 192. Refer
ping (interactive) for the interactive ping command.
Command Syntax
ping WORD (interface IFNAME| source-ip A.B.C.D |) (vrf (NAME|management)|)
ping ip WORD (interface IFNAME| source-ip A.B.C.D |) (vrf (NAME|management)|)
ping ipv6 WORD (interface IFNAME| source-ip X:X::X:X |) (vrf (NAME|management)|)
Parameters
WORD
Destination address (in A.B.C.D format for IPv4 or X:X::X:X for IPv6) or host name.
ip
IPv4 echo.
WORD
Destination address in A.B.C.D format or host name.
ipv6
IPv6 echo.
WORD
Destination address in X:X::X:X format or host name.
interface
Interface name through which the ICMP packets to be sent.
IFNAME
Interface's name
source-ip
Source IP to be used in ICMP packet.
A.B.C.D
Source IPv4 address in the ping.
X:X::X:X
Source IPv6 address in the ping.
vrf
Virtual Routing and Forwarding instance.
NAME
VRF instance name.
management
Management VRF.
Default
No default value is specified
Command Mode
Privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
>enable
#ping 20.20.20.1 vrf management
Press CTRL+C to exit
PING 20.20.20.1 (20.20.20.1) 56(84) bytes of data.
64 bytes from 20.20.20.1: icmp_seq=1 ttl=64 time=0.032 ms
64 bytes from 20.20.20.1: icmp_seq=2 ttl=64 time=0.035 ms
64 bytes from 20.20.20.1: icmp_seq=3 ttl=64 time=0.033 ms
64 bytes from 20.20.20.1: icmp_seq=4 ttl=64 time=0.034 ms
64 bytes from 20.20.20.1: icmp_seq=5 ttl=64 time=0.034 ms
64 bytes from 20.20.20.1: icmp_seq=6 ttl=64 time=0.036 ms
64 bytes from 20.20.20.1: icmp_seq=7 ttl=64 time=0.036 ms
64 bytes from 20.20.20.1: icmp_seq=8 ttl=64 time=0.036 ms
--- 20.20.20.1 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 6999ms
rtt min/avg/max/mdev = 0.032/0.034/0.036/0.006 ms
#ping ipv6 3001:db8:0:1::129 vrf management
Press CTRL+C to exit
PING 3001:db8:0:1::129(3001:db8:0:1::129) 56 data bytes
64 bytes from 3001:db8:0:1::129: icmp_seq=1 ttl=64 time=0.038 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=2 ttl=64 time=0.047 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=3 ttl=64 time=0.047 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=4 ttl=64 time=0.049 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=5 ttl=64 time=0.044 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=6 ttl=64 time=0.048 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=7 ttl=64 time=0.046 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=8 ttl=64 time=0.048 ms
--- 3001:db8:0:1::129 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 6999ms
Last modified date: 10/19/2023