ping

Use this command to determine whether another computer is on the network. Ping provides a synchronous response when initiated from the CLI and Web interfaces.

Note:

For information about the ping command for IPv6 hosts, see ping ipv6.

Default
  • The default count is 1.
  • The default interval is 3 seconds.
  • The default size is 0 bytes.
Format ping [vrf vrf-name] {ip-address | hostname | {ipv6 {interface {unit/slot/port | vlan 1-4093 | loopback loopback-id | network | serviceport | tunnel tunnel-id } link-local-address} | ip6addr | hostname} [count count] [interval 1-60] [size size] [source ip-address | ip6addr | {unit/slot/port | vlan 1-4093 | serviceport | network}] [outgoing-interface {unit/slot/port | vlan 1-4093 | serviceport | network}]
Mode
  • Privileged EXEC
  • User EXEC

Using the options described below, you can specify the number and size of Echo Requests and the interval between Echo Requests.

Parameter Description
vrf-name The name of the virtual router in which to initiate the ping. If no virtual router is specified, the ping is initiated in the default router instance.
address IPv4 or IPv6 addresses to ping.
count Use the count parameter to specify the number of ping packets (ICMP Echo requests) that are sent to the destination address specified by the ip-address field. The range for count is 1 to 15 requests.
size Use the size parameter to specify the size, in bytes, of the payload of the Echo Requests sent. Range is 0 to 65507 bytes.
source Use the source parameter to specify the source IP/IPv6 address or interface to use when sending the Echo requests packets.
hostname Use the hostname parameter to resolve to an IPv4 or IPv6 address. The ipv6 keyword is specified to resolve the hostname to IPv6 address. The IPv4 address is resolved if no keyword is specified.
ipv6 The optional keyword ipv6 can be used before the ipv6-address or hostname argument. Using the ipv6 optional keyword before hostname tries to resolve it directly to the IPv6 address. Also used for pinging a link-local IPv6 address.
interface Use the interface keyword to ping a link-local IPv6 address over an interface.
link-local-address The link-local IPv6 address to ping over an interface.
outgoing-interface Use the outgoing-interface parameter to specify the outgoing interface for multicast IP/IPv6 ping.

The following are examples of the CLI command.

Example: IPv4 ping success:

(Routing) #ping 10.254.2.160 count 3 interval 1 size 255
Pinging 10.254.2.160 with 255 bytes of data:

Received response for icmp_seq = 0. time = 275268 usec
Received response for icmp_seq = 1. time = 274009 usec
Received response for icmp_seq = 2. time = 279459 usec

----10.254.2.160 PING statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (msec) min/avg/max = 274/279/276

Example: IPv6 ping success:

(Routing) #ping 2001::1
Pinging 2001::1 with 64 bytes of data:

Send count=3, Receive count=3 from 2001::1
Average round trip time = 3.00 ms

Example: IPv4 ping failure:

Example: IPv6 ping failure

(Routing) #ping ipv6 2001::4
Pinging 2001::4 with 64 bytes of data:

Send count=3, Receive count=0 from 2001::4
Average round trip time = 0.00 ms

www.lancom-systems.com

LANCOM Systems GmbH | A Rohde & Schwarz Company | Adenauerstr. 20/B2 | 52146 Wuerselen | Germany | E‑Mail info@lancom.de

LANCOM Logo