NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: automatically configuring carp(4)

On Fri, Jun 05, 2009 at 02:37:14PM +1000, Ray Phillips wrote:
> Thanks for your reply Manuel.
> > >> But if you're running carp on vlan (like a do) you can't use 
> > auto_ifconfig
> >>> because it's going to do it in the wrong order. The solution is to set
> >>> auto_ifconfig=NO and list all interfaces in net_interfaces
> >>
> >> Could you expand on that a bit please?  Would the kernel (?) try to 
> >> configure carp before the physical interface?
> >
> >Not the kernel, the /etc/rc.d/network script.
> Ah, yes.  So why is that--what determines the order in which 
> /etc/rc.d/network configures interfaces?

It fist processes real interfaces (ifconfig -l) then pseudo-device cloning
interfaces (ifconfig -C). Both passes are done in ASCII alphanumeric order.
So as vlan and carp are both in the second pass, vlan will be done after carp.

> >
> >Quite easy, something like:
> >/etc/ifconfig.wm0
> >up
> >
> >/etc/ifconfig.vlan0
> >create
> >vlan 574 vlanif wm0
> >inet netmask
> >
> >/etc/ifconfig.carp0
> >create
> >vhid 1 advskew 100 pass password
> >
> >( being the public IP shared by the 2 boxes, and
> >the IP used for internal communication with the second member of the
> >CARP).
> That's tricky, I hadn't thought of creating a private channel for the 
> members of the CARP group to use to communicate between themselves. 
> That's so they can keep the state of whatever services they provide 
> in synch, no doubt.  Did you choose that approach instead of letting 
> them synch over the same subnet that the CARP group uses for security 
> reasons?

No, mostly because I didn't have that much spare IP addresses.

> I don't suppose you'd get higher data throughput by 
> creating separate VLANs would you?


> By the way, I noticed the MAC address of the only CARP virtual 
> interface I've set up so far is 00:00:5e:00:01:01, which according to
> NetBSD generates belong to that vendor?

I think so, yes. Mine are also in the 00:00:5e range.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index