keepalived純部署

主配置ide

! Configuration File for keepalived

global_defs {
   router_id  master_2
}

vrrp_instance ARPP {
    state MASTER
    interface bond0
    garp_master_delay 10
    virtual_router_id 7                        主備統一
    priority 180                                   數字越大,優先級越高
    advert_int 2                                  多長時間廣播一次本身的優先級
    authentication {
        auth_type PASS
        auth_pass 1111
    }
#    track_script {
#        chk_http_port
#    }
    virtual_ipaddress {
        192.168.3.100
    }
}

從配置code

global_defs {
   router_id slave_3
}

vrrp_instance ARPP {
    state BACKUP
    interface bond0
    garp_master_delay 10
    virtual_router_id 7
    priority 60
    advert_int 2
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
       192.168.3.100
    }
}
相關文章
相關標籤/搜索