Ubuntu virtualbox guest does not get ipv4 in bridged mode

The first answer to this seems a little over-complex to me. The following should work. Open the guest machine and do the following:

You might want to disable it right from the boot. For this purpose, open:

/etc/default/grub

with your favorite text editor with root access:

i.e.

gksu gedit /etc/default/grub

or if you prefer to work with command line only:

sudo nano /etc/default/grub

In this file, find this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and change it to:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"

Save the file and update GRUB by running:

sudo update-grub

If you tried the sysctl method:

See the following question/highest voted answer, because you can set ip6 values to 0 and if you do not init sysctl as part of boot it would ignore it anyway (read the default ip6 value after you set everything to 1 to disable if the system reports 0 you need to get sysctl running):

How to disable IPv6 in Ubuntu 14.04?

I like my method because it disables ip6 at boot, so nothing tries to go the ip6 route during boot (some may even get errors with it enabled at boot and disabled inside the OS itself). It's also only a small adjustment to one line in one file making things really easy, and you are not forced to sacrifice line speed as you would be doing if using less than the 100 MHz Full Duplex or 1000 MHz Full Duplex (if you have Gig it is the latter if 100 Meg router or switch it will be the former).


In the Settings for the VirtualBox VM, go to Network and then drop down the Advanced settings in the right-hand pane and check the "Adapter Type." The default appears to be "Intel PRO/1000 MT Desktop (82540EM)." With that adapter type, I had the exact same problem, so I tried changing the Adapter Type to "Intel PRO/1000 MT Server (82545EM)" and then updating the /etc/network/interfaces file (if you change the adapter type before you install Ubuntu Server it should create the interfaces file with the correct info) and it now works fine. The version of VBox I'm using is 5.1.28 r117968 (Qt5.6.2) on a Windows 10 host and using Bridged networking.