Setup NICs in Dataplane

Next, determine the device ID for the interfaces. Start the CLI (Entering the TNSR CLI) and run the following command to output the device IDs as seen by the dataplane:

tnsr# configure
tnsr(config)# dataplane dpdk dev ?
  0000:02:01.0           Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet
    Controller (Copper) (rev 01) ( Active Interface eth0 )
  0000:02:02.0           Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet
    Controller (Copper) (rev 01)
  0000:02:03.0           Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet
    Controller (Copper) (rev 01)

Interfaces under host control will be noted in the output with Active Interface. Other listed interfaces are usable by TNSR.

For a fresh installation of TNSR, skip ahead to Configuring Interfaces for TNSR, otherwise continue on to identify host interfaces added after TNSR was installed.


The default behavior of the dataplane with no interfaces defined in the configuration is to attach to all interfaces not in use by the host OS. Manually defining at least one device causes the dataplane to only attach to interfaces listed in the configuration. Thus, the best practice is to always define every interface required for use in the dataplane, even if only changing their names.

Host Interface Name to Dataplane ID Mapping

The output of the dataplane dpdk dev ? command includes the device IDs in the first column. The device IDs will map to the network cards in a way that is typically easy to determine. For example:

Interface Identifiers















The host OS interface name and VPP identifiers contain the same information represented in different ways. They both reference the PCI bus number, slot number, and function number. The Interface name contains the values in decimal while the identifier shown in VPP uses hexadecimal.

Deconstructing the first interface name, it contains the following:

Interface Name Components


Interface Value

VPP ID Value

Device Type

en (Ethernet)





Bus Slot


14 (Decimal 20 in Hex)




Using this pattern, make a note of the VPP identifiers for the next step. In this example, since enp0s20f1 and enp0s20f2 are the interfaces to use, the corresponding VPP IDs are 0000:00:14.1 and 0000:00:14.2.

Configuring Interfaces for TNSR

Next, edit the dataplane configuration. Start the CLI (Entering the TNSR CLI) and enter configuration mode:

tnsr# configure

Add the device IDs of the interfaces to be used by the VPP dataplane, determined above:

tnsr(config)# dataplane dpdk dev 0000:00:14.1 network
tnsr(config)# dataplane dpdk dev 0000:00:14.2 network

Restart the VPP dataplane:

tnsr(config)# service dataplane restart
tnsr(config)# exit

The interfaces will now be available for TNSR. Now run show interface and verify that the interfaces appear in the output.

The output example below has been shortened for brevity:

tnsr# show interface
Interface: GigabitEthernet0/14/1
Interface: GigabitEthernet0/14/2
Interface: local0

The TNSR interface name also reflects the type, followed by the PCI Bus/Slot/Function ID of each interface, using the same hexadecimal notation as VPP.


The dataplane uses hexadecimal values by default but can use decimal values instead by setting dataplane dpdk decimal-interface-names. See DPDK Configuration for details.


Once TNSR attaches to interfaces in this way, they will no longer be shown as devices in the host OS. To return a network interface back to host OS control, see Remove TNSR NIC for Host Use.

One exception to this behavior is Mellanox network interfaces as they use the same driver for both host OS and DPDK, they still appear in the host OS.

See also

The dataplane supports several additional per-device parameters which can fine-tune behavior. See DPDK Configuration for details.

Customizing Interface Names

The default interface names, such as GigabitEthernet0/14/1, may be customized by an administrator. To customize the names, the PCI ID of the device must be known. The custom names can be used anywhere that an interface name is necessary in TNSR.


Only dataplane hardware interface names may be customized in this way. Interfaces from virtual sources such as loopback, IPsec, and GRE cannot be renamed.

The command to rename interfaces is dataplane dpdk dev <pci-id> network name <name>. To activate the change, the dataplane must be restarted after making the name change.


Custom interface names cannot conflict with reserved keywords in the dataplane. TNSR will return a warning and prevent use of a conflicting name. Conflicting names include items such as dataplane graph node names both directly and indirectly. New nodes are created based on interface names with suffixes such as <name>-tx and <name>-output so TNSR checks for potential collisions there as well.

This example changes the name of GigabitEthernet0/14/1, PCI ID 0000:00:14.1, to DMZ:

First, look at the list of interfaces. Note that the interface is in the list with its original name:

tnsr# show interface
Interface: GigabitEthernet0/14/1
Interface: GigabitEthernet0/14/2
Interface: local0

Next, remove any references to the interface from TNSR, and then remove the interface configuration entirely:

tnsr(config)# no interface GigabitEthernet0/14/1

Now set the name of the device, then restart the dataplane:

tnsr(config)# dataplane dpdk dev 0000:00:14.1 network name DMZ
tnsr(config)# service dataplane restart

After the dataplane restarts, the interface will appear in the list with its new name:

tnsr# show interface
Interface: DMZ
Interface: GigabitEthernet0/14/2
Interface: local0

To change the name back at a later time, all references to the interface must first be removed, and then the name can be reset:

tnsr(config)# no interface DMZ
tnsr(config)# no dataplane dpdk dev 0000:00:14.1 name
tnsr(config)# service dataplane restart

Interface Driver Management

Depending on the hardware, changing the interface driver may be necessary to either see the interfaces at all or to achieve better performance.

See also

For a description of the available drivers, see Interface Drivers.

Check Current Driver

To check the current driver, see what is present in the configuration:

tnsr(config)# show configuration running cli cfgfile
dataplane dpdk uio-driver igb_uio

If there is no dataplane dpdk uio-driver, then it would use the current default driver which is vfio-pci.

Check Driver List

To see a list of available drivers, use the following command from config mode:

tnsr(config)# dataplane dpdk uio-driver ?
  igb_uio               UIO igb driver
  uio_pci_generic       Generic UIO driver
  vfio-pci              VFIO driver

Change Interface Driver

To enable a different driver, complete the command using the chosen driver name, restart the dataplane.

tnsr(config)# dataplane dpdk uio-driver igb_uio
tnsr(config)# service dataplane restart
tnsr(config)# exit

Then attempt to view the interfaces with show interface again. If they are listed, then the correct driver is now active. If not, save the running configuration to the startup configuration and reboot so the driver can try attaching at startup. If the interfaces still do not appear, try another driver.


When using the vfio-pci driver, the DPDK IOVA mode must be explicitly set to pa. See vfio-pci.

tnsr(config)# dataplane dpdk iova-mode pa
tnsr(config)# dataplane dpdk uio-driver vfio-pci
tnsr(config)# service dataplane restart
tnsr(config)# exit


Dataplane Interface(s) Missing

If one or more expected interfaces do not appear in the show interface output, the current driver did not attach to those interfaces.

The two most common reasons this happens are:


Mellanox devices use RDMA and not UIO, so changing the driver may not have any effect on their behavior. If a Mellanox device does not appear automatically, TNSR may not support that device.