日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

keepalived 的 unicast 单播模式

發(fā)布時間:2023/12/15 综合教程 28 生活家
生活随笔 收集整理的這篇文章主要介紹了 keepalived 的 unicast 单播模式 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

最近遇到一個問題,keepalived 在 OpenStack 環(huán)境下一直腦裂無法選舉。在不支持組播的場景下,可以使用單播模式。

主節(jié)點(diǎn):

global_defs {
   router_id LVS_DEVEL
#  vrrp_strict # 嚴(yán)格模式不支持單播
   vrrp_skip_check_adv_addr
   vrrp_garp_interval 0
   vrrp_gna_interval 0
   vrrp_iptables
   script_user root
   enable_script_security 
}

vrrp_script chk_nginx {
    script "/usr/bin/killall -0 nginx && exit 0 || exit 1"
    interval 1
    weight -10
    fall 2
    rise 1
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 55
    priority 100
    advert_int 1
#   nopreempt
    unicast_src_ip 172.20.47.4
    unicast_peer {
        172.20.47.5
    }
    authentication {
        auth_type PASS
        auth_pass 12345678
    }
    virtual_ipaddress {
        172.20.47.202
    }

    track_script {
        chk_nginx
    }
}

備節(jié)點(diǎn):

global_defs {
   router_id LVS_DEVEL
#  vrrp_strict # 嚴(yán)格模式不支持單播
   vrrp_skip_check_adv_addr
   vrrp_garp_interval 0
   vrrp_gna_interval 0
   vrrp_iptables
   script_user root
   enable_script_security 
}

vrrp_script chk_nginx {
    script "/usr/bin/killall -0 nginx && exit 0 || exit 1"
    interval 1
    weight -10
    fall 2
    rise 1
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 55
    priority 95
    advert_int 1
#   nopreempt
    unicast_src_ip 172.20.47.5
    unicast_peer {
        172.20.47.4
    }
    authentication {
        auth_type PASS
        auth_pass 12345678
    }
    virtual_ipaddress {
        172.20.47.202
    }

    track_script {
        chk_nginx
   }
}

參考:
https://www.jianshu.com/p/7c709c3be4a9
https://blog.csdn.net/weixin_34362991/article/details/93011752
https://blog.csdn.net/kjh2007abc/article/details/90455558

總結(jié)

以上是生活随笔為你收集整理的keepalived 的 unicast 单播模式的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。