User Tools

Site Tools


keepalive

keepalive

Configure this service on 2 VMs. The backup will take over the floating IP if it does not receive the VRRP traffic.

global_defs {
   router_id LVS_DEVEL
   vrrp_skip_check_adv_addr
   vrrp_garp_interval 0
   vrrp_gna_interval 0
}

vrrp_instance VI_1 {
    state MASTER  # use "BACKUP" on the VM2
    interface eth0
    virtual_router_id 51
    priority 100  # Use a lower number on the backup
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
	172.31.16.253  # Floating IP
    }
    unicast_src_ip 172.31.16.174  # IP of VM1 (switch to VM2 in the config on VM2)
    unicast_peer {
        172.31.31.39  # IP of VM2 (switch to VM1 in the config on VM2)
    }
}

With “vrrp_strict” removed from the default config, the VRRP traffic is less likely to get dropped (does not need explicit firewall rules for multicast VRRP traffic to 224.0.0.18). If multicast is still blocked, we use unicast - therefore the unicast_src_ip and unicast_peer parameters.

keepalive.txt · Last modified: by reddy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki