Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 May 2009 22:16:28 -0400
From:      Will Andrews <will@firepipe.net>
To:        Sam Wan <sam@ip6.com.au>
Cc:        freebsd-net@freebsd.org
Subject:   Re: CARP on FreeBSD 7,2
Message-ID:  <2aada3410905081916k51f75499ve867cc4be316cdcf@mail.gmail.com>
In-Reply-To: <11212.220.233.42.226.1241834944.squirrel@secure.ip6.com.au>
References:  <11159.220.233.42.226.1241834088.squirrel@secure.ip6.com.au> <11212.220.233.42.226.1241834944.squirrel@secure.ip6.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 8, 2009 at 10:09 PM, Sam Wan <sam@ip6.com.au> wrote:
> The following command also failed:
>
> test:~ # ifconfig carp1 vhid 1 pass password 192.168.2.144/24 up
> ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address
>
>>
>> Hi,
>>
>> I tried to setup CARP in FreeBSD 7.2, but seems not able to assign IP to
>> the carp interfaces.
>>
>> Here is my rc.conf file:
>>
>> hostname=3D"test.ip6.com.au"
>> ifconfig_fxp0=3D"inet 192.168.1.248 =A0netmask 255.255.255.0"
>> sshd_enable=3D"YES"
>>
>> pf_enable=3D"YES"
>> pf_rules=3D"/etc/pf.anti-spam.conf"
>> pf_flags=3D""
>> pflog_enable=3D"YES"
>> pflog_logfile=3D"/var/log/pflog"
>> pflog_program=3D"/sbin/pflogd"
>> pflog_flags=3D""
>> pfsync_enable=3D"NO"
>> pfsync_syncdev=3D""
>> pfsync_ifconfig=3D""
>>
>> cloned_interfaces=3D"carp1"
>> ifconfig_carp1=3D"up 24.214.165.129/25 vhid 2 pass privatepassword"
>>
>>
>> test:~ # ifconfig
>> fxp0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu =
1500
>> =A0 =A0 =A0 =A0 options=3D8<VLAN_MTU>
>> =A0 =A0 =A0 =A0 ether 00:13:20:65:ad:bd
>> =A0 =A0 =A0 =A0 inet 192.168.1.248 netmask 0xffffff00 broadcast 192.168.=
1.255
>> =A0 =A0 =A0 =A0 media: Ethernet autoselect (100baseTX <full-duplex>)
>> =A0 =A0 =A0 =A0 status: active
>> plip0: flags=3D108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0=
 mtu
>> 1500
>> lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>> =A0 =A0 =A0 =A0 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
>> =A0 =A0 =A0 =A0 inet6 ::1 prefixlen 128
>> =A0 =A0 =A0 =A0 inet 127.0.0.1 netmask 0xff000000
>> pflog0: flags=3D141<UP,RUNNING,PROMISC> metric 0 mtu 33204
>> pfsync0: flags=3D0<> metric 0 mtu 1460
>> =A0 =A0 =A0 =A0 syncpeer: 224.0.0.240 maxupd: 128
>> carp1: flags=3D9<UP,LOOPBACK> metric 0 mtu 1500
>> =A0 =A0 =A0 =A0 carp: INIT vhid 1 advbase 1 advskew 50
>>
>> What have I missed?

Hi,

Currently, the only way to assign an IP address for CARP is to use an
IP that is in the same subnet as the physical interface you intend to
handle its packets.  In other words, since neither 192.168.2.144/24
nor 24.215.165.129/25 are in 192.168.1.248/24, they cannot be assigned
to any CARP interface.  Eventually, this should be fixed by
introducing carpdev, which allows explicitly associating a CARP
interface with a physical interface, but it's not there yet.

Regards,
--Will.



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