ping
This command determines whether the network can reach a remote target.
Syntax
ping address [local_address]
ping host [IP-version] [local_address]
Parameters
- address
- Specifies the IP address of the target.
- host
- Specifies the host name of the target.
- IP-version
- Optional: Identifies the IP version to use when resolving an ambiguous
host name to an IP address. An ambiguous host name occurs when the
DNS publishes an IPv4 address and an IPv6 address. If not specified,
resolves to the preferred IP version as defined by the ip-preference command
in DNS Settings mode.
-4
- Identifies the target as an IPv4 host.
-6
- Identifies the target as an IPv6 host.
This parameter applies to ambiguous host names only. Although you specify
-6
, the output will show IPv4 output if the DNS published an IPv4 address only. Conversely, if you specify-4
and the DNS publishes an IPv6 address only, the output will show IPv6 output.
- local_address
- Optional: Specifies the IP address of a local interface to use for the ping.
Guidelines
The ping command sends 6 Internet Control Message Protocol (ICMP) echo-request messages to the specified host with a one second interval between each message and reports the results.
A packet capture can be used to verify the local IP address used to perform a ping.
Examples
The following command can be used to ping the remote server host123. In this scenario, the routing table selects interface mgt0 and the appliance sends the request from the primary IP address of the interface, 192.0.2.33.
mqa(config)# ping myhost123
mqa(config)# ping myhost123 192.0.2.35