ping
Use this command to send echo messages to another host.
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 (broadcast | count <1-2147483647> | datasize <36-18024> |interface IFNAME| source-ip A.B.C.D | interval <0-3600> | timeout <0-3600>|) (vrf (NAME|management)|)
ping ip WORD (broadcast | count <1-2147483647> | datasize <36-18024> | interface IFNAME| source-ip A.B.C.D | interval <0-3600> | timeout <0-3600>|) (vrf (NAME|management)|)
ping ipv6 WORD (broadcast | count <1-2147483647> | datasize <36-18024> |interface IFNAME| source-ip X:X::X:X | interval <0-3600> | timeout <0-3600>|) (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 Internet Control Message Protocol (ICMP) is a fundamental protocol used in networking to relay error messages and operational information. 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 Virtual Routing and Forwarding instance name.
management
Management VRF.
broadcast
Allow broadcast
count
Ping repeat count
<1-2147483647>
Repeat count value
datasize
Datagram size
<36-18024>
Data size in bytes (Default value is 100)
interval
Interval between sending each packet
<0-3600>
Interval value (Default value is 1)
timeout
Response timeout
<0-3600>
Timeout in seconds (Default value is 2)
Default
None
Command Mode
Privileged execution 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
#ping 11.11.11.1 source-ip 11.11.11.2 count 5 timeout 1
Press CTRL+C to exit
PING 11.11.11.1 (11.11.11.1) from 11.11.11.2 : 100(128) bytes of data.
108 bytes from 11.11.11.1: icmp_seq=1 ttl=64 time=0.437 ms
108 bytes from 11.11.11.1: icmp_seq=2 ttl=64 time=0.359 ms
108 bytes from 11.11.11.1: icmp_seq=3 ttl=64 time=0.314 ms
108 bytes from 11.11.11.1: icmp_seq=4 ttl=64 time=0.340 ms
108 bytes from 11.11.11.1: icmp_seq=5 ttl=64 time=0.299 ms
--- 11.11.11.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 97ms
rtt min/avg/max/mdev = 0.299/0.349/0.437/0.053 ms
#ping 9.2.27.17 source-ip 1.1.17.12 count 10 timeout 5 interval 10 broadcast vrf management
Press CTRL+C to exit
PING 9.2.27.17 (9.2.27.17) from 1.1.17.12 : 100(128) bytes of data.
108 bytes from 9.2.27.17: icmp_seq=1 ttl=64 time=0.211 ms
108 bytes from 9.2.27.17: icmp_seq=2 ttl=64 time=0.171 ms
108 bytes from 9.2.27.17: icmp_seq=3 ttl=64 time=0.182 ms
108 bytes from 9.2.27.17: icmp_seq=4 ttl=64 time=0.183 ms
108 bytes from 9.2.27.17: icmp_seq=5 ttl=64 time=0.182 ms
108 bytes from 9.2.27.17: icmp_seq=6 ttl=64 time=0.175 ms
108 bytes from 9.2.27.17: icmp_seq=7 ttl=64 time=0.186 ms
108 bytes from 9.2.27.17: icmp_seq=8 ttl=64 time=0.173 ms
108 bytes from 9.2.27.17: icmp_seq=9 ttl=64 time=0.163 ms
108 bytes from 9.2.27.17: icmp_seq=10 ttl=64 time=0.197 ms
--- 9.2.27.17 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 331ms
rtt min/avg/max/mdev = 0.163/0.182/0.211/0.016 ms
#