How to Fix “Object tuntap is unknown” Error When Creating TUN/TAP Devices in Linux


2 views

When working with network virtualization on older Linux distributions like Ubuntu 10.04, you might encounter the frustrating "Object tuntap is unknown" error when trying to create virtual network interfaces. This typically occurs when attempting commands like:

sudo ip tuntap add mode tap br0p0

The error stems from version incompatibility in the iproute2 package. Ubuntu 10.04 ships with an older version that doesn't support the tuntap subcommand in the ip utility. The modern syntax wasn't introduced until later versions of iproute2.

Here are three working approaches to create TUN/TAP devices on older systems:

# Method 1: Using the legacy tunctl command (requires installation)
sudo tunctl -t br0p0 -u $(whoami)

# Method 2: Using the older ip command syntax
sudo ip link add br0p0 type tap

# Method 3: Direct kernel interface (raw IOCTL method)
sudo mknod /dev/net/tap c 10 200
sudo chmod 0666 /dev/net/tap

For Method 1, you'll need to install the uml-utilities package:

sudo apt-get install uml-utilities

After creation, verify your new tap interface with:

ip link show br0p0
# or on very old systems:
ifconfig -a

To make the interface persistent across reboots, add to /etc/network/interfaces:

auto br0p0
iface br0p0 inet manual
    pre-up ip link add br0p0 type tap
    post-down ip link del br0p0

If you're able to upgrade to a newer Ubuntu version (16.04+), the original command will work. The modern iproute2 package supports the cleaner syntax:

sudo ip tuntap add dev br0p0 mode tap user $(whoami)

The error message "Object 'tuntap' is unknown" typically occurs on older Linux distributions when trying to create virtual network interfaces. This is fundamentally a compatibility issue between the ip command syntax and the installed version of iproute2 utilities.

For Ubuntu 10.04 and similar legacy systems, you should use the tunctl utility instead:

sudo tunctl -t br0p0 -u $(whoami)
sudo ifconfig br0p0 up

If you're working on a newer system (kernel 2.6.35+), the correct command would be:

sudo ip tuntap add dev br0p0 mode tap user $(whoami)
sudo ip link set br0p0 up

Ensure you have the necessary packages installed:

# For Ubuntu/Debian
sudo apt-get install uml-utilities bridge-utils

# For RHEL/CentOS
sudo yum install tunctl bridge-utils

After creation, verify your TAP device with:

ip link show br0p0
# or
ifconfig br0p0

For persistent TAP devices across reboots, add to /etc/network/interfaces:

auto br0p0
iface br0p0 inet manual
    pre-up tunctl -t br0p0 -u root
    up ifconfig br0p0 up
  • Check kernel module: lsmod | grep tun
  • Load module if missing: modprobe tun
  • Verify permissions in /dev/net/tun