Changes

Jump to: navigation, search

Virtual-Lan

968 bytes added, 20:53, 10 September 2014
Virtual Network Configuration
count=$(expr ${count} + 1)
done
 
* You also need to add routes on all you VMs to each student's "opsnet" and the logical network "172.16.0.0" that connects all the hosts. You can do it manually or by running the following script on each of your VMs:
#!/bin/bash
x=10 # my network id
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.${x}.1
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.${x}.1
route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.${x}.1
route add -net 192.168.4.0 netmask 255.255.255.0 gw 192.168.${x}.1
...
route add -net 192.168.36.0 netmask 255.255.255.0 gw 192.168.${x}.1
route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.${x}.1
 
or:
#!/bin/bash
count=1
x=10 # my network id
while [ ${count} -le 32 ]
do
if [ ${count} != ${x} ]
then
route add -net 192.168.${count}.0 netmask 255.255.255.0 gw 192.168.${x}.1
fi
count=$(expr ${count} + 1)
done
route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.${x}.1
 
* To test your static routes, pair up with a few fellow students and try to ping their VMs in their "opsnet".
1,760
edits

Navigation menu