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

Discussions related to using VirtualBox on Linux hosts.

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

Postby AthLux » 12. Feb 2008, 08:14

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   Expand viewCollapse view
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   Expand viewCollapse view
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   Expand viewCollapse view
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   Expand viewCollapse view
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   Expand viewCollapse view
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
AthLux
 
Posts: 14
Joined: 10. Feb 2008, 16:34

Postby stefan.becker » 12. Feb 2008, 08:25

Try before "chmod 666 /dev/net/tun".
stefan.becker
Volunteer
 
Posts: 7502
Joined: 7. Jun 2007, 21:53

Postby AthLux » 16. Feb 2008, 18:27

Some other must be wrong:
Code: Select all   Expand viewCollapse view
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
AthLux
 
Posts: 14
Joined: 10. Feb 2008, 16:34

Postby Technologov » 16. Feb 2008, 20:32

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
Technologov
Volunteer
 
Posts: 3305
Joined: 10. May 2007, 16:59
Location: Israel

Postby AthLux » 17. Feb 2008, 01:52

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

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


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 11 guests