misc/114095: Carp+pf delay with high state limit

Nerijus Ambrazas nerijus.ambrazas at ktu.lt
Thu Jun 28 13:30:07 UTC 2007

>Number:         114095
>Category:       misc
>Synopsis:       Carp+pf delay with high state limit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 28 13:30:06 GMT 2007
>Originator:     Nerijus Ambrazas
>Release:        FreeBSD 6.2-RELEASE amd64
Kaunas University of Technology
FreeBSD ad-baltas.ktu.lt 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Wed Jun 27 11:07:42 EEST 2007     root@:/usr/src/sys/amd64/compile/geras  amd64

CARP takes a long time to assign master and backup nodes after restart. One node initially becomes master on all vhids, not dependant on the value of advskew value. It might take a few minutes or more for the master/slave nodes to be set properly. The wait time seems to be linked to the the state limit set in pf. The higher the limit the longer it takes CARP to properly initialize.

The kernel config is as follows :

include GENERIC

options SMP

device pf
device pflog
device pfsync
device carp

options ALTQ
options ALTQ_CBQ
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFSC
options ALTQ_CDNR
options ALTQ_PRIQ
options ALTQ_NOPCC

pf.conf used for testing is

set limit {states 50000, frags 50000}
nat on em0 from to ! ->

pass quick all

rc.conf is as follows :

# -- sysinstall generated deltas -- # Fri Jun 22 15:57:33 2007
# Created: Fri Jun 22 15:57:33 2007
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
ifconfig_em0="inet netmask"

cloned_interfaces="lo0 vlan251 vlan252 vlan253 vlan254 vlan255 vlan256 vlan257 vlan258 vlan259 vlan260 vlan261 vlan262 vlan26
3 vlan264 vlan265 carp0 carp251 carp252 carp253 carp254 carp255 carp256 carp257 carp258 carp259 carp260 carp261 carp262 carp2
63 carp264 carp4 carp265"

ifconfig_carp0="up netmask vhid 1 advskew 100"

#Tarptautiniu studiju centras
ifconfig_vlan251="inet netmask vlan 251 vlandev em1 up"
ifconfig_carp251="up netmask vhid 2 advskew 100 "

#ITPI 2a
ifconfig_vlan252="inet netmask vlan 252 vlandev em1 up"
ifconfig_carp252="up netmask vhid 3 advskew 100 "

#ITPI 103  
ifconfig_vlan253="inet netmask vlan 253 vlandev em1 up"
ifconfig_carp253="up netmask vhid 4 advskew 100 "

ifconfig_vlan254="inet netmask vlan 254 vlandev em1 up"
ifconfig_carp254="up netmask vhid 5 advskew 100 "

ifconfig_vlan255="inet netmask vlan 255 vlandev em1 up"
ifconfig_carp255="up netmask vhid 6 advskew 100 "

ifconfig_vlan256="inet netmask vlan 256 vlandev em1 up"
ifconfig_carp256="up netmask vhid 7 advskew 100"

ifconfig_vlan257="inet netmask vlan 257 vlandev em1 up"
ifconfig_carp257="up netmask vhid 8 advskew 100 "

#Ekonomikos ir vadybos
ifconfig_vlan258="inet netmask vlan 258 vlandev em1 up"
ifconfig_carp258="up netmask vhid 9 advskew 100 "

ifconfig_vlan259="inet netmask vlan 259 vlandev em1 up"
ifconfig_carp259="up netmask vhid 10 advskew 100 "

ifconfig_vlan260="inet netmask vlan 260 vlandev em1 up"
ifconfig_carp260="up netmask vhid 11 advskew 100"

ifconfig_vlan261="inet netmask vlan 261 vlandev em1 up"
ifconfig_carp261="up netmask vhid 12 advskew 100"

ifconfig_vlan262="inet netmask vlan 262 vlandev em1 up"
ifconfig_carp262="up netmask vhid 13 advskew 0 "

ifconfig_vlan263="inet netmask vlan 263 vlandev em1 up"
ifconfig_carp263="up netmask vhid 14 advskew 100"

ifconfig_vlan264="inet netmask vlan 264 vlandev em1 up"
ifconfig_carp264="up netmask vhid 15 advskew 100 "
#ifconfig_carp265="up netmask vhid 16 "

#AD Serveris
ifconfig_vlan265="inet netmask vlan 265 vlandev em1 up"
ifconfig_carp265="up netmask vhid 16 advskew 100"

ifconfig_em2="inet netmask"
ifconfig_carp4="up netmask vhid 100"
ifconfig_pfsync0="up syncif em2"


Set the state limit in pf.conf to 100000 or something like that.
not known


More information about the freebsd-bugs mailing list