ping

To diagnose the basic IPv4 network connectivity to a remote system, use the ping command in the EXEC mode.

ping {ip-address | hostname} [df df] [packetsize packetsize] [pingcount pingcount]

Syntax Description

ping

The command to ping a remote IP address.

ip-address

IP address of the system to ping. Supports up to 32 alphanumeric characters.

hostname

Hostname of the system to ping. Supports up to 32 alphanumeric characters.

df

Specification for packet fragmentation.

df

Specify the value as 1 to prohibit packet fragmentation, or 2 to fragment the packets locally, or 3 to not set df.

packetsize

Size of the ping packet.

packetsize

Specify the size of the ping packet; the value can be between 0 and 65507.

pingcount

Number of ping echo requests.

pingcount

Specify the number of ping echo requests; the value can be between 1 and 10.

Defaults

No default behavior or values.

Command Modes

EXEC

Usage Guidelines

The ping command sends an echo request packet to an address, then awaits a reply. The ping output can help you evaluate path-to-host reliability, delays over the path, and whether you can reach a host.

Examples

/admin# ping 172.16.0.1 df 2 packetsize 10 pingcount 2

PING 172.16.0.1 (172.16.0.1) 10(38) bytes of data.

18 bytes from 172.16.0.1: icmp_seq=0 ttl=40 time=306 ms

18 bytes from 172.16.0.1: icmp_seq=1 ttl=40 time=300 ms

 

--- 172.16.0.1 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1001ms

rtt min/avg/max/mdev = 300.302/303.557/306.812/3.255 ms, pipe 2

/admin#

 

Related Commands

Command

Description

ping6

Ping a remote IPv6 address.