[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

ping

Syntax

ping host
<bypass-routing>
<count requests>
<detail>
<do-not-fragment>
<inet | inet6>
<interface source-interface>
<interval seconds>
<logical-system (all | logical-system-name)>
<loose-source value>
<no-resolve>
<pattern string>
<rapid>
<record-route>
<routing-instance routing-instance-name>
<size bytes>
<source source-address>
<strict strict-source value>
<tos type-of-service>
<ttl value>
<verbose>
<wait seconds>

Release Information

Command introduced before JUNOS Release 7.4.

Description

Check host reachability and network connectivity. The ping command sends Internet Control Message Protocol (ICMP) ECHO_REQUEST messages to elicit ICMP ECHO_RESPONSE messages from the specified host. Type Ctrl+c to interrupt a ping command.

Options

hostIP address or hostname of the remote system to ping.

bypass-routing — (Optional) Bypass the normal routing tables and send ping requests directly to a system on an attached network. If the system is not on a directly attached network, an error is returned. Use this option to ping a local system through an interface that has no route through it.

count requests(Optional) Number of ping requests to send. The range of values is 1 through 2,000,000,000. The default value is an unlimited number of requests.

detail — (Optional) Include in the output the interface on which the ping reply was received.

do-not-fragment — (Optional) Set the do-not-fragment (DF) bit in the IP header of the ping packets.

inet — (Optional) Ping Packet Forwarding Engine IPv4 routes.

inet6 — (Optional) Ping Packet Forwarding Engine IPv6 routes.

interface source-interface(Optional) Interface to use to send the ping requests.

interval seconds(Optional) How often to send ping requests. The range of values, in seconds, is 1 through infinity. The default value is 1.

logical-system (all | logical-system-name) — (Optional) Perform this operation on all logical systems or on a particular logical system.

loose-source value(Optional) Intermediate loose source route entry (IPv4). Open a set of values.

no-resolve — (Optional) Do not attempt to determine the hostname that corresponds to the IP address.

pattern string(Optional) Specify a hexadecimal fill pattern to include in the ping packet.

rapid — (Optional) Send 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) Record and report the packet's path (IPv4).

routing-instance routing-instance-name(Optional) Name of the routing instance for the ping attempt.

size bytes(Optional) Size of ping request packets. The range of values, in bytes, is 0 through 65,468. The default value is 56, which is effectively 64 bytes because 8 bytes of ICMP header data are added to the packet.

source source-address(Optional) IP address of the outgoing interface. This address is sent in the IP source address field of the ping request. If this option is not specified, the default address is usually the loopback interface (lo.0).

strict — (Optional) Use the strict source route option (IPv4).

strict-source value(Optional) Intermediate strict source route entry (IPv4). Open a set of values.

tos type-of-service(Optional) Set the type-of-service (ToS) field in the IP header of the ping packets. The range of values is 0 through 255.

ttl value(Optional) Time-to-live (TTL) value to include in the ping request (IPv6). The range of values is 0 through 255.

verbose — (Optional) Display detailed output.

wait seconds(Optional) Delay, in seconds, after sending the last packet. If this option is not specified, the default delay is 10 seconds. If this option is used without the count option, a default count of 5 packets is used.

Required Privilege Level

network

List of Sample Output

ping hostname
ping hostname size count
ping hostname rapid

Output Fields

When you enter this command, you are provided feedback on the status of your request. An exclamation point (!) indicates that an echo reply was received. A period (.) indicates that an echo reply was not received within the timeout period. An x indicates that an echo reply was received with an error code these packets are not counted in the received packets count. They are accounted for separately.

Sample Output

ping hostname

user@host> ping skye
PING skye.net (192.168.169.254): 56 data bytes
64 bytes from 192.168.169.254: icmp_seq=0 ttl=253 time=1.028 ms
64 bytes from 192.168.169.254: icmp_seq=1 ttl=253 time=1.053 ms
64 bytes from 192.168.169.254: icmp_seq=2 ttl=253 time=1.025 ms
64 bytes from 192.168.169.254: icmp_seq=3 ttl=253 time=1.098 ms
64 bytes from 192.168.169.254: icmp_seq=4 ttl=253 time=1.032 ms
64 bytes from 192.168.169.254: icmp_seq=5 ttl=253 time=1.044 ms
^C [abort]

ping hostname size count

user@host> ping skye size 200 count 5
PING skye.net (192.168.169.254): 200 data bytes
208 bytes from 192.168.169.254: icmp_seq=0 ttl=253 time=1.759 ms
208 bytes from 192.168.169.254: icmp_seq=1 ttl=253 time=2.075 ms
208 bytes from 192.168.169.254: icmp_seq=2 ttl=253 time=1.843 ms
208 bytes from 192.168.169.254: icmp_seq=3 ttl=253 time=1.803 ms
208 bytes from 192.168.169.254: icmp_seq=4 ttl=253 time=17.898 ms

--- skye.net ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 1.759/5.075/17.898 ms

ping hostname rapid

user@host> ping skye rapid
PING skye.net (192.168.169.254): 56 data bytes
!!!!!
--- skye.net ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.956/0.974/1.025/0.026 ms

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]