当前位置: > Linux集群 > 负载均衡SLB >

keepalived 实现双机热备配置

时间:2014-10-07 15:01来源:linux.it.net.cn 作者:it
master:
global_defs {
    router_id LVS_DEVEL
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 33
    priority 100
    nopreempt
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        外网IP dev eth1
    }

    notify_master /etc/keepalived/master_route.sh
    notify_backup /etc/keepalived/slave_route.sh
}

slave:
global_defs {
   router_id LVS_DEVEL
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 33
    priority 99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        外网IP dev eth1
    }

    notify_master /etc/keepalived/master_route.sh
    notify_backup /etc/keepalived/slave_route.sh
} (责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容