Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

L3 VLAN Sub-Interface Configuration Example

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

Overview

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

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 are example NADs to create a Layer 3 VLAN sub-interface:The NAD defines virtual-router instances vrf201 with the parent interface net1 and VLAN ID 201. A virtual-router instance type is similar to a VPN routing and forwarding instance type, but used for non-VPN-related applications. There are no virtual routing and forwarding (VRF) import, VRF export, VRF target, or route distinguisher requirements for this instance type. The pod VLAN sub-interface is attached to vrf201 instance. The NAD also defines static IP addresses to be assigned to the pod interface.
  2. Apply the NAD manifests to create the networks.
  3. Verify the NADs are created.
  4. Here is an example yaml to create a pod attached to the vrf201 and vrf202 networks: The pod attaches to the router instances 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 vrf201 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.You can see the IP addresses assigned to the sub-interfaces for the corresponding valid VRF numbers.