This article gives an example of configuring tagged and untagged sub-interfaces on vSRX.
On vSRX tagged and untagged sub-interfaces can be configured on the same physical interface. To accept untagged packets the native-vlan-id and flexible-vlan-tagging statements must be included at the [ edit interfaces interface-name ] hierarchy level:
native-vlan-id
flexible-vlan-tagging
edit interfaces
interface-name
[edit interfaces ge-fpc/pic/port] flexible-vlan-tagging; native-vlan-id number ;
The logical interface on which untagged packets are to be received must be configured with the same native VLAN ID as that configured on the physical interface. To configure the logical interface, include the vlan-id statement (matching the native-vlan-id statement on the physical interface) at the [edit interfaces interface-name unit logical-unit-number] hierarchy level.
vlan-id
[edit interfaces interface-name unit logical-unit-number]
This example shows how untagged packet is mapped to logical unit number 0 of vlan-id 10:
root@vSRX-1# show interfaces ge-0/0/0 flexible-vlan-tagging; native-vlan-id 10 ; unit 0 { vlan-id 10; family inet { address 10.10.10.1/30; } } unit 1 { vlan-id 20; family inet { address 20.20.20.1/30; } }
2020-06-23: Article reviewed for accuracy; no changes required 2022-03-02: Added related link to Understanding Layer 3 Subinterfaces