Skip to content

Commit a9a7b54

Browse files
committed
defaulting to configuring the vm on a private network so that it can be used when not connected or when connecting to various networks
1 parent 3a53498 commit a9a7b54

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

Vagrantfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,17 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4040
# config.vm.network :forwarded_port, guest: 80, host: 8080
4141

4242
# Create a private network, which allows host-only access to the machine
43-
# using a specific IP.
44-
# config.vm.network :private_network, ip: "192.168.33.10", netmask: "255.255.255.240"
43+
# using a specific IP. If you want to run multiple vms at once, you can change the .100
44+
# running a private network eliminates the chances of conflicting with the network you are connected to.
45+
# this is particularly useful when you want to run the vm on your laptop and endup being on various networks
46+
# or even no network connectivity
47+
config.vm.network :private_network, ip: "192.168.99.100", netmask: "255.255.255.255"
4548

4649
# Create a public network, obtain it's ip through dhcp and bridge it through host's en0
47-
# config.vm.network :public_network, :bridge => 'en0: Ethernet', ip: "192.168.10.222", netmask: "255.255.255.0"
48-
config.vm.network :public_network, :bridge => 'en0: Ethernet'
49-
#'en1: Wi-Fi (AirPort)'
50+
# config.vm.network :public_network, :bridge => 'en0: Ethernet'
5051

51-
# Create a public network with a static ip and bridged through host's en0 and specify the netmask
52-
# config.vm.network :public_network, :bridge => 'en0: Ethernet', ip: "190.5.74.29", netmask: "255.255.255.240"
52+
# The following can be used to specify a static ip through the host's en0. You can use other nework adaptors such as 'en1: Wi-Fi (AirPort)'
53+
# config.vm.network :public_network, :bridge => 'en0: Ethernet', ip: "192.168.10.222", netmask: "255.255.255.255"
5354

5455
# If true, then any SSH connections made will enable agent forwarding.
5556
# Default value: false

0 commit comments

Comments
 (0)