CARP Question

Stefan Lambrev stefan.lambrev at sun-fish.com
Thu Mar 15 18:45:35 UTC 2007


Hi,


Andrea Venturoli wrote:
> Hello.
>
> I've got two servers configured as follows:
>
> a)
> /etc/rc.conf:
> ifconfig_xl0="inet 192.168.0.2 netmask 255.255.255.0"
> ifconfig_fxp0="inet 192.168.101.4 netmask 255.255.255.0"
> cloned_interfaces="carp0 carp1 carp2 carp3"
> ifconfig_carp0="vhid 1 advskew 100 pass xxxx 192.168.101.10"
> ifconfig_carp1="vhid 2 pass yyyy 192.168.101.10"
> ifconfig_carp2="vhid 3 advskew 100 pass zzzz 192.168.0.4"
> ifconfig_carp3="vhid 4 pass wwww 192.168.0.4"
>
> /etc/sysctl.conf:
> net.inet.carp.arpbalance=1
> net.inet.carp.preempt=1
>
>
>
> b)
> /etc/rc.conf:
> ifconfig_fxp0="inet 192.168.101.1 netmask 255.255.255.0"
> ifconfig_fxp1="inet 192.168.0.3 netmask 255.255.255.0"
> cloned_interfaces="carp0 carp1 carp2 carp3"
> ifconfig_carp0="vhid 1 pass xxxx 192.168.101.10"
> ifconfig_carp1="vhid 2 advskew 100 pass yyyy 192.168.101.10"
> ifconfig_carp2="vhid 3 pass zzzz 192.168.0.4"
> ifconfig_carp3="vhid 4 advskew 100 pass wwww 192.168.0.4"
>
> /etc/sysctl.conf:
> net.inet.carp.arpbalance=1
> net.inet.carp.preempt=1
>
>
>
> With this I would expect that, being both servers online, they should 
> have two MASTER and two BACKUP carp interfaces each.
> Instead, one has all MASTERs and the other all BACKUPs.
>
> a) ifconfig
> carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.101.10 netmask 0xffffff00
>         carp: BACKUP vhid 1 advbase 1 advskew 100
> carp1: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.101.10 netmask 0xffffff00
>         carp: BACKUP vhid 2 advbase 1 advskew 0
> carp2: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.0.4 netmask 0xffffff00
>         carp: BACKUP vhid 3 advbase 1 advskew 100
> carp3: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.0.4 netmask 0xffffff00
>         carp: BACKUP vhid 4 advbase 1 advskew 0
>
> b) ifconfig
> carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.101.10 netmask 0xffffff00
>         carp: MASTER vhid 1 advbase 1 advskew 0
> carp1: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.101.10 netmask 0xffffff00
>         carp: MASTER vhid 2 advbase 1 advskew 100
> carp2: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.0.4 netmask 0xffffff00
>         carp: MASTER vhid 3 advbase 1 advskew 0
> carp3: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
>         inet 192.168.0.4 netmask 0xffffff00
>         carp: MASTER vhid 4 advbase 1 advskew 100
>
>
> Why?
>
man carp:

    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 
down,
                              advskew is changed to 240 on all carp inter-
                              faces.  See also the first example.  Disabled
                              by default.
>
>  bye & Thanks
>     av.
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"

-- 
Best Wishes,
Stefan Lambrev
ICQ# 24134177



More information about the freebsd-net mailing list