Linux Lab Report-Build a LVS of the DR Model
Experimental background:
Learn notes and build a Dr model of LVs
Experimental Purpose:
Understand LVS of the DR How the Model works
Implement a LVS of the DR the experiment of the model
Lab Environment:
Vmware Workstation 9 , CentOS 6.4
experimental steps:
1 , the experiment aims to plan the following models,CIP,VIP,DIP and RIP on the same network segment
650) this.width=650; "title=" snag-0196.jpg "src=" http://s3.51cto.com/wyfs02/M00/41/5C/wKiom1PTpObRIvI_ Aaeqcjkduh4106.jpg "alt=" Wkiom1ptpobrivi_aaeqcjkduh4106.jpg "/>
2 , RS1 the configuration is as follows:
To configure kernel parameters:
#echo 1 >/prco/sys/net/ipv4/conf/lo/arp_ignore #echo 1 >/prco/sys/net/ipv4/conf/all/arp_ign Ore #echo 2 >/prco/sys/net/ipv4/conf/lo/arp_announce#echo 2 >/prco/sys/net/ipv4/conf/all/arp _announce
Configure RIP,VIP:
#ifconfig eth0 172.16.100.7/24#ifconfig lo:0 172.16.100.3 broadcast 172.16.100.3 netmask 255.255.255.255 up
To add a route:
#route add-host 172.16.100.3 Dev lo:0
3 , in accordance with the same process RS2 (slightly)
4 , Director on the configuration:
Configure DIP,VIP:
#ifconfig eth0 172.16.100.1/24#ifconfig eth0:0 172.16.100.3 broadcast 172.16.100.3 netmask 255.255.255.255 up
to add a route:
#route add-host 172.16.100.3 Dev eth0:0
to define a rule:
#ipvsadm-A-t 172.16.100.3:80-s RR #ipvsadm-T 172.16.100.3:80-r 172.16.100.7-g-W 2#ipvsadm-a-T 172.16.100.3:80 -R 172.16.100.8-g-W 1#ipvsadm-l-N
5 , complete the configuration, and start testing:
Client Connection Web page Test http://172.16.100.3 , keep refreshing, Director you can observe that the client's link request is evenly dispatched to the following command RS1 with the RS2 to respond ( RR Polling scheduling algorithm)
#watch-n1 ' ipvsadm-l-n--status '
This article is from the Zebra Linux blog, so be sure to keep this source http://zebralinux.blog.51cto.com/8627088/1530271
Linux Lab Report-Build a Dr model of LVS