# keepalived for lvs-nat
# 未测试通过

global_defs {
   router_id HA_LVS
}

vrrp_sync_group HA_LVS_NAT {
    group {
        HA_LVS_NAT
    }
}

vrrp_instance HA_LVS_NAT {
    state MASTER
    interface bond1
    virtual_router_id 222
    priority 100
    advert_int 1
    nopreempt
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.212.100/25 dev bond1
    }
}

virtual_server 192.168.212.100 80 {
    delay_loop 6
    lb_algo rr
    lb_kind NAT
    protocol TCP

    real_server 192.168.212.129 80 {
        weight 100
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
            connect_port 15000
        }
    }

}
