Page 1 of 1
Bridged mode on ubuntu 16.04
Posted: 3. May 2016, 18:08
by alain.roger
Hi,
before i used VB on linux Host and i was able to setup NAT for guest and to setup a MAC address, to make my guest VM use its own IP address given by router.
However i'm not able to get the same thing under ubuntu 16.04.
even if i set my VM guest (window) using NAT and setup a MAC address, once started my guest VM display an IP as 10.0.2.15 for example instead of having for example 192.168.1.205 as my home network/router is set to give DHCP IP starting by 192.168.1.X
so where is the problem with version 5.0.20 ?
thx
Re: NAT on ubuntu 16.04
Posted: 3. May 2016, 18:21
by socratis
alain.roger wrote:i was able to setup NAT for guest and to setup a MAC address, to make my guest VM use its own IP address given by router.
I'm afraid that this doesn't make too much sense. NAT stands for Network Address Translation. Your router will never see the VM's MAC address, since everything goes through the host and gets translated there. The IP will default to 10.0.2.15.
What you most probably had was "Bridged" mode, where the VM acts as another physical PC on your network. In that case, it asks from the router directly for an address (if DHCP is enabled). In that case your router would definitely see the VM's MAC address. Try to change the network mode to Bridged.
Re: Bridged mode on ubuntu 16.04
Posted: 3. May 2016, 20:48
by alain.roger
Yes sorry, i was talking about bridged mode

sorry for my mistake... 35 hours without sleeping result
so doing such as my laptop use Wifi adaptor, i should get 192.168.1.x while in guest i get 169.254.1.x

my router does not allocate such range...so from where is it coming ?
if i do File > Preferences > Network and create a Host Only network, my wifi adapter from my laptop stop to work.... so no way to bridge it later on in VM settings.
any idea ?
Re: Bridged mode on ubuntu 16.04
Posted: 4. May 2016, 07:28
by socratis
alain.roger wrote:I get 169.254.1.x. My router does not allocate such range...so from where is it coming?
From the inability of your computer/VM to get an automatic address from DHCP. Read
https://en.wikipedia.org/wiki/Link-local_address
Did I understand that this used to work with 5.0.18?
You should read
http://www.virtualbox.org/manual/ch06.html to better understand the basics of networking in VirtualBox. And unless you have a good understanding of the implications of your actions, do not things like changing the MAC addresses.
Re: Bridged mode on ubuntu 16.04
Posted: 4. May 2016, 18:45
by alain.roger
if i set Bridged mode on VM and set a particular MAC address, my router allocate a static IP based on MAC Address to the VM guest OS.
But for unknown reason on Linux host (kubuntu 16.04) and VB 5.0.20 such behavior does not work the same and router does not find the VM guest OS and can not allocate an IP.