keepalivedDROPvrrp与配置文件详解-创新互联
在线上部署keepalived的时候遇到了问题总结下:
创新互联建站是专业的晋源网站建设公司,晋源接单;提供成都做网站、网站设计,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行晋源网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!2台服务器
eth0为内网卡
eth2为外网卡
在主备切换的时候没有收到vrrp广播包
刚开始部署的时候copy的网上的配置文件,所以中招了
错误日志信息:/var/log/message
Oct 9 07:57:35 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:35 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:37 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:37 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:37 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:39 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:39 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:39 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:41 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:41 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:41 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet...
Oct 9 07:57:43 test4 Keepalived_vrrp[22495]: advertissement interval mismatch mine=1000000 rcved=2
Oct 9 07:57:43 test4 Keepalived_vrrp[22495]: Sync instance needed on eth2 !!!
Oct 9 07:57:43 test4 Keepalived_vrrp[22495]: VRRP_Instance(VI_10) Dropping received VRRP packet..
解决方法:
vrrp_instance VI_10 {
state BACKUP
interface eth0 注意:eth0是内网网卡,这个选项是定义接受vrrp广播包的网卡,而不是有的博客说的虚拟ip绑定的网卡,这里被网上配置文件给坑了。
virtual_router_id 111
mcast_src_ip 10.28.163.89
priority 100
nopreempt
authentication {
auth_type PASS
auth_pass HAmysql
}
track_script {
check_mysqld
}
virtual_ipaddress {
1.1.1.1/29 dev eth2 scope global 这里才是定义vip绑定的网卡为eth2
}
}
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
名称栏目:keepalivedDROPvrrp与配置文件详解-创新互联
分享链接:http://ybzwz.com/article/dooegi.html