2. The Network

First set-up a basic network.

image for >

I used 3640 as routers. I put a NM-4E in slot 0. Step one is to set-up the IP addresses; as an example for r1:
enable
conf t
interface Ethernet0/0
 ip address 10.128.1.1 255.255.255.0
 no shut
!
interface Ethernet0/1
 ip address 10.128.3.1 255.255.255.0
 no shut
!
^Z
wr

Once it is all set, verify that you can ping the neighbours:
Router#ping 10.128.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.128.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms
Router#ping 10.128.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.128.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms
Router#

Next step is to get routing going on all routers.
enable
conf t
router rip
version 2
network 10.128.0.0
no auto-summary

Verify that routing works; on r3:
Router#traceroute 10.128.4.2
Type escape sequence to abort.
Tracing the route to 10.128.4.2
  1 10.128.3.1 4 msec 0 msec 4 msec
  2 10.128.1.2 12 msec 4 msec 8 msec
  3 10.128.4.2 12 msec 12 msec * 
Router#

Next are the servers.
host
function
adapter
IP
network
xenial1
DNS server
eth1
10.128.5.2
vboxnet1
xenial2
DNS server
eth1
10.128.6.2
vboxnet2
xenial3
DNS client
eth1
10.128.7.2
vboxnet3
xenial4
DNS client
eth1
10.128.8.2
vboxnet4

The networks are defined in VirtualBox.

network2.png>

As a first Vagrantfile file, use the following content:
# -*- 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 :xenial1 do |t|
		t.vm.box = "ubuntu/xenial64"
		t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64"
		t.vm.provider "virtualbox" do |prov|
			prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet1" ]
		end
		t.vm.provision "shell", path: "./setup.xenial1.sh"
	end
	config.vm.define :xenial2 do |t|
		t.vm.box = "ubuntu/xenial64"
		t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64"
		t.vm.provider "virtualbox" do |prov|
			prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet2" ]
		end
		t.vm.provision "shell", path: "./setup.xenial2.sh"
	end
	config.vm.define :xenial3 do |t|
		t.vm.box = "ubuntu/xenial64"
		t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64"
		t.vm.provider "virtualbox" do |prov|
			prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet3" ]
		end
		t.vm.provision "shell", path: "./setup.xenial3.sh"
	end
	config.vm.define :xenial4 do |t|
		t.vm.box = "ubuntu/xenial64"
		t.vm.box_url = "file:////links/virt_comp/vagrant/boxes/xenial64"
		t.vm.provider "virtualbox" do |prov|
			prov.customize ["modifyvm", :id, "--nic2", "hostonly", "--hostonlyadapter2", "vboxnet4" ]
		end
		t.vm.provision "shell", path: "./setup.xenial4.sh"
	end
end

The set-up scripts look like this:

setup.xenial1.sh:
 #!/bin/bash
 echo "Setup xenial1"
 ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p')
 
 ifconfig $ETH1 10.128.5.2 netmask 255.255.255.0
 route add -net 10.128.0.0 netmask 255.255.0.0 gw 10.128.5.1
 netstat -rn

Noteworthy is, that Ubuntu now uses unpredictable interface names, which systemd zealots seem to prefer, and the effort needed to assign the IP address to the right interface.

setup.xenial2.sh:
 #!/bin/bash
 echo "Setup xenial2"
 ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p')
 ifconfig $ETH1 10.128.6.2 netmask 255.255.255.0
 route add -net 10.128.0.0 netmask 255.255.0.0 gw 10.128.6.1
 netstat -rn

setup.xenial3.sh:
 #!/bin/bash
 ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p')
 ifconfig $ETH1 10.128.7.2 netmask 255.255.255.0
 ifconfig -a
 route add -net 10.128.0.0 netmask 255.255.0.0 gw 10.128.7.1
 netstat -rn
 hostname xenial3
 domainname home

setup.xenial4.sh
 #!/bin/bash
 ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p')
 ifconfig $ETH1 10.128.8.2 netmask 255.255.255.0
 route add -net 10.128.0.0 netmask 255.255.0.0 gw 10.128.8.1
 netstat -rn

Finally, if all that work is done, the network in GNS3 should look like this:

gns3topology.png>

You should now be able to ping from xenial3 and xenial4 to xenial1 and xenial2.