Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2014 08:15:56 -0700
From:      Freddie Cash <fjwcash@gmail.com>
To:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Using CARP with multiple IP aliases (FBSD 10.0)
Message-ID:  <CAOjFWZ5_M_d3AStmkUJKk0TgesowJH-jWsKBbvZshwQ278o8ow@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Good morning,

Just looking for some clarification around the proper use of CARP on
interfaces with multiple IPs.

I've been using the new CARP on FreeBSD 10.0 with great success on a pair
of systems with lots of vlans across 3 physical NIC ports.  However, those
systems only have a single IP per vlan.  The ifconfig lines are very
simple, and everything just works the way I expect it to, failing back and
forth between the two systems as needed.

I'm now trying to get CARP working on a second pair of systems, and running
into issues with one of the physical interfaces.  I think I might be doing
the ifconfig commands wrong, but the ifconfig(8) and carp(4) man pages
aren't very clear on this usage.

Are all of the carp-related parameters required for every IP alias added to
an interface?  Or are the pass/advbase/advskew only needed once per
interface, and you just pass the vhid to each IP alias?

Currently, I'm doing the former and having issues with both boxes claiming
to be master for that one interface.

Which is correct:

ifconfig igb0 inet 1.2.3.4/24 vhid 30 pass mypass
ifconfig igb0 inet 1.2.3.5/32 vhid 30 pass mypass alias
ifconfig igb0 inet 1.2.3.6/32 vhid 30 pass mypass alias
ifconfig igb0 inet 1.2.3.7/32 vhid 30 pass mypass alias
ifconfig igb0 inet 1.2.3.8/32 vhid 30 pass mypass alias

OR

ifconfig igb0 inet 1.2.3.4/24 vhid 30 pass mypass
ifconfig igb0 inet 1.2.3.5/32 vhid 30 alias
ifconfig igb0 inet 1.2.3.6/32 vhid 30 alias
ifconfig igb0 inet 1.2.3.7/32 vhid 30 alias
ifconfig igb0 inet 1.2.3.8/32 vhid 30 alias

Neither the ifconfig nor the carp man pages show examples with multiple IPs
configured within the same vhid.

-- 
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ5_M_d3AStmkUJKk0TgesowJH-jWsKBbvZshwQ278o8ow>