On Monday 23 October 2006 17:34, Vivek Khera wrote: > I'm attempting to use CARP with arpbalance to load balance some > services. My only problem is that the balancing doesn't happen > automatically. > > The configuration is just from the carp man page: > > ifconfig_em0="inet XXX.XXX.XXX.55 netmask 255.255.255.192 " > ifconfig_em1="inet 192.168.100.55 netmask 255.255.255.0 " > ifconfig_carp0="inet 192.168.100.100 netmask 255.255.255.0 vhid 5 > pass dns-prv" > ifconfig_carp1="inet 192.168.100.100 netmask 255.255.255.0 vhid 6 > advskew 100 pass dns-prv" > cloned_interfaces="carp0 carp1" > > and on the other box: > > ifconfig_em0="inet XXX.XXX.XXX.56 netmask 255.255.255.192 " > ifconfig_em1="inet 192.168.100.56 netmask 255.255.255.0 " > ifconfig_carp0="inet 192.168.100.100 netmask 255.255.255.0 vhid 5 > advskew 100 pass dns-prv" > ifconfig_carp1="inet 192.168.100.100 netmask 255.255.255.0 vhid 6 > pass dns-prv" > cloned_interfaces="carp0 carp1" > > > and of course net.inet.carp.arpbalance=1 in /etc/sysctl.conf. > > > When I reboot the systems, the first one to boot up becomes the > MASTER for both carp0 and carp1 interfaces and remains so even after > the other machine comes up. The second machine to boot comes up in > BACKUP mode for both interfaces. > > The only way to make the balance change is to bring down carp0 on the > box not designated as the master for it momentarily until such time > that the first one (the designated master for carp0) takes over, then > bring up carp0 again. > > Until I perform this manual step, all traffic goes to the single box. > After I perform this step, the traffic is balanced nicely as expected > amongst the local network hosts. Each box then has one MASTER and > one BACKUP carp interface for this IP.
Sounds like you forgot the net.inet.carp.preempt sysctl. See the begining of the EXAMPLES section of carp(4). > What can I do to make the balance automatic as the docs imply? This > also happens on another pair of machines I have which are CARP + > arpbalance for another IP. > > The NICs in question are hooked up to a gigabit switch. -- /"\ Best regards, | [EMAIL PROTECTED] \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | [EMAIL PROTECTED] / \ ASCII Ribbon Campaign | Against HTML Mail and News
pgpdbncRk7yOI.pgp
Description: PGP signature