CARP + LAGG problem

Andrea Venturoli ml at netfence.it
Mon Mar 8 19:04:56 UTC 2010


Hello.

I've a couple of 7.2p7 servers (one i386, the other amd64) which are 
working in parallel using CARP.
Recently I bonded two interfaces on the former and CARP stopped working.

Here's the relevant part from rc.conf on the first box:
ifconfig_em0="up"
ifconfig_em1="up"
ifconfig_lagg0="laggproto lacp laggport em0 laggport em1 192.168.101.1 
netmask 255.255.255.0"
ifconfig_fxp0="inet 192.168.0.3 netmask 255.255.255.0"
ifconfig_fxp0_alias0="inet 192.168.2.3 netmask 255.255.255.0"
cloned_interfaces="lagg0 carp0 carp1 carp2 carp3 carp4 carp5"
ifconfig_carp0="vhid 1 pass AAAAAAA 192.168.101.10"
ifconfig_carp1="vhid 2 advskew 100 pass BBBBBBBB 192.168.101.10"
ifconfig_carp2="vhid 3 pass CCCC 192.168.0.4"
ifconfig_carp3="vhid 4 advskew 100 pass DDDDDDDD 192.168.0.4"
ifconfig_carp4="vhid 5 pass EEEEEE 192.168.2.4"
ifconfig_carp5="vhid 6 advskew 100 pass FFFFFFFFFFF 192.168.2.4"

And on the second one:
ifconfig_em0="inet 192.168.101.4 netmask 255.255.255.0"
ifconfig_xl0="inet 192.168.2.2 netmask 255.255.255.0"
ifconfig_xl0_alias0="inet 192.168.0.2 netmask 255.255.255.0"
cloned_interfaces="carp0 carp1 carp2 carp3 carp4 carp5"
ifconfig_carp0="vhid 1 advskew 100 pass AAAAAAA 192.168.101.10"
ifconfig_carp1="vhid 2 pass BBBBBBBB 192.168.101.10"
ifconfig_carp2="vhid 3 advskew 100 pass CCCC 192.168.0.4"
ifconfig_carp3="vhid 4 pass DDDDDDDD 192.168.0.4"
ifconfig_carp4="vhid 5 advskew 100 pass EEEEEE 192.168.2.4"
ifconfig_carp5="vhid 6 pass FFFFFFFFFFF 192.168.2.4"

I also have in both boxes' sysctl.conf:
net.inet.carp.arpbalance=1
net.inet.carp.preempt=1
net.inet.carp.log=2



As I said, everything worked fine as long as I was simply using em0 on 
the first box; since I switched it to lagg, carp0 will stay in BACKUP 
mode on both box, so some internal IPs won't get any answer.
In the logs (of the first box) I'll get tons of the following messages:

kernel: arp_rtrequest: bad gateway 192.168.101.10 (!AF_LINK)
kernel: carp0: MASTER -> BACKUP (more frequent advertisement received)


The only way I found to let everyone get the service they excpect is to 
issue "ifconfig carp0 down" on the faulty box, so that the other will be 
master for everyone.
Strangely, all the other carp interfaces don't seem to be affected.



Any help?

  bye & Thanks
	av.

P.S. Should not be a firewall problem, since i tried allowing all 
traffic and it didn't help.


More information about the freebsd-net mailing list