0

I have configured keepalived on two RHEL 7 servers as below

Primary server

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
       10.1.1.181
    }
}

Secondary server

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 51
    priority 99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
       10.1.1.181
    }
}

After I restart keepalived service and execute ip addr show eth0, VIP is active on both the servers. I am able to ping primary from secondary and secondary from primary.

Kindly advise.

c4f4t0r
  • 5,149
  • 3
  • 28
  • 41
Asha
  • 3
  • 1
  • 3

1 Answers1

3

In what kind of environment are you running this keepalived instances? I've seen similar issues in environments that are not supporting multicast. Keepalived uses mulitcast for VRRP advertisements by default. So, try using unicast instead. This is example for MASTER instance, for BACKUP instance just replace unicast_src_ip and unicast_peer addresses.

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }

    unicast_src_ip 10.0.0.2   # IP address of local interface
    unicast_peer {            # IP address of peer interface
        10.0.0.3
    }

    virtual_ipaddress {
    10.1.1.181
    }
 }
user373333
  • 630
  • 1
  • 4
  • 12