Reference Documentation

Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: osmode


Port mode:
The osmode tool creates a virtual network adapter on top of the Napatech NTAPI. This enables a port to be used as a standard Ethernet device. The virtual network device is named ntxs<port> where <port> is the port number chosen. By default, port 0 and port 0 MAC address are used. When osmode terminates, the device will be deleted.

Stream ID mode:
When using a stream ID, data will be received using the filter defined by the stream ID. A port number must also be specified in order to define where to transmit data

The stream ID must be created and deleted using the "ntpl" tool.

When using stream ID mode and using a more advanced filter other than a single port filter like "assign[streamid=0]=port==0" the OS might not be able to use the the virtual network adapter as a network device. A more advanced filter might filter out some essential packets needed for the OS to establish a link and communicate on the link.
Though the purpose for osmode is to use the Napatech adapters as an OS network adapter, osmode can be used other ways. For example if only ARP packets are wanted. Then a filter only allowing ARP packets can be used.


osmode [ --help ] [ --port <port number> ] [ --streamid <stream ID> ] [ --mac <MAC address> ]

Command Description
Display help and exit
--port <port number>
-p <port number>
Port number used for osmode — default is port 0
--streamid <stream ID>
-s <stream ID>
Stream ID to used for osmode
--mac <MAC address>
-m <MAC address>
Specify the MAC address in the format xx:xx:xx:xx:xx:xx — default is the port specific MAC address


  • Use port 3 for osmode, and the MAC address 00:FF:11:22:33:44 for the virtual adapter — this creates the device ntxs3:
    osmode --port 3 --mac 00:FF:11:22:33:44

  • Use port 3 for osmode, streamid 0, and the MAC address 00:FF:11:22:33:44 for the virtual adapter — this creates the device ntxs3:
    Setup filter:
    ntpl -e "assign[streamid=0]=port==3"
    Start osmode:
    osmode --port 3 --streamid 0 --mac 00:FF:11:22:33:44

  • Use port 1 for osmode, and use NetworkManager to manage and assign IPv4 address
    osmode --port 1
    nmcli dev set ifname ntxs1 managed yes
    nmcli connection add type tun ifname ntxs1 con-name ntxs1 mode tap ip4

  • Examples on how to setup an IP address in Linux for the ntxs0 interface:
    Note: This may differ between various distributions.


    edit /etc/network/interfaces
    and add:
    iface ntxs0 inet static
    address <static ip adress>
    netmask <netmask>
    gateway <gw ip address>
    # sudo ifup ntxs0

    CentOS/Fedora/Red Hat:

    create /etc/sysconfig/network-scripts/ifcfg-napa
    and add:
    IPADDR=<static ip address>
    GATEWAY=<gw ip address>

    # service network restart