This article provides a configure example for how to let traffic without VLAN tag rewriting pass through SRX when VLAN tag rewrite is used in Switching mode.
SRX supports VLAN rewrite when working in switching mode.
For a related topic, refer to KB32245 - VLAN tag rewrite in SRX L2 mode (switching and transparent mode) [juniper.net]
In certain scenarios, you may want to let traffic without VLAN tag rewriting pass through SRX when VLAN tag rewrite is used at the same time.
Configuration:
set interfaces ge-0/0/1 flexible-vlan-tagging set interfaces ge-0/0/1 encapsulation extended-vlan-bridge set interfaces ge-0/0/1 unit 100 vlan-id 100 set interfaces ge-0/0/1 unit 100 family ethernet-switching set interfaces ge-0/0/1 unit 200 vlan-id 200 set interfaces ge-0/0/1 unit 200 input-vlan-map swap set interfaces ge-0/0/1 unit 200 input-vlan-map tag-protocol-id 0x8100 set interfaces ge-0/0/1 unit 200 input-vlan-map vlan-id 300 set interfaces ge-0/0/1 unit 200 output-vlan-map swap set interfaces ge-0/0/1 unit 200 family ethernet-switching vlan members 300 set interfaces ge-0/0/2 unit 0 family ethernet-switching interface-mode trunk set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members 100 set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members 300 set protocols l2-learning global-mode switching set vlans vlan100 vlan-id 100 set vlans vlan100 interface ge-0/0/1.100 set vlans vlan200 vlan-id 200 set vlans vlan300 vlan-id 300
Verification:
root# run show vlans detail Routing instance: default-switch VLAN Name: default State: Active Tag: 1 Internal index: 2, Generation Index: 1, Origin: Static MAC aging time: 300 seconds VXLAN Enabled : No Number of interfaces: Tagged 0 , Untagged 0 Total MAC count: 0 Routing instance: default-switch VLAN Name: vlan100 State: Active Tag: 100 Internal index: 3, Generation Index: 2, Origin: Static MAC aging time: 300 seconds VXLAN Enabled : No Interfaces: ge-0/0/1.100*,tagged,trunk <<< ge-0/0/2.0*,tagged,trunk <<< Number of interfaces: Tagged 2 , Untagged 0 Total MAC count: 2
Routing instance: default-switch
VLAN Name: vlan200 State: Active Tag: 200 Internal index: 4, Generation Index: 3, Origin: Static MAC aging time: 300 seconds VXLAN Enabled : No Number of interfaces: Tagged 0 , Untagged 0 Total MAC count: 0
VLAN Name: vlan300 State: Active Tag: 300 Internal index: 5, Generation Index: 4, Origin: Static MAC aging time: 300 seconds VXLAN Enabled : No Interfaces: ge-0/0/1.200*,tagged,trunk ge-0/0/2.0*,tagged,trunk Number of interfaces: Tagged 2 , Untagged 0 Total MAC count: 2