Layer-2 VLAN Sub-Interfaces
VLAN sub-interfaces are like logical interfaces on a physical switch or router. They access only tagged packets that match the configured VLAN tag. A sub-interface has a parent interface. A parent interface can have multiple sub-interfaces, each with a VLAN ID. When you run the cloud-native router, you must associate each sub-interface with a specific VLAN. Starting in Juniper Cloud-Native Router Release 23.2, the cloud-native router supports the use of VLAN sub-interfaces in L3 mode along with the previously supported L2 mode.
Configuration Example
The VLAN sub-interfaces are configured using the Netowrk Attachment Definition (NAD) and pod YAML manifests. Please see the Cloud-Native Router Use-Cases and Configuration Overview and relevant configuration examples for more information.
The Cloud-Native Router controller interface configuration viewed using the show
configuration command is as shown below (the output is trimmed for brevity).
For L2 mode:
routing-instances {
switch {
instance-type virtual-switch;
bridge-domains {
bd100 {
vlan-id 100;
interface vhostnet1-1e555ee1-7d93-40.100;
}
}
}
}On the vRouter, a VLAN sub-interface configuration is as shown below:
For L2 mode:
vif0/5 Virtual: vhostnet1-71cd7db1-1a5e-49.100 Vlan(o/i)(,S): 3003/3003 Parent:vif0/4
Type:Virtual(Vlan) HWaddr:00:99:99:99:33:09
Vrf:0 Flags:L2 QOS:-1 Ref:3
RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0
RX packets:0 bytes:0 errors:0
TX packets:0 bytes:0 errors:0
Drops:0