Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

L2 virtio Trunk-Mode Interface Configuration Example

SUMMARY Read this topic to learn how to add a user pod with a virtio trunk-mode interface to an instance of the cloud-native router.

Overview

You can configure a user pod with a Layer 2 trunk-mode virtio interface and attach it to the JCNR instance. The Juniper Cloud-Native Router must have an L2 interface configured at the time of deployment. 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.

    Note:

    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 trunk-mode virtio interface interface with static IPAM:The NAD defines the VLAN IDs for the virtual-switch instance to which the pod's trunk interface will be attached.
  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 network: The pod attaches to the router instance using the k8s.v1.cni.cncf.io/networks 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 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 mode is set to trunk with the Vlan ID set to 201-203. The VRF is always 0 for L2 interfaces.