Narada, the reason that it creates two interfaces through Vagrant is that 
Vagrant internally requires a host-only or NAT connection in order to 
contact the machine directly WITHOUT going out and back in through the 
bridged connection. This is because that kind of "hairpin" in networking is 
tough to manage and maintain, where a "host-only" route is easier to verify 
and confirm is functional.

Technically you should be able to ping the VM's bridged interface from 
other VMs (assuming your host firewall is disabled and properly passing 
traffic to the VM via the bridge), but the eth0 which is the internal 
interface, is mostly for Vagrant to manage the VM through SSH. If you 
aren't using bridged networking in the VM, you need to use port forwarding 
in your Vagrantfile to publish ports from your VM and make them available 
on the host's IP.

Otherwise everything Alvaro mentioned is correct that you probably need to 
clear the network connection info if you are packaging it.

On Thursday, April 23, 2015 at 9:35:54 AM UTC-5, Narada Hess wrote:
>
> If I create a VM using bridged networking from virtualbox directly, the VM 
> IP address assigned is on the same subnet as my host and the VM can be 
> pinged from any other host on the subnet.  Good.  ifconfig shows an IP 
> address on eth0 within the normal external subnet range.  There is no eth1.
>
> But if I create the VM from vagrant, I cannot ping the VM from other 
> hosts.  ifconfig now shows two adapters.  eth0 has a 10.0.2.x address that 
> does not match my actual subnet, and the route command shows 10.0.2.2 as 
> the default gateway.  eth1 now shows up, with an address that looks like a 
> correctly allocated address from the real DHCP server.  But pinging its 
> address form an external host does not work.
>
> I have this command in Vagrantfile:
>     config.vm.network "public_network", bridge: 'eth0', type: "dhcp"
> I have also tried:
>     config.vm.network "public_network"
> and
>     config.vm.network "public_network", bridge: 'eth0'
>
> I am using Ubuntu 14.04 and latest versions of vagrant (1.7.2) and 
> virtualbox (4.3.26).  I suspect the 10.0.2.x DHCP address is being 
> generated locally (within my host) and thus is not registered with the real 
> DHCP server (and is thus not being routed).
>
> Thanks to anyone who can help me with this.
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to