need help with bridging - Failed to open '/dev/net/tun'

Discussions related to using VirtualBox on Linux hosts.
Post Reply
AthLux
Posts: 14
Joined: 10. Feb 2008, 16:34

need help with bridging - Failed to open '/dev/net/tun'

Post by AthLux »

Hello,

I make root to a member of the group vboxusers and uml-net.
I follow the instructions 6.5.1.1. Debian and Ubuntu hosts step 1 till 4:

Code: Select all

root@AthLux:# cat /etc/network/interfaces

auto lo eth0

iface lo inet loopback

iface eth0 inet dhcp
        hostname athlux

auto br0
iface br0 inet dhcp
    bridge_ports eth0
but I can not create the permanent host interface vbox0:

Code: Select all

root@AthLux:# VBoxAddIF vbox0 root br0
VirtualBox host networking interface creation utility, version 1.5.4
(C) 2005-2007 innotek GmbH
All rights reserved.

Creating the permanent host networking interface "vbox0" for user root.

Failed to take down the old interface in order to replace it with the new one.
The interface may still be in use, or you may not currently have sufficient
permissions to do this.  You can replace the interface manually using the
VBoxTunctl command, or alternatively, the new interface will be created
automatically next time you restart the host system.
I also try the Debian native method

Code: Select all

root@AthLux:# cat /etc/network/interfaces
auto lo eth0

iface lo inet loopback

iface eth0 inet dhcp
        hostname athlux

auto br0
iface br0 inet dhcp
    bridge_ports eth0 tap0

auto tap0
iface tap0 inet manual
    up ifconfig $IFACE 0.0.0.0 up
    down ifconfig $IFACE down
    tunctl_user root
but get an error too:
-> interface tap0 does not exist!
-> Failed to open '/dev/net/tun' : No such device
but it exists:

Code: Select all

root@AthLux:# ls -alh /dev/net/tun
crw-rw---- 1 root uml-net 10, 200 2008-02-10 15:25 /dev/net/tun
full output of networking restart follows:

Code: Select all

root@AthLux:# /etc/init.d/networking restart
* /etc/network/options is deprecated (see README.Debian of netbase).
Setting up IP spoofing protection...done (rp_filter).
Reconfiguring network interfaces...tap0: ERROR while getting interface flags: No such device
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

Listening on LPF/eth0/00:50:fc:21:0f:27
Sending on   LPF/eth0/00:50:fc:21:0f:27
Sending on   Socket/fallback/fallback-net
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.254
bound to 192.168.0.86 -- renewal in 1800 seconds.
if-up.d/mountnfs[eth0]: waiting for interface br0 before doing NFS mounts
if-up.d/mountnfs[eth0]: waiting for interface tap0 before doing NFS mounts
interface tap0 does not exist!

Waiting for br0 to get ready (MAXWAIT is 32 seconds).
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

Listening on LPF/br0/00:50:fc:21:0f:27
Sending on   LPF/br0/00:50:fc:21:0f:27
Sending on   Socket/fallback/fallback-net
DHCPREQUEST on br0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.254
bound to 192.168.0.86 -- renewal in 1800 seconds.
if-up.d/mountnfs[br0]: waiting for interface tap0 before doing NFS mounts
Failed to open '/dev/net/tun' : No such device
SIOCSIFADDR: No such device
tap0: ERROR while getting interface flags: No such device
tap0: ERROR while getting interface flags: No such device
Failed to bring up tap0.
done.
How to get bridging working?

Thanks
AthLux
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

Try before "chmod 666 /dev/net/tun".
AthLux
Posts: 14
Joined: 10. Feb 2008, 16:34

Post by AthLux »

Some other must be wrong:

Code: Select all

root@AthLux:# chmod 666 /dev/net/tun
root@AthLux:# chgrp vboxusers /dev/net/tun
root@AthLux:# ls -alh /dev/net/tun
crw-rw-rw- 1 root vboxusers 10, 200 2008-02-16 18:14 /dev/net/tun
root@AthLux:# tunctl -t tap0 -u root
Failed to open '/dev/net/tun' : No such device
chmod do not solve my problem :-(
As descriped in the howto I have installed bridge-utils and uml-utilities.
Is there a module to load with modprobe or something else to install?

Thanks
AthLux
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

AthLux:
It is _really_ strange, but it seems your TUN/TAP network driver doesn't works. Try reloading it:

# rmmod tun
# modprobe tun
# lsmod | sort

+ see how it is built into the kernel - possibilities: (y/m/n):

# cat /boot/config-$(uname -r) | grep CONFIG_TUN

-Technologov
AthLux
Posts: 14
Joined: 10. Feb 2008, 16:34

Post by AthLux »

I had not build the kernel module tun.
After rebuild of kernel kernel (and modules ;-)) all went fine.

Thanks,
AthLux
Post Reply