Command Reference Network Connectivity Test Tool Commands
Network Connectivity Test Tool Commands
ping
Use this command to test the connectivity of a network to locate the network connectivity problem. The
command format is as follows:
ping [ vrf vrf-name | ip ] [ ip-address [ length length ] [ ntimes times ] [ timeout seconds] [ data
data ] [ source source ] [ df-bit ] [ validate ] ]
Parameter
Description
Parameter Description
vrf-name
VRF name
ip-address
Specifies an IPv4 address.
length
Specifies the length of the packet to be sent.
times
Specifies the number of packets to be sent.
seconds
Specifies the timeout time.
data
Specifies the data to fill in.
seconds
Specifies the source IPv4 address or the source interface. The
loopback interface address (for example: 127.0.0.1) is not allowed to
be the source address.
df-bit
Sets the DF bit for the IP address. DF bit=1 indicates not to
segmentate the datagrams. By default, the DF bit is 0.
validate
Sets whether to validate the reply packets or not.
Defaults
Five packets with 100Byte in length are sent to the specified IP address within specified time (2s by
default).
Command
Mode
Privileged EXEC mode.
Usage Guide
The ping command can be used in the ordinary user mode and the privileged EXEC mode. In the
ordinary mode, only the basic functions of ping are available. In the privileged EXEC mode, in addition
to the basic functions, the extension functions of the ping are also available. For the ordinary functions
of ping, five packets of 100Byte in length are sent to the specified IP address within the specified
period (2s by default). If response is received, ‘!’ is displayed. If no response is received, ‘.’ displayed,
and the statistics is displayed at the end. For the extension functions of ping, the number, quantity and
timeout time of the packets to be sent can be specified, and the statistics is also displayed in the end.
To use the domain name function, configure the domain name server firstly. For the concrete
configuration, refer to the DNS Configuration section.
Configuration
Examples
The example below shows the ordinary ping.
Ruijie# ping 192.168.5.1
Sending 5, 100-byte ICMP Echoes to 192.168.5.1, timeout is 2 seconds: