VirtualBox

Ticket #10019 (new defect)

Opened 2 years ago

Last modified 4 weeks ago

Unable to bridge Mac OS X AirPort connection

Reported by: willmc Owned by:
Priority: major Component: network
Version: VirtualBox 4.1.6 Keywords: mac bridge wifi airport wireless network
Cc: Guest type: Linux
Host type: Mac OS X

Description

If I connected my host OS (Mac OS X 10.7.2) to a Wi-Fi network, I cannot bridge the VM's network connection to that interface. The VirtualBox VM settings allow me to choose bridging over that interface, but I'm unable to obtain a DHCP lease or do anything else on that interface. Bridging to the Ethernet interface works fine, and the Wi-Fi connection works fine in the host OS.

Attachments

VBox.log Download (64.6 KB) - added by willmc 2 years ago.

Change History

Changed 2 years ago by willmc

comment:1 Changed 2 years ago by camjack1728

I am also having this same issue. If there is any information that I can supply to help in trouble shooting this, Please let me know.

comment:2 Changed 21 months ago by DrPepperAndPizza

I am also having the same issue.

  • VirtualBox 4.1.18 r78361
  • Host: Mac 10.7.4. MacBook Pro. Just purchased 3 weeks ago.
  • Guest: Debian 6.0.5, CentOS 6.2. All guests really.

Bridged Network *WAS* working on Wi-Fi. But it stopped after I the the following:

  1. Created a 2nd Wi-Fi. (Directions: On Mac OS X, click "System Preferences" -> "Network" -> "+" -> Interface = "Wi-Fi", Service Name = "Wi-Fi (AirPort)" -> "Create" -> "Apply".) I created a 2nd Wi-Fi, because I was on the train going home and wanted to test a VM with 2 NICs.
  2. Create a Network. (Directions: On Mac OS X, click the wifi icon in the upper right of the screen -> "Create Network..." -> Network Name = "my network blah", Channel = 11, Security = "None" -> "Create".
  3. In Virtualbox, set the VMs to use the 2 wifi in Bridge Network mode.

Up to here, everything was working.

Here is when Bridge Networking stopped working when the wifi is used for bridged networking.

I was done testing and I deleted the 2nd Wi-fi that I created in step 1. (Directions: On Mac OS X, click "System Preferences" -> "Network" -> select "Wi-Fi (AirPort)" which was created in step 1 above -> "-" -> "Apply".

After that Bridged Networking does not work when en1: Wi-Fi (AirPort) is selected. It seems as if VirtualBox is still pointing to the one I deleted. I don't remember, but I think I named it "Wi-Fi (AirPort)". And that's the entry that VirtualBox keeps.

But "Wi-Fi" (which is the default in Mac OS X) and is the only entry in "System Preferences" -> "Network".

I tried:

  1. Deleting "Wi-Fi" and creating a "Wi-Fi (AirPort)" to match what Virtualbox is showing.
  2. Having both "Wi-Fi" and "Wi-Fi (AirPort)" entries.
  3. Uninstalling VirtualBox, reboot, then re-installing.

Nothing worked.

In the guest, Debian still cannot contact the DHCP server on my network after running /etc/init.d/networking restart: ...<snip>... Listening on LPF/eth0/08:00:27:56:00:de Sending on LPF/eth0/08:00:27:56:00:de Sending on Socket/fallback DHCPDISCOVER on eth0 to 255.255.255.255 port 67 intervale 5 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 intervale 10 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 intervale 13 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 intervale 11 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 intervale 14 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 intervale 8 No DHCPOFFERS received. No working leases in persistent database - sleeping. done.

I've tail -f my dhcp logs and it shows no contact from the guest host.

I'm guessing that Virtualbox is still stuck to the 2nd wifi that I added then deleted.

Everything else works, just not Bridged Networking on wifi.

  • NAT works on both wifi and ethernet.
  • Bridged Networking works on ethernet. It used to work both both ethernet and wifi, until I added then deleted the 2nd wifi.
  • Internal Network works on both
  • Host Only Adaptor works on both, I think. Didn't really test much.

I really want and need Bridged Networking on the wifi to work. Let me know if you need any other info.

comment:3 Changed 21 months ago by DrPepperAndPizza

I ran the command to force the name change on the wifi nic:

VBoxManage modifyvm 717a337d-910e-42d5-a8b0-e05fc9d848e1 --nic1 bridged --bridgeadapter1 'en1: Wi-Fi'

And that took. In the VirtualBox Manager windows with the list of VMs on the left and the Details of the settings on the right, the name of the Network is updated:

OLD:

Adapter 1:

Intel PRO/1000 MT Desktop (Bridged adapter, en1: Wi-Fi (AirPort))

NEW:

Adapter 1:

Intel PRO/1000 MT Desktop (Bridged adapter, en1: Wi-Fi)

In the VirtualBox Manager window, I click on the VM to highlight/select it on the left -> "Settings" -> "Network".

For "Attached to" pull down menu, select "Bridged Adaptor".

Then for "Name", the old wifi name "en: Wi-Fi (AirPort)" in the pull down menu it still shows up! There is no choice for "en: Wi-Fi".

So when I select "en: Wi-Fi (AirPort)", the Details show "en: Wi-Fi (AirPort)", not "en: Wi-Fi".

I turned to the source and found in src/VBox/Main/src-server/darwin/iokit.cpp that apparently Virtualbox is some how not finding the interface and generating a name by adding "(AirPort)" or "(Wireless)" to it.

Last edited 21 months ago by DrPepperAndPizza (previous) (diff)

comment:4 Changed 21 months ago by DrPepperAndPizza

So I deleted my VMs. Installed from ISO a new Debian 6 installation. Set to NAT so that it could retrieve packages during the install.

After the installation, I shutdown the guest, switch the NAT to Bridged Networking and started the guest. In the Guest, I set /etc/network/interfaces to a static IP in the same range as my Host. Then rebooted the guest.

Now I'm getting a strange behavior. The host loses connection to the router 192.168.1.1 = router (iptables with Debian 6.0.5) 192.168.1.10 = host OS (Mac OS X 10.7.4) 192.168.1.100 = guest OS (Debian 6.0.5 64-bit)

Pinging scenario 1:

  • pinging from host to router works.
  • pinging from host to guest works.
  • pinging from guest to router does NOT work.

When I stop the wifi and restart, the same occurs, but when I ping from guest to router, the pinging from host to router dies.

I have to stop/start the wifi, we go back to scenario 1.

It's either the host can ping the router or the guest can ping the router, but not both at the same time.

If I leave the pinging running in the Guest, eventually the guest can ping, but the ping from host to router dies. After about 10-20 seconds, it goes visa-versa (the ping from guest to router dies, and the ping from host to router starts working again.

The ping from host to guest never has any problems.

comment:5 Changed 8 months ago by dportabella

I have the same issue on my Mac book air, OSX 10.8.4.

Any solution to this issue?

comment:6 Changed 7 months ago by drkn

Any update on this - or at least a workaround? Having an ethernet cable plugged in just for vbox is a pain.

comment:7 Changed 6 months ago by Oliver Drummond

Having the same problem, can only connect in Bridge Mode on my Mac if I use a cable connection. Any news about this?

comment:8 Changed 6 months ago by tmas

Hi, having the same issue on my macbook air. Any updates about this issue?

comment:9 Changed 5 months ago by lidaobing3

Any update on this - or at least a workaround?

Thanks

comment:10 Changed 4 months ago by Os

Hi, I have a Macbook Air as host and having the same problem. Any update of using bridged adapters over WiFi ?

comment:11 Changed 2 months ago by phillipbarron

I have a MacBook Pro running Mavericks and have the same issue - I am running Virtual box on a Windows 7 machine too and have no problem bridging the Wireless network adaptor to the VM running Debian 6.0.6.

The problem then seems Mac specific - The Mac is my Main Dev machine and not being able to get an IP from the Wireless Adapter is a real headache. This support ticket is already 2 years old ! - I will submit another in the hope that someone will look again or, at the very least, respond. If this is not going to be fixed, please state that this is the case.

comment:12 Changed 6 weeks ago by obduk

So far I have found out this seems to be something to do with VirtualBox not working on mac os wirless when IPv6 is enabled, however following these instructions I have still not got it to work:

 https://forums.virtualbox.org/viewtopic.php?f=5&t=12887  https://discussions.apple.com/thread/3757967?tstart=0

comment:13 Changed 4 weeks ago by cerberos

I have this problem with a new MBP with Mavericks running virtualbox 4.3.10, it's not related to IPV6 as I've turned it off via

networksetup -listallnetworkservices (to find the available interfaces)
networksetup -setv6off Wi-Fi

MBPs don't have ethernet sockets any more so this is a major problem.

comment:14 Changed 4 weeks ago by cerberos

I setup some wireshark captures while running sudo dhclient eth0 -v with bridged ethernet and bridged wireless settings. There seems to be some duplicate packets that are issued with the mac address of the client then again with the mac address of the host, I don't know if that's correct or not. Here are the capture files.

 https://dl.dropboxusercontent.com/u/45079992/bridged_ethernet1.pcapng  https://dl.dropboxusercontent.com/u/45079992/bridged_wireless1.pcapng

For more background, see this thread.  https://forums.virtualbox.org/viewtopic.php?f=8&t=60883&p=283490#p283490

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use