Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


L2 VLAN Sub-Interface Configuration Example

SUMMARY Read this topic to learn how to add a user pod with a Layer 2 VLAN sub-interface to an instance of the cloud-native router.


You can configure a user pod with a Layer 2 VLAN sub-interface and attach it to the JCNR instance. The Juniper Cloud-Native Router must have an L2 interface configured at the time of deployment. The cRPD must be configured with the valid VLAN configuration for the fabric interface. For example:


Note that the unit number and the VLAN ID must match.

Your high-level tasks are:

  • Define and apply a network attachment definition (NAD)—The NAD file defines the required configuration for Multus to invoke the JCNR-CNI and create a network to attach the pod interface to.

  • Define and apply a pod YAML file to your cloud-native router cluster—The pod YAML contains the pod specifications and an annotation to the network created by the JCNR-CNI


    Please review the JCNR Use-Cases and Configuration Overview topic for more information on NAD and pod YAML files.

Configuration Example

  1. Here is an example NAD to create a Layer 2 VLAN sub-interface:The NAD defines a bridge domain bd201 and a sub-interface net1.201 with a parent interface net1. The pod will be attached in the virtual-switch instance.. It also defines a static IP address to be assigned to the pod interface.
  2. Apply the NAD manifest to create the network.
  3. Verify the NAD is created.
  4. Here is an example yaml to create a pod attached to the vswitch-bd201-sub network: The pod attaches to the router instance using the annotation.
  5. Apply the pod manifest.
  6. Verify the pod is running.
  7. Describe the pod to verify a secondary interface is created and attached to the vswitch-bd201-sub network. (The output is trimmed for brevity).
  8. Verify the vRouter has the corresponding interface created. Access the vRouter CLI and issue the vif --list command.Note that the interface type is Virtual and the Vlan ID set to 201. The parent interface is vif0/2. The VRF is always 0 for L2 sub-interfaces.