Vagrant multiple hostonly networks problem

6 views
Skip to first unread message

spike.w...@gmail.com

unread,
Apr 11, 2018, 12:10:07 PM4/11/18
to Vagrant
Hello everybody,


Supposing that I have this setup:

server


server.vm.network 'private_network', ip: 192.168.10.10 , netmask: 255.255.255.0
server.vm.network 'private_network', ip: 192.168.20.10 , netmask: 255.255.255.0


client

client.vm.network 'private_network', type: "dhcp"
client.vm.network 'private_network', type: "dhcp"


server acts as dhcp server for client, How do I have to set on client that I would like that those 2 networks to linked to the server networks ( one to 192.168.10.0/24 and the second to 192.168.20.0/24 ) ?

I would like to have 2 different host only networks, and each adapter on a machine to be plugged in to one of those networks.

Since on client side both are configured with dhcp, I don't understand how I can distinguish them. But

I've found this example
config.vm.network "private_network", :type => 'dhcp', :name => 'vboxnet0'

But in this case if vboxnet0 already exists, my entire vagrant init will fail.


Could you please advise?

Thank you.
Spike

Alvaro Miranda Aguilera

unread,
Apr 11, 2018, 2:27:14 PM4/11/18
to vagra...@googlegroups.com
on client, try giving an ip on the same network, but use 

,auto_config: false

That should do the right thing and put the nics on the same vbox switch



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/3272a96d-9710-49ff-a77b-d3e6c6787966%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages