3

I'm trying to establish bridged networking from linux mint vsn 12 in virtualbox to a Mac Lion host.

Mac config:

  • Network setting: en3 configured by DHCP
  • Sharing setting: Internet Sharing selected, Share connection from en3 to computers using en3

Virtualbox Linux setting:

  • Network setting: Bridged Adapter, Name: en3

I can ping from host (192.168.2.1) to guest (192.168.2.2) and guest to host, but I Cannot ping from the Linux guest to the outside world. Connection in host is up, because I can ping from the Mac host to the outside world.

Something else that's seems weird to me, in the Mac Network setting, the IP Address generated by DHCP says 169.254.243.185. What the heck is that?? When I open a terminal up in the Mac, however, ifconfig shows its en3 inet address as 192.168.2.1.

2
  • I tried the suggestion at: superuser.com/questions/100499/… But my machine got stuck on reboot. Had to boot with a rescue disk, mount the VM's hd, then change /etc/network/interaces back to the original values. :-(
    – tgoneil
    Commented Feb 2, 2012 at 16:04
  • Just tried a different vm -- VMWare's Fusion. Got the exact same problem, so it's looking like a Mac configuration issue, and not the virtual machine.
    – tgoneil
    Commented Feb 2, 2012 at 20:52

3 Answers 3

0

I have a CentOS guest OS in VirtualBox and am using a Mac OS X host. Bridged networking is working for me.

I did not enable Internet Sharing on my Mac OS X config. Is there a reason you needed to enable that? Have you tried the bridged networking option without Internet Sharing enabled?

9
  • I have indeed. Still no connection. Are you connecting via en3? If so, is the ip address generated by DHCP an expected 192.168.x.x or is it 169.254.x.x? Still scratching my head about that. Thanks for your help with this Rohit.
    – tgoneil
    Commented Feb 7, 2012 at 19:03
  • My mac is on a wireless connection, which is 'en1'. The bridged connection it is connected over 'en1'. My Mac gets a proper ip address (eg 10.10.x.x) for the en1 interface. I have other en* interfaces that get IP addresses like 169..., but I am not using those for network communication. In my CentOS virtual machine, the eth0 network interface is enabled and it gets a 10.10.x.x IP address. Do you have multiple network interfaces defined in your Linux VM instance? What does ifconfig show?
    – Rohit
    Commented Feb 7, 2012 at 23:25
  • Ok, I turned off the en3 connection in the Mac host, so now only the wireless connection is active. The Mac host was assigned 192.168.1.2 by the router. In Linux Mint, the vm in virtualbox, I changed the bridged adapter to use en0, rather than en3, and that's the only active network interface in the vm. Still doesn't work.
    – tgoneil
    Commented Feb 8, 2012 at 15:31
  • ifconfig output: Here is the eth0 output of ifconfig: $> ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:4b:81:0c inet6 addr: fe80::a00:27ff:fe4b:810c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:420509 errors:0 dropped:0 overruns:0 frame:0 TX packets:209529 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:326718251 (326.7 MB) TX bytes:28947274 (28.9 MB)
    – tgoneil
    Commented Feb 8, 2012 at 15:32
  • It confirms no inet address assigned. Just for grins, I changed the vm's network to NAT which does indeed get me internet access. I'm relatively new to network configurations, but isn't the NAT configuration supposed to use the host's ip address? With NAT for the adapter, ifconfig reports the ip address is: 10.0.2.15
    – tgoneil
    Commented Feb 8, 2012 at 15:37
3

I had same issue: NAT was working fine while in bridged mode failed to get DHCP.

I was suspicious about Lion Firewall but switching it off did not help.

Later I found that it is only DHCP that is not working in Bridged mode; so I set the IP address manually on my Linux host and everything started to work nicely.

1

Found a simple solution to the connectivity problem in VirtualBox:

  1. Set the Network setting to "NAT" in VirtualBox settings for the virtual/guest machine
  2. After booting into the VM, go to "Network Adapter Properties" and insert the following DNS server addresses (OpenDNS configuration):
    • 208.67.222.222
    • 208.67.220.220
  3. Now full internet connectivity is established.
1
  • 2
    Thanks Indrek, but was looking for BRIDGED networking solution, NOT Nat!
    – tgoneil
    Commented Sep 5, 2012 at 14:42

You must log in to answer this question.

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