HI,

I'm trying to set a static ip address on my public_network. My home network 
is 10.0.1.0/24 and I'd like the host to be on that.

My line inside my Vagrantfile is as follows:

config.vm.network "public_network", ip: "10.0.1.111"

When i run vagrant up && vagrant ssh  then ifconfig -a, a new interface 
eth1 is created however its clearly getting its ipaddress via DHCP.

eth1      Link encap:Ethernet  HWaddr 00:0C:29:78:F7:1F
          inet addr:10.0.1.215  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe78:f71f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:316 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:28658 (27.9 KiB)  TX bytes:1236 (1.2 KiB)

[vagrant@localhost ~]$ vi /etc/sysconfig/network-scripts/ifcfg-eth1
[vagrant@localhost ~]$ cat !$
cat /etc/sysconfig/network-scripts/ifcfg-eth1
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
BOOTPROTO=dhcp
ONBOOT=yes
DEVICE=eth1
#VAGRANT-END

So, vagrant is ignoring the IP address for public networks.

My environment is as follows:

Host : Mavericks
Guest : Centos 6.5
Vagrant: 1.6.5
Using the VMWare Fusion provider.

Thoughts?

Jeff.






-- 
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