Supported Platforms
Related Documentation
- J, LN, SRX Series
- Diagnostic Tools Overview
- Configuring Ping MPLS
- Pinging Layer 2 Circuits
- Pinging Layer 2 VPNs
- Pinging Layer 3 VPNs
- Pinging RSVP-Signaled LSPs and LDP-Signaled LSPs
- Additional Information
- Junos OS Interfaces Library for Security Devices
Using the ping Command
You can perform certain tasks only through the CLI. Use the CLI ping command to verify that a host can be reached over the network. This command is useful for diagnosing host and network connectivity problems. The device sends a series of ICMP echo (ping) requests to a specified host and receives ICMP echo responses.
Enter the ping command with the following syntax:
Table 1 describes the ping command options.
To quit the ping command, press Ctrl-C.
Table 1: CLI ping Command Options
Option | Description |
---|---|
host | Pings the hostname or IP address you specify. |
interface source-interface | (Optional) Sends the ping requests on the interface you specify. If you do not include this option, ping requests are sent on all interfaces. |
bypass-routing | (Optional) Bypasses the routing tables and sends the ping requests only to hosts on directly attached interfaces. If the host is not on a directly attached interface, an error message is returned. Use this option to ping a local system through an interface that has no route through it. |
countnumber | (Optional) Limits the number of ping requests to send. Specify a count from 1 through 2,000,000,000. If you do not specify a count, ping requests are continuously sent until you press Ctrl-C. |
do-not-fragment | (Optional) Sets the Don't Fragment (DF) bit in the IP header of the ping request packet. |
inet | (Optional) Forces the ping requests to an IPv4 destination. |
inet6 | (Optional) Forces the ping requests to an IPv6 destination. |
interval seconds | (Optional) Sets the interval between ping requests, in seconds. Specify an interval from 0.1 through 10,000. The default value is 1 second. |
loose-source [hosts] | (Optional) For IPv4, sets the loose source routing option in the IP header of the ping request packet. |
no-resolve | (Optional) Suppresses the display of the hostnames of the hops along the path. |
pattern string | (Optional) Includes the hexadecimal string you specify, in the ping request packet. |
rapid | (Optional) Sends ping requests rapidly. The results are reported in a single message, not in individual messages for each ping request. By default, five ping requests are sent before the results are reported. To change the number of requests, include the count option. |
record-route | (Optional) For IPv4, sets the record route option in the IP header of the ping request packet. The path of the ping request packet is recorded within the packet and displayed on the screen. |
routing-instance routing-instance-name | (Optional) Uses the routing instance you specify for the ping request. |
size bytes | (Optional) Sets the size of the ping request packet. Specify a size from 0 through 65,468. The default value is 56 bytes, which is effectively 64 bytes because 8 bytes of ICMP header data are added to the packet. |
source source-address | (Optional) Uses the source address that you specify, in the ping request packet. |
strict | (Optional) For IPv4, sets the strict source routing option in the IP header of the ping request packet. |
strict-source [hosts] | (Optional) For IPv4, sets the strict source routing option in the IP header of the ping request packet, and uses the list of hosts you specify for routing the packet. |
tos number | (Optional) Sets the type-of-service (TOS) value in the IP header of the ping request packet. Specify a value from 0 through 255. |
ttl number | (Optional) Sets the time-to-live (TTL) value for the ping request packet. Specify a value from 0 through 255. |
wait seconds | (Optional) Sets the maximum time to wait after sending the last ping request packet. If you do not specify this option, the default delay is 10 seconds. If you use this option without the count option, the J Series device uses a default count of 5 packets. |
detail | (Optional) Displays the interface on which the ping response was received. |
verbose | (Optional) Displays detailed output. |
The following is sample output from a ping command:
PING host3.site.net (176.26.232.111): 56 data bytes 64 bytes from 176.26.232.111: icmp_seq=0 ttl=122 time=0.661 ms 64 bytes from 176.26.232.111: icmp_seq=1 ttl=122 time=0.619 ms 64 bytes from 176.26.232.111: icmp_seq=2 ttl=122 time=0.621 ms 64 bytes from 176.26.232.111: icmp_seq=3 ttl=122 time=0.634 ms --- host3.site.net ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.619/0.634/0.661/0.017 ms
The fields in the display are the same as those displayed by the J-Web ping host diagnostic tool.
Related Documentation
- J, LN, SRX Series
- Diagnostic Tools Overview
- Configuring Ping MPLS
- Pinging Layer 2 Circuits
- Pinging Layer 2 VPNs
- Pinging Layer 3 VPNs
- Pinging RSVP-Signaled LSPs and LDP-Signaled LSPs
- Additional Information
- Junos OS Interfaces Library for Security Devices
Published: 2014-12-07
Supported Platforms
Related Documentation
- J, LN, SRX Series
- Diagnostic Tools Overview
- Configuring Ping MPLS
- Pinging Layer 2 Circuits
- Pinging Layer 2 VPNs
- Pinging Layer 3 VPNs
- Pinging RSVP-Signaled LSPs and LDP-Signaled LSPs
- Additional Information
- Junos OS Interfaces Library for Security Devices