Homework #3. Configure a Linux Virtual Server

Goal:

Assignment Date: 10/2/2003
Due Day: 11/9/2003
Lab Reservation:

The lab reservation web page for 10/3-16/2003 is here.
10/17-22/2003 lab reservation.
10/23-30/2003 lab reservation.
10/31-11/9/2003 lab reservation.
11/11-24/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.

Lab Reservation:

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.

Exercise 4. Configure LVS-DR.

From Tim Biles:

For those who don’t have Remote Desktop Connection or Terminal Services Client, here is the link to download it directly from Microsoft. It is the latest version which will run on 95/98/Me/NT/2000/XP.

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).