巧用keepalived实现一主多备

vrrp_instance VI_1 {
    state BACKUP             #备份服务器上将MASTER改为BACKUP  
    interface eth1
    virtual_router_id 60
    priority 99   # 备份服务上将100改为99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.2.248  
        #(如果有多个VIP,继续换行填写.)
    }
}

vrrp_instance VI_2 {
    state BACKUP             #备份服务器上将MASTER改为BACKUP  
    interface eth1
    virtual_router_id 2
    priority 99   # 备份服务上将100改为99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.2.248  
        #(如果有多个VIP,继续换行填写.)
    }
}

vrrp_instance VI_3 {
    state BACKUP             #备份服务器上将MASTER改为BACKUP  
    interface eth1
    virtual_router_id 3
    priority 99   # 备份服务上将100改为99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.2.248  
        #(如果有多个VIP,继续换行填写.)
    }
}
 

你可能感兴趣的:(keepalived,职场,休闲,一主多备)