FortiGateからPingを実行する方法は CLIより下記のコマンドを実行いたします。
FGT # execute ping <対象のIPアドレス>
<例>
FGT # execute ping 192.168.1.1
また、Pingの設定は下記のコマンドより変更する事が可能です。
FGT # execute ping-options <下記のパラメータ>
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.
【設定例】:下記に設定例を一部記載いたします。
【data-size】
FGT #execute ping-options data-size <パケットのデータサイズ>
<例>
FGT #execute ping-options data-size 1300
FGT # execute ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 1300 data bytes ⇒1300バイトにてPingを実行する
1308 bytes from 192.168.1.1: icmp_seq=0 ttl=128 time=0.9 ms
1308 bytes from 192.168.1.1: icmp_seq=1 ttl=128 time=0.7 ms
Pingオプションは一度CLIからログアウトすると、デフォルトの値へ戻ります。
【repeat-count】
FGT #execute ping-options repeat-count <Pingの実行回数>
<例>
FGT #execute ping-options repeat-count 3
FGT # execute ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=128 time=0.5 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=128 time=0.3 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=128 time=0.3 ms
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.3/0.3/0.5 ms
FGT #
Pingの実行回数を変更するオプションとなります。 デフォルトでは5回実行いたします。
Pingオプションは一度CLIからログアウトすると、デフォルトの値へ戻ります。
【source】
FGT #execute ping-options source <FortiGateのインタフェースに設定されているIPアドレス>
<例>
FGT #execute ping-options source 172.16.1.1
FGT #execute ping 192.168.1.1 ⇒(送信元アドレスは172.16.1.1となる)
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=128 time=0.5 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=128 time=0.2 ms
Pingを実行するSorceとなるインターフェースを変更する設定となります。
Internalに属しているネットワークが192.168.1.0/24 wan1に属しているネットワークが172.16.1.0/24の場合
execute ping コマンドにてInternalに属している端末にPingを実行する場合には通常ではInternalポートに設定されてあるアドレスが送信元となります。
上記コマンドを実行することで、送信元をWan1に設定してあるアドレスへ変更し、 Internalの端末へとPingを実行する事が可能となります。
Pingオプションは一度CLIからログアウトすると、デフォルトの値へ戻ります。