溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

keepalived DROP vrrp與配置文件詳解

發(fā)布時(shí)間:2020-06-29 12:55:03 來源:網(wǎng)絡(luò) 閱讀:2600 作者:winsnet27 欄目:開發(fā)技術(shù)

在線上部署keepalived的時(shí)候遇到了問題總結(jié)下:


2臺(tái)服務(wù)器

eth0為內(nèi)網(wǎng)卡

eth2為外網(wǎng)卡

在主備切換的時(shí)候沒有收到vrrp廣播包

剛開始部署的時(shí)候copy的網(wǎng)上的配置文件,所以中招了

錯(cuò)誤日志信息:/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是內(nèi)網(wǎng)網(wǎng)卡,這個(gè)選項(xiàng)是定義接受vrrp廣播包的網(wǎng)卡,而不是有的博客說的虛擬ip綁定的網(wǎng)卡,這里被網(wǎng)上配置文件給坑了。
    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綁定的網(wǎng)卡為eth2
    }
}

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI