Stable Ethernet Interface Naming for Multiple USB-LAN Adapters on NI Linux RT

Updated Feb 2, 2026

Environment

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

When using multiple USB-LAN adapters on NI Linux RT, unstable ethX naming is expected due to non-deterministic device enumeration. The recommended and supported solution is to create udev rules that bind interface names to MAC addresses, ensuring persistent and predictable network configuration across reboots.

On Linux-based systems, including NI Linux RT, network interfaces are assigned names (eth0, eth1, eth2, …) in the order that the kernel detects the hardware during boot. When multiple USB-LAN adapters are connected, the detection order is not guaranteed to be consistent across power cycles. As a result:
  • Interface names (ethX) may be reassigned differently on each boot
  • IP addresses configured per interface can appear to be "swapped"
  • NI MAX may still show the original configuration, even though the underlying interface-to-hardware mapping has changed
This behavior typically does not appear when only one USB-LAN adapter is connected, because there is no ambiguity in enumeration order.
 
To permanently fix the interface mapping, you should assign stable interface names based on MAC addresses using udev rules. This ensures that each physical Ethernet adapter is always recognized with the same interface name, regardless of boot order.
 
 

Configuration File

Edit (or create, if empty) the following file on the NI Linux RT target:
 /etc/udev/rules.d/80-net-name-slot.rules

 

Example udev Rules

Map each USB-LAN adapter to a unique and stable interface name using its MAC address:
 
# Map to stable names using MAC addresses
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:80:2f:19:0c:79", NAME="ethA"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:80:2f:19:0c:3c", NAME="ethB"
 *Replace the MAC addresses and interface names to match your environment.
 

Important Notes and Limitations

  • Do not reuse existing names such as eth0, eth1, eth2, or eth3.
    • These names are already assigned early in the boot process and cannot be reclaimed.
    • Use new, unique names such as ethA / ethB, lan0 / lan1, or eth5 / eth6.
  • MAC addresses must be lowercase and in the format:
    • aa:bb:cc:dd:ee:ff
  • Renaming built-in Ethernet ports (eth0 / eth1) is not recommended.
  • If you attempt to rename an interface to a name already in use, udev will fail with a “name already exists” error.
 

Identifying MAC Addresses

You can determine the MAC address of each network interface by running the following command on the target: ifconfig
The MAC address is shown as HWaddr.

 

Visibility in NI MAX

Interfaces renamed via udev rules (e.g., ethA, ethB) do appear in NI MAX under the Network Settings tab. You can configure IP addresses for these interfaces in NI MAX just like any other network adapter.
 
 

Next Steps

Reverting to the Original Behavior

To remove the custom interface mapping:
  1. Open the file:
/etc/udev/rules.d/80-net-name-slot.rules
  1. Delete all contents so the file is empty
  2. Do not delete the file itself
  3. Reboot the target
After rebooting, interface naming will return to the default Linux behavior.