From owner-freebsd-net@FreeBSD.ORG Thu Mar 15 18:45:35 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC67616A402 for ; Thu, 15 Mar 2007 18:45:35 +0000 (UTC) (envelope-from stefan.lambrev@sun-fish.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 3C05713C45A for ; Thu, 15 Mar 2007 18:45:35 +0000 (UTC) (envelope-from stefan.lambrev@sun-fish.com) Received: from blah.sun-fish.com (localhost [127.0.0.1]) by blah.sun-fish.com (Postfix) with ESMTP id 744701B10F08 for ; Thu, 15 Mar 2007 19:45:34 +0100 (CET) Received: from [192.168.3.125] (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 6F8551B10F05 for ; Thu, 15 Mar 2007 19:45:34 +0100 (CET) Message-ID: <45F9944D.6070707@sun-fish.com> Date: Thu, 15 Mar 2007 20:45:33 +0200 From: Stefan Lambrev User-Agent: Thunderbird 1.5.0.10 (X11/20070307) MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <45F97BE2.4010605@netfence.it> In-Reply-To: <45F97BE2.4010605@netfence.it> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP on BLAH Subject: Re: CARP Question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2007 18:45:35 -0000 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 mtu 1500 > inet 192.168.101.10 netmask 0xffffff00 > carp: BACKUP vhid 1 advbase 1 advskew 100 > carp1: flags=49 mtu 1500 > inet 192.168.101.10 netmask 0xffffff00 > carp: BACKUP vhid 2 advbase 1 advskew 0 > carp2: flags=49 mtu 1500 > inet 192.168.0.4 netmask 0xffffff00 > carp: BACKUP vhid 3 advbase 1 advskew 100 > carp3: flags=49 mtu 1500 > inet 192.168.0.4 netmask 0xffffff00 > carp: BACKUP vhid 4 advbase 1 advskew 0 > > b) ifconfig > carp0: flags=49 mtu 1500 > inet 192.168.101.10 netmask 0xffffff00 > carp: MASTER vhid 1 advbase 1 advskew 0 > carp1: flags=49 mtu 1500 > inet 192.168.101.10 netmask 0xffffff00 > carp: MASTER vhid 2 advbase 1 advskew 100 > carp2: flags=49 mtu 1500 > inet 192.168.0.4 netmask 0xffffff00 > carp: MASTER vhid 3 advbase 1 advskew 0 > carp3: flags=49 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- Best Wishes, Stefan Lambrev ICQ# 24134177