2. The network

2.1. Connecting the network


network.png>

All devices are 3640 routers. The switches are the NM-16-ESW switch cards in a slot; we'll be using them as switch. For the hosts, we've just connected them to the different vboxnet interfaces.

For the VirtualBox instances, the following Vagrantfile is used:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
        config.vm.define :precise1 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet1" ]
                end
                t.vm.provision "shell", path: "./setup.precise1.sh"
        end
        config.vm.define :precise2 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet2" ]
                end
                t.vm.provision "shell", path: "./setup.precise2.sh"
        end
        config.vm.define :precise3 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet3" ]
                end
                t.vm.provision "shell", path: "./setup.precise3.sh"
        end
        config.vm.define :precise4 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet4" ]
                end
                t.vm.provision "shell", path: "./setup.precise4.sh"
        end
        config.vm.define :precise5 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet5" ]
                end
                t.vm.provision "shell", path: "./setup.precise5.sh"
        end
        config.vm.define :precise6 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet6" ]
                end
                t.vm.provision "shell", path: "./setup.precise6.sh"
        end
        config.vm.define :precise7 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet7" ]
                end
                t.vm.provision "shell", path: "./setup.precise7.sh"
        end
        config.vm.define :precise8 do |t|
                t.vm.box = "hashicorp/precise32"
                t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet8" ]
                end
                t.vm.provision "shell", path: "./setup.precise8.sh"
        end
        config.vm.define :precise9 do |t|
                t.vm.box = "hashicorp/precise32"
                       t.vm.provider "virtualbox" do |prov|
                        prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet9" ]
                end
                t.vm.provision "shell", path: "./setup.precise9.sh"
        end
end

I have tried to do it in a loop, but I have some problems understanding the Ruby way of looping.

2.2. Basic IP plan

This is not the complete IP plan, but the information required to get it all working.
network
subnet
netmask
user1
10.128.101.0
255.255.255.0
core
10.128.1.0
255.255.255.0
all natted networks
10.128.2.0
255.255.255.0