OSDx Documentation Logo
v4.2.10.1
  • About
  • Releases

First steps

  • Setting Up
  • Quick Start
  • Licensing
  • CLI Overview
  • Configuration Management

Admin Guide

  • System Administration
  • Articles
  • Troubleshooting
  • Examples
    • Basic
    • Interfaces
    • Protocols
    • Service
    • System
    • Tech Support
    • Traffic
      • Control
      • Group
      • Policy
      • Selector
        • Rule
        • Selector
      • Zone
    • User-Level
    • Vpn

Command reference

  • Configuration commands
  • Operational commands
OSDx Documentation
  • Examples
  • Traffic
  • Selector
  • Rule
  • Vlan
  • Link-Out
  • View page source

Link-Out

The following scenario shows how to filter packets based on VLAN attributes using traffic selectors. The policy is attached to DUT0’s link-out hook; DUT0 originates the traffic and DUT0’s journal is checked.

Test VLAN Selector (802.1Q)

Description

A traffic policy MATCH_VLAN is configured on DUT0’s parent interface (eth0) in the link-out hook. The traffic selector VLAN filters packets with ether-type 8021q and vlan id 100, logging matches with prefix MATCH_VLAN. A ping through the 802.1Q VLAN verifies that the selector correctly identifies tagged packets.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.437 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.437/0.437/0.437/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 10:37:44.657633 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:dcad:beff:feef:6c00 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x132
Jun 03 10:37:44.669607 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:dcad:beff:feef:6c00 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x132
Jun 03 10:37:44.669642 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:00 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 10:37:44.669651 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=45291 DF PROTO=ICMP TYPE=8 CODE=0 ID=94 SEQ=1
Jun 03 10:37:44.725618 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:dcad:beff:feef:6c00 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x132

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.680 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.680/0.680/0.680/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 04 04:06:00.330085 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:02a0:26ff:fee3:014c DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 04 04:06:00.690125 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:e3:01:4c IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 04 04:06:00.690324 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=10392 DF PROTO=ICMP TYPE=8 CODE=0 ID=1071 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.687 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.687/0.687/0.687/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 23:41:53.840843 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe99:3597 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 23:41:54.240855 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:99:35:97 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 23:41:54.241073 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=27641 DF PROTO=ICMP TYPE=8 CODE=0 ID=699 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0p0 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.979 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.979/0.979/0.979/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0p0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 10:21:08.087754 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:0e:03:39 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 10:21:08.088207 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=53566 DF PROTO=ICMP TYPE=8 CODE=0 ID=82 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth4 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.536 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.536/0.536/0.536/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth4.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 21:30:54.421428 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xb2
Jun 03 21:30:54.469021 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff04:001c LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 21:30:54.705038 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:04:00:1c IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 21:30:54.705141 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3254 DF PROTO=ICMP TYPE=8 CODE=0 ID=474 SEQ=1
Jun 03 21:30:54.733023 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xb2

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.451 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.451/0.451/0.451/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 08:51:47.827440 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=40:64:dc:38:ed:02 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 08:51:47.827501 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=26513 DF PROTO=ICMP TYPE=8 CODE=0 ID=35 SEQ=1

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 8: Set the following configuration in DUT0 :

set interfaces ethernet eth5 mtu 1390
set interfaces ethernet eth5 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth5 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 9: Set the following configuration in DUT1 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 10: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.451 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.451/0.451/0.451/0.000 ms

Step 11: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth5.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 08:51:59.055461 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142
Jun 03 08:51:59.107461 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff38:ed07 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 08:51:59.443463 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142
Jun 03 08:51:59.995458 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=40:64:dc:38:ed:07 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 08:51:59.995519 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=28612 DF PROTO=ICMP TYPE=8 CODE=0 ID=36 SEQ=1
Jun 03 08:52:00.115420 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed07 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142
Jun 03 08:52:00.127413 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed07 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142
Jun 03 08:52:00.527414 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed07 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.582 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.582/0.582/0.582/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 22:06:01.531976 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:8b:00:96 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 22:06:01.532085 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39536 DF PROTO=ICMP TYPE=8 CODE=0 ID=341 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=3.28 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.279/3.279/3.279/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 19:06:52.532767 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 19:06:52.956782 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:16:00:16 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 19:06:52.956915 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=46474 DF PROTO=ICMP TYPE=8 CODE=0 ID=99 SEQ=1
Jun 03 19:06:53.068775 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth2 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.640 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.640/0.640/0.640/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth2.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 14:28:37.215656 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 14:28:37.435648 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff54:5516 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 14:28:37.555659 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 14:28:37.627661 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:54:55:16 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 14:28:37.627789 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=50877 DF PROTO=ICMP TYPE=8 CODE=0 ID=394 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.660 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.660/0.660/0.660/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 12:47:03.906371 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe18:00ca DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 12:47:04.410377 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe18:00ca DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 12:47:04.455341 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:18:00:ca IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 12:47:04.455586 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=62431 DF PROTO=ICMP TYPE=8 CODE=0 ID=224 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.772 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.772/0.772/0.772/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 12:05:38.865510 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 12:05:38.929489 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff12:003b LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 12:05:39.369562 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:12:00:3b IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 12:05:39.369778 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=61174 DF PROTO=ICMP TYPE=8 CODE=0 ID=157 SEQ=1

Test VLAN Selector (QinQ)

Description

A traffic policy MATCH_VLAN is configured on DUT0’s parent interface (eth0) in the link-out hook. The traffic selector VLAN filters packets with ether-type 8021ad, vlan id 100, vlan protocol 8021q and vlan inner-id 200, logging matches with prefix MATCH_VLAN. A ping through the QinQ VLAN verifies that the selector correctly identifies double-tagged packets.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.385 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.385/0.385/0.385/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 10:37:53.876483 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:de:ad:be:ef:6c:00:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.654 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.654/0.654/0.654/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 04 04:06:22.738168 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:00:a0:26:e3:01:4c:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.707 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.707/0.707/0.707/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 23:42:22.901404 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:99:35:97:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0p0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0p0 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.943 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.943/0.943/0.943/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0p0.*
Show output
Jun 03 10:21:37.639507 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 MAC=de:ad:be:ef:6c:10:00:a0:26:0e:03:39:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth4 vif 100 ethertype 802.1ad
set interfaces ethernet eth4 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.464 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.464/0.464/0.464/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth4.*
Show output
Jun 03 21:31:09.321246 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 MAC=de:ad:be:ef:6c:10:00:a0:26:04:00:1c:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.439 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.439/0.439/0.439/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 08:52:12.027570 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:40:64:dc:38:ed:02:81:00

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 8: Set the following configuration in DUT0 :

set interfaces ethernet eth5 mtu 1390
set interfaces ethernet eth5 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth5 vif 100 ethertype 802.1ad
set interfaces ethernet eth5 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 9: Set the following configuration in DUT1 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 10: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.541 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.541/0.541/0.541/0.000 ms

Step 11: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth5.*
Show output
Jun 03 08:52:24.095564 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 MAC=de:ad:be:ef:6c:11:40:64:dc:38:ed:07:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.603 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.603/0.603/0.603/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 22:06:15.199828 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:8b:00:96:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=2.66 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.664/2.664/2.664/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 19:07:14.548226 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:16:00:16:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth2 vif 100 ethertype 802.1ad
set interfaces ethernet eth2 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.586 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.586/0.586/0.586/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth2.*
Show output
Jun 03 14:28:59.351214 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 MAC=de:ad:be:ef:6c:10:00:a0:26:54:55:16:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.678 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.678/0.678/0.678/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 12:47:28.574892 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:18:00:ca:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.718 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.718/0.718/0.718/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 12:06:07.185578 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:12:00:3b:81:00

Test VLAN Selector (QinQ) With PCP Matches

Description

A traffic policy MATCH_VLAN is configured on DUT0’s parent interface (eth0) in the link-out hook. The traffic selector VLAN filters QinQ packets matching vlan id 100, vlan pcp 3, vlan inner-id 200 and vlan inner-pcp 5. Traffic policies OUTER_COS and INNER_COS on the outer and inner VLAN sub-interfaces set the required PCP values.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth0 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.966 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.966/0.966/0.966/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 10:38:04.841476 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:de:ad:be:ef:6c:00:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth0 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.658 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.658/0.658/0.658/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 04 04:06:47.222171 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:00:a0:26:e3:01:4c:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.686 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.686/0.686/0.686/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 23:42:47.681078 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:99:35:97:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0p0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0p0 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth0p0 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth0p0 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.03 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.034/1.034/1.034/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0p0.*
Show output
Jun 03 10:22:09.597012 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 MAC=de:ad:be:ef:6c:10:00:a0:26:0e:03:39:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth4 vif 100 ethertype 802.1ad
set interfaces ethernet eth4 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth4 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth4 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.457 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.457/0.457/0.457/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth4.*
Show output
Jun 03 21:31:25.877454 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 MAC=de:ad:be:ef:6c:10:00:a0:26:04:00:1c:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth0 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.411 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.411/0.411/0.411/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 08:52:35.183375 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:40:64:dc:38:ed:02:81:00

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 8: Set the following configuration in DUT0 :

set interfaces ethernet eth5 mtu 1390
set interfaces ethernet eth5 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth5 vif 100 ethertype 802.1ad
set interfaces ethernet eth5 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth5 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth5 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 9: Set the following configuration in DUT1 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 10: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.539 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.539/0.539/0.539/0.000 ms

Step 11: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth5.*
Show output
Jun 03 08:52:47.899412 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 MAC=de:ad:be:ef:6c:11:40:64:dc:38:ed:07:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.598 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.598/0.598/0.598/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 22:06:28.971981 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:8b:00:96:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.559 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.559/0.559/0.559/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 19:07:33.676606 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:16:00:16:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth2 vif 100 ethertype 802.1ad
set interfaces ethernet eth2 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth2 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth2 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.595 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.595/0.595/0.595/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth2.*
Show output
Jun 03 14:29:28.243580 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 MAC=de:ad:be:ef:6c:10:00:a0:26:54:55:16:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.770 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.770/0.770/0.770/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 12:47:53.740241 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:18:00:ca:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 traffic policy link-out OUTER_COS
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 5
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy OUTER_COS rule 1 set cos-mark 3
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan pcp 3
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.808 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.808/0.808/0.808/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 12:06:33.945314 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:12:00:3b:81:00

Test VLAN Selector (802.1Q) With Not Vlan Id

Description

The traffic selector VLAN uses not vlan id 100. Traffic is sent through VLAN 101, so the negated condition matches (the packet’s VLAN id differs from 100), causing rule 1 to match and log with prefix MATCH_VLAN.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.361 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.361/0.361/0.361/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 10:38:13.938517 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:00 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 10:38:13.938545 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=49793 DF PROTO=ICMP TYPE=8 CODE=0 ID=97 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.708 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.708/0.708/0.708/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 04 04:07:11.546141 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:02a0:26ff:fee3:014c DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 04 04:07:11.918124 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:02a0:26ff:fee3:014c DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 04 04:07:13.098172 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:e3:01:4c IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 04 04:07:13.098395 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=14324 DF PROTO=ICMP TYPE=8 CODE=0 ID=1074 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.773 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.773/0.773/0.773/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 23:43:09.757120 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe99:3597 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 23:43:09.901092 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe99:3597 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 23:43:10.669304 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:99:35:97 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 23:43:10.669505 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=37875 DF PROTO=ICMP TYPE=8 CODE=0 ID=702 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0p0 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.03 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.033/1.033/1.033/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0p0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 10:22:37.871182 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:0e:03:39 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 10:22:37.871617 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=58580 DF PROTO=ICMP TYPE=8 CODE=0 ID=85 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth4 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.488 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.488/0.488/0.488/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth4.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 21:31:39.456659 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xb2
Jun 03 21:31:39.632659 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff04:001c LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 21:31:39.684659 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xb2
Jun 03 21:31:39.735453 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:04:00:1c IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 21:31:39.735511 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=12668 DF PROTO=ICMP TYPE=8 CODE=0 ID=477 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.436 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.436/0.436/0.436/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 08:52:57.819205 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed02 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142
Jun 03 08:52:57.835193 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed02 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142
Jun 03 08:52:57.903237 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=40:64:dc:38:ed:02 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 08:52:57.903295 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=38136 DF PROTO=ICMP TYPE=8 CODE=0 ID=41 SEQ=1

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 8: Set the following configuration in DUT0 :

set interfaces ethernet eth5 mtu 1390
set interfaces ethernet eth5 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth5 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 9: Set the following configuration in DUT1 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 10: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.540 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.540/0.540/0.540/0.000 ms

Step 11: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth5.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 08:53:09.219192 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142
Jun 03 08:53:09.367205 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=40:64:dc:38:ed:07 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 08:53:09.367275 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39287 DF PROTO=ICMP TYPE=8 CODE=0 ID=42 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.611 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.611/0.611/0.611/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 22:06:42.603540 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:8b:00:96 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 22:06:42.603652 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=45752 DF PROTO=ICMP TYPE=8 CODE=0 ID=344 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.678 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.678/0.678/0.678/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 19:07:49.425063 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 19:07:49.797069 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff16:0016 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 19:07:49.853080 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:16:00:16 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 19:07:49.853195 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=49163 DF PROTO=ICMP TYPE=8 CODE=0 ID=102 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth2 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.629 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.629/0.629/0.629/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth2.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 14:29:49.235402 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 14:29:49.343393 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff54:5516 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 14:29:49.547411 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:54:55:16 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 14:29:49.547546 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=65181 DF PROTO=ICMP TYPE=8 CODE=0 ID=397 SEQ=1
Jun 03 14:29:49.575392 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.732 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.732/0.732/0.732/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 12:48:16.902788 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe18:00ca DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 12:48:17.175673 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:18:00:ca IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 12:48:17.175889 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3699 DF PROTO=ICMP TYPE=8 CODE=0 ID=227 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 101 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 101 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.641 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.641/0.641/0.641/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 12:07:05.225684 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2
Jun 03 12:07:05.225888 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:12:00:3b IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 12:07:05.225957 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3949 DF PROTO=ICMP TYPE=8 CODE=0 ID=160 SEQ=1

Test VLAN Selector (802.1Q) With Not Vlan PCP

Description

The traffic selector VLAN uses vlan id 100 and not vlan pcp 3. A traffic policy SET_COS configured on the VLAN sub-interface sets the PCP value to 5, so the negated condition matches (the packet’s PCP differs from 3), causing rule 1 to match and log with prefix MATCH_VLAN.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 address 10.0.0.1/24
set interfaces ethernet eth0 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.372 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.372/0.372/0.372/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 10:38:22.778587 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:00 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 10:38:22.778632 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=51329 DF PROTO=ICMP TYPE=8 CODE=0 ID=98 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 address 10.0.0.1/24
set interfaces ethernet eth0 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.656 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.656/0.656/0.656/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 04 04:07:36.754349 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:02a0:26ff:fee3:014c DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 04 04:07:37.286328 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:02a0:26ff:fee3:014c DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 04 04:07:38.274366 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:e3:01:4c IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 04 04:07:38.274568 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=19827 DF PROTO=ICMP TYPE=8 CODE=0 ID=1075 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.720 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.720/0.720/0.720/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 23:43:34.112899 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe99:3597 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 03 23:43:34.601023 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:99:35:97 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 23:43:34.601252 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=38805 DF PROTO=ICMP TYPE=8 CODE=0 ID=703 SEQ=1
Jun 03 23:43:34.692907 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe99:3597 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0p0 vif 100 address 10.0.0.1/24
set interfaces ethernet eth0p0 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.01 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.009/1.009/1.009/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0p0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 10:23:06.832824 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:0e:03:39 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 10:23:06.833326 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=60007 DF PROTO=ICMP TYPE=8 CODE=0 ID=86 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth4 vif 100 address 10.0.0.1/24
set interfaces ethernet eth4 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.493 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.493/0.493/0.493/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth4.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 21:31:54.964891 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff04:001c LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0 COS=0x5
Jun 03 21:31:54.976885 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xb2 COS=0x5
Jun 03 21:31:55.280501 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:04:00:1c IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 21:31:55.280553 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=14166 DF PROTO=ICMP TYPE=8 CODE=0 ID=478 SEQ=1
Jun 03 21:31:55.404891 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xb2 COS=0x5

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 address 10.0.0.1/24
set interfaces ethernet eth0 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.424 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.424/0.424/0.424/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 08:53:20.695534 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=40:64:dc:38:ed:02 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 08:53:20.695593 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=40085 DF PROTO=ICMP TYPE=8 CODE=0 ID=43 SEQ=1

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 8: Set the following configuration in DUT0 :

set interfaces ethernet eth5 mtu 1390
set interfaces ethernet eth5 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth5 vif 100 address 10.0.0.1/24
set interfaces ethernet eth5 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 9: Set the following configuration in DUT1 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 10: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.465 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.465/0.465/0.465/0.000 ms

Step 11: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth5.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 08:53:32.351498 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142 COS=0x5
Jun 03 08:53:32.703543 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff38:ed07 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0 COS=0x5
Jun 03 08:53:33.151546 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142 COS=0x5
Jun 03 08:53:33.723538 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed07 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142 COS=0x5
Jun 03 08:53:33.739495 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed07 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142 COS=0x5
Jun 03 08:53:34.111536 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed07 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142 COS=0x5
Jun 03 08:53:34.111575 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=fe80:0000:0000:0000:4264:dcff:fe38:ed07 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x142 COS=0x5
Jun 03 08:53:34.863540 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=40:64:dc:38:ed:07 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 08:53:34.863613 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=40550 DF PROTO=ICMP TYPE=8 CODE=0 ID=44 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.572 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.572/0.572/0.572/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 22:06:55.899586 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:8b:00:96 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 22:06:55.899694 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=46899 DF PROTO=ICMP TYPE=8 CODE=0 ID=345 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.699 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.699/0.699/0.699/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 19:08:05.780627 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 03 19:08:06.172690 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:16:00:16 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 19:08:06.172813 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=52806 DF PROTO=ICMP TYPE=8 CODE=0 ID=103 SEQ=1
Jun 03 19:08:06.312647 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff16:0016 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0 COS=0x5

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth2 vif 100 address 10.0.0.1/24
set interfaces ethernet eth2 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.677 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.677/0.677/0.677/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth2.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 14:30:11.515713 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 03 14:30:12.115760 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:54:55:16 IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 14:30:12.115905 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3661 DF PROTO=ICMP TYPE=8 CODE=0 ID=398 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.779 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.779/0.779/0.779/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 12:48:41.963258 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe18:00ca DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 03 12:48:42.151248 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=fe80:0000:0000:0000:02a0:26ff:fe18:00ca DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 03 12:48:42.916207 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:18:00:ca IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 12:48:42.916418 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=7827 DF PROTO=ICMP TYPE=8 CODE=0 ID=228 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 address 10.0.0.1/24
set interfaces ethernet eth1 vif 100 traffic policy link-out SET_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic policy SET_COS rule 1 set cos-mark 5
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan pcp 3
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.769 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.769/0.769/0.769/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth1.*10.0.0.1.*10.0.0.2.*
Show output
Jun 03 12:07:28.319806 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 03 12:07:28.595795 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0xf2 COS=0x5
Jun 03 12:07:28.807871 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=00:a0:26:12:00:3b IPSRC=10.0.0.1 MACDST=00:00:00:00:00:00 IPDST=10.0.0.2
Jun 03 12:07:28.808099 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=5507 DF PROTO=ICMP TYPE=8 CODE=0 ID=161 SEQ=1
Jun 03 12:07:28.851799 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ff12:003b LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0 COS=0x5

Test VLAN Selector (QinQ) With Not Vlan Inner-id

Description

The traffic selector VLAN uses vlan id 100, vlan protocol 8021q and not vlan inner-id 200. Traffic is sent through C-VLAN 201, so the negated condition matches (the packet’s inner VLAN id differs from 200), causing rule 1 to match and log with prefix MATCH_VLAN.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.596 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.596/0.596/0.596/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 10:38:32.259529 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:00:81:00
Jun 03 10:38:32.259590 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:de:ad:be:ef:6c:00:81:00
Jun 03 10:38:32.299516 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=33:33:00:00:00:16:de:ad:be:ef:6c:00:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.680 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.680/0.680/0.680/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 04 04:08:00.702029 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=33:33:00:00:00:16:00:a0:26:e3:01:4c:81:00
Jun 04 04:08:01.154045 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:e3:01:4c:81:00
Jun 04 04:08:01.154253 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:00:a0:26:e3:01:4c:81:00
Jun 04 04:08:01.234066 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=33:33:00:00:00:16:00:a0:26:e3:01:4c:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.692 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.692/0.692/0.692/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 23:43:57.985397 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:00:00:00:16:00:a0:26:99:35:97:81:00
Jun 03 23:43:58.559901 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:99:35:97:81:00
Jun 03 23:43:58.560188 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:99:35:97:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0p0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0p0 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.21 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.206/1.206/1.206/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0p0.*
Show output
Jun 03 10:23:35.323735 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:0e:03:39:81:00
Jun 03 10:23:35.324297 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0p0 MAC=de:ad:be:ef:6c:10:00:a0:26:0e:03:39:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth4 vif 100 ethertype 802.1ad
set interfaces ethernet eth4 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.409 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.409/0.409/0.409/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth4.*
Show output
Jun 03 21:32:09.900857 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 MAC=33:33:00:00:00:16:00:a0:26:04:00:1c:81:00
Jun 03 21:32:10.016841 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 MAC=33:33:ff:04:00:1c:00:a0:26:04:00:1c:81:00
Jun 03 21:32:10.219639 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:04:00:1c:81:00
Jun 03 21:32:10.219684 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth4 MAC=de:ad:be:ef:6c:10:00:a0:26:04:00:1c:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.457 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.457/0.457/0.457/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 08:53:45.503047 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=33:33:00:00:00:16:40:64:dc:38:ed:02:81:00
Jun 03 08:53:45.547032 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=ff:ff:ff:ff:ff:ff:40:64:dc:38:ed:02:81:00
Jun 03 08:53:45.547100 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:40:64:dc:38:ed:02:81:00
Jun 03 08:53:45.599049 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=33:33:00:00:00:16:40:64:dc:38:ed:02:81:00

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0

Step 8: Set the following configuration in DUT0 :

set interfaces ethernet eth5 mtu 1390
set interfaces ethernet eth5 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth5 vif 100 ethertype 802.1ad
set interfaces ethernet eth5 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 9: Set the following configuration in DUT1 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 10: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.515 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.515/0.515/0.515/0.000 ms

Step 11: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth5.*
Show output
Jun 03 08:53:57.623049 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 MAC=33:33:00:00:00:16:40:64:dc:38:ed:07:81:00
Jun 03 08:53:57.991067 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 MAC=ff:ff:ff:ff:ff:ff:40:64:dc:38:ed:07:81:00
Jun 03 08:53:57.991139 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 MAC=de:ad:be:ef:6c:11:40:64:dc:38:ed:07:81:00
Jun 03 08:53:58.271095 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 MAC=33:33:ff:38:ed:07:40:64:dc:38:ed:07:81:00
Jun 03 08:53:58.559085 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth5 MAC=33:33:00:00:00:16:40:64:dc:38:ed:07:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.662 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.662/0.662/0.662/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 22:07:09.951430 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:8b:00:96:81:00
Jun 03 22:07:09.951553 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:8b:00:96:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.627 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.627/0.627/0.627/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 19:08:22.953005 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:00:00:00:16:00:a0:26:16:00:16:81:00
Jun 03 19:08:23.089007 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:ff:16:00:16:00:a0:26:16:00:16:81:00
Jun 03 19:08:23.481023 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:16:00:16:81:00
Jun 03 19:08:23.481141 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:16:00:16:81:00
Jun 03 19:08:23.549008 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:00:00:00:16:00:a0:26:16:00:16:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth2 vif 100 ethertype 802.1ad
set interfaces ethernet eth2 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.692 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.692/0.692/0.692/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth2.*
Show output
Jun 03 14:30:33.399047 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 MAC=33:33:00:00:00:16:00:a0:26:54:55:16:81:00
Jun 03 14:30:33.619042 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 MAC=33:33:00:00:00:16:00:a0:26:54:55:16:81:00
Jun 03 14:30:33.803036 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 MAC=33:33:ff:54:55:16:00:a0:26:54:55:16:81:00
Jun 03 14:30:34.015101 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:54:55:16:81:00
Jun 03 14:30:34.015227 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth2 MAC=de:ad:be:ef:6c:10:00:a0:26:54:55:16:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.730 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.730/0.730/0.730/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 12:49:07.318912 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:00:00:00:16:00:a0:26:18:00:ca:81:00
Jun 03 12:49:07.918900 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:00:00:00:16:00:a0:26:18:00:ca:81:00
Jun 03 12:49:08.110946 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:18:00:ca:81:00
Jun 03 12:49:08.111134 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:18:00:ca:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth1 vif 100 ethertype 802.1ad
set interfaces ethernet eth1 vif 100 vif-c 201 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-id 200
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 201 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.631 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.631/0.631/0.631/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jun 03 12:07:52.501416 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:ff:12:00:3b:00:a0:26:12:00:3b:81:00
Jun 03 12:07:52.501678 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:00:00:00:16:00:a0:26:12:00:3b:81:00
Jun 03 12:07:53.165454 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=33:33:00:00:00:16:00:a0:26:12:00:3b:81:00
Jun 03 12:07:53.165681 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=ff:ff:ff:ff:ff:ff:00:a0:26:12:00:3b:81:00
Jun 03 12:07:53.165748 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth1 MAC=de:ad:be:ef:6c:10:00:a0:26:12:00:3b:81:00

Test VLAN Selector (QinQ) With Not Vlan Inner-pcp

Description

The traffic selector VLAN uses vlan id 100, vlan protocol 8021q, vlan inner-id 200 and not vlan inner-pcp 5. A traffic policy INNER_COS configured on the inner VLAN sub-interface sets the inner PCP value to 3, so the negated condition matches (the packet’s inner PCP differs from 5), causing rule 1 to match and log with prefix MATCH_VLAN.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set interfaces ethernet eth0 vif 100 vif-c 200 traffic policy local-out INNER_COS
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy INNER_COS rule 1 set cos-mark 3
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-pcp 5
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.0.0.2 from DUT0:

admin@DUT0$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.613 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.613/0.613/0.613/0.000 ms

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 10:38:42.213831 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:00:81:00
Jun 03 10:38:42.213897 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=de:ad:be:ef:6c:10:de:ad:be:ef:6c:00:81:00
Jun 03 10:38:42.269842 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=33:33:00:00:00:16:de:ad:be:ef:6c:00:81:00
Jun 03 10:38:42.281833 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=33:33:00:00:00:16:de:ad:be:ef:6c:00:81:00

Test VLAN Selector (802.1Q) With Not Vlan Protocol

Description

The traffic selector VLAN uses not vlan protocol ip. An arping (ARP) is sent: since ARP is not IP, the negated condition matches and rule 1 logs with prefix MATCH_VLAN.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021q
set traffic selector VLAN rule 1 not vlan protocol ip
set traffic selector VLAN rule 1 vlan id 100

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Send an ARP ping from DUT0 to IP address 10.0.0.2:

admin@DUT0$ arping 10.0.0.2 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.2 from 10.0.0.1 eth0.100
Unicast reply from 10.0.0.2 [DE:AD:BE:EF:6C:10]  0.756ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 10:38:51.580837 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:00 IPSRC=10.0.0.1 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.2
Jun 03 10:38:51.688849 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 SRC=fe80:0000:0000:0000:dcad:beff:feef:6c00 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0 MARK=0x132

Test VLAN Selector (QinQ) With Not Vlan Inner-protocol

Description

The traffic selector VLAN uses not vlan inner-protocol ip. An arping (ARP) is sent: since ARP is not IP, the negated condition matches and rule 1 logs with prefix MATCH_VLAN.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-out MATCH_VLAN
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.1/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set traffic policy MATCH_VLAN rule 1 log prefix MATCH_VLAN
set traffic policy MATCH_VLAN rule 1 selector VLAN
set traffic selector VLAN rule 1 ether-type 8021ad
set traffic selector VLAN rule 1 not vlan inner-protocol ip
set traffic selector VLAN rule 1 vlan id 100
set traffic selector VLAN rule 1 vlan inner-id 200
set traffic selector VLAN rule 1 vlan protocol 8021q

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 vif 100 ethertype 802.1ad
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Send an ARP ping from DUT0 to IP address 10.0.0.2:

admin@DUT0$ arping 10.0.0.2 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.2 from 10.0.0.1 eth0.100.200
Unicast reply from 10.0.0.2 [DE:AD:BE:EF:6C:10]  0.753ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

Step 4: Run the command system journal show | grep MATCH_VLAN on DUT0 and check whether the output matches the following regular expressions:

.*MATCH_VLAN-1.*eth0.*
Show output
Jun 03 10:39:00.858637 osdx kernel: [MATCH_VLAN-1] ACCEPT IN= OUT=eth0 MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:00:81:00

Previous Next

© Copyright 2026, Teldat.

Built with Sphinx using a theme provided by Read the Docs.