Difference between revisions of "JLab Server"
m (→Dokumentation) |
m (→VLans) |
||
Line 102: | Line 102: | ||
vlan-raw-device bond0 | vlan-raw-device bond0 | ||
</pre> | </pre> | ||
+ | ==LinuX Containers== | ||
=Dokumentation= | =Dokumentation= | ||
http://www.stgraber.org/category/lxc/ | http://www.stgraber.org/category/lxc/ | ||
<references /> | <references /> |
Revision as of 16:36, 24 January 2012
<accesscontrol>teacher</accesscontrol>
Ide
Ideen med denne server er at lave et Juniper Lab, med en logon server der giver kursisten adgang til et virtuelt netværk hvor der kan opsættes udstyr og prøves ting af i et test senarie.
Installation
Default programs
sudo aptitude install nmap bmon nmon htop mono-runtime mono-2.0-gac
EtherChanel
Nic Bonding på Ubuntu er beskrevet her: https://help.ubuntu.com/community/LinkAggregation
sudo aptitude install ifenslave
sudo nano /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp # This is an autoconfigured IPv6 interface iface eth0 inet6 auto #Create the interface auto bond0 iface bond0 inet manual #Add physical network adapters bond-slaves eth1 eth2 #Configure load balancing mode #mode=0 (balance-rr) #mode=1 (active-backup) #mode=2 (balance-xor) #mode=3 (broadcast) #mode=4 (802.3ad) #mode=5 (balance-tlb) #mode=6 (balance-alb) bond_mode 2
Genstart networking
sudo /etc/init.d/networking restart
For at teste at det virker, har jeg lavet et program der sender UDP trafik til den bestemt IP og port, så hurtigt som maskinen kan.
Opret 2 statiske ARP's for maskinen har noget L2 at sende til:
sudo arp -s 10.0.0.3 00:00:00:00:00:01 sudo arp -s 10.0.0.4 00:00:00:00:00:02
Jeg har brugt bmon til at se om den sender noget trafik, og på hvilke kanaler.
rael@JLab:~$ ./LinuxUdpBomber.exe 10.0.0.3 5000 #Bmon snippet JLab (source: local) 0 lo 0.00B 0 0.00B 0 1 eth2 163.00B 1 0.00B 0 2 eth1 395.00B 3 11.08MiB 36076 3 eth0 566.00B 5 100.00B 0 4 bond0 558.00B 5 11.08MiB 36076 rael@JLab:~$ ./LinuxUdpBomber.exe 10.0.0.4 5000 #Bmon snippet JLab (source: local) 0 lo 0.00B 0 0.00B 0 1 eth2 0.00B 0 11.08MiB 36076 2 eth1 384.00B 5 0.00B 0 3 eth0 424.00B 6 186.00B 1 4 bond0 384.00B 5 11.08MiB 36076
VLans
Vlan konfiguration står beskrevet her: https://wiki.ubuntu.com/vlan
Installer vlan mgmt og load moduler
aptitude install vlan modprobe 8021q sudo su -c 'echo "8021q" >> /etc/modules'
Ændre i /etc/network/interfaces
auto bond0 iface bond0 inet static address 10.0.0.1 netmask 255.255.255.0 bond-slaves eth1 eth2 bond_mode 2 auto bond0.100 iface bond0.100 inet static address 10.100.0.1 netmask 255.255.255.0 vlan-raw-device bond0