Assignment
Date: 10/2/2003
Due Day:
11/9/2003
Lab Reservation:
Description:
I have set up 8 small virtual machines as real servers running Redhat 9 Linux and apache web servers . 4 runs on ardor and 4 runs on dilbert. Each only uses 32MBytes of main memory and about 700MBytes of disk space. Note that on dilbert there are also duplicate rsnat1 and rsnat2. If you are assigned to run on dilbert, you can use them also. Since we are using private LAN, the 192.168.2.0/24 on dilbert is different from that on ardor. The IP address assigned to the eth2 interfaces of the 8 virtual machines are
On ardor
rsnat1 192.168.2.111
rsnat2 192.168.2.112
rsdr1 192.168.2.101
rsdr2 192.168.2.102
On dilbert
rsnat3 192.168.2.113
rsnat4 192.168.2.114
rsdr1 192.168.2.103
rsdr2 192.168.2.104
They also has eth0 configured with 128.198.61.x where x is the same last byte of the eth2 IP address. When configured as real servers of LVS-NAT cluster, their eth0 should be shutdown.
Both dilbert and ardor are set up with a host-only virtual network, 192.168.2.0/24, and it is associated with VMWare virtual network 2, VMNet2.
Due to limited disk space and the relative
speed of the machines, we are divided into two groups. First group only
uses the dilbert machine. It consists of students with following login:
twbiles, ycai, mechrist, pdcook, asdeshmu, gkgodava. The rest of the class
constitutes the second group and uses ardor. Use account cs526 and same
password to access these two host machines. The
lab reservation web page for 10/3-16/2003 is here.
For 10/17-22/2003 lab serveration, use this
web page.
d:\vmware\cs526 contains a folder with your login name. Copy the content of d:\vmware\cs526hw3\lvs directory to your designated directory. d:\vmware\cs526hw3\lvs contains the virtual machine files of a redhat 9 with 2.4.20-8 kernel.
In Exercise 1, configure your virtual machine to have its own domain name and IP address. In Exercise 2, upgrade it to 2.4.21 kernel and patch it with lvs code. In Exercise 3, configure it as the lvs-nat director to work with rsnat1 and rsnat2 real servers as a web cluster. In Exercise 4, configure it as lvs-dr director to work with rsdr1 and rsdr2 real server as a web cluster.
Exercise 1. Run and Configure the virtual machine with its own domain name and IP address.
Exercise 2. Upgrade kernel to 2.4.21 and patches with lvs code.
Exercise 3. Configure LVS-NAT.
---
192.168.2.111 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.480/1.480/1.480/0.000 ms
PING 192.168.2.112 (192.168.2.112) 56(84) bytes of data.
64 bytes from 192.168.2.112: icmp_seq=1 ttl=64 time=2.51 ms
---
192.168.2.112 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.515/2.515/2.515/0.000 ms
IP Virtual Server version 1.0.10 (size=65536)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 128.198.61.61:http wlc
-> 192.168.2.112:http Masq 2 0 0
-> 192.168.2.111:http Masq 3 0 0
http://www.microsoft.com/downloads/details.aspx?FamilyID=a8255ffc-4b4a-40e7-a706-cde7e9b57e79&DisplayLang=en
LVS-DR
We need to patch kernel to use the hidden flag feature.
[root@rsnat2 lvs]# wget http://www.ssi.bg/~ja/hidden-2.4.20pre10-1.diff
--21:31:40-- http://www.ssi.bg/%7Eja/hidden-2.4.20pre10-1.diff
=> `hidden-2.4.20pre10-1.diff'
Resolving www.ssi.bg... done.
Connecting to www.ssi.bg[217.79.71.85]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6,526 [text/plain]
100%[====================================>] 6,526 13.50K/s ETA 00:00
21:31:46 (13.50 KB/s) - `hidden-2.4.20pre10-1.diff' saved [6526/6526]
[root@rsnat2 linux]# ls *.diff
hidden-2.4.20pre10-1.diff
[root@rsnat2 linux]# patch -p1 < hidden-2.4.20pre10-1.diff
patching file Documentation/filesystems/proc.txt
Hunk #1 succeeded at 1567 (offset -6 lines).
patching file Documentation/networking/ip-sysctl.txt
Hunk #1 succeeded at 489 (offset 44 lines).
patching file include/linux/inetdevice.h
patching file include/linux/sysctl.h
Hunk #1 succeeded at 344 (offset 5 lines).
patching file net/ipv4/arp.c
patching file net/ipv4/devinet.c
Hunk #2 succeeded at 1057 (offset 24 lines).