CARP question (interpretation clarification)

Webster, Andrew awebster at
Wed Feb 15 19:19:42 PST 2006

On FreeBSD 5.4-p8, the man page for CARP(4), has a paragraph about
net.inet.carp.preempt which reads :


     net.inet.carp.preempt     Allow virtual hosts to preempt each
other.  It

                               is also used to failover carp interfaces
as a

                               group.  When the option is enabled and
one of

                               the carp enabled physical interfaces goes

                               advskew is changed to 240 on all carp

                               faces.  See also the first example.

                               by default.


If I understand this correctly, a system having multiple carp interfaces
would either see all carp interfaces as all MASTER or all BACKUP, but
not a combination of both?

On my system, I've got preempt turned on, but as shown below on my
"backup" machine, two carp interfaces are in BACKUP config, and one is

On the "master" machine of this pair, I have the reverse, two MASTER,
and one BACKUP corresponding to the appropriate subnets.


Am I misinterpreting the documentation, or does the preempt function not
work the way I expected it to? 


r2# sysctl -a | grep preempt

net.inet.carp.preempt: 1

r2#  ifconfig -a


carp0: flags=41<UP,RUNNING> mtu 1500

        inet netmask 0xfffffc00 

        carp: BACKUP vhid 1 advbase 1 advskew 100

carp1: flags=41<UP,RUNNING> mtu 1500

        inet netmask 0xfffffc00 

        carp: BACKUP vhid 20 advbase 1 advskew 100

carp2: flags=41<UP,RUNNING> mtu 1500

        inet netmask 0xffffffe0 

        carp: MASTER vhid 88 advbase 1 advskew 100







More information about the freebsd-questions mailing list