Bridged mode on ubuntu 16.04

Discussions related to using VirtualBox on Linux hosts.
Post Reply
alain.roger
Posts: 42
Joined: 10. Feb 2010, 15:34
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows, MacOSX, Manjaro
Contact:

Bridged mode on ubuntu 16.04

Post 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
Last edited by alain.roger on 3. May 2016, 21:08, edited 1 time in total.
Manjaro 21 / Plasma 5
What does not kill you, makes you stronger
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NAT on ubuntu 16.04

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
alain.roger
Posts: 42
Joined: 10. Feb 2010, 15:34
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows, MacOSX, Manjaro
Contact:

Re: Bridged mode on ubuntu 16.04

Post 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 ?
Manjaro 21 / Plasma 5
What does not kill you, makes you stronger
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged mode on ubuntu 16.04

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
alain.roger
Posts: 42
Joined: 10. Feb 2010, 15:34
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows, MacOSX, Manjaro
Contact:

Re: Bridged mode on ubuntu 16.04

Post 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.
Manjaro 21 / Plasma 5
What does not kill you, makes you stronger
Post Reply