FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
aishaqui
New Contributor III
Article Id 232172
Description

This article describes how to to configure FortiGate as speed test (iperf) server.

Scope

FortiGate v7.0, 7.2.

Solution

Use the below settings to configure FortiGate as speed test (iperf) server:

 

config system global

    set speedtest-server enable

end

   

config system interface

    edit <interface name>

        append allowaccess speed-test

     next

end

 

Note:

For now, FortiGate as a speed test (Iperf) server listens on TCP port 5201.

 

For testing, it is possible to make one FortiGate as Iperf client and another FortiGate as an Iperf server.

Make 'FGT-A' as iperf server and 'FGT-B' as Iperf client.

 

FGT-A:

 

config system global

    set speedtest-server enable

end

 

config system interface

    edit "port1"

        set ip 10.9.1.127 255.255.240.0

        set allowaccess ping https ssh http telnet speed-test

    end

 

FGT-B:

From 'FGT-B', run the below command to check traffic test settings.

Make sure the port is 5201 and the proto is TCP:

 

FortiGate-2000E # di traffictest show

server-intf:    port1

client-intf:    port1

port:   5201

proto:  TCP

 

Now, run the below command to initiate the traffic test or speed test:

 

FortiGate-2000E # di traffictest run -c 10.9.1.127

Connecting to host 10.9.1.127, port 5201

[ 14] local 10.9.0.167 port 1209 connected to 10.9.1.127 port 5201

[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd

[ 14]   0.00-1.00   sec   114 MBytes   955 Mbits/sec   23   1.13 MBytes      

[ 14]   1.00-2.00   sec   112 MBytes   943 Mbits/sec    0   1.25 MBytes      

[ 14]   2.00-3.00   sec   112 MBytes   939 Mbits/sec    0   1.35 MBytes      

[ 14]   3.00-4.00   sec   112 MBytes   939 Mbits/sec    0   1.43 MBytes      

[ 14]   4.00-5.00   sec   113 MBytes   945 Mbits/sec    0   1.48 MBytes      

[ 14]   5.00-6.00   sec   112 MBytes   941 Mbits/sec    0   1.52 MBytes      

[ 14]   6.00-7.00   sec   112 MBytes   943 Mbits/sec    0   1.54 MBytes      

[ 14]   7.00-8.00   sec   112 MBytes   941 Mbits/sec    0   1.55 MBytes      

[ 14]   8.00-9.00   sec   112 MBytes   940 Mbits/sec    0   1.56 MBytes      

[ 14]   9.00-10.00  sec   112 MBytes   940 Mbits/sec    0   1.56 MBytes      

- - - - - - - - - - - - - - - - - - - - - - - - -

[ ID] Interval           Transfer     Bandwidth       Retr

[ 14]   0.00-10.00  sec  1.10 GBytes   943 Mbits/sec   23             sender

[ 14]   0.00-10.00  sec  1.10 GBytes   943 Mbits/sec                  receiver

 

iperf Done

 

 

FGT-A:

If the sniffer is run on 'FGT-A':

 

FGT-A # di sniffer packet any "port 5201" 4 0 l

interfaces=[any]

filters=[port 5201]

2022-12-03 06:57:27.907142 port1 in 10.9.0.167.17680 -> 10.9.1.127.5201: syn 3982763007

2022-12-03 06:57:27.907176 port1 out 10.9.1.127.5201 -> 10.9.0.167.17680: syn 29805291 ack 3982763008

2022-12-03 06:57:27.907228 port1 in 10.9.0.167.17680 -> 10.9.1.127.5201: ack 29805292

2022-12-03 06:57:27.907242 port1 in 10.9.0.167.17680 -> 10.9.1.127.5201: psh 3982763008 ack 29805292

2022-12-03 06:57:27.907248 port1 out 10.9.1.127.5201 -> 10.9.0.167.17680: ack 3982763045

 

Related article:
Technical Tip: Use cases for the diagnose traffictest command