2

I'm having some troubles setting up my network connection using the Bridged Adapter configuration. I'm just starting with Linux and even if I was going through different forum discussions on the web, I'm still not able to make it work. NAT is working perfectly and I'm able to access Internet, while with Bridged Adapter the network result unreachable, altough I need it for the application I have in mind.

My setup is the following:

VirtualBox 5, Host: Windows 10, Guest: Ubuntu 14.04 LTS

Here you could see in details my configuration

VirtualBox Network Config Beside the RealTek, I could use also: Qualcomm Atheros AR946x Wireless Network Adapter. However the problem remain the same, since it seems I have no network working.

This if the ifconfig command:

    giulio@giulio-VirtualBox:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 08:00:27:f5:87:2f  
              inet6 addr: fe80::a00:27ff:fef5:872f/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:24737 (24.7 KB)

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:161 errors:0 dropped:0 overruns:0 frame:0
              TX packets:161 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:11409 (11.4 KB)  TX bytes:11409 (11.4 KB)

While /etc/network/interface looks like this:

      # interfaces(5) file used by ifup(8) and ifdown(8)
      auto lo
      iface lo inet loopback

Here it is a screenshot of the overall network settings. For the IPv4 settings I'm using AUtomatic (DHCP), while for IPv6 I've set "ignore".

I hope somebody could have a look and help me out, thank you! Giulio

1
  • Having the same problem. Did you manage to fix this? Jun 11, 2018 at 8:11

4 Answers 4

8

I have tried to make it work with bridged and after a lot of troubleshooting, it worked.

The primary issue was that my guest OS was sending packets with different MAC address compared to my host OS.

Thus the traffic was getting dropped at wifi gateway.

The solution was to change the MAC address in guest OS and have same MAC for guest as well as host OS.

Steps:

  1. Power off the VM

  2. Go to Settings->Network->Advanced and remove the mac address.

  3. Check the mac address of host machine (ifconfig -a or ipconfig /all) and update the same in the option in step 2.

  4. Save the settings and start the VM, it should work and internet should be reachable :)

4
  • Sir, you are a hero! :) Apr 19, 2019 at 11:06
  • You save my day. Dec 25, 2019 at 4:28
  • Dude you are amazing! I guess the issue is that in the gateway, the mac address of the guest os was not recognizable in the arp table?
    – alex067
    Apr 21, 2020 at 3:34
  • After hours of looking for an answer...this one really came through! Thanks!
    – ReyHaynes
    Nov 19, 2021 at 3:38
1

I just had this problem on Pop!_OS 19.10 (running a Debian 10 guest).

Tl;dr: Running sudo modprobe vboxnetflt on the host fixed it.


The problem seems to be that the kernel module vboxnetflt wasn't loaded.

When I first started the VM, it prompted me to load vboxdrv which I did and it worked. I didn't (and still haven't) restarted the host to see if that changed anything.

Running "NAT" networking worked and I tried changing it to "Bridged Adapter" I got a "network activation failed". I restarted multiple times without getting errors from VirtualBox. It was only when I fully shut down the VM (to attempt @IamSushil's solution) that I got a startup error which led me to this solution.

0

First of all: Bridged config does not work with wi-fi.

So you can't bridge the Qualcomm Atheros AR946x to your VMs, but you can use the Realtek adapter, I can see that you're only showing the Ubuntu config and the VM config, but the matter may be with Windows.

I suggest you find how your Windows network is configured to make it work.

Maybe this can help you find the problem: https://stackoverflow.com/questions/31922055/bridged-networking-not-working-in-virtualbox-under-windows-10

1
0

You need to add a route to the default gateway:

sudo bash
route add default gw 192.168.0.X

Check and change nano /etc/reslov.conf to set it to Google DNS. It's not persistent so might want to run a script at startup.

Finally, change the IP to any other IP that is not used on the network, including the host machine:

ifconfig [interface] down
ifconfig [interface] 192.168.0.X netmask 255.255.255.0 broadcast 192.168.0.255
ifconfig [interface] up

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .