carp-ng and vhid>9

Eugene M. Zheganin emz at norma.perm.ru
Fri Jul 26 12:25:00 UTC 2013


Hi.

I use FreeBSD 10.0-CURRENT.
Call me a dumbhead, but I have a strong impression that using vhid>9
causes problems:

Host A (r251857):

# ifconfig vlan3
vlan3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric
0 mtu 1500
        options=3<RXCSUM,TXCSUM>
        ether 00:1a:64:21:94:89
        inet 128.127.145.2 netmask 0xfffffff8 broadcast 128.127.145.7
        inet6 fe80::21a:64ff:fe21:9489%vlan3 prefixlen 64 scopeid 0x8
        inet6 2a00:7540::2 prefixlen 120
        inet 128.127.145.1 netmask 0xfffffff8 broadcast 128.127.145.7
vhid 10
        inet6 2a00:7540::1 prefixlen 120 vhid 10
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        vlan: 3 parent interface: bge0
        carp: MASTER vhid 10 advbase 1 advskew 100

Host B (r253079):

# ifconfig vlan3
vlan3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric
0 mtu 1500
        options=3<RXCSUM,TXCSUM>
        ether 00:1a:64:21:95:28
        inet 128.127.145.3 netmask 0xfffffff8 broadcast 128.127.145.7
        inet6 fe80::21a:64ff:fe21:9528%vlan3 prefixlen 64 scopeid 0x8
        inet6 2a00:7540::3 prefixlen 120
        inet 128.127.145.1 netmask 0xfffffff8 broadcast 128.127.145.7
vhid 10
        inet6 2a00:7540::1 prefixlen 120 vhid 10
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        vlan: 3 parent interface: bge0
        carp: BACKUP vhid 10 advbase 1 advskew 200

but in dmesg on host B I see (net.inet.carp.log: 2):

[...]
carp: VHID 10 at vlan3: MASTER -> BACKUP (more frequent advertisement received)
carp: VHID 11 at vlan600: BACKUP -> MASTER (master down)
carp: VHID 11 at vlan600: MASTER -> BACKUP (more frequent advertisement
received)
carp: VHID 10 at vlan3: BACKUP -> MASTER (master down)
carp: VHID 10 at vlan3: MASTER -> BACKUP (more frequent advertisement received)
carp: VHID 11 at vlan600: BACKUP -> MASTER (master down)
carp: VHID 11 at vlan600: MASTER -> BACKUP (more frequent advertisement
received)
carp: VHID 10 at vlan3: BACKUP -> MASTER (master down)
carp: VHID 10 at vlan3: MASTER -> BACKUP (more frequent advertisement received)
carp: VHID 11 at vlan600: BACKUP -> MASTER (master down)
carp: VHID 11 at vlan600: MASTER -> BACKUP (more frequent advertisement
received)
carp: VHID 10 at vlan3: BACKUP -> MASTER (master down)
carp: VHID 10 at vlan3: MASTER -> BACKUP (more frequent advertisement received)
carp: VHID 11 at vlan600: BACKUP -> MASTER (master down)
[...]

I checked and rechecked the passwords on both machines - identical. As
you can see - address pairs are identical too. The fact that host B
receives some vrrp announces tells that the packet filter/passwords are
configured properly (in fact, I turned it off on B, but this didn't
resolve the situation).

netstat:

Host A:
# netstat -s -p carp
carp:
        524 packets received (IPv4)
        0 packets received (IPv6)
                0 packets discarded for wrong TTL
                0 packets shorter than header
                0 discarded for bad checksums
                0 discarded packets with a bad version
                0 discarded because packet too short
                0 discarded for bad authentication
                0 discarded for bad vhid
                0 discarded because of a bad address list
        14064 packets sent (IPv4)
        3516 packets sent (IPv6)
                0 send failed due to mbuf memory error

Host B:
# netstat -s -p carp
carp:
        12881 packets received (IPv4)
        1171 packets received (IPv6)
                0 packets discarded for wrong TTL
                0 packets shorter than header
                0 discarded for bad checksums
                0 discarded packets with a bad version
                0 discarded because packet too short
                0 discarded for bad authentication
                0 discarded for bad vhid
                0 discarded because of a bad address list
        648 packets sent (IPv4)
        570 packets sent (IPv6)
                0 send failed due to mbuf memory error

I would be really glad if someone could help me with this.
I have seen this situation when host B was running FreeBSD 8.2-STABLE,
but first I thought that there's some incompatibility between old carp
and carp-ng.
I also have 9 other vhids that work just fine. The only explanation I
have so far - using vhid>9 causes some errors on the backup side.

Thanks.
Eugene.


More information about the freebsd-pf mailing list