Comment 84 for bug 256054

nullrend (nullrend) wrote :

Using Ubuntu 8.10 amd64, updated from RC

I was able to setup VirtualBox Host Networking with this tutorial here:
https://help.ubuntu.com/community/VirtualBox#Networking

However, after using the system for a few days, I noticed instances where the system would lose all connectivity and would not regain it until a reboot. Trying various solutions previously stated within this bug report provided no satisfactory solution. As a work-around I uninstalled network-manager using aptitude, then manually configured all interfaces in /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.0.255
    gateway 192.168.1.254

#VirtualBox interface bridging for Host Networking
auto br0
iface br0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.0.255
    gateway 192.168.1.254
bridge_ports eth0 vbox0 vbox1 vbox2

Use the values appropriate for your own situation, but do mind the configuration of br0, as it overrides the configuration of eth0. Myself I'm using static IP addresses; to use DHCP just set both to use dhcp. Afterwards changed /etc/NetworkManager/nm-system-settings.conf so the ifupdown plugin is set to false (I had previously set it to "true"):

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

Then manually edited /etc/resolv.conf with the settings I wanted:
domain gateway.2wire.net
search gateway.2wire.net
nameserver 192.168.1.254
nameserver 208.67.222.222
nameserver 208.67.220.220

This lets me use the 2wire DSL functions and OpenDNS's nameservers, as my ISP's nameservers fail constantly.

Rebooted system, networking works as expected for both the Host and Guest systems. I do realize this is not the most appropriate place to post this information, but I thought it important to have a written workaround somewhere. As usual, your mileage may vary depending on your own system setup.