FortiExtender
FortiExtender offers wireless connectivity for nearly any operational network.
gvenkatesan
Staff
Staff
Article Id 388526
Description This article describes how to use the 'ping' command on FortiExtender devices with advanced options, including how to specify a source IP address or interface. It outlines available parameters and practical examples to help with network troubleshooting and connectivity testing.
Scope FortiExtender, v7.4. x and v7.6.x.
Solution

To get all the available ping options, execute the help command as shown below:

 

FEX# execute ping -h
ping: invalid option -- 'h'
BusyBox v1.36.1 (2024-06-08 00:28:07 UTC) multi-call binary.

Usage: ping [OPTIONS] HOST

Send ICMP ECHO_REQUESTs to HOST

-4,-6 Force IP or IPv6 name resolution
-c CNT Send only CNT pings
-s SIZE Send SIZE data bytes in packets (default 56)
-i SECS Interval
-A Ping as soon as reply is received
-t TTL Set TTL
-I IFACE/IP Source interface or IP address
-W SEC Seconds to wait for the first response (default 10)
(after all -c CNT packets are sent)
-w SEC Seconds until ping exits (default:infinite)
(can exit earlier with -c CNT)
-q Quiet, only display output at start/finish
-p HEXBYTE Payload pattern

 

Example 1: Pinging a Destination from a Specific Source IP:


FEX# execute ping 10.1.1.10 -I 10.10.257.10
PING 10.1.1.10 (10.1.1.10) from 10.10.257.10: 56 data bytes
64 bytes from 10.1.1.10: seq=0 ttl=255 time=1.922 ms
64 bytes from 10.1.1.10: seq=1 ttl=255 time=1.287 ms
64 bytes from 10.1.1.10: seq=2 ttl=255 time=1.038 ms
^C
--- 10.1.1.10 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss

 

Example 2: Using a Timeout with -w Option:

 

FEX# execute ping 10.1.1.10 -I 10.10.257.10 -w 10
PING 10.1.1.10 (10.1.1.10) from 10.10.257.10: 56 data bytes
64 bytes from 10.1.1.10: seq=0 ttl=255 time=1.745 ms
64 bytes from 10.1.1.10: seq=1 ttl=255 time=1.353 ms
64 bytes from 10.1.1.10: seq=2 ttl=255 time=1.377 ms
64 bytes from 10.1.1.10: seq=3 ttl=255 time=1.312 ms
64 bytes from 10.1.1.10: seq=4 ttl=255 time=1.056 ms
64 bytes from 10.1.1.10: seq=5 ttl=255 time=1.038 ms
64 bytes from 10.1.1.10: seq=6 ttl=255 time=1.215 ms
64 bytes from 10.1.1.10: seq=7 ttl=255 time=1.140 ms
64 bytes from 10.1.1.10: seq=8 ttl=255 time=1.342 ms
64 bytes from 10.1.1.10: seq=9 ttl=255 time=1.261 ms

--- 10.1.1.10 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss

round-trip min/avg/max = 1.038/1.283/1.745 ms

 

Note:

Multiple Options can be clubbed together as per the requirement.