VRRP peers ignore each other

I'm trying to set up a pair of VRRP routers based on OpenWrt 19.07.3
I installed keepalived and configured the daemon so both routers should share a common IPv4 address. The routers can ping each other over the network using the interface which keepalived will use.

However, both routers assume that they are MASTER. It seems to me, that the routers cannot reach each other by VRRP keepalives.

Here is the content of my /etc/keepalived/keepalived.conf file:

vrrp_instance VI_1 {
        state MASTER
        interface eth1
        virtual_router_id 10
        virtual_ipaddress {
                10.1.1.5
        }
}

When keepalived starts, it reports:

Fri Aug 21 09:09:54 2020: Starting Keepalived v2.0.18 (05/16,2020)
Fri Aug 21 09:09:54 2020: WARNING - keepalived was build for newer Linux 4.14.193, running on Linux 4.14.180 #0 SMP Sat May 16 18:32:20 2020
Fri Aug 21 09:09:54 2020: Command line: 'keepalived' '--dont-fork' '--log-console' '--log-detail' '--no-syslog'
Fri Aug 21 09:09:54 2020:               '--pid=/var/run/keepalived.pid' '--vrrp_pid=/var/run/vrrp.pid'
Fri Aug 21 09:09:54 2020: Opening file '/etc/keepalived/keepalived.conf'.
Fri Aug 21 09:09:54 2020: Starting VRRP child process, pid=9450
Fri Aug 21 09:09:54 2020: Registering Kernel netlink reflector
Fri Aug 21 09:09:54 2020: Registering Kernel netlink command channel
Fri Aug 21 09:09:54 2020: Opening file '/etc/keepalived/keepalived.conf'.
Fri Aug 21 09:09:54 2020: Unable to load magic database
Fri Aug 21 09:09:54 2020: Assigned address 10.1.1.1 for interface eth1
Fri Aug 21 09:09:54 2020: Registering gratuitous ARP shared channel
Fri Aug 21 09:09:54 2020: (VI_1) removing VIPs.
Fri Aug 21 09:09:54 2020: (VI_1) Entering BACKUP STATE (init)
Fri Aug 21 09:09:54 2020: VRRP sockpool: [ifindex(3), family(IPv4), proto(112), unicast(0), fd(10,11)]
Fri Aug 21 09:09:58 2020: (VI_1) Receive advertisement timeout
Fri Aug 21 09:09:58 2020: (VI_1) Entering MASTER STATE
Fri Aug 21 09:09:58 2020: (VI_1) setting VIPs.
Fri Aug 21 09:09:58 2020: Sending gratuitous ARP on eth1 for 10.1.1.5
Fri Aug 21 09:09:58 2020: (VI_1) Sending/queueing gratuitous ARPs on eth1 for 10.1.1.5
Fri Aug 21 09:09:58 2020: Sending gratuitous ARP on eth1 for 10.1.1.5
Fri Aug 21 09:09:58 2020: Sending gratuitous ARP on eth1 for 10.1.1.5

It stays in this state, even if VRRP packets from its partner arrive at the correct interface:

root@RT-1:~# tcpdump -nnli eth1 host 224.0.0.18
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
09:19:19.842057 IP 10.1.1.2 > 224.0.0.18: VRRPv2, Advertisement, vrid 20, prio 100, authtype none, intvl 1s, length 20
09:19:20.687292 IP 10.1.1.1 > 224.0.0.18: VRRPv2, Advertisement, vrid 10, prio 90, authtype none, intvl 1s, length 20
09:19:20.844620 IP 10.1.1.2 > 224.0.0.18: VRRPv2, Advertisement, vrid 20, prio 100, authtype none, intvl 1s, length 20
09:19:21.689344 IP 10.1.1.1 > 224.0.0.18: VRRPv2, Advertisement, vrid 10, prio 90, authtype none, intvl 1s, length 20

The local router is 10.1.1.1 and the partner router is 10.1.1.2

The daemon is even visible by netstat:

root@RT-1:~# netstat -na | grep -i 112
raw        0      0 0.0.0.0:112             0.0.0.0:*               112     
raw        0      0 0.0.0.0:112             0.0.0.0:*               112

I'm running this scenario on a VMware environment. I've also tried different virtual NIC types (e1000, vmxnet3), but the result is the same.

My best guess is that the local router receives the packets but looses them somewhere on its way through the kernel.

Any advise would be greatly appreciated.
Thanks!

Oh dear. Just found the reason for the issue. I had a simple typo in the keepalived.conf file of the other router.
Sorry for blaming OpenWrt :face_with_hand_over_mouth:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.