The ping command entered at the command prompt of a Telnet or terminal connection sends an "ICMP echo-request" packet to the destination address of the host to be checked. If the receiver supports the protocol and it is not filtered out in the firewall, the destination host will respond with an "ICMP echo reply". If the target computer is not reachable, the last device before the host responds with a "network unreachable" or "host unreachable" message.
The syntax of the ping command is as follows:
ping [-46dfnoqrb] [-s n] [-i n] [-c n] [-x x][-p <dscp>][-a ...] destination [%scope] [%scope@rtg-tag] [%%interface] [@rtg-tag]
The meaning of the optional parameters is explained in the following table:
Parameter | Meaning |
---|---|
-4 | Force IPv4 |
-6 | Force IPv6 |
-d | Forbid fragmentation |
-f | flood ping: Sends a large number of pings in a short time. Can be used to test network bandwidth, for example.
Important: It is easy for flood ping to be misinterpreted as a denial-of-service (DoS) attack.
|
-n | Returns the computer name of a specified IP address. |
-o | Immediately sends another request after a response. |
-q | Ping command returns no output to the CLI (quiet). |
-r | Switches to the traceroute mode. The path taken by the data packets to the target computer is displayed with all intermediate stations. |
-b | Do not stop pinging after receiving a PacketTooBig (DF), in order to achieve "Path MTU Discovery". |
-s n | Sets the packet size to n bytes (max. 65500). |
-i n | Time between packets in seconds. |
-c n | Send n pings. |
[-x x] | Atomic fragments: (n)ever, (f)orce, (a)utomatic |
[-p <dscp>] | Use a specific DSCP value for this ping. DSCP (Differentiated Services Code Point) is used for QoS (Quality of Service). Possible DSCP values: BE/CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43, EF |
-a a.b.c.d | Sets the ping's sender address (default: IP address of the device. |
-a <name> | Uses a named network, interface, or loopback address as the sender address |
-l <Load-Balancer-Policy> | If the ping target is reached via a load balancer, the policy makes a load-balancer decision when the pings are sent. Possible values are
default, traffic, bandwidth, round-robin, mst-used and all defined Dynamic Path Selection policies. If an invalid policy is
specified, no pings are sent
Note: It is not possible to use this CLI option in combination with the specification of a scope or an interface binding in the destination.
|
-6 <IPv6-Address>%<Scope> | Performs a ping command to the link-local address via the interface specified by <scope>.
For IPv6, the scope of parameters is of central importance: IPv6 requires a link-local address (fe80::/10) to be assigned to every network interface (logical or physical) on which the IPv6 protocol is enabled, so you must specify the scope when pinging a link-local address. This is the only way that the ping command knows which interface it should send the packet to. A percent sign (%) separates the name of the interface from the IPv6 address.
Examples:
|
destination | Address or host name of the target computer |
%scope | Name of the interface used to send the packet when link-local addresses are used as the destination. |
%scope@rtg-tag | Name of the interface used to send the packet when link-local addresses are used as the destination, with additional specification of the routing tag. |
%%interface | Name of the destination interface. The packet is sent directly to the interface without taking the routing table into account. |
@rtg-tag | Routing tag used to send the packet. |
stop /<RETURN> | Entering stop or pressing the RETURN button terminates the ping command. |