You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a VRRP setup with keepalived on 2 nodes. I use 2 VRRP instances (one for IPv4 and another for IPv6) with virtual MAC addresses. The instance for IPv4 works as desired, but the IPv6 related instance misbehaves which leads to network issues:
Shortly after master and backup election takes place, an IPv6 ULA address on the backup nodes virt. macvlan interface appears and sends out e.g. neighbor advertisements using the virtual MAC address which causes MAC flapps on the switch where both nodes are connected. Here you can see the relevant output of ip address show for both nodes.
Master node:
2: eth0@if182: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether bc:24:11:53:eb:97 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 192.168.222.196/24 brd 192.168.222.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 20xx:xxxx:2de0::196/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::be24:11ff:fe53:eb97/64 scope link
valid_lft forever preferred_lft forever
9: vrrp.4@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:00:5e:00:01:04 brd ff:ff:ff:ff:ff:ff
inet 192.168.222.199/24 brd 192.168.222.255 scope global vrrp.4
valid_lft forever preferred_lft forever
10: vrrp.6@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:00:5e:00:02:06 brd ff:ff:ff:ff:ff:ff
inet6 20xx:xxxx:2de0::199/64 scope global nodad
valid_lft forever preferred_lft forever
inet6 fe80::dead:beef/64 scope link nodad
valid_lft forever preferred_lft forever
Backup node:
2: end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:1e:06:48:e4:bb brd ff:ff:ff:ff:ff:ff
inet 192.168.222.248/24 brd 192.168.222.255 scope global end0
valid_lft forever preferred_lft forever
inet6 20xx:xxxx:2de0::248/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::21e:6ff:fe48:e4bb/64 scope link
valid_lft forever preferred_lft forever
36: vrrp.4@end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:00:5e:00:01:04 brd ff:ff:ff:ff:ff:ff
37: vrrp.6@end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:00:5e:00:02:06 brd ff:ff:ff:ff:ff:ff
inet6 fd04:db37:bcb0:f08c:200:5eff:fe00:206/64 scope global dynamic mngtmpaddr
valid_lft 1775sec preferred_lft 1775sec
To Reproduce
Start keepalived and wait a while. After a short time, an IPv6 ULA adress on the vrrp. interface appears. and sends In my case, it's fd04:db37:bcb0:f08c:200:5eff:fe00:206/64
Expected behavior
I would expect that there is no IPv6 address on the backup node's MacVLAN virtual interface, as is the case immediately after starting keepalived
e.g.:
36: vrrp.4@end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:00:5e:00:01:04 brd ff:ff:ff:ff:ff:ff
37: vrrp.6@end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:00:5e:00:02:06 brd ff:ff:ff:ff:ff:ff
Notify and track scripts
/etc/keepalived/keepalived_notify
#!/bin/bash
# example output:
# INSTANCE:VI_6:BACKUP or INSTANCE:VI_6:MASTER
echo $1:$2:$3 > /var/run/keepalived.$1.$2.state
System Log entries
Master
Feb 24 20:40:02 adguard01 systemd[1]: Starting keepalived.service - Keepalive Daemon (LVS and VRRP)...
Feb 24 20:40:02 adguard01 Keepalived[15244]: Starting Keepalived v2.2.7 (01/16,2022)
Feb 24 20:40:02 adguard01 Keepalived[15244]: Running on Linux 6.8.12-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-2 (2024-09-05T10:03Z) (built for Linux 5.19.11)
Feb 24 20:40:02 adguard01 Keepalived[15244]: Command line: '/usr/sbin/keepalived' '--dont-fork'
Feb 24 20:40:02 adguard01 Keepalived[15244]: Configuration file /etc/keepalived/keepalived.conf
Feb 24 20:40:02 adguard01 Keepalived[15244]: NOTICE: setting config option max_auto_priority should result in better keepalived performance
Feb 24 20:40:02 adguard01 Keepalived[15244]: Starting VRRP child process, pid=15245
Feb 24 20:40:02 adguard01 systemd[1]: keepalived.service: Got notification message from PID 15245, but reception only permitted for main PID 15244
Feb 24 20:40:02 adguard01 Keepalived_vrrp[15245]: Script user 'keepalived_script' does not exist
Feb 24 20:40:02 adguard01 Keepalived_vrrp[15245]: SECURITY VIOLATION - scripts are being executed but script_security not enabled.
Feb 24 20:40:02 adguard01 Keepalived_vrrp[15245]: use_vmac or no_accept/strict specified, but no firewall configured - using nftables
Feb 24 20:40:02 adguard01 Keepalived_vrrp[15245]: NOTICE: setting sysctl net.ipv4.conf.default.rp_filter from 0 to 2
Feb 24 20:40:02 adguard01 Keepalived_vrrp[15245]: NOTICE: setting sysctl net.ipv4.conf.all.rp_filter from 2 to 0
Feb 24 20:40:02 adguard01 Keepalived[15244]: Startup complete
Feb 24 20:40:02 adguard01 systemd[1]: Started keepalived.service - Keepalive Daemon (LVS and VRRP).
Feb 24 20:40:02 adguard01 Keepalived_vrrp[15245]: (VI_4) Entering MASTER STATE
Feb 24 20:40:02 adguard01 Keepalived_vrrp[15245]: (VI_6) Entering MASTER STATE
Backup
Feb 24 20:39:43 c4 systemd[1]: Starting keepalived.service - Keepalive Daemon (LVS and VRRP)...
Feb 24 20:39:43 c4 Keepalived[426282]: Starting Keepalived v2.2.7 (01/16,2022)
Feb 24 20:39:43 c4 Keepalived[426282]: Running on Linux 6.1.0-31-arm64 #1 SMP Debian 6.1.128-1 (2025-02-07) (built for Linux 5.19.11)
Feb 24 20:39:43 c4 Keepalived[426282]: Command line: '/usr/sbin/keepalived' '--dont-fork'
Feb 24 20:39:43 c4 Keepalived[426282]: Configuration file /etc/keepalived/keepalived.conf
Feb 24 20:39:43 c4 Keepalived[426282]: NOTICE: setting config option max_auto_priority should result in better keepalived performance
Feb 24 20:39:43 c4 Keepalived[426282]: Starting VRRP child process, pid=426283
Feb 24 20:39:43 c4 systemd[1]: keepalived.service: Got notification message from PID 426283, but reception only permitted for main PID 426282
Feb 24 20:39:43 c4 Keepalived_vrrp[426283]: Script user 'keepalived_script' does not exist
Feb 24 20:39:43 c4 Keepalived_vrrp[426283]: SECURITY VIOLATION - scripts are being executed but script_security not enabled.
Feb 24 20:39:43 c4 Keepalived_vrrp[426283]: use_vmac or no_accept/strict specified, but no firewall configured - using nftables
Feb 24 20:39:43 c4 Keepalived[426282]: Startup complete
Feb 24 20:39:43 c4 systemd[1]: Started keepalived.service - Keepalive Daemon (LVS and VRRP).
Feb 24 20:39:43 c4 Keepalived_vrrp[426283]: (VI_4) Entering BACKUP STATE (init)
Feb 24 20:39:43 c4 Keepalived_vrrp[426283]: (VI_6) Entering BACKUP STATE (init)
Feb 24 20:39:57 c4 Keepalived_vrrp[426283]: (VI_6) Entering MASTER STATE
Feb 24 20:39:57 c4 Keepalived_vrrp[426283]: VRRP_Group(VI_46) Syncing instances to MASTER state
Feb 24 20:39:57 c4 Keepalived_vrrp[426283]: (VI_4) Entering MASTER STATE
Feb 24 20:40:02 c4 Keepalived_vrrp[426283]: (VI_4) Master received advert from 192.168.222.196 with higher priority 255, ours 250
Feb 24 20:40:02 c4 Keepalived_vrrp[426283]: (VI_4) Entering BACKUP STATE
Feb 24 20:40:02 c4 Keepalived_vrrp[426283]: VRRP_Group(VI_46) Syncing instances to BACKUP state
Feb 24 20:40:02 c4 Keepalived_vrrp[426283]: (VI_6) Entering BACKUP STATE
Did keepalived coredump?
No
The text was updated successfully, but these errors were encountered:
The ULA address fd04:db37:bcb0:f08c:200:5eff:fe00:206/64 added on vrrp.6 on the backup node is not added by keepalived. keepalived adds IPv6 addresses with nodad configured, in order to avoid delays in the address becoming active. The ULA address added to vrrp.6 is derived from the MAC address of the interface, has mngtmpaddr set and a lifetime of 1775 seconds, none of which keepalived sets, unless it is configured to do so.
I have run your configurations in a Debian 12 VM and am not experiencing the problem of an added ULA, so I suspect that it is some process running on the backup node that is adding the address - perhaps when it notices the last ULA being removed from the interface.
Thanks for your reply.
I'm not aware of a process running on the backup node which add an ULA on an interface and in the meanwhile I also saw that the address was also added on the master node.
keepalived adds IPv6 addresses with nodad configured,
Thanks, I'll further investigate on OS level and hope to find the root cause.
I have a VRRP setup with keepalived on 2 nodes. I use 2 VRRP instances (one for IPv4 and another for IPv6) with virtual MAC addresses. The instance for IPv4 works as desired, but the IPv6 related instance misbehaves which leads to network issues:
Shortly after master and backup election takes place, an IPv6 ULA address on the backup nodes virt. macvlan interface appears and sends out e.g. neighbor advertisements using the virtual MAC address which causes MAC flapps on the switch where both nodes are connected. Here you can see the relevant output of
ip address show
for both nodes.Master node:
Backup node:
To Reproduce
Start keepalived and wait a while. After a short time, an IPv6 ULA adress on the vrrp. interface appears. and sends In my case, it's fd04:db37:bcb0:f08c:200:5eff:fe00:206/64
Expected behavior
I would expect that there is no IPv6 address on the backup node's MacVLAN virtual interface, as is the case immediately after starting keepalived
e.g.:
Keepalived version
Master
Backup
Distro (please complete the following information):
Configuration file:
Master
Backup
Notify and track scripts
/etc/keepalived/keepalived_notify
System Log entries
Master
Backup
Did keepalived coredump?
No
The text was updated successfully, but these errors were encountered: