carp and alias

2007-06-08 Thread Tobias Weisserth

Hi everybody,

I read the carp(4) manpage, the carp FAQ entry and http:// 
www.countersiege.com/doc/pfsync-carp/ yet I still have some questions.


Let's say I have an OpenBSD host like this:

#/etc/hostname.xl0
inet 10.0.0.1 255.255.255.0 NONE
inet alias 10.0.0.2  255.255.255.0
inet alias 10.0.0.3  255.255.255.0
inet alias 10.0.0.4  255.255.255.0

This might be the external interface.

Now I want to have one carp interface with the address 10.0.0.250:

#/etc/hostname.carp0
inet 10.0.0.250 255.255.255.0 10.0.0.255 vhid 1 pass foo

Is it possible to let carp0 have the alias definitions like this?

#/etc/hostname.carp0
inet 10.0.0.250 255.255.255.0 10.0.0.255 vhid 1 pass foo
inet alias 10.0.0.2  255.255.255.0
inet alias 10.0.0.3  255.255.255.0
inet alias 10.0.0.4  255.255.255.0

and remove those from /etc/hostname.xl0?

regards,
Tobias W.


*
God is real, unless declared integer.



Re: carp and alias

2007-06-08 Thread Steven Surdock
Tobias Weisserth wrote:
 Is it possible to let carp0 have the alias definitions like this?

 #/etc/hostname.carp0
 inet 10.0.0.250 255.255.255.0 10.0.0.255 vhid 1 pass foo
 inet alias 10.0.0.2  255.255.255.0
 inet alias 10.0.0.3  255.255.255.0
 inet alias 10.0.0.4  255.255.255.0

 and remove those from /etc/hostname.xl0?

Yes.  Make sure the carp interfaces match on each firewall, otherwise
you'll end up multiple masters.

$ ifconfig carp0
carp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
lladdr 00:00:5e:00:01:01
description: ISP VIP
carp: MASTER carpdev fxp0 vhid 1 advbase 2 advskew 0
groups: carp
inet 10.10.10.63 netmask 0xff80 broadcast 10.10.10.127
inet6 fe80::200:5eff:fe00:101%carp0 prefixlen 64 scopeid 0xb
inet 10.10.10.2 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.3 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.4 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.5 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.6 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.7 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.8 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.9 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.10 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.14 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.16 netmask 0xff80 broadcast 10.10.10.127
inet 10.10.10.17 netmask 0xff80 broadcast 10.10.10.127
inet 10.20.20.62 netmask 0xffe0 broadcast 10.20.20.63
inet 10.20.20.45 netmask 0xffe0 broadcast 10.20.20.63