Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring VNFs on NFX350 Devices

The NFX350 devices enable you to instantiate and manage virtualized network functions (VNFs) from the Junos Control Plane (JCP). The JCP supports the creation and management of third-party VNFs.

Load a VNF Image

To configure a VNF, you must log in to the JCP:

To load a VNF image on the device from a remote location, you can either use the file-copy command or copy the image from a USB by using the usb-pass-through command.

Note:

You can save the VNF image in the /var/public directory if you are using up to two VNFs. If you are using more than two VNFs, save the files on an external SSD. If you are using an external SSD for VNFs, make sure to initialize and add the SSD to the device. For more information, see Configuring the Solid State Disk on NFX350 Device.

For example:

Alternatively, you can load a VNF image by using the NETCONF command, file-put.

To copy a VNF image from a USB, see Supporting File Transfer from USB on NFX Series Devices.

Prepare the Bootstrap Configuration

You can bootstrap a VNF by attaching a CD-ROM, a USB storage device, or a config drive that contains a bootstrap-config ISO file.

For an example of creating an ISO file, see the procedure in Creating a vSRX Bootstrap ISO Image. The procedure might differ based on the operating system (for example, Linux, Ubuntu) that you use to create the ISO file.

A bootstrap configuration file must contain an initial configuration that allows the VNF to be accessible from an external controller, and accepts SSH, HTTP, or HTTPS connections from an external controller for further runtime configurations.

Note:
  • The system saves the bootstrap-config ISO file in the /var/public folder. The file is saved only if the available space in the folder is more than double the total size of the contents in the file. If the available space in the folder is not sufficient, an error message is displayed when you commit the configuration.

  • When you reboot the system, the system generates a new bootstrap-config ISO file and replaces the existing ISO file with the new ISO file on the VNF.

Allocate CPUs for a VNF

Table 1 lists the CPUs available for VNF usage for the NFX350 models.

Table 1: CPUs Available for VNF Usage

Model

CPUs Available for VNF Usage

Throughput Mode

Hybrid Mode

Compute Mode

Custom Mode

Flex Mode

Perf Mode

NFX350-S1

0

8

10

11 6

NFX350-S2

0

10

14

19 10

NFX350-S3

0

14

20

27 12
Note:

The resource allocations for flex and perf custom modes are based on the templates provided in the default Junos configuration.

Note:

When you change the performance mode of the device, it is recommended to check the availability of the CPUs for VNFs.

To check the CPU availability and its status:

The CPUs available for VNFs section in the output message shows the CPUs that are available to onboard VNFs.

Note:

vjunos0 is a system VNF, you cannot modify the CPU allocation for the vjunos0.

To specify the number of virtual CPUs that are required for a VNF:

  1. Specify the number of CPUs required for the VNF:
  2. Connect a virtual CPU to a physical CPU:
  3. Commit the configuration:

The physical CPU number can be either a number or a number range. By default, a VNF is allocated one virtual CPU that is not connected to any physical CPU.

Note:

You cannot change the CPU configuration of a VNF while the VNF is running. You must restart the VNF for the changes to take effect.

To enable hardware virtualization or hardware acceleration for VNF CPUs:

Allocate Memory for a VNF

By default, a certain amount of memory is allocated for VNFs. Table 2 lists the possible memory availability for VNF usage for the NFX350 models.

Table 2: Memory Availability for VNF Usage

Model

Total Memory Available

Hugepages Availability for VNF Usage in Compute, Hybrid, and Throughput Modes

Hugepages Availability for VNF Usage in Custom Mode

Flex Mode

Perf Mode

NFX350-S1

32 GB

7 1G hugepages

24 1G hugepages

22 1G hugepages

NFX350-S2

64 GB

23 1G hugepages

50 1G hugepages

49 1G hugepages

NFX350-S3

128 GB

62 1G hugepages

110 1G hugepages

108 1G hugepages

Note:

The resource allocations for flex and perf custom modes are based on the templates provided in the default Junos configuration.

To check the available memory:

Note:

vjunos0 is a system VNF, you cannot modify the memory allocation for the vjunos0.

To specify the maximum primary memory that the VNF can use:

Note:

You cannot change the memory configuration of a VNF while the VNF is running. You must restart the VNF for the changes to take effect.

Configure Interfaces and VLANs for a VNF

You can configure a VNF interface, map a VNF interface to a virtual function, and attach the interface to a physical NIC port, a management interface, or VLANs, assign a VLAN ID to it, and enable trust mode on it.

Prior to Junos OS Releases 21.3R1, 21.2R2, 21.2R1, 21.1R2, and 20.4R3, the step to configure an SR-IOV VNF interface and to assign a VLAN ID is as follows:

Starting from Junos OS Releases 21.3R1, 21.2R2, 21.2R1, 21.1R2, and 20.4R3, the steps to configure an SR-IOV VNF interface, to assign a VLAN ID, and to enable trust mode are as follows:

To map a VNF interface to a virtual function:

To attach a VNF interface to a physical NIC port by using the SR-IOV virtual function and assign a VLAN ID:

vlan-id is the VLAN ID of the port and is an optional value.

To enable trust mode:

Note:
  • Trust mode is supported on NFX Series devices from Junos OS Releases 21.3R1, 21.2R2, 21.2R1, 21.1R2, and 20.4R3.

  • If you enable trust mode on VNF SR-IOV interface, then the VNF interface goes into promiscuous mode.

To attach a VNF interface to a VLAN:

  • Create a VLAN:

  • Attach a VNF interface to a VLAN:

A VNF interface can be mapped to one or more physical interface .You can enable this functionality by configuring the virtual port peer (VPP) feature. You can configure mappings between an OVS interface of a VNF to one or more front panel interfaces. The VNF interface becomes inactive if all of the mapped physical interfaces are inactive. The VNF interface becomes active even if at least one of the mapped physical interface is active.

Note:
  • The mapped physical interface does not become inactive if a VNF interface is inactive.

  • Before upgrading a software image that does not support trust mode to an image that supports trust mode, it is recommended to delete all VNF interface to virtual-function mappings from the configuration.

  • Before downgrading a software image that supports trust mode to an image that does not support trust mode, it is necessary to delete all VNF interface to virtual-function mappings from the configuration. Else, the device goes into Amnesiac state after the downgrade.

The interface to the VNF is an OVS port and this mapping is defined in the configuration. If the mapping rules can view multiple physical ports before triggering the action, configuring the VPP feature allows you to manage multiple, redundant physical links.

You can configure a mapping between VNF virtual interfaces and JCP physical interfaces (ge-0/0/x and xe-0/0/x). One virtual interface can be mapped to one or more physical interfaces. There is no limit on the number of physical interfaces to which a VNF virtual interface can be mapped to. You can map a VNF virtual interface to all the physical interfaces or you can map multiple VNF interfaces to a single physical interface.

To configure VPP:

For example:

To view mapping of the peer interfaces, run the show system visibility vnf vnf-name command.

Note:
  • The interfaces attached to a VNF are persistent across VNF restarts.

  • If the VNF supports hot-plugging, you can attach the interfaces while the VNF is running. Otherwise, you must add the interfaces, and then restart the VNF.

  • You cannot change the mapping of a VNF interface while the VNF is running.

Note:

You can prevent the VNF interface from sending or receiving traffic by using the deny-forwarding CLI option.

If the deny-forwarding option is enabled on an interface that is a part of cross-connect, then the cross-connect status goes down and drops all traffic.

To specify the target PCI address for a VNF interface:

You can use the target PCI address to rename or reorganize interfaces within the VNF.

For example, a Linux-based VNF can use udev rules within the VNF to name the interface based on the PCI address.

Note:
  • The target PCI address string should be in the following format:

    0000:00:<slot:>:0, which are the values for domain:bus:slot:function. The value for slot should be different for each VNF interface. The values for domain, bus, and function should be zero.

  • You cannot change the target PCI address of VNF interface while the VNF is running.

To delete a VNF interface:

Note:
  • To delete a VNF interface, you must stop the VNF, delete the interface, and then restart the VNF.

  • After attaching or detaching a virtual function, you must restart the VNF for the changes to take effect.

  • eth0 and eth1 are reserved for the default VNF interfaces that are connected to the internal network and the out-of-band management network. Therefore, the configurable VNF interface names start from eth2.

  • Within a VNF, the interface names can be different, based on guest OS naming conventions. VNF interfaces that are configured in the JCP might not appear in the same order within the VNF.

  • You must use the target PCI addresses to map to the VNF interfaces that are configured in the JCP and you must name them accordingly.

Configure Storage Devices for VNFs

An NFX350 device supports the following storage options for VNFs:

  • CD-ROM

  • Disk

  • USB

To add a virtual CD or to update the source file of a virtual CD:

You can specify a valid device name in the format hdx, sdx, or vdx—for example, hdb, sdc, vdb, and so on.

To add a virtual USB storage device:

To attach an additional hard disk:

To delete a virtual CD, USB storage device, or hard disk from the VNF:

Note:
  • After attaching or detaching a CD from a VNF, you must restart the device for the changes to take effect. The CD detach operation fails if the device is in use within the VNF.

  • A VNF supports one virtual CD, one virtual USB storage device, and multiple virtual hard disks.

  • You can update the source file in a CD or USB storage device while the VNF is running.

  • You must save the source file in the /var/public directory, and the file must have read and write permission for all users.

Instantiate a VNF

You can instantiate a VNF by configuring the VNF name, and by specifying the path of an image.

While instantiating a VNF with an image, two VNF interfaces are added by default. These interfaces are required for management and for the internal network.

Note:

Only QCOW2, IMG, and RAW image types are supported.

To instantiate a VNF by using an image:

Note:

When you configure VNFs, do not use VNF names in the format vnfn—for example, vnf1, vnf2, and so on. Configurations that contain such names fail to commit.

(Optional) To specify a UUID for the VNF:

uuid is an optional parameter. We recommend that you allow the system to allocate a UUID for the VNF.

Note:

You cannot change the image configuration for a VNF after saving and committing the configuration. To change the image for a VNF, you must delete the VNF and create a VNF again.

Verify the VNF Instantiation

To verify that the VNF is instantiated successfully:

The output in the Liveliness field of a VNF indicates whether the IP address of the VNF is reachable over the internal management network. The default IP address of the liveliness bridge is 192.0.2.1/24. Note that this IP address is internal to the device and is used for VNF management.