Using CARP with multiple IP aliases (FBSD 10.0)

Freddie Cash fjwcash at gmail.com
Fri Sep 12 14:33:41 UTC 2014


On Thu, Sep 11, 2014 at 11:04 AM, Freddie Cash <fjwcash at gmail.com> wrote:

> On Thu, Sep 11, 2014 at 10:39 AM, Peter Wemm <peter at wemm.org> wrote:
>
>> This is the method we use extensively in the freebsd.org cluster.  eg:
>> the
>> routers have public IP addresses, private RFC1918, IPv6 etc addresses,
>> all on
>> the same vhid for each interface.
>>
>> * One vhid presence, with multiple aliases on the same vhid.
>> * Configure vhid params once, aliases attached without params.
>>
>> carp state checking uses link local addresses to communicate.
>>
>> Having multiple IP's per vhid means they change master->backup state as a
>> group, not individually and that's what we wanted for things like router
>> default gateways.
>>
>
> ​Excellent.  Thanks for the confirmation.
>
> ​I'll be testing the updated configuration tomorrow morning (set all vhid
> params in rc.conf.local, and only set vhid number in firewall scripts when
> adding IPs).
>
​
>
​Everything is working correctly now.  :)

/etc/rc.conf.local configures all the carp-related options.

And the firewall scripts now only set the vhid when adding the IP to the
interface, nothing else.

Seems I also had a typo in one of my scripts that wasn't adding one of the
IPs to the vhid on sys2, so the IP list on both systems wasn't identical,
which could also be part of the reason they were both MASTER at the same
time.​

Now, igb0 on each system is showing the correct CARP status (MASTER on
sys1, BACKUP on sys2).  And, downing any of the 4 interfaces on sys1
correctly sets all interfaces on sys2 to MASTER.

Thanks for all the help, and for pointing me in the right direction.  :D

-- 
Freddie Cash
fjwcash at gmail.com


More information about the freebsd-stable mailing list