lvs命令
(具体参数的意思可以参看其他文章)
1,查看配置 ipvsadm -ln
2,清空所有配置 ipvsadm -C
listener(-t添加tcp -u添加udp)
添加:ipvsadm -A -t 192.168.11.60:80 -s rr
修改:ipvsadm -E -t 192.168.11.60:80 -s wrr
删除:ipvsadm -D -t 192.168.11.60:80
real server(DR模式)
添加:ipvsadm -a -t 192.168.11.60:80 -r 10.110.38.146:8080 -g -w 20
修改:ipvsadm -e -t 192.168.11.60:80 -r 10.110.38.146:8080 -g -w 10
删除:ipvsadm -d -t 192.168.11.60:80 -r 10.110.38.146:8080
real server (nat模式)
ipvsadm -A -t [2001:250:4000:2000::50]:888
ipvsadm -a -t [2001:250:4000:2000::50]:888 -r [2001:250:4000:2000::50]:8080 -m -w 30
ipvsadm 更详细解说请参考
https://blog.csdn.net/shaoyunzhe/article/details/88894005