LVS--NAT模型
vim /etc/sysctl.conf 开启转发功能
net.ipv4.ip_forward = 1
sysctl -p 看是否开启
ipvsadm -A -t 172.16.125.5:80 -s rr
ipvsadm -a -t 172.16.125.5:80 -r 192.168.100.2 -m
ipvsadm -a -t 172.16.125.5:80 -r 192.168.100.3 -m
ipvsadm -L -n
ipvsadm -A -t 172.16.125.5:80 -s wrr
ipvsadm -a -t 172.16.125.5:80 -r 192.168.100.2 -m -w 3
ipvsadm -a -t 172.16.125.5:80 -r 192.168.100.3 -m -w 1
本文转自 meteor_hy 51CTO博客,原文链接:http://blog.51cto.com/zuoshou/1740692,如需转载请自行联系原作者