Fortinet black logo

CLI Reference

ping

ping

Use this command to perform an ICMP ECHO request (also called a ping) to a host by specifying its fully qualified domain name (FQDN) or IPv4 address, using the options configured by ping-options.

Pings are often used to test IP-layer connectivity during troubleshooting.

To use this command, your administrator account’s access control profile must have at least r permission to the sysgrp area. For details, see Permissions.

Syntax

execute ping {<host_fqdn> | <host_ipv4>}

Variable Description Default

ping {<host_fqdn> | <host_ipv4>}

Type either the IPv4 address or fully qualified domain name (FQDN) of the host. No default.

Example

This example pings a host with the IP address 192.0.2.10.

execute ping 192.0.2.10

The CLI displays the following:

PING 192.0.2.10 (192.0.2.10): 56 data bytes
64 bytes from 192.0.2.10: icmp_seq=0 ttl=128 time=0.5 ms
64 bytes from 192.0.2.10: icmp_seq=1 ttl=128 time=0.2 ms
64 bytes from 192.0.2.10: icmp_seq=2 ttl=128 time=0.2 ms
64 bytes from 192.0.2.10: icmp_seq=3 ttl=128 time=0.2 ms
64 bytes from 192.0.2.10: icmp_seq=4 ttl=128 time=0.2 ms

--- 192.0.2.10 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.2/0.2/0.5 ms

The results indicate that a route exists between the FortiWeb appliance and 192.0.2.10. It also indicates that during the sample period, there was no packet loss, and the average response time was 0.2 milliseconds.

Example

This example pings a host with the IP address 192.0.2.78.

execute ping 192.0.2.78

The CLI displays the following:

PING 192.0.2.78 (192.0.2.78): 56 data bytes

After several seconds, no output appears. The administrator halts the ping by pressing Ctrl+C. The CLI displays the following:

--- 192.0.2.78 ping statistics ---

5 packets transmitted, 0 packets received, 100% packet loss

The results indicate the host may be down, or there is no route between the FortiWeb appliance and 192.0.2.78. To determine the point of failure along the route, further diagnostic tests are required, such as traceroute.

Related topics

ping

ping

Use this command to perform an ICMP ECHO request (also called a ping) to a host by specifying its fully qualified domain name (FQDN) or IPv4 address, using the options configured by ping-options.

Pings are often used to test IP-layer connectivity during troubleshooting.

To use this command, your administrator account’s access control profile must have at least r permission to the sysgrp area. For details, see Permissions.

Syntax

execute ping {<host_fqdn> | <host_ipv4>}

Variable Description Default

ping {<host_fqdn> | <host_ipv4>}

Type either the IPv4 address or fully qualified domain name (FQDN) of the host. No default.

Example

This example pings a host with the IP address 192.0.2.10.

execute ping 192.0.2.10

The CLI displays the following:

PING 192.0.2.10 (192.0.2.10): 56 data bytes
64 bytes from 192.0.2.10: icmp_seq=0 ttl=128 time=0.5 ms
64 bytes from 192.0.2.10: icmp_seq=1 ttl=128 time=0.2 ms
64 bytes from 192.0.2.10: icmp_seq=2 ttl=128 time=0.2 ms
64 bytes from 192.0.2.10: icmp_seq=3 ttl=128 time=0.2 ms
64 bytes from 192.0.2.10: icmp_seq=4 ttl=128 time=0.2 ms

--- 192.0.2.10 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.2/0.2/0.5 ms

The results indicate that a route exists between the FortiWeb appliance and 192.0.2.10. It also indicates that during the sample period, there was no packet loss, and the average response time was 0.2 milliseconds.

Example

This example pings a host with the IP address 192.0.2.78.

execute ping 192.0.2.78

The CLI displays the following:

PING 192.0.2.78 (192.0.2.78): 56 data bytes

After several seconds, no output appears. The administrator halts the ping by pressing Ctrl+C. The CLI displays the following:

--- 192.0.2.78 ping statistics ---

5 packets transmitted, 0 packets received, 100% packet loss

The results indicate the host may be down, or there is no route between the FortiWeb appliance and 192.0.2.78. To determine the point of failure along the route, further diagnostic tests are required, such as traceroute.

Related topics