keepalived纯部署

主配置

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

从配置

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
    }
}
上一篇:Linux双网卡绑定和解除


下一篇:计算机网络