Changes

Jump to: navigation, search

Virtual-Lan

618 bytes added, 03:06, 12 January 2011
Setup a Virtual Local Area Networking Using CentOS 5.5
=Setup a Virtual Local Area Networking Using CentOS 5.5Network environment for OPS535 Labs=
== OS Installation ==
* Locate the name of the physical network device connected to the lab network. The following configuration assume eth3 as the device name name.
** assignment 172.16.[x].1 to the alias of eth3: ifconfig eth3:0 172.16.[x].1
* Adding routes to each student's "opsnet" virtual network manually or by running the following bash script on the host OS:
#!/bin/bash
route add -net 192.168.1.0 netmask 255.255.255.0 gw 172.16.1.1
route add -net 192.168.2.0 netmask 255.255.255.0 gw 172.16.2.1
route add -net 192.168.3.0 netmask 255.255.255.0 gw 172.16.3.1
route add -net 192.168.4.0 netmask 255.255.255.0 gw 172.16.4.1
...
route add -net 192.168.36.0 netmask 255.255.255.0 gw 172.16.36.1
 
or:
#!/bin/bash
x=1
while [ $x -le 36 ]
do
route add -net 192.168.${x}.0 netmask 255.255.255.0 gw 172.16.${x}.1
x=$(expr $x + 1)
done
1
edit

Navigation menu