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-In
  • View page source

Link-In

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

Test VLAN Selector (802.1Q) Link-In

Description

A traffic policy MATCH_VLAN is configured on DUT0’s parent interface (eth0) in the link-in hook. The traffic selector VLAN filters packets with ether-type 8021q and vlan id 100, logging matches with prefix MATCH_VLAN. DUT1 sends a ping through the 802.1Q VLAN; DUT0 sees it on link-in.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.653/0.653/0.653/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.2.*10.0.0.1.*
Show output
Jun 03 10:39:09.416028 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 10:39:09.420269 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=de:ad:be:ef:6c:00:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=29755 DF PROTO=ICMP TYPE=8 CODE=0 ID=484 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.626/0.626/0.626/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.2.*10.0.0.1.*
Show output
Jun 04 04:02:25.211133 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 04 04:02:25.531181 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 04 04:02:25.531404 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=57700 DF PROTO=ICMP TYPE=8 CODE=0 ID=1183 SEQ=1
Jun 04 04:02:26.570003 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=57803 DF PROTO=ICMP TYPE=8 CODE=0 ID=1184 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.587/0.587/0.587/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.2.*10.0.0.1.*
Show output
Jun 03 23:38:08.022061 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 23:38:08.025379 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=27394 DF PROTO=ICMP TYPE=8 CODE=0 ID=991 SEQ=1
Jun 03 23:38:08.086005 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 23:38:09.108514 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=27747 DF PROTO=ICMP TYPE=8 CODE=0 ID=992 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.677/1.677/1.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.*eth0p0.*10.0.0.2.*10.0.0.1.*
Show output
Jun 03 10:25:29.169067 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd 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
Jun 03 10:25:29.303153 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 10:25:29.303616 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=00:a0:26:0e:03:39:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=22537 DF PROTO=ICMP TYPE=8 CODE=0 ID=207 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.293/0.293/0.293/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.2.*10.0.0.1.*
Show output
Jun 03 21:28:33.545496 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 21:28:33.545687 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=57392 DF PROTO=ICMP TYPE=8 CODE=0 ID=1049 SEQ=1
Jun 03 21:28:34.590836 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=57565 DF PROTO=ICMP TYPE=8 CODE=0 ID=1050 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.812/0.812/0.812/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.2.*10.0.0.1.*
Show output
Jun 03 08:55:19.383369 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 08:55:19.383429 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=40:64:dc:38:ed:02:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=23006 DF PROTO=ICMP TYPE=8 CODE=0 ID=190 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-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.556/0.556/0.556/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.2.*10.0.0.1.*
Show output
Jun 03 08:55:31.691368 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:11 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 08:55:31.691430 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=24292 DF PROTO=ICMP TYPE=8 CODE=0 ID=192 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.851/0.851/0.851/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.2.*10.0.0.1.*
Show output
Jun 03 22:03:57.742086 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 22:03:57.742346 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:8b:00:96:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=51360 DF PROTO=ICMP TYPE=8 CODE=0 ID=918 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.710/0.710/0.710/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.2.*10.0.0.1.*
Show output
Jun 03 19:09:33.974069 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 19:09:34.294056 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 19:09:34.742118 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 19:09:34.742338 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=11048 DF PROTO=ICMP TYPE=8 CODE=0 ID=1145 SEQ=1
Jun 03 19:09:35.809305 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=11271 DF PROTO=ICMP TYPE=8 CODE=0 ID=1146 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.621/0.621/0.621/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.2.*10.0.0.1.*
Show output
Jun 03 14:24:50.118331 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 14:24:50.342305 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 14:24:50.534307 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 14:24:50.535746 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=54150 DF PROTO=ICMP TYPE=8 CODE=0 ID=430 SEQ=1
Jun 03 14:24:51.605053 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=54162 DF PROTO=ICMP TYPE=8 CODE=0 ID=431 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.483/0.483/0.483/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.2.*10.0.0.1.*
Show output
Jun 03 12:43:20.804816 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 12:43:20.964730 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 12:43:20.966727 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=52679 DF PROTO=ICMP TYPE=8 CODE=0 ID=461 SEQ=1
Jun 03 12:43:22.031641 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=53066 DF PROTO=ICMP TYPE=8 CODE=0 ID=462 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.418/0.418/0.418/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.2.*10.0.0.1.*
Show output
Jun 03 12:01:40.396627 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 12:01:40.398972 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=52849 DF PROTO=ICMP TYPE=8 CODE=0 ID=521 SEQ=1
Jun 03 12:01:41.441559 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=53087 DF PROTO=ICMP TYPE=8 CODE=0 ID=522 SEQ=1

Test VLAN Selector (QinQ) Link-In

Description

A traffic policy MATCH_VLAN is configured on DUT0’s parent interface (eth0) in the link-in hook. The traffic selector VLAN filters packets with ether-type 8021ad, vlan id 100, vlan protocol 8021q and vlan inner-id 200. DUT1 sends a ping through the QinQ VLAN; DUT0 sees the double-tagged packet on link-in.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.736/0.736/0.736/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:39:20.001409 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=de:ad:be:ef:6c:00:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.683/0.683/0.683/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:02:49.012603 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00
Jun 04 04:02:50.046415 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.368/0.368/0.368/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:38:32.383051 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00
Jun 03 23:38:33.462821 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.142/1.142/1.142/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:25:56.644109 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=00:a0:26:0e:03:39:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.491/0.491/0.491/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:28:49.065765 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jun 03 21:28:50.125959 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.331/1.331/1.331/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:55:42.695272 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=40:64:dc:38:ed:02:de:ad:be:ef:6c:10: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-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.474/0.474/0.474/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:55:54.971302 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.839/0.839/0.839/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:04:12.334686 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:8b:00:96:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.543/0.543/0.543/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:09:52.350984 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:09:53.424654 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.705/0.705/0.705/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:25:19.506892 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:25:20.584771 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.392/0.392/0.392/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:43:45.930426 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jun 03 12:43:47.002505 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.775/0.775/0.775/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:02:08.911694 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jun 03 12:02:09.973531 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00

Test VLAN Selector (QinQ) With PCP Matches Link-In

Description

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 DUT1’s outer and inner VLAN sub-interfaces set the required PCP values, which DUT0 matches on link-in.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.722/0.722/0.722/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:39:29.857991 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=de:ad:be:ef:6c:00:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.714/0.714/0.714/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:03:14.703075 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.507/0.507/0.507/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:38:58.150634 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00
Jun 03 23:38:59.212157 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.505/1.505/1.505/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:26:25.887293 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=00:a0:26:0e:03:39:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.417/0.417/0.417/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:29:05.698824 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jun 03 21:29:06.749836 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.915/0.915/0.915/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:56:06.987504 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=40:64:dc:38:ed:02:de:ad:be:ef:6c:10: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-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth1 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 10: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.614/0.614/0.614/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:56:19.215512 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:81:00
Jun 03 08:56:20.519521 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 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 22:04:26.704581 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:8b:00:96:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.365/0.365/0.365/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:10:11.160299 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:10:12.237393 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.463/0.463/0.463/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:25:44.316166 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:25:45.384361 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.721/0.721/0.721/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:44:11.570920 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jun 03 12:44:13.649246 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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-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 traffic policy link-out OUTER_COS
set interfaces ethernet eth0 vif 100 vif-c 200 address 10.0.0.2/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 OUTER_COS rule 1 set cos-mark 3

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.498/0.498/0.498/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:02:34.407490 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jun 03 12:02:35.469911 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00

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

Description

The traffic selector VLAN uses not vlan id 100. DUT1 sends through VLAN 101, so the negated condition matches on DUT0’s link-in hook (the packet’s VLAN id differs from 100), causing rule 1 to 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-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.791/0.791/0.791/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.2.*10.0.0.1.*
Show output
Jun 03 10:39:39.551203 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 10:39:39.552856 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=de:ad:be:ef:6c:00:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=36470 DF PROTO=ICMP TYPE=8 CODE=0 ID=487 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 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.*eth0.*10.0.0.2.*10.0.0.1.*
Show output
Jun 04 04:03:37.569519 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 04 04:03:37.697419 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 04 04:03:38.738184 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 04 04:03:38.738358 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=62879 DF PROTO=ICMP TYPE=8 CODE=0 ID=1190 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.117/1.117/1.117/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.2.*10.0.0.1.*
Show output
Jun 03 23:39:24.210423 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 23:39:24.210871 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=42822 DF PROTO=ICMP TYPE=8 CODE=0 ID=998 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.443/1.443/1.443/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.2.*10.0.0.1.*
Show output
Jun 03 10:26:54.177111 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 10:26:54.177659 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=00:a0:26:0e:03:39:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=35524 DF PROTO=ICMP TYPE=8 CODE=0 ID=210 SEQ=1
Jun 03 10:26:54.186077 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:86:dd SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ffef:6c10 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.362/0.362/0.362/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.2.*10.0.0.1.*
Show output
Jun 03 21:29:20.477017 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 21:29:20.730729 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 21:29:20.730921 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=64977 DF PROTO=ICMP TYPE=8 CODE=0 ID=1055 SEQ=1
Jun 03 21:29:21.778726 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=131 DF PROTO=ICMP TYPE=8 CODE=0 ID=1056 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.614/0.614/0.614/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.2.*10.0.0.1.*
Show output
Jun 03 08:56:32.459689 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 08:56:32.459728 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=40:64:dc:38:ed:02:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=30654 DF PROTO=ICMP TYPE=8 CODE=0 ID=199 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-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.852/0.852/0.852/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.2.*10.0.0.1.*
Show output
Jun 03 08:56:44.711692 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:11 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 08:56:44.711732 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=33052 DF PROTO=ICMP TYPE=8 CODE=0 ID=201 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.920/0.920/0.920/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.2.*10.0.0.1.*
Show output
Jun 03 22:04:39.435655 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:86:dd SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ffef:6c10 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 22:04:39.499151 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 22:04:39.499419 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:8b:00:96:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=56306 DF PROTO=ICMP TYPE=8 CODE=0 ID=921 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.547/0.547/0.547/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.2.*10.0.0.1.*
Show output
Jun 03 19:10:28.196318 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 19:10:28.612413 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 19:10:28.612622 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=19502 DF PROTO=ICMP TYPE=8 CODE=0 ID=1151 SEQ=1
Jun 03 19:10:29.714587 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=19504 DF PROTO=ICMP TYPE=8 CODE=0 ID=1152 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.527/0.527/0.527/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.2.*10.0.0.1.*
Show output
Jun 03 14:26:07.067706 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 14:26:07.131726 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 14:26:07.259799 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 14:26:08.091725 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 14:26:08.095898 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=63944 DF PROTO=ICMP TYPE=8 CODE=0 ID=438 SEQ=1
Jun 03 14:26:09.168027 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=64675 DF PROTO=ICMP TYPE=8 CODE=0 ID=439 SEQ=1
Jun 03 14:26:12.270226 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=65389 DF PROTO=ICMP TYPE=8 CODE=0 ID=440 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.458/0.458/0.458/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.2.*10.0.0.1.*
Show output
Jun 03 12:44:37.279609 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 12:44:37.279921 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=61764 DF PROTO=ICMP TYPE=8 CODE=0 ID=467 SEQ=1
Jun 03 12:44:38.339899 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=62142 DF PROTO=ICMP TYPE=8 CODE=0 ID=468 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.491/0.491/0.491/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.2.*10.0.0.1.*
Show output
Jun 03 12:03:03.079130 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 12:03:03.081065 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=60026 DF PROTO=ICMP TYPE=8 CODE=0 ID=529 SEQ=1
Jun 03 12:03:04.134562 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=60358 DF PROTO=ICMP TYPE=8 CODE=0 ID=530 SEQ=1

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

Description

The traffic selector VLAN uses vlan id 100 and not vlan pcp 3. A traffic policy SET_COS on DUT1’s VLAN sub-interface sets the PCP value to 5, so the negated condition matches on DUT0’s link-in hook, causing rule 1 to 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-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.947/0.947/0.947/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.2.*10.0.0.1.*
Show output
Jun 03 10:39:49.030344 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 10:39:49.034094 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=de:ad:be:ef:6c:00:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=36847 DF PROTO=ICMP TYPE=8 CODE=0 ID=488 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

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

Step 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.2.*10.0.0.1.*
Show output
Jun 04 04:04:01.474072 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 04 04:04:01.794034 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 04 04:04:01.858041 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 04 04:04:01.861941 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=65252 DF PROTO=ICMP TYPE=8 CODE=0 ID=1191 SEQ=1
Jun 04 04:04:02.908245 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=65485 DF PROTO=ICMP TYPE=8 CODE=0 ID=1192 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.397/0.397/0.397/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.2.*10.0.0.1.*
Show output
Jun 03 23:39:48.755589 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 23:39:48.756887 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=44099 DF PROTO=ICMP TYPE=8 CODE=0 ID=999 SEQ=1
Jun 03 23:39:49.796860 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=44648 DF PROTO=ICMP TYPE=8 CODE=0 ID=1000 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.288/1.288/1.288/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.2.*10.0.0.1.*
Show output
Jun 03 10:27:21.596702 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd 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
Jun 03 10:27:21.834170 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 10:27:21.836180 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=00:a0:26:0e:03:39:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=37402 DF PROTO=ICMP TYPE=8 CODE=0 ID=211 SEQ=1
Jun 03 10:27:21.980436 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:86:dd SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ffef:6c10 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 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:

.*MATCH_VLAN-1.*eth4.*10.0.0.2.*10.0.0.1.*
Show output
Jun 03 21:29:37.079304 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 21:29:37.079501 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=2418 DF PROTO=ICMP TYPE=8 CODE=0 ID=1057 SEQ=1
Jun 03 21:29:38.135794 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=2774 DF PROTO=ICMP TYPE=8 CODE=0 ID=1058 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.689/0.689/0.689/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.2.*10.0.0.1.*
Show output
Jun 03 08:56:54.915289 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 08:56:54.915331 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=40:64:dc:38:ed:02:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=35701 DF PROTO=ICMP TYPE=8 CODE=0 ID=202 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-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 10: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.463/0.463/0.463/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.2.*10.0.0.1.*
Show output
Jun 03 08:57:07.555286 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:11 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 08:57:07.555326 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=38013 DF PROTO=ICMP TYPE=8 CODE=0 ID=204 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 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.2.*10.0.0.1.*
Show output
Jun 03 22:04:52.830224 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:86:dd SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ffef:6c10 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
Jun 03 22:04:52.862465 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 22:04:52.862862 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:8b:00:96:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=59327 DF PROTO=ICMP TYPE=8 CODE=0 ID=922 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 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:

.*MATCH_VLAN-1.*eth1.*10.0.0.2.*10.0.0.1.*
Show output
Jun 03 19:10:45.556157 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 19:10:45.748093 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 19:10:46.580159 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 19:10:46.580378 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=22967 DF PROTO=ICMP TYPE=8 CODE=0 ID=1153 SEQ=1
Jun 03 19:10:47.639771 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=23359 DF PROTO=ICMP TYPE=8 CODE=0 ID=1154 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.527/0.527/0.527/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.2.*10.0.0.1.*
Show output
Jun 03 14:26:37.751911 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 14:26:37.755243 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=1897 DF PROTO=ICMP TYPE=8 CODE=0 ID=442 SEQ=1
Jun 03 14:26:38.849593 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=1946 DF PROTO=ICMP TYPE=8 CODE=0 ID=443 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.510/0.510/0.510/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.2.*10.0.0.1.*
Show output
Jun 03 12:45:02.304382 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 12:45:02.304596 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 12:45:02.656327 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 12:45:02.656637 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=1259 DF PROTO=ICMP TYPE=8 CODE=0 ID=469 SEQ=1
Jun 03 12:45:03.740274 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=1681 DF PROTO=ICMP TYPE=8 CODE=0 ID=470 SEQ=1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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 SET_COS rule 1 set cos-mark 5

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.571/0.571/0.571/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.2.*10.0.0.1.*
Show output
Jun 03 12:03:29.935496 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=00:00:00:00:00:00 IPDST=10.0.0.1
Jun 03 12:03:29.935728 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=61437 DF PROTO=ICMP TYPE=8 CODE=0 ID=532 SEQ=1
Jun 03 12:03:30.997616 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:08:00 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=62029 DF PROTO=ICMP TYPE=8 CODE=0 ID=533 SEQ=1

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

Description

The traffic selector VLAN uses vlan id 100, vlan protocol 8021q and not vlan inner-id 200. DUT1 sends through C-VLAN 201, so the negated condition matches on DUT0’s link-in hook (the packet’s inner VLAN id differs from 200), causing rule 1 to 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-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.872/1.872/1.872/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:39:58.900742 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 10:39:58.904743 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=de:ad:be:ef:6c:00:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.604/0.604/0.604/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:04:25.364950 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 04 04:04:25.365351 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00
Jun 04 04:04:26.405223 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.812/0.812/0.812/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:40:14.388121 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 23:40:14.516053 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 23:40:14.516325 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00
Jun 03 23:40:15.570747 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.284/1.284/1.284/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:27:50.266754 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 10:27:50.267868 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=00:a0:26:0e:03:39:de:ad:be:ef:6c:10:81:00
Jun 03 10:27:50.292053 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.527/0.527/0.527/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:29:52.095772 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 21:29:52.095961 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jun 03 21:29:53.138831 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.856/0.856/0.856/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:57:19.635384 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 08:57:19.635440 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=40:64:dc:38:ed:02:de:ad:be:ef:6c:10: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-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.690/0.690/0.690/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:57:32.547427 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:11:81:00
Jun 03 08:57:32.547466 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 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.*eth1.*
Show output
Jun 03 22:05:07.078714 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 22:05:07.079057 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:8b:00:96:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.363/0.363/0.363/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:11:03.700873 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:03.700983 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:04.144920 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:04.720931 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:04.721194 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:05.776336 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.775/0.775/0.775/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:27:00.944277 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:27:01.616237 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 14:27:01.619537 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:27:02.679559 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.516/0.516/0.516/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:45:27.057119 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 12:45:27.057403 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jun 03 12:45:28.141020 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.819/0.819/0.819/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:03:54.735638 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 12:03:54.749188 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 12:03:54.863531 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 12:03:55.183604 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 12:03:55.407569 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 12:03:55.409191 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jun 03 12:03:56.481208 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00

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

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 on DUT1’s inner VLAN sub-interface sets the inner PCP value to 3, so the negated condition matches on DUT0’s link-in hook, causing rule 1 to 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-in 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-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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.834/0.834/0.834/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:40:08.493343 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 10:40:08.493492 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=de:ad:be:ef:6c:00:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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-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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.633/0.633/0.633/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:04:48.795439 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 04 04:04:49.845104 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 04 04:04:49.846126 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.613/1.613/1.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.*eth1.*
Show output
Jun 03 23:40:40.198267 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 23:40:40.200837 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.546/1.546/1.546/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:28:18.607801 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 10:28:18.608249 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=00:a0:26:0e:03:39:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.395/0.395/0.395/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:30:08.484310 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 21:30:08.484526 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jun 03 21:30:09.523644 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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-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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 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 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:57:44.363429 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 08:57:44.363470 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=40:64:dc:38:ed:02:de:ad:be:ef:6c:10: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-in 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 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 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 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 3

Step 10: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.352/0.352/0.352/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:57:55.831416 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:11:81:00
Jun 03 08:57:55.831475 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:81:00
Jun 03 08:57:57.087471 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=40:64:dc:38:ed:07:de:ad:be:ef:6c:11:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.648/0.648/0.648/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:05:21.501908 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 22:05:21.502182 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:8b:00:96:de:ad:be:ef:6c:10:81:00
Jun 03 22:05:21.580212 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.688/0.688/0.688/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:11:22.609539 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:22.624465 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:22.809471 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:22.833448 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:23.505507 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:23.857526 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:23.860476 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:11:24.954962 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.386/0.386/0.386/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:27:22.930969 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 14:27:23.952098 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 14:27:23.954971 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:27:25.009520 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.750/0.750/0.750/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:45:52.945415 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 12:45:52.946481 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jun 03 12:45:53.010479 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 12:45:53.976914 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 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

Step 3: Ping the IP address 10.0.0.1 from DUT1:

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.520/0.520/0.520/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:04:22.848320 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 12:04:23.870743 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 12:04:23.872306 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jun 03 12:04:24.909407 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00

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

Description

The traffic selector VLAN uses not vlan protocol ip. DUT1 sends an arping (ARP): since ARP is not IP, the negated condition matches on DUT0’s link-in hook 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-in 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [DE:AD:BE:EF:6C:00]  1.043ms
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:40:18.490998 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:E3:01:4C]  0.884ms
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 04 04:05:12.763783 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 04 04:05:12.923659 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 04 04:05:13.692106 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:99:35:97]  0.891ms
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.*eth1.*
Show output
Jun 03 23:41:07.922452 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:0E:03:39]  1.171ms
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.*eth0p0.*
Show output
Jun 03 10:28:46.153588 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1
Jun 03 10:28:46.323454 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd 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
Jun 03 10:28:46.323846 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:86:dd SRC=0000:0000:0000:0000:0000:0000:0000:0000 DST=ff02:0000:0000:0000:0000:0001:ffef:6c10 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:04:00:1C]  0.754ms
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.*eth4.*
Show output
Jun 03 21:30:24.803871 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [40:64:DC:38:ED:02]  0.747ms
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 08:58:08.067576 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.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-in 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 not vlan protocol ip
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: Send an ARP ping from DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth1.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth1.100
Unicast reply from 10.0.0.1 [40:64:DC:38:ED:07]  0.772ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

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.*
Show output
Jun 03 08:58:20.607540 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:11 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:8B:00:96]  0.951ms
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.*eth1.*
Show output
Jun 03 22:05:34.546187 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:16:00:16]  0.990ms
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.*eth1.*
Show output
Jun 03 19:11:41.342155 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 19:11:41.406090 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 19:11:43.090419 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:54:55:16]  0.862ms
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.*eth2.*
Show output
Jun 03 14:27:54.321513 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:18:00:CA]  0.923ms
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.*eth1.*
Show output
Jun 03 12:46:18.301140 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100
Unicast reply from 10.0.0.1 [00:A0:26:12:00:3B]  0.893ms
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.*eth1.*
Show output
Jun 03 12:04:47.249631 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 12:04:47.249840 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:86:dd SRC=fe80:0000:0000:0000:dcad:beff:feef:6c10 DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=116 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=143 CODE=0
Jun 03 12:04:48.674297 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= ARP HTYPE=1 PTYPE=0x0800 OPCODE=1 MACSRC=de:ad:be:ef:6c:10 IPSRC=10.0.0.2 MACDST=ff:ff:ff:ff:ff:ff IPDST=10.0.0.1

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

Description

The traffic selector VLAN uses not vlan inner-protocol ip. DUT1 sends an arping (ARP): since ARP is not IP, the negated condition matches on DUT0’s link-in hook 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-in 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [DE:AD:BE:EF:6C:00]  0.946ms
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:40:28.074088 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:E3:01:4C]  0.896ms
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 04 04:05:38.167870 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:99:35:97]  0.959ms
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.*eth1.*
Show output
Jun 03 23:41:30.816823 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0p0 mtu 1390
set interfaces ethernet eth0p0 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:0E:03:39]  1.237ms
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.*eth0p0.*
Show output
Jun 03 10:29:15.007916 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth4 mtu 1390
set interfaces ethernet eth4 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:04:00:1C]  0.788ms
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.*eth4.*
Show output
Jun 03 21:30:40.245176 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 mtu 1390
set interfaces ethernet eth0 traffic policy link-in 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [40:64:DC:38:ED:02]  0.969ms
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 08:58:31.703499 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10: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-in 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 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 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: Send an ARP ping from DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth1.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth1.100.200
Unicast reply from 10.0.0.1 [40:64:DC:38:ED:07]  17.339ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

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.*
Show output
Jun 03 08:58:43.931499 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:11:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:8B:00:96]  0.832ms
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.*eth1.*
Show output
Jun 03 22:05:48.033136 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jun 03 22:05:48.092266 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:16:00:16]  0.855ms
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.*eth1.*
Show output
Jun 03 19:12:00.014935 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 19:12:01.573607 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth2 mtu 1390
set interfaces ethernet eth2 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:54:55:16]  0.981ms
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.*eth2.*
Show output
Jun 03 14:28:14.729240 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:28:14.741126 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:28:15.529193 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:28:15.625179 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 14:28:16.575758 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:18:00:CA]  0.901ms
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.*eth1.*
Show output
Jun 03 12:46:42.087095 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth1 mtu 1390
set interfaces ethernet eth1 traffic policy link-in 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 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 DUT1 to IP address 10.0.0.1:

admin@DUT1$ arping 10.0.0.1 interface eth0.100.200 timeout 5 count 1
Show output
ARPING 10.0.0.1 from 10.0.0.2 eth0.100.200
Unicast reply from 10.0.0.1 [00:A0:26:12:00:3B]  0.882ms
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.*eth1.*
Show output
Jun 03 12:05:13.783905 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 12:05:13.847848 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jun 03 12:05:14.874321 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Previous Next

© Copyright 2026, Teldat.

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