I installed 3.1.4 on Snow Leopard, and using Ubuntu guest.
Network is sort of working but I am scratching my head about it.
(Well, if I change /etc/resolv.conf along with "route add default gw" to my actual gateway, it works.)
When I use "bridge", the guest Ubuntu still gets DHCP lease from the host Mac OS X.
I know it's the MacOS X host since /etc/resolv.conf has the IP address of the host Mac OS X.
If it's NAT, I understand. But for "bridge", NAT's DHCP needs to stop, and I don't know how.
Thanks.
Bridge network question
-
tennisgeek
- Posts: 7
- Joined: 4. Mar 2010, 20:07
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Ubuntu
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Bridge network question
Using Bridged you should be getting this information from your router.
Do you have a router in the network? Or are you trying to bridge to the host and do the routing there?
Do you have a router in the network? Or are you trying to bridge to the host and do the routing there?
-
tennisgeek
- Posts: 7
- Joined: 4. Mar 2010, 20:07
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Ubuntu
Re: Bridge network question
The MacOS X host gets the DHCP lease correctly from the server (which is a dd-wrt, if you care.)
-
tennisgeek
- Posts: 7
- Joined: 4. Mar 2010, 20:07
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Ubuntu
Re: Bridge network question
I'm not asking about DNS address or routing, nor asking about how DHCP server should be set up in my network, nor "there should be a router" in my network.Perryg wrote:Using Bridged you should be getting this information from your router.
Do you have a router in the network? Or are you trying to bridge to the host and do the routing there?
I thought that my original post was sufficient to indicate that even the Ubuntu guest's network is working correctly if I manually set the /etc/resolv.conf and default routing.
I'm asking about how to make MacOS X host's VirtualBox to not do DHCP lease to the guest when the network is set to bridge.
Thanks.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Bridge network question
I simply asked so I would know. Just because you know what you were talking about does not mean anyone else would.
Evidently this has become personal to you and I need to back away.
Evidently this has become personal to you and I need to back away.
-
tennisgeek
- Posts: 7
- Joined: 4. Mar 2010, 20:07
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Ubuntu
Re: Bridge network question
I am totally cool about it. Thanks for the reply anyway.
Do you have any suggestion about how to stop the DHCP lease from the VirtualBox on MacOS X to the guest?
I suspect some kind of setting that I missed or killing a background process gets the job done.
Thanks.
Do you have any suggestion about how to stop the DHCP lease from the VirtualBox on MacOS X to the guest?
I suspect some kind of setting that I missed or killing a background process gets the job done.
Thanks.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Bridge network question
You shut down the VirtualBox dhcp server with the following command:
You can see the rest of the commands to control VirtualBox and guests in your VirtualBox Users Guide.
Code: Select all
VBoxManage dhcpserver --disable-
tennisgeek
- Posts: 7
- Joined: 4. Mar 2010, 20:07
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Ubuntu
Re: Bridge network question
Alrighty!
(a) Using the VBoxManage to disable DHCP server
You do
VBoxManage list dhcpservers
so that you get the name of DHCP server, then
VBoxManage dhcpserver -name <the-name> -disable
This solved the problem.
(b) After realizing that the DHCP is per virtual network, I opened the Network setting, and "edit" the vboxnet0 (? from top of my head).
Sure enough the dialog box has two tabs, and second is "DHCP server". That's what I missed.
By the time I discovered it, it was already disabled, probably because of (a)
What I did not know is that the DHCP on/off is per virtual network, so it's setting is in the separate dialog of virtual network.
From user's point of view, it would be nice if the installation creates two virtual networks, one with DHCP server for NAT and the other without DHCP server for bridge, and warns the user for the bridge connection using DHCP server, and not having DHCP server for non-bridge connection.
Also, when "bridge" is chosen, it would be nice if the UI forces you to pick the virtual network without DHCP server.
Anyway, I now know where to toggle.
Thanks for the help.
(a) Using the VBoxManage to disable DHCP server
You do
VBoxManage list dhcpservers
so that you get the name of DHCP server, then
VBoxManage dhcpserver -name <the-name> -disable
This solved the problem.
(b) After realizing that the DHCP is per virtual network, I opened the Network setting, and "edit" the vboxnet0 (? from top of my head).
Sure enough the dialog box has two tabs, and second is "DHCP server". That's what I missed.
By the time I discovered it, it was already disabled, probably because of (a)
What I did not know is that the DHCP on/off is per virtual network, so it's setting is in the separate dialog of virtual network.
From user's point of view, it would be nice if the installation creates two virtual networks, one with DHCP server for NAT and the other without DHCP server for bridge, and warns the user for the bridge connection using DHCP server, and not having DHCP server for non-bridge connection.
Also, when "bridge" is chosen, it would be nice if the UI forces you to pick the virtual network without DHCP server.
Anyway, I now know where to toggle.
Thanks for the help.
-
tennisgeek
- Posts: 7
- Joined: 4. Mar 2010, 20:07
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Ubuntu
Re: Bridge network question
FYI: If you update VirtualBox from 3.0 to 3.1. (Somewhat of OT.)
I updated VirtualBox on Ubuntu to 3.1.4 from 3.0.?, and bit me in the same way.
The command used for disabling DHCP server of VirtualBox is the same on MacOS X as Ubuntu.
$ VBoxManage list dhcpservers
Sun VirtualBox Command Line Management Interface Version 3.1.4
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
NetworkName: HostInterfaceNetworking-vboxnet0
IP: 192.168.56.100
NetworkMask: 255.255.255.0
lowerIPAddress: 192.168.56.101
upperIPAddress: 192.168.56.254
Enabled: Yes
$ VBoxManage dhcpserver modify --netname HostInterfaceNetworking-vboxnet0 --disable
And the bridge network works again.
I updated VirtualBox on Ubuntu to 3.1.4 from 3.0.?, and bit me in the same way.
The command used for disabling DHCP server of VirtualBox is the same on MacOS X as Ubuntu.
$ VBoxManage list dhcpservers
Sun VirtualBox Command Line Management Interface Version 3.1.4
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
NetworkName: HostInterfaceNetworking-vboxnet0
IP: 192.168.56.100
NetworkMask: 255.255.255.0
lowerIPAddress: 192.168.56.101
upperIPAddress: 192.168.56.254
Enabled: Yes
$ VBoxManage dhcpserver modify --netname HostInterfaceNetworking-vboxnet0 --disable
And the bridge network works again.