Detailed LVS Configuration
NAT model
Schematic diagram:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/79/C9/wKioL1abBzrQCAXFAADTAjwmcD8103.png "title=" Nat.png "alt=" Wkiol1abbzrqcaxfaadtajwmcd8103.png "/>
IP Address Planning:
cip:192.168.55.2
DIP:
eth1:172.16.1.254
eth0:192.168.55.5
vip:eth0:0 192.168.55.30
rip1:172.16.1.10
rip2:172.16.1.11
1 . First install the httpd on the backend real server and configure the index.html page. Two back-end servers can be accessed on the director.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/79/CA/wKiom1abCFPgIPfQAABuZkMFTKs301.png "title=" Nat1.png "alt=" Wkiom1abcfpgipfqaabuzkmftks301.png "/>
2 . Configure VIP on Director
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/79/C9/wKioL1abCUmDyMxhAABhLh-5ECs399.png "title=" Nat2.png "alt=" Wkiol1abcumdymxhaabhlh-5ecs399.png "/>
3, configure Ip_forward on director, is to turn on the IP forwarding function
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/79/CA/wKiom1abCXzCtwIKAAAUlSK5n44372.png "title=" Nat3.png "alt=" Wkiom1abcxzctwikaaaulsk5n44372.png "/>
4. Configure Ipvs rules in director
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/79/CA/wKiom1abChXzQX4KAACBT8lruog173.png "title=" Nat4.png "alt=" Wkiom1abchxzqx4kaacbt8lruog173.png "/>
Several issues to be aware of:
First: When configuring LVS, all hosts do not consider the rules of the firewall, so I am the direct service iptables stop.
Second: IPVSADM configuration Command This experiment is to use RR scheduling algorithm, more other algorithms can be studied by themselves.
Third: In the configuration of real server I was added port, if the backend is 8080, the port can be. This enables port forwarding.
This article technical information from this site http://www.178linux.com/10598, in this thank Marco Education.
This article is from the "Leslie" blog, make sure to keep this source http://qikang.blog.51cto.com/1504256/1735763
LVS na model