OSDx Documentation Logo
v4.2.10.3
  • 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.671 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.671/0.671/0.671/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
Jul 24 17:22:10.246759 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
Jul 24 17:22:10.248146 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=55683 DF PROTO=ICMP TYPE=8 CODE=0 ID=901 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.401 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.401/0.401/0.401/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
Jul 24 07:19:39.056009 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
Jul 24 07:19:39.439914 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
Jul 24 07:19:39.440228 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=63097 DF PROTO=ICMP TYPE=8 CODE=0 ID=82 SEQ=1
Jul 24 07:19:40.483091 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=63436 DF PROTO=ICMP TYPE=8 CODE=0 ID=83 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.647 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.647/0.647/0.647/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
Jul 24 22:30:55.543965 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
Jul 24 22:30:55.544252 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=60049 DF PROTO=ICMP TYPE=8 CODE=0 ID=1038 SEQ=1
Jul 24 22:30:56.611112 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=60757 DF PROTO=ICMP TYPE=8 CODE=0 ID=1039 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.67 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.672/1.672/1.672/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
Jul 24 19:52:29.050727 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
Jul 24 19:52:29.210636 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
Jul 24 19:52:29.276795 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
Jul 24 19:52:29.278663 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=18055 DF PROTO=ICMP TYPE=8 CODE=0 ID=578 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.202 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.202/0.202/0.202/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
Jul 24 20:50:11.683011 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
Jul 24 20:50:11.683207 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=30790 DF PROTO=ICMP TYPE=8 CODE=0 ID=1113 SEQ=1
Jul 24 20:50:12.739631 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=30955 DF PROTO=ICMP TYPE=8 CODE=0 ID=1114 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.801 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.801/0.801/0.801/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
Jul 24 07:03:05.271650 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
Jul 24 07:03:05.271686 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=12801 DF PROTO=ICMP TYPE=8 CODE=0 ID=63 SEQ=1

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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.533 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.533/0.533/0.533/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
Jul 24 07:03:18.539629 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
Jul 24 07:03:18.539673 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=14398 DF PROTO=ICMP TYPE=8 CODE=0 ID=65 SEQ=1
Jul 24 07:03:20.775645 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=14579 DF PROTO=ICMP TYPE=8 CODE=0 ID=66 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.895 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.895/0.895/0.895/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
Jul 24 18:37:40.450141 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
Jul 24 18:37:40.468614 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
Jul 24 18:37:40.471166 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=62735 DF PROTO=ICMP TYPE=8 CODE=0 ID=709 SEQ=1
Jul 24 18:37:40.547171 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=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

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.387 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.387/0.387/0.387/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
Jul 24 18:25:09.499746 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
Jul 24 18:25:09.627779 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
Jul 24 18:25:10.523783 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
Jul 24 18:25:10.524055 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=630 DF PROTO=ICMP TYPE=8 CODE=0 ID=733 SEQ=1
Jul 24 18:25:11.597731 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=1330 DF PROTO=ICMP TYPE=8 CODE=0 ID=734 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.374 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.374/0.374/0.374/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
Jul 24 23:45:38.767883 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
Jul 24 23:45:38.768114 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=14001 DF PROTO=ICMP TYPE=8 CODE=0 ID=936 SEQ=1
Jul 24 23:45:39.816255 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=14625 DF PROTO=ICMP TYPE=8 CODE=0 ID=937 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.384 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.384/0.384/0.384/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
Jul 24 19:56:00.843570 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
Jul 24 19:56:01.163510 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
Jul 24 19:56:01.163816 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=35333 DF PROTO=ICMP TYPE=8 CODE=0 ID=560 SEQ=1
Jul 24 19:56:02.242706 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=35953 DF PROTO=ICMP TYPE=8 CODE=0 ID=561 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.647 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.647/0.647/0.647/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
Jul 24 22:07:23.961765 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
Jul 24 22:07:23.961965 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=2592 DF PROTO=ICMP TYPE=8 CODE=0 ID=1081 SEQ=1
Jul 24 22:07:24.025698 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
Jul 24 22:07:24.249689 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
Jul 24 22:07:24.999841 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=2681 DF PROTO=ICMP TYPE=8 CODE=0 ID=1082 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.611 ms

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

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

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jul 24 17:22:18.782157 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.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:

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jul 24 07:20:07.937011 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00
Jul 24 07:20:08.985612 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.632 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.632/0.632/0.632/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
Jul 24 22:31:19.685390 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00
Jul 24 22:31:20.752259 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.11 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.105/1.105/1.105/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
Jul 24 19:52:58.319169 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.477 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.477/0.477/0.477/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
Jul 24 20:50:27.378762 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jul 24 20:50:28.422518 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=0.464 ms

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

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

(?i).*MATCH_VLAN-1.*eth0.*
Show output
Jul 24 07:03:32.119418 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 plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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.645 ms

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.806/0.806/0.806/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
Jul 24 18:37:54.212017 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.603 ms

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

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

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jul 24 18:25:28.556851 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:25:29.641303 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.391 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.391/0.391/0.391/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
Jul 24 23:46:00.707455 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jul 24 23:46:01.774879 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.519 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.519/0.519/0.519/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
Jul 24 19:56:25.488773 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jul 24 19:56:26.557621 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.734 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.734/0.734/0.734/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
Jul 24 22:07:51.789916 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jul 24 22:07:52.865516 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.517 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.517/0.517/0.517/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
Jul 24 17:22:29.503662 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=2.25 ms

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.416/0.416/0.416/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
Jul 24 22:31:44.739951 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00
Jul 24 22:31:45.782004 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.16 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.163/1.163/1.163/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
Jul 24 19:53:28.133920 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.477 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.477/0.477/0.477/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
Jul 24 20:50:43.896263 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jul 24 20:50:44.967027 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.681 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.681/0.681/0.681/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
Jul 24 07:03:58.887721 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 plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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.469 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.469/0.469/0.469/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
Jul 24 07:04:11.687735 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.857 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.857/0.857/0.857/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
Jul 24 18:38:08.839490 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.517 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.517/0.517/0.517/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
Jul 24 18:25:46.486829 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:25:48.589831 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.412 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.412/0.412/0.412/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
Jul 24 23:46:22.730089 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jul 24 23:46:23.760337 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.468 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.468/0.468/0.468/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
Jul 24 19:56:50.321536 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jul 24 19:56:52.399216 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.511 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.511/0.511/0.511/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
Jul 24 22:08:17.088093 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jul 24 22:08:18.141650 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.540 ms

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

Step 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
Jul 24 17:22:38.266311 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
Jul 24 17:22:38.267711 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=58999 DF PROTO=ICMP TYPE=8 CODE=0 ID=904 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.436 ms

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

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

.*MATCH_VLAN-1.*eth0.*10.0.0.2.*10.0.0.1.*
Show output
Jul 24 07:21:01.894275 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
Jul 24 07:21:02.246239 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
Jul 24 07:21:02.278214 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
Jul 24 07:21:03.270290 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
Jul 24 07:21:03.270580 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=4576 DF PROTO=ICMP TYPE=8 CODE=0 ID=88 SEQ=1
Jul 24 07:21:04.347059 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=4784 DF PROTO=ICMP TYPE=8 CODE=0 ID=89 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.393 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.393/0.393/0.393/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
Jul 24 22:32:08.465123 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
Jul 24 22:32:08.465493 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=2516 DF PROTO=ICMP TYPE=8 CODE=0 ID=1044 SEQ=1
Jul 24 22:32:09.525398 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=2659 DF PROTO=ICMP TYPE=8 CODE=0 ID=1045 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.39 ms

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

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

.*MATCH_VLAN-1.*eth0p0.*10.0.0.2.*10.0.0.1.*
Show output
Jul 24 19:53:56.052780 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
Jul 24 19:53:56.148386 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
Jul 24 19:53:56.193682 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
Jul 24 19:53:56.196628 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=25453 DF PROTO=ICMP TYPE=8 CODE=0 ID=581 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 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.594 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.594/0.594/0.594/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
Jul 24 20:50:59.620117 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
Jul 24 20:50:59.620306 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=35504 DF PROTO=ICMP TYPE=8 CODE=0 ID=1119 SEQ=1
Jul 24 20:51:00.680449 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=35576 DF PROTO=ICMP TYPE=8 CODE=0 ID=1120 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.911 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.911/0.911/0.911/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
Jul 24 07:04:24.811334 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
Jul 24 07:04:24.811386 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=20809 DF PROTO=ICMP TYPE=8 CODE=0 ID=73 SEQ=1

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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.874 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.874/0.874/0.874/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
Jul 24 07:04:37.519362 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
Jul 24 07:04:37.519403 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=22029 DF PROTO=ICMP TYPE=8 CODE=0 ID=75 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.833 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.833/0.833/0.833/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
Jul 24 18:38:21.579530 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=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
Jul 24 18:38:21.719854 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
Jul 24 18:38:21.720093 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=1764 DF PROTO=ICMP TYPE=8 CODE=0 ID=712 SEQ=1
Jul 24 18:38:21.835547 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

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.475 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.475/0.475/0.475/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
Jul 24 18:26:05.080975 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
Jul 24 18:26:05.416962 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
Jul 24 18:26:05.736979 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
Jul 24 18:26:05.960953 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
Jul 24 18:26:05.961214 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=8820 DF PROTO=ICMP TYPE=8 CODE=0 ID=739 SEQ=1
Jul 24 18:26:07.047924 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=9044 DF PROTO=ICMP TYPE=8 CODE=0 ID=740 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.599 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.599/0.599/0.599/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
Jul 24 23:46:44.130341 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
Jul 24 23:46:44.130730 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=21995 DF PROTO=ICMP TYPE=8 CODE=0 ID=942 SEQ=1
Jul 24 23:46:45.187845 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=22301 DF PROTO=ICMP TYPE=8 CODE=0 ID=943 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.374 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.374/0.374/0.374/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
Jul 24 19:57:14.478153 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
Jul 24 19:57:14.478394 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=43420 DF PROTO=ICMP TYPE=8 CODE=0 ID=566 SEQ=1
Jul 24 19:57:15.508862 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=43827 DF PROTO=ICMP TYPE=8 CODE=0 ID=567 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.425 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.425/0.425/0.425/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
Jul 24 22:08:44.386224 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
Jul 24 22:08:44.386470 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=13573 DF PROTO=ICMP TYPE=8 CODE=0 ID=1089 SEQ=1
Jul 24 22:08:45.451654 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=14281 DF PROTO=ICMP TYPE=8 CODE=0 ID=1090 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.730 ms

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

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

.*MATCH_VLAN-1.*eth0.*10.0.0.2.*10.0.0.1.*
Show output
Jul 24 17:22:49.648425 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
Jul 24 17:22:49.652311 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=59079 DF PROTO=ICMP TYPE=8 CODE=0 ID=905 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.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:

.*MATCH_VLAN-1.*eth0.*10.0.0.2.*10.0.0.1.*
Show output
Jul 24 07:21:31.647223 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
Jul 24 07:21:31.647529 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=6924 DF PROTO=ICMP TYPE=8 CODE=0 ID=90 SEQ=1
Jul 24 07:21:31.743241 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
Jul 24 07:21:31.743336 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
Jul 24 07:21:33.743437 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=7100 DF PROTO=ICMP TYPE=8 CODE=0 ID=91 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=1.18 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.182/1.182/1.182/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
Jul 24 22:32:33.493580 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
Jul 24 22:32:33.494043 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=7759 DF PROTO=ICMP TYPE=8 CODE=0 ID=1047 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.48 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.475/1.475/1.475/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
Jul 24 19:54:23.946948 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
Jul 24 19:54:23.947499 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=31680 DF PROTO=ICMP TYPE=8 CODE=0 ID=582 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 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.485 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.485/0.485/0.485/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
Jul 24 20:51:15.052919 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
Jul 24 20:51:15.053110 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=38132 DF PROTO=ICMP TYPE=8 CODE=0 ID=1121 SEQ=1
Jul 24 20:51:16.103369 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=38801 DF PROTO=ICMP TYPE=8 CODE=0 ID=1122 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.771 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.771/0.771/0.771/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
Jul 24 07:04:48.695367 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
Jul 24 07:04:48.695403 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=22231 DF PROTO=ICMP TYPE=8 CODE=0 ID=76 SEQ=1

Step 5: Clean all the configuration in DUT0:

delete
set system login user admin authentication plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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.315 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.315/0.315/0.315/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
Jul 24 07:05:01.139325 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
Jul 24 07:05:01.139374 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=24598 DF PROTO=ICMP TYPE=8 CODE=0 ID=77 SEQ=1
Jul 24 07:05:02.435321 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=25283 DF PROTO=ICMP TYPE=8 CODE=0 ID=78 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.840 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.840/0.840/0.840/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
Jul 24 18:38:36.071438 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
Jul 24 18:38:36.071544 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=3169 DF PROTO=ICMP TYPE=8 CODE=0 ID=713 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
Jul 24 18:26:23.550054 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
Jul 24 18:26:23.561963 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
Jul 24 18:26:23.645981 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
Jul 24 18:26:24.286017 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
Jul 24 18:26:24.414026 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
Jul 24 18:26:24.670061 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
Jul 24 18:26:24.670264 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=9277 DF PROTO=ICMP TYPE=8 CODE=0 ID=741 SEQ=1
Jul 24 18:26:25.714948 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=9352 DF PROTO=ICMP TYPE=8 CODE=0 ID=742 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.410 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.410/0.410/0.410/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
Jul 24 23:47:05.805844 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
Jul 24 23:47:06.477826 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
Jul 24 23:47:06.478580 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=23745 DF PROTO=ICMP TYPE=8 CODE=0 ID=944 SEQ=1
Jul 24 23:47:07.534571 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=23946 DF PROTO=ICMP TYPE=8 CODE=0 ID=945 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.457 ms

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

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

.*MATCH_VLAN-1.*eth1.*10.0.0.2.*10.0.0.1.*
Show output
Jul 24 19:57:38.926793 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
Jul 24 19:57:39.278743 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
Jul 24 19:57:39.310798 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
Jul 24 19:57:39.311012 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=44071 DF PROTO=ICMP TYPE=8 CODE=0 ID=568 SEQ=1
Jul 24 19:57:40.369150 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=44501 DF PROTO=ICMP TYPE=8 CODE=0 ID=569 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.709 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.709/0.709/0.709/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
Jul 24 22:09:08.026093 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
Jul 24 22:09:08.037984 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
Jul 24 22:09:08.890036 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
Jul 24 22:09:08.890253 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
Jul 24 22:09:08.986065 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
Jul 24 22:09:08.986268 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=18486 DF PROTO=ICMP TYPE=8 CODE=0 ID=1091 SEQ=1
Jul 24 22:09:10.038465 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=18525 DF PROTO=ICMP TYPE=8 CODE=0 ID=1092 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=0.880 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.880/0.880/0.880/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
Jul 24 17:22:59.123766 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 17:22:59.124932 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.434 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.434/0.434/0.434/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
Jul 24 07:21:58.547429 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 07:21:58.899279 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 07:21:58.901110 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00
Jul 24 07:21:59.978765 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.490 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.490/0.490/0.490/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
Jul 24 22:32:57.181820 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 22:32:57.277812 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 22:32:57.279100 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00
Jul 24 22:32:57.533800 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 22:32:58.328143 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.27 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.265/1.265/1.265/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
Jul 24 19:54:52.404059 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=33:33:ff:ef:6c:10:de:ad:be:ef:6c:10:81:00
Jul 24 19:54:52.495898 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0p0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 19:54:52.496611 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 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.341 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.341/0.341/0.341/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
Jul 24 20:51:31.117277 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 20:51:31.117459 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jul 24 20:51:32.173446 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.567 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.567/0.567/0.567/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
Jul 24 07:05:15.027670 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 07:05:15.027709 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 plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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.597 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.597/0.597/0.597/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
Jul 24 07:05:28.147617 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth5 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:11:81:00
Jul 24 07:05:28.147667 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.685 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.685/0.685/0.685/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
Jul 24 18:38:50.139354 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 18:38:50.139698 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.423 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.423/0.423/0.423/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
Jul 24 18:26:41.411102 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 18:26:41.411180 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:26:41.603064 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:26:42.435087 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 18:26:42.436442 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:26:43.500442 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.394 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.394/0.394/0.394/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
Jul 24 23:47:27.802392 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 23:47:28.058361 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 23:47:28.410369 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 23:47:28.410795 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jul 24 23:47:29.469215 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.513 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.513/0.513/0.513/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
Jul 24 19:58:04.267789 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 19:58:04.587648 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 19:58:04.589576 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jul 24 19:58:05.619993 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.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.*eth1.*
Show output
Jul 24 22:09:32.785921 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 22:09:33.073907 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 22:09:33.521869 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 22:09:33.522166 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jul 24 22:09:34.552059 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.744 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.744/0.744/0.744/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
Jul 24 17:23:09.234297 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 17:23:09.235847 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.809 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.809/0.809/0.809/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
Jul 24 07:22:23.526350 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 07:22:23.876355 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 07:22:24.005429 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 07:22:24.548326 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 07:22:24.548639 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=00:a0:26:e3:01:4c:de:ad:be:ef:6c:10:81:00
Jul 24 07:22:26.625551 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=0.550 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.550/0.550/0.550/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
Jul 24 22:33:21.098675 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 22:33:21.226620 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 22:33:21.290575 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 22:33:21.291413 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:99:35:97:de:ad:be:ef:6c:10:81:00
Jul 24 22:33:22.343204 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.73 ms

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.383/0.383/0.383/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
Jul 24 20:51:47.634464 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 20:51:47.634603 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth4 OUT= MAC=00:a0:26:04:00:1c:de:ad:be:ef:6c:10:81:00
Jul 24 20:51:48.686833 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.515 ms

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

Step 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
Jul 24 07:05:40.143636 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 07:05:40.143673 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 plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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=1.02 ms

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

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.887/0.887/0.887/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
Jul 24 18:39:04.433600 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 18:39:04.433872 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 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.513 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.513/0.513/0.513/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
Jul 24 18:26:59.530920 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:26:59.702932 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 18:26:59.926946 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:27:00.726921 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 18:27:00.727722 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:16:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:27:01.776556 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.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:

(?i).*MATCH_VLAN-1.*eth2.*
Show output
Jul 24 23:47:52.698827 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 23:47:52.702877 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth2 OUT= MAC=00:a0:26:54:55:16:de:ad:be:ef:6c:10:81:00
Jul 24 23:47:53.754888 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.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:

(?i).*MATCH_VLAN-1.*eth1.*
Show output
Jul 24 19:58:29.468640 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 19:58:29.660539 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 19:58:29.980631 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 19:58:29.980839 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:18:00:ca:de:ad:be:ef:6c:10:81:00
Jul 24 19:58:31.054745 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.454 ms

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.454/0.454/0.454/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
Jul 24 22:09:59.342377 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 22:09:59.598376 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:de:ad:be:ef:6c:10:81:00
Jul 24 22:09:59.598673 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=00:a0:26:12:00:3b:de:ad:be:ef:6c:10:81:00
Jul 24 22:10:00.665476 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.141ms
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
Jul 24 17:23:18.012816 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.878ms
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
Jul 24 07:22:50.797110 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
Jul 24 07:22:52.607347 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.900ms
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
Jul 24 22:33:47.187310 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.109ms
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
Jul 24 19:55:47.767362 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
Jul 24 19:55:47.988009 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
Jul 24 19:55:47.991348 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

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.759ms
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
Jul 24 20:52:03.745516 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.771ms
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
Jul 24 07:06:06.499325 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 plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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.820ms
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
Jul 24 07:06:22.551394 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.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.*eth1.*
Show output
Jul 24 18:39:18.674958 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.908ms
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
Jul 24 18:27:17.447945 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
Jul 24 18:27:17.607883 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
Jul 24 18:27:18.972067 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.845ms
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
Jul 24 23:48:19.325351 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.926ms
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
Jul 24 19:58:53.329710 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
Jul 24 19:58:54.750124 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.866ms
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
Jul 24 22:10:23.738472 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
Jul 24 22:10:24.474411 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
Jul 24 22:10:25.149955 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.799ms
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
Jul 24 17:23:28.099660 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.846ms
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
Jul 24 07:23:17.637682 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.910ms
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
Jul 24 22:34:11.874993 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.102ms
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
Jul 24 19:56:17.088407 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.760ms
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
Jul 24 20:52:19.135380 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]  1.162ms
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
Jul 24 07:06:34.399763 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 plaintext-password admin

Step 6: Clean all the configuration in DUT1:

delete
set system login user admin authentication plaintext-password admin

Step 7: Clean all the configuration in DUT2:

delete
set system login user admin authentication plaintext-password admin

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]  0.863ms
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
Jul 24 07:06:47.367732 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.806ms
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
Jul 24 18:39:33.066288 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:16:00:16]  0.866ms
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
Jul 24 18:27:34.916436 osdx kernel: [MATCH_VLAN-1] ACCEPT IN=eth1 OUT= MAC=33:33:00:00:00:16:de:ad:be:ef:6c:10:81:00
Jul 24 18:27:36.578860 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.999ms
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
Jul 24 23:48:40.662991 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.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
Jul 24 19:59:19.538284 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.881ms
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
Jul 24 22:10:50.730295 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.