One more piece of info is that from within the VM that works, I do not see
any DHCP leases. But from the problematic VM, I see:
/var/lib/dhcp/dhclient.eth0.leases: option dhcp-server-identifier
10.0.2.2;
/var/lib/dhcp/dhclient.eth1.leases: option dhcp-server-identifier
10.31.2.107;
On Thursday, April 23, 2015 at 7:35:54 AM UTC-7, 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.