标签:LVS-DR负载均衡
Linux Virtual Serve 虚拟服务器的体系结构如图1
LVS相关术语
调度器配置:
yum源配置:
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=http://172.25.40.250/rhel6.5
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=http://172.25.40.250/rhel6.5/HighAvailability
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=http://172.25.40.250/rhel6.5/LoadBalancer
gpgcheck=0
[ResilientStorage]
name=ResilientStorage
baseurl=http://172.25.40.250/rhel6.5/ResilientStorage
gpgcheck=0
[ScalableFileSystem]
name=ScalableFileSystem
baseurl=http://172.25.40.250/rhel6.5/ScalableFileSystem
gpgcheck=0
yum install ipvsadm -y
ip addr add 172.25.40.100/24 dev eth0
ipvsadm -A -t 172.25.40.100:80 -s rr
ipvsadm -a -t 172.25.40.100:80 -r 172.25.40.2 -g
ipvsadm -a -t 172.25.40.100:80 -r 172.25.40.3 -g
/etc/init.d/ipvsadm save
在RS上配置arp抑制:
Real-server 172.25.40.2
/etc/init.d/httpd start
ip addr add 172.25.40.100/24 dev eth0
yum install arptables_jf -y
arptables -A IN -d 172.25.40.100 -j DROP
arptables -A OUT -s 172.25.40.100 -j mangle --mangle-ip-s 172.25.40.2
/etc/init.d/arptables_jf save
Real-server 172.25.40.3
/etc/init.d/httpd start
ip addr add 172.25.40.100/24 dev eth0
yum install arptables_jf -y
arptables -A IN -d 172.25.40.100 -j DROP
arptables -A OUT -s 172.25.40.100 -j mangle --mangle-ip-s 172.25.40.3
/etc/init.d/arptables_jf save
标签:LVS-DR负载均衡
原文地址:http://blog.51cto.com/12183531/2096928