Last active
January 24, 2017 07:15
-
-
Save hkwi/607d899f5a5edc8526b6bf3f691979d8 to your computer and use it in GitHub Desktop.
Simple routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vagrant.configure(2) do |config| | |
| config.vm.box = "minimal/xenial64" | |
| config.vm.synced_folder ".", "/vagrant", disabled: true | |
| config.vm.define :nodeL do |node| | |
| node.vm.network :private_network, ip: "192.168.30.2", virtualbox__intnet: "L" | |
| node.vm.provision :shell, inline: <<-SHELL | |
| ip route replace default via 192.168.30.3 | |
| SHELL | |
| end | |
| config.vm.define :nodeR do |node| | |
| node.vm.network :private_network, ip: "192.168.40.2", virtualbox__intnet: "R" | |
| node.vm.provision :shell, inline: <<-SHELL | |
| ip route replace default via 192.168.40.3 | |
| SHELL | |
| end | |
| config.vm.define :nodeX do |node| | |
| node.vm.network :private_network, ip: "192.168.30.3", virtualbox__intnet: "L" | |
| node.vm.network :private_network, ip: "192.168.40.3", virtualbox__intnet: "R" | |
| node.vm.provision :shell, inline: <<-SHELL | |
| sysctl net.ipv4.ip_forward=1 | |
| SHELL | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment