ping (interactive)
Use this command to send echo messages to another host interactively. You are prompted with options supported by the command.
Command Syntax
ping
Parameters
None
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
>enable
#ping
Protocol [ip]:
Target IP address: 20.20.20.1
Name of the VRF : management
Repeat count [5]: 6
Time Interval in Sec [1]: 2.2
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Ping Broadcast? Then -b [n]:
PING 20.20.20.1 (20.20.20.1) 100(128) bytes of data.
108 bytes from 20.20.20.1: icmp_seq=1 ttl=64 time=0.038 ms
108 bytes from 20.20.20.1: icmp_seq=2 ttl=64 time=0.038 ms
108 bytes from 20.20.20.1: icmp_seq=3 ttl=64 time=0.038 ms
108 bytes from 20.20.20.1: icmp_seq=4 ttl=64 time=0.036 ms
108 bytes from 20.20.20.1: icmp_seq=5 ttl=64 time=0.037 ms
108 bytes from 20.20.20.1: icmp_seq=6 ttl=64 time=0.034 ms
--- 20.20.20.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 11000ms
rtt min/avg/max/mdev = 0.034/0.036/0.038/0.007 ms
#ping
Protocol [ip]: ipv6
Target IP address: 3001:db8:0:1::129
Name of the VRF : management
Repeat count [5]:
Time Interval in Sec [1]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
PING 3001:db8:0:1::129(3001:db8:0:1::129) 100 data bytes
108 bytes from 3001:db8:0:1::129: icmp_seq=1 ttl=64 time=0.050 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=2 ttl=64 time=0.047 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=3 ttl=64 time=0.042 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=4 ttl=64 time=0.048 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=5 ttl=64 time=0.051 ms
--- 3001:db8:0:1::129 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.042/0.047/0.051/0.008 ms
The input prompts are described in
Table 1-9:
Table 1-9: ping output fields
Protocol [ip] | IPv4 or IPv6. The default is IPv4 if not specified. |
Target IP address | IPv4 or IPv6 address or host name. |
Name of the VRF | Name of the Virtual Routing and Forwarding instance. |
Repeat count [5] | Number of ping packets to send. The default is 5 if not specified. |
Time Interval in Sec [1] | Time interval between two ping packets. The default is 1 second if not specified. |
Datagram size [100] | Ping packet size. The default is 100 bytes if not specified. |
Timeout in seconds [2] | Time to wait for ping reply. The default is 2 seconds if not specified. |
Extended commands [n] | Options for extended ping. The default is “no”. |
Source address or interface | Source address or interface. |
Type of service [0] | Types of service. The default is 0 if not specified. |
Set DF bit in IP header? [no] | Do not fragment bit. The default value is “no” if not specified. |
Data pattern [0xABCD] | Specify a pattern. |
Ping Broadcast? Then -b [n] | Broadcast ping. The default is “no”. For a broadcast address, the value should be “y”. |
Last modified date: 08/28/2023