Just if it helps anyone else having similar problems with CARP (was hoping
someone would make a comment about the man page for hostname.carp if it is
going to be so fussy about the order of parameters).

- Anyway for a hostname.carpX file, the mandatory "carpdev" must always be
the first parameter, and if you are using "carppeer", it must come after
the IP addresses;

hostname.carp1;
carpdev ix0 advbase 2 advskew 10 pass carppass vhid 1
inet 10.2.1.254 255.255.255.0 10.2.1.255
carppeer 10.2.1.253

- If your CARP interfaces "carpdev" is a VLAN, the vlandev must also always
be the first parameter. And if you are using IPv6 you seem to also need the
"eui64" to stop all v6 errors even though the link-local is created just by
defining an inet6;

hostname.carp11;
carpdev vlan11 advbase 2 advskew 10 pass carppass vhid 11
inet 10.2.11.254 255.255.255.0 10.2.11.255
inet6 2a12:12e0:2:11::254 64
inet6 eui64
carppeer 10.2.11.253

hostname.vlan11;
vlandev ix0 vlan 11
inet 10.2.11.252 255.255.255.0 10.2.11.255
inet6 2a12:12e0:2:11::252 64
inet6 eui64
group INSIDE

The above examples work perfectly. At boot up, the CARP interfaces
gracefully start INIT->Backup (without a Master flap), and no errors are
seen in dmesg.

This is not obvious after working with the ifconfig commands, and there is
no man so I hope this helps some people :)

Cheers, All the best, Andy.





On Wed, May 18, 2016 at 11:24 AM, Andy Lemin <a...@brandwatch.com> wrote:

> Hi Martin,
>
> Thanks for your suggestion.
>
> Indeed it does clear the SIOCAIFADDR errors, however there are new errors
> and the config is more unstable :(
>
> - New boot errors are; "carp0: master_down event in INIT state"
>
> - Instability after the firewall has booted; CARP statuses initialise as
> Backup (and don't go Master temporarily) as they should do. Great..
> But, if we now run "sh /etc/netstart" to make any change, the CARP
> interfaces fall into "status: invalid" and cannot be made functional
> again until another reboot.
>
>
> The previous config with the SIOCAIFADDR errors is more stable, because
> at least we can run "sh /etc/netstart" and make changes to the firewall
> without needing a reboot each time?
>
> What do you think is going on?
> And just to play devils advocate, why is there not a man page for
> hostname.carp?
>
> New hostname.carp0
> carpdev ix0 advbase 2 advskew 10 carppeer 10.255.12.3 pass testpass vhid
> 212
> inet 10.255.12.1 255.255.255.0 10.255.12.255
> inet6 2a00:77e0:255:12::1 64
> inet6 eui64
> description "4D_CDC_VPLS"
>
> Cheers, Andy.
>
>
> On Tue, May 17, 2016 at 5:37 PM, Martin Pieuchot <m...@openbsd.org> wrote:
>
>> On 17/05/16(Tue) 16:37, Andy Lemin wrote:
>> > Hi Misc,
>> >
>> > Since 5.9 (maybe earlier), we noticed that our CARP interfaces no longer
>> > behave as before, don't initialise properly on boot up, and throw
>> errors at
>> > boot.
>> >
>> > I know there has been lots of changes, especially IPv6. So hopefully
>> this
>> > is a simple question and I'm just being stupid, and unable to find a man
>> > page that explains the correct format for hostname.carp ?
>> >
>> >
>> > Otherwise if their really is no man page for hostname.carp, then could
>> > someone please point us in the right direction.
>> >
>> > - Using the following examples;
>> > hostname.ix0
>> > inet 10.255.12.2 255.255.255.0 10.255.12.255
>> > inet6 2a00:77e0:255:12::2 64
>> > inet6 eui64
>> > description "BACKHAUL"
>> > !route add -net 10.1.0.0/16 10.255.12.254
>> >
>> > hostname.carp0
>> > inet 10.255.12.1 255.255.255.0 10.255.12.255
>> > inet6 2a00:77e0:255:12::1 64
>> > advbase 2 advskew 10 carpdev ix0 carppeer 10.255.12.3 pass testpass
>> vhid 212
>> > inet6 eui64
>> > description "BACKHAUL"
>> >
>> > - The following errors at boot are seen multiple times;
>> > ifconfig: SIOCAIFADDR: Invalid argument
>>
>> That's because you're trying to add addresses *before* configuring
>> a "carpdev" (parent) interface.

Reply via email to