Bypass Tests
The following scenario shows different configuration alternatives to improve the OSDx firewall performance.
Test Local Bypass
Description
Builds a scenario with three DUTs in which a performance test is carried out between DUT1 and DUT2, and DUT0 is the router running the firewall. “Local bypass” is set to allow the firewall to internally skips packets belonging to a flow that must be bypassed. The performance test may produce better results than the general tests.
Scenario
Step 1: Run command file copy http://10.215.168.1/~robot/test-performance.rules running:// force
at DUT0
and expect this output:
Show output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 129 100 129 0 0 24608 0 --:--:-- --:--:-- --:--:-- 25800
Step 2: Run command file show running://test-performance.rules
at DUT0
and expect this output:
Show output
alert tcp any any -> any 5001 (msg: "Skipping test network performance traffic"; bypass; flow: established, to_server; sid: 40;)
Step 3: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth0 traffic nat source rule 1 address masquerade set interfaces ethernet eth1 vif 101 address 40.0.0.1/8 set interfaces ethernet eth1 vif 101 traffic policy in FW_PLAN set interfaces ethernet eth1 vif 201 address 20.0.0.1/8 set interfaces ethernet eth1 vif 201 traffic policy in FW_PLAN set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set service dns static host-name WAN inet 10.215.168.1 set service firewall FW logging level config set service firewall FW logging outputs fast set service firewall FW mode inline queue FW_Q set service firewall FW ruleset file 'running://test-performance.rules' set service firewall FW stream bypass set service firewall FW validator-timeout 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set traffic policy FW_PLAN rule 1 action enqueue FW_Q set traffic queue FW_Q elements 1
Step 4: Ping IP address 20.0.0.2
from DUT1
:
admin@DUT1$ ping 20.0.0.2 count 1 size 56 timeout 1Show output
PING 20.0.0.2 (20.0.0.2) 56(84) bytes of data. 64 bytes from 20.0.0.2: icmp_seq=1 ttl=63 time=0.500 ms --- 20.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.500/0.500/0.500/0.000 ms
Step 5: Ping IP address 40.0.0.2
from DUT2
:
admin@DUT2$ ping 40.0.0.2 count 1 size 56 timeout 1Show output
PING 40.0.0.2 (40.0.0.2) 56(84) bytes of data. 64 bytes from 40.0.0.2: icmp_seq=1 ttl=63 time=0.438 ms --- 40.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.438/0.438/0.438/0.000 ms
Step 6: Initiate a bandwidth test from DUT2
to DUT1
admin@DUT1$ monitor test performance server port 5001 admin@DUT2$ monitor test performance client 40.0.0.2 duration 10 port 5001 parallel 1Expect this output in
DUT2
:Connecting to host 40.0.0.2, port 5001 [ 5] local 20.0.0.2 port 36048 connected to 40.0.0.2 port 5001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 51.0 MBytes 428 Mbits/sec 0 2.44 MBytes [ 5] 1.00-2.00 sec 92.5 MBytes 776 Mbits/sec 172 1.62 MBytes [ 5] 2.00-3.00 sec 55.0 MBytes 461 Mbits/sec 0 1.71 MBytes [ 5] 3.00-4.00 sec 47.5 MBytes 398 Mbits/sec 0 1.79 MBytes [ 5] 4.00-5.00 sec 47.5 MBytes 398 Mbits/sec 0 1.84 MBytes [ 5] 5.00-6.00 sec 46.2 MBytes 388 Mbits/sec 0 1.87 MBytes [ 5] 6.00-7.00 sec 50.0 MBytes 419 Mbits/sec 0 1.89 MBytes [ 5] 7.00-8.00 sec 46.2 MBytes 388 Mbits/sec 0 1.90 MBytes [ 5] 8.00-9.00 sec 85.0 MBytes 713 Mbits/sec 0 1.91 MBytes [ 5] 9.00-10.00 sec 81.2 MBytes 682 Mbits/sec 0 1.91 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 602 MBytes 505 Mbits/sec 172 sender [ 5] 0.00-10.01 sec 601 MBytes 504 Mbits/sec receiver iperf Done.
Step 7: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Skipping test network performance traffic).+$Show output
10/07/2024-11:54:08.290249 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:36038 -> 40.0.0.2:5001 10/07/2024-11:54:08.291162 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:36048 -> 40.0.0.2:5001
Test Capture Bypass Using Packet Mark
Description
Builds a scenario with three DUTs in which a performance test is conducted between DUT1 and DUT2, and DUT0 is the router running the firewall. “Capture bypass” is set to allow the firewall to mark packets. An external tool can then decide what to do with the flow when the mark is seen. For this example, when packet marks are detected, the traffic is assigned a label, thereby allowing the possibility of classifying traffic. In particular, labeling avoids traffic from entering the firewall.
Performance must improve considerably compared to the Local Bypass test.
Scenario
Step 1: Run command file copy http://10.215.168.1/~robot/test-performance.rules running:// force
at DUT0
and expect this output:
Show output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 129 100 129 0 0 2007 0 --:--:-- --:--:-- --:--:-- 2015
Step 2: Run command file show running://test-performance.rules
at DUT0
and expect this output:
Show output
alert tcp any any -> any 5001 (msg: "Skipping test network performance traffic"; bypass; flow: established, to_server; sid: 40;)
Step 3: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth0 traffic nat source rule 1 address masquerade set interfaces ethernet eth1 vif 101 address 40.0.0.1/8 set interfaces ethernet eth1 vif 101 traffic policy in FW_PLAN set interfaces ethernet eth1 vif 101 traffic policy out FW-SKIP set interfaces ethernet eth1 vif 201 address 20.0.0.1/8 set interfaces ethernet eth1 vif 201 traffic policy in FW_PLAN set interfaces ethernet eth1 vif 201 traffic policy out FW-SKIP set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set service dns static host-name WAN inet 10.215.168.1 set service firewall FW logging level config set service firewall FW logging outputs fast set service firewall FW mode inline queue FW_Q set service firewall FW ruleset file 'running://test-performance.rules' set service firewall FW stream bypass mark 129834765 set service firewall FW stream bypass mask 129834765 set service firewall FW validator-timeout 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set traffic label BYPASS set traffic policy FW-SKIP rule 1 log prefix SKIP set traffic policy FW-SKIP rule 1 selector MARKED-PACKETS set traffic policy FW-SKIP rule 1 set label BYPASS set traffic policy FW_PLAN rule 1 action enqueue FW_Q set traffic policy FW_PLAN rule 1 selector FW_SEL_ENQUEUE set traffic queue FW_Q elements 1 set traffic selector FW_SEL_ENQUEUE rule 1 not label BYPASS set traffic selector MARKED-PACKETS rule 1 mark 129834765
Step 4: Ping IP address 20.0.0.2
from DUT1
:
admin@DUT1$ ping 20.0.0.2 count 1 size 56 timeout 1Show output
PING 20.0.0.2 (20.0.0.2) 56(84) bytes of data. 64 bytes from 20.0.0.2: icmp_seq=1 ttl=63 time=0.568 ms --- 20.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.568/0.568/0.568/0.000 ms
Step 5: Ping IP address 40.0.0.2
from DUT2
:
admin@DUT2$ ping 40.0.0.2 count 1 size 56 timeout 1Show output
PING 40.0.0.2 (40.0.0.2) 56(84) bytes of data. 64 bytes from 40.0.0.2: icmp_seq=1 ttl=63 time=0.476 ms --- 40.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.476/0.476/0.476/0.000 ms
Step 6: Initiate a bandwidth test from DUT2
to DUT1
admin@DUT1$ monitor test performance server port 5001 admin@DUT2$ monitor test performance client 40.0.0.2 duration 10 port 5001 parallel 1Expect this output in
DUT2
:Connecting to host 40.0.0.2, port 5001 [ 5] local 20.0.0.2 port 44788 connected to 40.0.0.2 port 5001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 237 MBytes 1.99 Gbits/sec 405 1.61 MBytes [ 5] 1.00-2.00 sec 334 MBytes 2.80 Gbits/sec 0 1.74 MBytes [ 5] 2.00-3.00 sec 366 MBytes 3.07 Gbits/sec 0 1.89 MBytes [ 5] 3.00-4.00 sec 376 MBytes 3.16 Gbits/sec 110 1.51 MBytes [ 5] 4.00-5.00 sec 336 MBytes 2.82 Gbits/sec 66 1.19 MBytes [ 5] 5.00-6.00 sec 352 MBytes 2.96 Gbits/sec 0 1.39 MBytes [ 5] 6.00-7.00 sec 354 MBytes 2.97 Gbits/sec 0 1.57 MBytes [ 5] 7.00-8.00 sec 362 MBytes 3.04 Gbits/sec 0 1.73 MBytes [ 5] 8.00-9.00 sec 378 MBytes 3.17 Gbits/sec 0 1.88 MBytes [ 5] 9.00-10.00 sec 355 MBytes 2.98 Gbits/sec 0 2.01 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 3.37 GBytes 2.89 Gbits/sec 581 sender [ 5] 0.00-10.00 sec 3.37 GBytes 2.89 Gbits/sec receiver iperf Done.
Step 7: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Skipping test network performance traffic).+$Show output
10/07/2024-11:54:38.498488 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:44780 -> 40.0.0.2:5001 10/07/2024-11:54:38.499481 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:44788 -> 40.0.0.2:5001
Step 8: Run command system journal show | cat
at DUT0
and check if output matches the following regular expressions:
(?m)^.*\[SKIP\-1\].*$Show output
Oct 07 11:54:30.335928 osdx systemd-journald[115269]: Runtime Journal (/run/log/journal/ea320b11e8924984abe0660bdd8d3fcc) is 2.0M, max 15.3M, 13.2M free. Oct 07 11:54:30.337364 osdx systemd-journald[115269]: Received client request to rotate journal, rotating. Oct 07 11:54:30.337425 osdx systemd-journald[115269]: Vacuuming done, freed 0B of archived journals from /run/log/journal/ea320b11e8924984abe0660bdd8d3fcc. Oct 07 11:54:30.346079 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'system journal clear'. Oct 07 11:54:30.760628 osdx osdx-coredump[240075]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... Oct 07 11:54:30.767882 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'system coredump delete all'. Oct 07 11:54:31.232346 osdx OSDxCLI[239743]: User 'admin' entered the configuration menu. Oct 07 11:54:31.305373 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 address 10.215.168.64/24'. Oct 07 11:54:31.395871 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 traffic nat source rule 1 address masquerade'. Oct 07 11:54:31.451131 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set protocols static route 0.0.0.0/0 next-hop 10.215.168.1'. Oct 07 11:54:31.549233 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service dns static host-name WAN inet 10.215.168.1'. Oct 07 11:54:31.608118 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth1 vif 101 address 40.0.0.1/8'. Oct 07 11:54:31.703525 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth1 vif 201 address 20.0.0.1/8'. Oct 07 11:54:31.777513 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'show working'. Oct 07 11:54:31.913365 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth0 Oct 07 11:54:31.949370 osdx kernel: 8021q: adding VLAN 0 to HW filter on device eth1 Oct 07 11:54:31.985826 osdx (udev-worker)[240193]: Network interface NamePolicy= disabled on kernel command line. Oct 07 11:54:31.993870 osdx (udev-worker)[240200]: Network interface NamePolicy= disabled on kernel command line. Oct 07 11:54:32.107082 osdx cfgd[1439]: [239743]Completed change to active configuration Oct 07 11:54:32.132462 osdx OSDxCLI[239743]: User 'admin' committed the configuration. Oct 07 11:54:32.148463 osdx OSDxCLI[239743]: User 'admin' left the configuration menu. Oct 07 11:54:34.225275 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'. Oct 07 11:54:34.300496 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'ping 40.0.0.2 count 1 size 56 timeout 1'. Oct 07 11:54:34.414775 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'ping 20.0.0.2 count 1 size 56 timeout 1'. Oct 07 11:54:34.897165 osdx file_operation[240273]: using src url: http://10.215.168.1/~robot/test-performance.rules dst url: running:// Oct 07 11:54:34.985088 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'file copy http://10.215.168.1/~robot/test-performance.rules running:// force'. Oct 07 11:54:35.188872 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'file show running://test-performance.rules'. Oct 07 11:54:35.338694 osdx OSDxCLI[239743]: User 'admin' entered the configuration menu. Oct 07 11:54:35.403686 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service firewall FW ruleset file running://test-performance.rules'. Oct 07 11:54:35.493172 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service firewall FW mode inline queue FW_Q'. Oct 07 11:54:35.557990 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service firewall FW logging outputs fast'. Oct 07 11:54:35.643000 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service firewall FW logging level config'. Oct 07 11:54:35.708646 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service firewall FW validator-timeout 20'. Oct 07 11:54:35.805401 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic queue FW_Q elements 1'. Oct 07 11:54:35.881022 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth1 vif 101 traffic policy in FW_PLAN'. Oct 07 11:54:35.965569 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth1 vif 201 traffic policy in FW_PLAN'. Oct 07 11:54:36.018874 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service firewall FW stream bypass mark 129834765'. Oct 07 11:54:36.114186 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set service firewall FW stream bypass mask 129834765'. Oct 07 11:54:36.167885 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic label BYPASS'. Oct 07 11:54:36.270097 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic policy FW-SKIP rule 1 log prefix SKIP'. Oct 07 11:54:36.365212 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic policy FW-SKIP rule 1 selector MARKED-PACKETS'. Oct 07 11:54:36.425503 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic policy FW-SKIP rule 1 set label BYPASS'. Oct 07 11:54:36.522500 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic selector MARKED-PACKETS rule 1 mark 129834765'. Oct 07 11:54:36.587878 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic selector FW_SEL_ENQUEUE rule 1 not label BYPASS'. Oct 07 11:54:36.710516 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic policy FW_PLAN rule 1 selector FW_SEL_ENQUEUE'. Oct 07 11:54:36.767952 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth1 vif 101 traffic policy out FW-SKIP'. Oct 07 11:54:36.866213 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set interfaces ethernet eth1 vif 201 traffic policy out FW-SKIP'. Oct 07 11:54:36.935011 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'set traffic policy FW_PLAN rule 1 action enqueue FW_Q'. Oct 07 11:54:37.077670 osdx OSDxCLI[239743]: User 'admin' added a new cfg line: 'show working'. Oct 07 11:54:37.577811 osdx systemd[1]: Reloading. Oct 07 11:54:37.689365 osdx systemd-sysv-generator[240404]: stat() failed on /etc/init.d/README, ignoring: No such file or directory Oct 07 11:54:37.817744 osdx systemd[1]: Starting suricata@FW.service - Suricata client "FW" service... Oct 07 11:54:37.837628 osdx systemd[1]: Started suricata@FW.service - Suricata client "FW" service. Oct 07 11:54:38.048816 osdx INFO[240386]: Rules successfully loaded Oct 07 11:54:38.049676 osdx cfgd[1439]: [239743]Completed change to active configuration Oct 07 11:54:38.052206 osdx OSDxCLI[239743]: User 'admin' committed the configuration. Oct 07 11:54:38.075340 osdx OSDxCLI[239743]: User 'admin' left the configuration menu. Oct 07 11:54:38.501451 osdx kernel: [SKIP-1] ACCEPT IN=eth1.201 OUT=eth1.101 MAC=de:ad:be:ef:6c:11:de:ad:be:ef:6c:30:08:00:45:00:00:59 SRC=20.0.0.2 DST=40.0.0.2 LEN=89 TOS=0x00 PREC=0x00 TTL=63 ID=31384 DF PROTO=TCP SPT=44780 DPT=5001 WINDOW=502 RES=0x00 ACK PSH URGP=0 MARK=0x7bd1f0d Oct 07 11:54:38.501530 osdx kernel: [SKIP-1] ACCEPT IN=eth1.201 OUT=eth1.101 MAC=de:ad:be:ef:6c:11:de:ad:be:ef:6c:30:08:00:45:00:00:59 SRC=20.0.0.2 DST=40.0.0.2 LEN=89 TOS=0x00 PREC=0x00 TTL=63 ID=38442 DF PROTO=TCP SPT=44788 DPT=5001 WINDOW=502 RES=0x00 ACK PSH URGP=0 MARK=0x7bd1f0d Oct 07 11:54:46.978551 osdx zebra[1404]: [WPPMZ-G9797] if_zebra_speed_update: eth1.201 old speed: 0 new speed: 4294967295 Oct 07 11:54:46.993920 osdx zebra[1404]: [WPPMZ-G9797] if_zebra_speed_update: eth1.101 old speed: 0 new speed: 4294967295 Oct 07 11:54:48.694517 osdx OSDxCLI[239743]: User 'admin' executed a new command: 'service firewall FW show logging fast | tail'.
Test Capture Bypass Using Conntrack Mark
Description
Builds a scenario with three DUTs in which a performance test is conducted between DUT1 and DUT2, and DUT0 is the router running the firewall. This test sets the conntrack mark directly, thus skipping all the steps required to set it later.
Performance must improve considerably compared to the Local Bypass test.
Then, the test is broaden by configuring “Capture bypass drop” to also avoid dropped packets from entering the firewall.
Scenario
Step 1: Run command file copy http://10.215.168.1/~robot/test-performance.rules running:// force
at DUT0
and expect this output:
Show output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 129 100 129 0 0 19521 0 --:--:-- --:--:-- --:--:-- 21500
Step 2: Run command file show running://test-performance.rules
at DUT0
and expect this output:
Show output
alert tcp any any -> any 5001 (msg: "Skipping test network performance traffic"; bypass; flow: established, to_server; sid: 40;)
Step 3: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth0 traffic nat source rule 1 address masquerade set interfaces ethernet eth1 vif 101 address 40.0.0.1/8 set interfaces ethernet eth1 vif 101 traffic policy in FW_PLAN set interfaces ethernet eth1 vif 201 address 20.0.0.1/8 set interfaces ethernet eth1 vif 201 traffic policy in FW_PLAN set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set service dns static host-name WAN inet 10.215.168.1 set service firewall FW logging level config set service firewall FW logging outputs fast set service firewall FW mode inline queue FW_Q set service firewall FW ruleset file 'running://test-performance.rules' set service firewall FW stream bypass mark 129834765 set service firewall FW stream bypass mask 129834765 set service firewall FW stream bypass set-connmark set service firewall FW validator-timeout 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set traffic policy FW_PLAN rule 2 action enqueue FW_Q set traffic policy FW_PLAN rule 2 selector FW_SEL_ENQUEUE set traffic queue FW_Q elements 1 set traffic selector FW_SEL_ENQUEUE rule 1 not connmark 129834765
Step 4: Ping IP address 20.0.0.2
from DUT1
:
admin@DUT1$ ping 20.0.0.2 count 1 size 56 timeout 1Show output
PING 20.0.0.2 (20.0.0.2) 56(84) bytes of data. 64 bytes from 20.0.0.2: icmp_seq=1 ttl=63 time=0.476 ms --- 20.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.476/0.476/0.476/0.000 ms
Step 5: Ping IP address 40.0.0.2
from DUT2
:
admin@DUT2$ ping 40.0.0.2 count 1 size 56 timeout 1Show output
PING 40.0.0.2 (40.0.0.2) 56(84) bytes of data. 64 bytes from 40.0.0.2: icmp_seq=1 ttl=63 time=0.470 ms --- 40.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.470/0.470/0.470/0.000 ms
Step 6: Initiate a bandwidth test from DUT2
to DUT1
admin@DUT1$ monitor test performance server port 5001 admin@DUT2$ monitor test performance client 40.0.0.2 duration 10 port 5001 parallel 1Expect this output in
DUT2
:Connecting to host 40.0.0.2, port 5001 [ 5] local 20.0.0.2 port 51840 connected to 40.0.0.2 port 5001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 326 MBytes 2.74 Gbits/sec 75 1.64 MBytes [ 5] 1.00-2.00 sec 371 MBytes 3.11 Gbits/sec 0 1.80 MBytes [ 5] 2.00-3.00 sec 396 MBytes 3.32 Gbits/sec 0 1.95 MBytes [ 5] 3.00-4.00 sec 371 MBytes 3.12 Gbits/sec 10 1.54 MBytes [ 5] 4.00-5.00 sec 385 MBytes 3.23 Gbits/sec 0 1.71 MBytes [ 5] 5.00-6.00 sec 404 MBytes 3.39 Gbits/sec 0 1.88 MBytes [ 5] 6.00-7.00 sec 386 MBytes 3.24 Gbits/sec 0 2.02 MBytes [ 5] 7.00-8.00 sec 411 MBytes 3.45 Gbits/sec 0 2.16 MBytes [ 5] 8.00-9.00 sec 402 MBytes 3.38 Gbits/sec 0 2.29 MBytes [ 5] 9.00-10.00 sec 364 MBytes 3.05 Gbits/sec 7 1.69 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 3.73 GBytes 3.20 Gbits/sec 92 sender [ 5] 0.00-10.00 sec 3.73 GBytes 3.20 Gbits/sec receiver iperf Done.
Step 7: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Skipping test network performance traffic).+$Show output
10/07/2024-11:55:09.228782 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:51830 -> 40.0.0.2:5001 10/07/2024-11:55:09.229729 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:51840 -> 40.0.0.2:5001
Step 8: Run command system conntrack show
at DUT0
and check if output matches the following regular expressions:
(?m)^tcp\s+.*src=20.0.0.2 dst=40.0.0.2.+dport=5001.*mark=129834765.*$Show output
icmp 1 19 src=20.0.0.2 dst=40.0.0.2 type=8 code=0 id=96 packets=1 bytes=84 src=40.0.0.2 dst=20.0.0.2 type=0 code=0 id=96 packets=1 bytes=84 (Sc: not-bypass) mark=0 use=1 tcp 6 9 CLOSE src=20.0.0.2 dst=40.0.0.2 sport=51840 dport=5001 packets=2764500 bytes=4146707405 src=40.0.0.2 dst=20.0.0.2 sport=5001 dport=51840 packets=43649 bytes=2262900 [ASSURED] (Sc: not-bypass) mark=129834765 use=1 icmp 1 19 src=40.0.0.2 dst=20.0.0.2 type=8 code=0 id=413 packets=1 bytes=84 src=20.0.0.2 dst=40.0.0.2 type=0 code=0 id=413 packets=1 bytes=84 (Sc: not-bypass) mark=0 use=1 tcp 6 19 TIME_WAIT src=20.0.0.2 dst=40.0.0.2 sport=51830 dport=5001 packets=16 bytes=1299 src=40.0.0.2 dst=20.0.0.2 sport=5001 dport=51830 packets=13 bytes=1019 [ASSURED] (Sc: not-bypass) mark=129834765 use=1 conntrack v1.4.7 (conntrack-tools): 4 flow entries have been shown.
Step 9: Run command file copy http://10.215.168.1/~robot/drop-performance.rules running:// force
at DUT0
and expect this output:
Show output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 200 100 200 0 0 902 0 --:--:-- --:--:-- --:--:-- 900
Step 10: Run command file show running://drop-performance.rules
at DUT0
and expect this output:
Show output
drop tcp any any -> any 5000 (msg: "Dropping TCP performance test traffic"; sid: 1; flow: established, to_server;) drop udp any any -> any 5001 (msg: "Dropping UDP performance test traffic"; sid: 2;)
Step 11: Modify the following configuration lines in DUT0
:
set service firewall FW bypass action drop set connmark mark 147652983 set service firewall FW ruleset file 'running://drop-performance.rules' set traffic policy FW_PLAN rule 1 action drop set traffic policy FW_PLAN rule 1 selector FW_SEL_DROP set traffic selector FW_SEL_DROP rule 1 connmark 147652983
Step 12: Initiate a bandwidth test from DUT2
to DUT1
admin@DUT1$ monitor test performance server port 5000 admin@DUT2$ monitor test performance client 40.0.0.2 duration 10 port 5000 parallel 1Expect this output in
DUT2
:^C- - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr iperf3: interrupt - the client has terminated admin@osdx$
Step 13: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Dropping TCP performance test traffic).+$Show output
10/07/2024-11:55:09.228782 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:51830 -> 40.0.0.2:5001 10/07/2024-11:55:09.229729 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:51840 -> 40.0.0.2:5001 10/07/2024-11:55:23.033777 [Drop] [**] [1:1:0] Dropping TCP performance test traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:50332 -> 40.0.0.2:5000
Step 14: Run command system conntrack show
at DUT0
and check if output matches the following regular expressions:
(?m)^tcp\s+.*src=20.0.0.2 dst=40.0.0.2.+dport=5000.*mark=147652983.*$Show output
tcp 6 29 LAST_ACK src=20.0.0.2 dst=40.0.0.2 sport=50332 dport=5000 packets=8 bytes=610 src=40.0.0.2 dst=20.0.0.2 sport=5000 dport=50332 packets=5 bytes=270 [ASSURED] (Sc: not-bypass) mark=147652983 use=1 conntrack v1.4.7 (conntrack-tools): 1 flow entries have been shown.
Step 15: Run command traffic policy FW_PLAN show
at DUT0
and check if output matches the following regular expressions:
(?m)^1\s+FW_SEL_DROP\s+[1-9].*$Show output
Policy FW_PLAN -- ifc eth1.101 -- hook in prio very-high --------------------------------------------------------------------- rule selector pkts match pkts eval bytes match bytes eval --------------------------------------------------------------------- 1 FW_SEL_DROP 4 5 210 270 2 FW_SEL_ENQUEUE 1 1 60 60 --------------------------------------------------------------------- Total 5 5 270 270 Policy FW_PLAN -- ifc eth1.201 -- hook in prio very-high --------------------------------------------------------------------- rule selector pkts match pkts eval bytes match bytes eval --------------------------------------------------------------------- 1 FW_SEL_DROP 6 9 499 700 2 FW_SEL_ENQUEUE 3 3 201 201 --------------------------------------------------------------------- Total 9 9 700 700
Test Capture And Offload
Description
Builds a scenario with three DUTs in which a performance test is conducted between DUT1 and DUT2, and DUT0 is the router running the firewall. This test sets the conntrack mark directly, thus skipping all the steps required to set it later. In addition, OSDx is instructed to accelerate the flow using internal accelerators.
Performance must improve considerably compared to the previous test, to reach its top value.
Scenario
Step 1: Run command file copy http://10.215.168.1/~robot/test-performance.rules running:// force
at DUT0
and expect this output:
Show output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 129 100 129 0 0 1193 0 --:--:-- --:--:-- --:--:-- 1194
Step 2: Run command file show running://test-performance.rules
at DUT0
and expect this output:
Show output
alert tcp any any -> any 5001 (msg: "Skipping test network performance traffic"; bypass; flow: established, to_server; sid: 40;)
Step 3: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth0 traffic nat source rule 1 address masquerade set interfaces ethernet eth1 vif 101 address 40.0.0.1/8 set interfaces ethernet eth1 vif 101 traffic policy in FW_PLAN set interfaces ethernet eth1 vif 201 address 20.0.0.1/8 set interfaces ethernet eth1 vif 201 traffic policy in FW_PLAN set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set service dns static host-name WAN inet 10.215.168.1 set service firewall FW logging level config set service firewall FW logging outputs fast set service firewall FW mode inline queue FW_Q set service firewall FW ruleset file 'running://test-performance.rules' set service firewall FW stream bypass action accept set conntrack offload-flag set service firewall FW stream bypass mark 129834765 set service firewall FW stream bypass mask 129834765 set service firewall FW stream bypass set-connmark set service firewall FW validator-timeout 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set traffic policy FW_PLAN rule 1 action enqueue FW_Q set traffic policy FW_PLAN rule 2 action enqueue FW_Q set traffic policy FW_PLAN rule 2 selector FW_SEL_ENQUEUE set traffic queue FW_Q elements 1 set traffic selector FW_SEL_ENQUEUE rule 1 not connmark 129834765
Step 4: Ping IP address 20.0.0.2
from DUT1
:
admin@DUT1$ ping 20.0.0.2 count 1 size 56 timeout 1Show output
PING 20.0.0.2 (20.0.0.2) 56(84) bytes of data. 64 bytes from 20.0.0.2: icmp_seq=1 ttl=63 time=0.542 ms --- 20.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.542/0.542/0.542/0.000 ms
Step 5: Ping IP address 40.0.0.2
from DUT2
:
admin@DUT2$ ping 40.0.0.2 count 1 size 56 timeout 1Show output
PING 40.0.0.2 (40.0.0.2) 56(84) bytes of data. 64 bytes from 40.0.0.2: icmp_seq=1 ttl=63 time=0.435 ms --- 40.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.435/0.435/0.435/0.000 ms
Step 6: Initiate a background bandwidth test from DUT2
to DUT1
. The control is returned back allowing to perform another tasks while test is running
admin@DUT1$ monitor test performance server port 5001 admin@DUT2$ monitor test performance client 40.0.0.2 duration 10 port 5001 parallel 1
Step 7: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Skipping test network performance traffic).+$Show output
10/07/2024-11:55:47.107523 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:36906 -> 40.0.0.2:5001 10/07/2024-11:55:47.108349 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:36912 -> 40.0.0.2:5001
Step 8: Run command system conntrack show
at DUT0
and check if output matches the following regular expressions:
(?m)^tcp\s+.*src=20.0.0.2 dst=40.0.0.2.+dport=5001.+OFFLOAD.+mark=129834765.*$Show output
icmp 1 29 src=40.0.0.2 dst=20.0.0.2 type=8 code=0 id=416 packets=1 bytes=84 src=20.0.0.2 dst=40.0.0.2 type=0 code=0 id=416 packets=1 bytes=84 (Sc: not-bypass) mark=0 use=1 tcp 6 src=20.0.0.2 dst=40.0.0.2 sport=36906 dport=5001 packets=7 bytes=537 src=40.0.0.2 dst=20.0.0.2 sport=5001 dport=36906 packets=7 bytes=376 [ASSURED] [OFFLOAD, packets=4 bytes=336 packets=4 bytes=211] mark=129834765 use=2 tcp 6 src=20.0.0.2 dst=40.0.0.2 sport=36912 dport=5001 packets=52906 bytes=79353253 src=40.0.0.2 dst=20.0.0.2 sport=5001 dport=36912 packets=2217 bytes=117908 [ASSURED] [OFFLOAD, packets=52895 bytes=79341052 packets=2215 bytes=117796] mark=129834765 use=2 icmp 1 29 src=20.0.0.2 dst=40.0.0.2 type=8 code=0 id=99 packets=1 bytes=84 src=40.0.0.2 dst=20.0.0.2 type=0 code=0 id=99 packets=1 bytes=84 (Sc: not-bypass) mark=0 use=1 conntrack v1.4.7 (conntrack-tools): 4 flow entries have been shown.
Step 9: Stop the current bandwidth test between DUT2
and DUT1
Step 10: Run command file copy http://10.215.168.1/~robot/test-performance-udp.rules running:// force
at DUT0
and expect this output:
Show output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 133 100 133 0 0 4116 0 --:--:-- --:--:-- --:--:-- 4156
Step 11: Run command file show running://test-performance-udp.rules
at DUT0
and expect this output:
Show output
alert udp any any -> any 5001 (msg: "Skipping test network performance UDP traffic"; bypass; flow: established, to_server; sid: 41;)
Step 12: Modify the following configuration lines in DUT0
:
set service firewall FW ruleset file 'running://test-performance-udp.rules'
Step 13: Initiate a background bandwidth test from DUT2
to DUT1
. The control is returned back allowing to perform another tasks while test is running
admin@DUT1$ monitor test performance server port 5001 admin@DUT2$ monitor test performance client 40.0.0.2 duration 10 udp port 5001 parallel 1
Step 14: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Skipping test network performance UDP traffic).+$Show output
10/07/2024-11:55:47.107523 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:36906 -> 40.0.0.2:5001 10/07/2024-11:55:47.108349 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:36912 -> 40.0.0.2:5001 10/07/2024-11:55:49.075495 [**] [1:40:0] Skipping test network performance traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:37674 -> 40.0.0.2:5001 10/07/2024-11:55:49.077201 [**] [1:41:0] Skipping test network performance UDP traffic [**] [Classification: (null)] [Priority: 3] {UDP} 20.0.0.2:35931 -> 40.0.0.2:5001 10/07/2024-11:55:49.088277 [**] [1:41:0] Skipping test network performance UDP traffic [**] [Classification: (null)] [Priority: 3] {UDP} 20.0.0.2:35931 -> 40.0.0.2:5001
Step 15: Run command system conntrack show
at DUT0
and check if output matches the following regular expressions:
(?m)^udp\s+.*src=20.0.0.2 dst=40.0.0.2.+dport=5001.+OFFLOAD.+mark=129834765.*$Show output
tcp 6 src=20.0.0.2 dst=40.0.0.2 sport=37674 dport=5001 packets=8 bytes=607 src=40.0.0.2 dst=20.0.0.2 sport=5001 dport=37674 packets=7 bytes=376 [ASSURED] [OFFLOAD, packets=5 bytes=406 packets=4 bytes=211] mark=129834765 use=2 udp 17 src=20.0.0.2 dst=40.0.0.2 sport=35931 dport=5001 packets=16 bytes=22172 src=40.0.0.2 dst=20.0.0.2 sport=5001 dport=35931 packets=1 bytes=32 [OFFLOAD, packets=13 bytes=19188 packets=0 bytes=0] mark=129834765 use=2 conntrack v1.4.7 (conntrack-tools): 2 flow entries have been shown.
Step 16: Stop the current bandwidth test between DUT2
and DUT1
Test Traffic Early Dropping
Description
Builds a scenario with three DUTs and a simple ruleset to drop TCP traffic between DUT1 and DUT2. Such traffic must pass through port 5000 for the rule to match. Later, XDP is queried to check if packets are being dropped at the specified interface.
The contents of the rule file are:
drop tcp any any -> any 5000 (msg: "Dropping TCP performance test traffic"; sid: 1; flow: established, to_server;)
This rule allows the connection to be established and traffic to be dropped later.
Scenario
Step 1: Run command file copy http://10.215.168.1/~robot/drop-performance.rules running://drop-performance.rules force
at DUT0
and expect this output:
Show output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 200 100 200 0 0 34381 0 --:--:-- --:--:-- --:--:-- 40000
Step 2: Run command file show running://drop-performance.rules
at DUT0
and expect this output:
Show output
drop tcp any any -> any 5000 (msg: "Dropping TCP performance test traffic"; sid: 1; flow: established, to_server;) drop udp any any -> any 5001 (msg: "Dropping UDP performance test traffic"; sid: 2;)
Step 3: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth0 traffic nat source rule 1 address masquerade set interfaces ethernet eth1 vif 101 address 40.0.0.1/8 set interfaces ethernet eth1 vif 101 traffic policy in FW_PLAN set interfaces ethernet eth1 vif 201 address 20.0.0.1/8 set interfaces ethernet eth1 vif 201 traffic policy in FW_PLAN set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set service dns static host-name WAN inet 10.215.168.1 set service firewall FW logging level config set service firewall FW logging outputs fast set service firewall FW mode inline queue FW_Q set service firewall FW ruleset file 'running://drop-performance.rules' set service firewall FW stream bypass action drop set xdp-early-drop eth1 set service firewall FW validator-timeout 20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set traffic policy FW_PLAN rule 1 action enqueue FW_Q set traffic queue FW_Q elements 1
Step 4: Ping IP address 20.0.0.2
from DUT1
:
admin@DUT1$ ping 20.0.0.2 count 1 size 56 timeout 1Show output
PING 20.0.0.2 (20.0.0.2) 56(84) bytes of data. 64 bytes from 20.0.0.2: icmp_seq=1 ttl=63 time=0.609 ms --- 20.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.609/0.609/0.609/0.000 ms
Step 5: Ping IP address 40.0.0.2
from DUT2
:
admin@DUT2$ ping 40.0.0.2 count 1 size 56 timeout 1Show output
PING 40.0.0.2 (40.0.0.2) 56(84) bytes of data. 64 bytes from 40.0.0.2: icmp_seq=1 ttl=63 time=0.704 ms --- 40.0.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.704/0.704/0.704/0.000 ms
Step 6: Initiate a bandwidth test from DUT2
to DUT1
admin@DUT1$ monitor test performance server port 5000 admin@DUT2$ monitor test performance client 40.0.0.2 duration 10 port 5000 parallel 1Expect this output in
DUT2
:^C- - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr iperf3: interrupt - the client has terminated admin@osdx$
Step 7: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Dropping TCP performance test traffic).+$Show output
10/07/2024-11:56:07.402381 [Drop] [**] [1:1:0] Dropping TCP performance test traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:51642 -> 40.0.0.2:5000
Step 8: Run command service firewall FW show early-drop-stats eth1
at DUT0
and check if output matches the following regular expressions:
yes\s+201\s+\d+\s+[1-9]\d*\s+[1-9]\d*Show output
------------------------------------------------------------------------ src dst src port dst port tcp vlan_0 vlan_1 pkts bytes ------------------------------------------------------------------------ 20.0.0.2 40.0.0.2 51642 5000 yes 201 0 9 731 40.0.0.2 20.0.0.2 5000 51642 yes 201 0 0 0
Step 9: Run command interfaces ethernet eth1 monitor xdp-stats times 1
at DUT0
and expect this output:
Show output
Pin path: /sys/fs/bpf/eth1 Period of 0.250113s ending at 1728302171.135134 XDP_DROP 10 pkts ( 4 pps) 0 KiB ( 0 Mbits/s) XDP_PASS 14 pkts ( 4 pps) 1 KiB ( 0 Mbits/s) XDP_TX 0 pkts ( 0 pps) 0 KiB ( 0 Mbits/s) XDP_REDIRECT 0 pkts ( 0 pps) 0 KiB ( 0 Mbits/s)
Step 10: Initiate a bandwidth test from DUT2
to DUT1
admin@DUT1$ monitor test performance server port 5001 admin@DUT2$ monitor test performance client 40.0.0.2 duration 30 udp port 5001 parallel 1Expect this output in
DUT2
:^C- - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams iperf3: interrupt - the client has terminated admin@osdx$
Step 11: Run command service firewall FW show logging fast | tail
at DUT0
and check if output matches the following regular expressions:
(?m)^.+(Dropping UDP performance test traffic).+$Show output
10/07/2024-11:56:07.402381 [Drop] [**] [1:1:0] Dropping TCP performance test traffic [**] [Classification: (null)] [Priority: 3] {TCP} 20.0.0.2:51642 -> 40.0.0.2:5000 10/07/2024-11:56:11.292336 [Drop] [**] [1:2:0] Dropping UDP performance test traffic [**] [Classification: (null)] [Priority: 3] {UDP} 20.0.0.2:34246 -> 40.0.0.2:5001
Step 12: Run command service firewall FW show early-drop-stats eth1
at DUT0
and check if output matches the following regular expressions:
yes\s+201\s+\d+\s+[1-9]\d*\s+[1-9]\d*Show output
------------------------------------------------------------------------ src dst src port dst port tcp vlan_0 vlan_1 pkts bytes ------------------------------------------------------------------------ 40.0.0.2 20.0.0.2 5001 34246 no 201 0 0 0 20.0.0.2 40.0.0.2 51642 5000 yes 201 0 12 905 40.0.0.2 20.0.0.2 5000 51642 yes 201 0 0 0 20.0.0.2 40.0.0.2 34246 5001 no 201 0 0 0
Step 13: Run command interfaces ethernet eth1 monitor xdp-stats times 1
at DUT0
and expect this output:
Show output
Pin path: /sys/fs/bpf/eth1 Period of 0.250139s ending at 1728302174.968152 XDP_DROP 12 pkts ( 0 pps) 0 KiB ( 0 Mbits/s) XDP_PASS 33 pkts ( 0 pps) 2 KiB ( 0 Mbits/s) XDP_TX 0 pkts ( 0 pps) 0 KiB ( 0 Mbits/s) XDP_REDIRECT 0 pkts ( 0 pps) 0 KiB ( 0 Mbits/s)