温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

keepalived DROP vrrp与配置文件详解

发布时间:2020-06-29 12:55:03 来源:网络 阅读:2606 作者:winsnet27 栏目:开发技术

在线上部署keepalived的时候遇到了问题总结下:


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
    }
}

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI