Fortinet Document Library

Version:

Version:

Version:

Version:

Version:

Version:

Version:


Table of Contents

CLI Reference

execute ping/ping6

Use these commands 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 execute ping-option/ping6-option.

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

Syntax

execute {ping|ping6} {<hostname> | <ipaddress>}

<hostname>

Fully qualified domain name (FQDN) of the host to ping.

<ipaddress>

IP address to ping.

Example

This example pings a host with the IP address 172.16.1.10.

execute ping 172.16.1.10

The CLI displays the following:

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

--- 172.16.1.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 FortiADC appliance and 172.16.1.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 10.0.0.1.

execute ping 10.0.0.1

The CLI displays the following:

PING 10.0.0.1 (10.0.0.1): 56 data bytes

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

--- 10.0.0.1 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 FortiADC appliance and 10.0.0.1. To determine the point of failure along the route, further diagnostic tests are required, such as execute traceroute.

Example

This example pings a host with the IP address 2001:0db8:85a3:::8a2e:0370:7334.

execute ping6 2607:f0b0:f:420::

The CLI displays the following:

PING 2607:f0b0:f:420:: (2607:f0b0:f:420::): 56 data bytes

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

--- 2607:f0b0:f:420:: 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 FortiADC appliance and 2607:f0b0:f:420::. To determine the point of failure along the route, further diagnostic tests are required, such as execute traceroute.

execute ping/ping6

Use these commands 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 execute ping-option/ping6-option.

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

Syntax

execute {ping|ping6} {<hostname> | <ipaddress>}

<hostname>

Fully qualified domain name (FQDN) of the host to ping.

<ipaddress>

IP address to ping.

Example

This example pings a host with the IP address 172.16.1.10.

execute ping 172.16.1.10

The CLI displays the following:

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

--- 172.16.1.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 FortiADC appliance and 172.16.1.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 10.0.0.1.

execute ping 10.0.0.1

The CLI displays the following:

PING 10.0.0.1 (10.0.0.1): 56 data bytes

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

--- 10.0.0.1 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 FortiADC appliance and 10.0.0.1. To determine the point of failure along the route, further diagnostic tests are required, such as execute traceroute.

Example

This example pings a host with the IP address 2001:0db8:85a3:::8a2e:0370:7334.

execute ping6 2607:f0b0:f:420::

The CLI displays the following:

PING 2607:f0b0:f:420:: (2607:f0b0:f:420::): 56 data bytes

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

--- 2607:f0b0:f:420:: 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 FortiADC appliance and 2607:f0b0:f:420::. To determine the point of failure along the route, further diagnostic tests are required, such as execute traceroute.