keepalived: BACKUP send a G-ARP of VIP after a temporary network issue
Issue
- keepalived: BACKUP send a G-ARP of VIP after a temporary network issue
As a sample configuration, there are 2 hosts, lvs1 and lvs2 and lvs1 has a VIP.
lvs1:/etc/keepalived/keepalived.conf
vrrp_instance VI_1 {
interface ens3
state BACKUP
virtual_router_id 51
priority 150
nopreempt
virtual_ipaddress {
192.168.122.100
}
}
lvs2:/etc/keepalived/keepalived.conf
vrrp_instance VI_1 {
interface ens3
state BACKUP
virtual_router_id 51
priority 100
nopreempt
virtual_ipaddress {
192.168.122.100
}
}
When a temporary network issue happens, lvs2 become MASTER and send G-ARP(Gratuitous ARP) of VIP and goes back to BACKUP soone. However MASTER lvs1 sometimes doesn't notice it depending on the timing. In such case, the G-ARP from lvs2 adversely affect the network.
lvs2: /var/log/messages
Jul 20 11:17:41 lvs2 Keepalived_vrrp[3476]: VRRP_Instance(VI_1) Transition to MASTER STATE
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: VRRP_Instance(VI_1) Entering MASTER STATE
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: VRRP_Instance(VI_1) setting protocol VIPs.
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: Sending gratuitous ARP on ens3 for 192.168.122.100
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: VRRP_Instance(VI_1) Sending/queueing gratuitous ARPs on ens3 for 192.168.122.100
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: Sending gratuitous ARP on ens3 for 192.168.122.100
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: Sending gratuitous ARP on ens3 for 192.168.122.100
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: Sending gratuitous ARP on ens3 for 192.168.122.100
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: Sending gratuitous ARP on ens3 for 192.168.122.100
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: VRRP_Instance(VI_1) Received advert with higher priority 150, ours 100
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: VRRP_Instance(VI_1) Entering BACKUP STATE
Jul 20 11:17:42 lvs2 Keepalived_vrrp[3476]: VRRP_Instance(VI_1) removing protocol VIPs.
lvs1 doesn't have any log entry in /var/log/messages.
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- keepalived
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.