Hi,
I'm still playing/testing around with CARP and ran into some
problems with IPv6 on CARP.
Here the configuration:
System1:
$ ifconfig carp
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:65
priority: 0
carp: carpdev em0 advbase 1 balancing ip-stealth
state MASTER vhid 101 advskew 0
state BACKUP vhid 102 advskew 254
state BACKUP vhid 110 advskew 254
state MASTER vhid 120 advskew 0
groups: carp
status: master
inet6 fe80::60b8:702d:2636:fba1%carp0 prefixlen 64 scopeid 0x5
inet 192.168.2.240 netmask 0xffffff00 broadcast 192.168.2.255
inet6 dead:beef:1::3 prefixlen 64
inet6 dead:beef:1::6 prefixlen 64
carp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:c8
priority: 0
carp: MASTER carpdev em0 vhid 200 advbase 1 advskew 0
groups: carp
status: master
inet6 fe80::200:5eff:fe00:1c8%carp1 prefixlen 64 scopeid 0x6
inet 192.168.200.241 netmask 0xffffff00 broadcast 192.168.200.255
inet 192.168.201.241 netmask 0xffffff00 broadcast 192.168.201.255
inet6 dead:beef:1::1 prefixlen 64
carp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:c9
priority: 0
carp: BACKUP carpdev em0 vhid 201 advbase 1 advskew 254
groups: carp
status: backup
inet6 fe80::200:5eff:fe00:1c9%carp2 prefixlen 64 scopeid 0x7
inet 192.168.200.242 netmask 0xffffffff
inet 192.168.202.241 netmask 0xffffff00 broadcast 192.168.202.255
inet6 dead:beef:1::2 prefixlen 128
System2:
$ ifconfig carp
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:65
priority: 0
carp: carpdev em0 advbase 1 balancing ip-stealth
state BACKUP vhid 101 advskew 254
state MASTER vhid 102 advskew 0
state MASTER vhid 110 advskew 0
state BACKUP vhid 120 advskew 254
groups: carp
status: backup
inet6 fe80::94e1:6afd:9d82:5964%carp0 prefixlen 64 scopeid 0x5
inet 192.168.2.240 netmask 0xffffff00 broadcast 192.168.2.255
inet6 dead:beef:1::3 prefixlen 64 duplicated
inet6 dead:beef:1::6 prefixlen 64
carp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:c8
priority: 0
carp: BACKUP carpdev em0 vhid 200 advbase 1 advskew 254
groups: carp
status: backup
inet6 fe80::200:5eff:fe00:1c8%carp1 prefixlen 64 scopeid 0x6
inet 192.168.200.241 netmask 0xffffffff
inet 192.168.201.241 netmask 0xffffff00 broadcast 192.168.201.255
inet6 dead:beef:1::1 prefixlen 128
carp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:c9
priority: 0
carp: MASTER carpdev em0 vhid 201 advbase 1 advskew 0
groups: carp
status: master
inet6 fe80::200:5eff:fe00:1c9%carp2 prefixlen 64 scopeid 0x7
inet 192.168.200.242 netmask 0xffffff00 broadcast 192.168.200.255
inet 192.168.202.241 netmask 0xffffff00 broadcast 192.168.202.255
inet6 dead:beef:1::2 prefixlen 64
After booting on one machine one IPv6 address is marked as duplicated.
Running /etc/netstart again 'fixes' the duplicate address.
dmesg:
carp0: DAD detected duplicate IPv6 address dead:beef:0001::0003: NS
in/out=0/1, NA in=1
carp0: DAD complete for dead:beef:0001::0003 - duplicate found
carp0: manual intervention required
And nd6_na_input() complains about an different duplicate address, too:
dmesg:
nd6_na_input: duplicate IP6 address fe80:0007::0200:5eff:fe00:01c9
nd6_na_input: duplicate IP6 address dead:beef:0001::0002
The nd6_na_input message seems to be triggered by the NA packet carp sends
if it switches from BACKUP to MASTER. Can be triggered by:
ifconfig em0 down && sleep 1 && ifconfig em0 up.
While balancing generates (wrong) DAD messages, on non-balancing carps
DAD does
not work. Even if I configure an address already used by a different system.
I've read a lot of code, IPv6 and carp, and was not able to find a
solution for the problems.
Maybe someone here can help or has an idea.
BTW. why do the link local addresses on balancing carp interfaces differ
on each system?
fe80::60b8:702d:2636:fba1%carp0 and fe80::94e1:6afd:9d82:5964%carp0
If some configuration details are missing, please let me know.
Thanks in advance!
Stefan