From owner-freebsd-net@FreeBSD.ORG Thu Jun 12 15:26:28 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 910B61065670 for ; Thu, 12 Jun 2008 15:26:28 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0F7968FC14 for ; Thu, 12 Jun 2008 15:26:27 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m5CFQPb7021115; Thu, 12 Jun 2008 17:26:26 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m5CFQPAI021114; Thu, 12 Jun 2008 17:26:25 +0200 (CEST) (envelope-from olli) Date: Thu, 12 Jun 2008 17:26:25 +0200 (CEST) Message-Id: <200806121526.m5CFQPAI021114@lurza.secnetix.de> From: Oliver Fromme To: freebsd-net@FreeBSD.ORG X-Newsgroups: list.freebsd-net User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 12 Jun 2008 17:26:26 +0200 (CEST) Cc: Subject: CARP + multiple addresses 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, 12 Jun 2008 15:26:28 -0000 Hi, I'm building a fail-over setup with two database servers, so when the first one fails, the second takes over. The data is replicated. So far it seems to work fine with CARP, but now it turned out that I need another address from a different subnet which also needs to access the database. What's the best way to do that? Add a second IP address to the existing carp interface, or create a new carp interface? Are there any pros and cons? I.e. currently it looks like this: Database server A: bge0: physical interface vlan101: 10.1.101.41/24 on bge0 vlan202: 10.1.202.41/24 on bge0 carp0: 10.1.101.40/32 vhid 1 Database server B: bge0: physical interface vlan101: 10.1.101.42/24 on bge0 vlan202: 10.1.202.42/24 on bge0 carp0: 10.1.101.40/32 vhid 1 And now I need to add an IP address from vlan202 which also needs to access the same database. I'm inclined to add 10.1.202.40/32 vhid 1 to the existing carp0 on both servers. I assume that the CARP interface goes to BACKUP when *any* of its IP addresses fail, right? Can anybody confirm this, please? So, would that work, or is there a better way? Any hints are appreciated! Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "In My Egoistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton