keepalived服务配置文件注释

    Read

上篇文章介绍了keepalived的安装,此次来看一下keepalived的配置:
修正配置文件一处bug,DR模式下,lvs_sync_daemon_inteface与服务接口interface使用同一个网络接口。不能使用其他网络接口来配置心跳线。
验证方式:

tcpdump -p vrrp -n #查看vrrp协议
tcpdump -v -i eth0 host 224.0.0.18 #本地eth0监听。而不是eth1监听 SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

master:SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

[root@MASTER ~]# uname -r
2.6.32-573.22.1.el6.x86_64
[root@MASTER ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@MASTER ~]# ifconfig | grep "inet addr:"
eth0: inet addr:1.1.1.201 Bcast:1.1.1.255 Mask:255.255.255.0
eth1: inet addr:192.168.2.201 Bcast:192.168.2.255 Mask:255.255.255.0
eth2: inet addr:10.10.10.201 Bcast:10.255.255.255 Mask:255.0.0.0
lo: inet addr:127.0.0.1 Mask:255.0.0.0 SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

backup:SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

[root@BACKUP keepalived]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@BACKUP keepalived]# uname -r
3.10.0-327.13.1.el7.x86_64
[root@BACKUP keepalived]# ifconfig|grep "inet"
eno16777736: inet 1.1.1.202 netmask 255.255.255.0 broadcast 1.1.1.255
eno33554984: inet 192.168.2.202 netmask 255.255.255.0 broadcast 192.168.2.255
eno33554978: inet 10.10.10.202 netmask 255.0.0.0 broadcast 10.255.255.255
lo: inet 127.0.0.1 netmask 255.0.0.0 SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

keepalived搭建

keepalived搭建


MASTER配置:

BACKUP配置:

MASTER与BACKUP区别:

单播:

防火墙配置:
SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

裂脑问题:SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

1:iptables防火墙导致多播地址224.0.0.18无法通过;
2:route在DR模式下指定了网卡口,导致裂脑;
3:网络不通导致的其他问题; SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

这就是说,MASTER和BACKUP除了route_id、主备、优先级不同以外,其他都一样。SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

官方文档:http://www.keepalived.org/pdf/UserGuide.pdf
参考文档:http://blog.jobbole.com/94675/SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/ SourceByrd's Weblog-https://note.t4x.org/remark/keepalived-configfile-comments/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on May 11, 2017
  • 原文链接:https://note.t4x.org/remark/keepalived-configfile-comments/
匿名

Comment

Anonymous

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: