Steps
- Start both master and slave
- Keep pinging virtual ip (i.e
192.168.10.100) - Shutdown master
- Slave enters MASTER state
- Restart master
- Slave enters BACKUP state and Master enters MASTER state
Ping doesn't work after step 6. No server gets the virtual ip. (I checked with ip addr show eth1)
Master can get back the virtual ip until I restart the keepalived service.
How to make the master getting virtual ip without restart the service?
Keepalived configuration:
host1 (master)
vrrp_instance VI_1 {
state MASTER
interface eth1
virtual_router_id 51
priority 101
advert_int 1
authentication {
auth_type PASS
auth_pass secret
}
virtual_ipaddress {
192.168.10.100
}
}
host2 (slave)
vrrp_instance VI_1 {
state BACKUP
interface eth1
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass secret
}
virtual_ipaddress {
192.168.10.100
}
}