vbox: replace NAT eth0 with real bridged interface

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vbox: replace NAT eth0 with real bridged interface

Luis Lavena
Hello,

I found myself in the need to replicate the following network interface setup:

eth0: dhcp interface connected "to the internetz" (IPv4)
eth1: dhcp interface connected to the DC routing.

Until today, I was a happy person using "private_network" and setting it to a particular IP, leaving the eth0 as NAT and used to download stuff from the web.

Now, I need to ensure eth0 is public interface so other machines can connect to the ports of it and eth1 be an internal network for multiple VMs on the same machine to interact (cluster).

I've tried adding the "public_network" and indicate the bridge in my Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "precise64"

  # boxes
  config.vm.define "box1" do |box|
    # setup two interfaces
    box.vm.network "public_network",  bridge: "en0: Wi-Fi (AirPort)"
    box.vm.network "private_network", ip:     "192.168.33.100"
  end
end

But seems that the one defined as public ends being eth1 and the private being eth2.

While I know particular provider customization should be avoided, perhaps there is something I can do as provider block to remove the briged/NAT interface?

All this were my noob observations, but most likely I'm missing something.

Any suggestion?

Thank you in advance.
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: vbox: replace NAT eth0 with real bridged interface

Adam Mills
Im in the same position.
Anyone got this working?

On Tuesday, September 10, 2013 9:57:14 PM UTC-4, Luis Lavena wrote:
Hello,

I found myself in the need to replicate the following network interface setup:

eth0: dhcp interface connected "to the internetz" (IPv4)
eth1: dhcp interface connected to the DC routing.

Until today, I was a happy person using "private_network" and setting it to a particular IP, leaving the eth0 as NAT and used to download stuff from the web.

Now, I need to ensure eth0 is public interface so other machines can connect to the ports of it and eth1 be an internal network for multiple VMs on the same machine to interact (cluster).

I've tried adding the "public_network" and indicate the bridge in my Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "precise64"

  # boxes
  config.vm.define "box1" do |box|
    # setup two interfaces
    box.vm.network "public_network",  bridge: "en0: Wi-Fi (AirPort)"
    box.vm.network "private_network", ip:     "192.168.33.100"
  end
end

But seems that the one defined as public ends being eth1 and the private being eth2.

While I know particular provider customization should be avoided, perhaps there is something I can do as provider block to remove the briged/NAT interface?

All this were my noob observations, but most likely I'm missing something.

Any suggestion?

Thank you in advance.
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vbox: replace NAT eth0 with real bridged interface

VMTrooper
Hello Adam,

Virtualbox uses eth0 for VM customization and management. Unless the dev team made significant changes recently, It is not possible to change it.

The best thing to do is add additional network statements like in the OP's sample code and then customize your networks starting with eth1.

Regards,
Trevor

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.