Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
unknown1020
New Contributor III

ping command on the fortigate

friends could help me by clarifying what is the difference between the command
#execute ping x.x.x.x and #execute ping-options x.x.x.x

4 REPLIES 4
Toshi_Esumi
Esteemed Contributor III

"exe ping-options" doesn't execute ping. But you can change like source IP, packet size(data-size), repeat-count, etc. when you run "exe ping". You can hit '?' to see what options are available:

myfgt-xxx (root) # exe ping-o ?
adaptive-ping Adaptive ping <enable|disable>.
data-size Integer value to specify datagram size in bytes.
df-bit Set DF bit in IP header <yes | no>.
interface Auto | <outgoing interface>.
interval Integer value to specify seconds between two pings.
pattern Hex format of pattern, e.g. 00ffaabb.
repeat-count Integer value to specify how many times to repeat PING.
reset Reset settings.
source Auto | <source interface IP>.
timeout Integer value to specify timeout in seconds.
tos IP type-of-service option.
ttl Integer value to specify time-to-live.
use-sdwan Use SD-WAN rules to get output interface <yes | no>.
validate-reply Validate reply data <yes | no>.
view-settings View the current settings for PING option.

 

Toshi

unknown1020

So when executing #exe ping-options x.x.x.x should I indicate the source IP of the computer where I want to ping another IP?

for example I have an ip of my lan 11.11.11.5 and I want to ping the ip 11.11.11.6; So from the CLI of the fortigate I could execute the command #exe ping-options 11.11.11.5 and then do a #execute ping 11.11.11.6 ?

Toshi_Esumi
Esteemed Contributor III

If you don't specify the source IP by the "exe ping-o", the FGT picks up the outgoing interface IP when you run "exe ping" by default. So you don't have to specify it if you don't need to change the source IP from the interface IP, like your example pinging something inside of directly connected subnets.
It's useful when there are multiple L3 devices/routers between the FGT and the ping destination, and when you need to test the destination and all routers in-between have a route back to other subnets on the FGT.

 

Toshi

unknown1020

thanks, it's clear to me

Labels
Top Kudoed Authors