Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Oct 2004 09:12:18 +0200 (CEST)
From:      Christian Kratzer <ck-lists@cksoft.de>
To:        "Marc G. Fournier" <scrappy@hub.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ifconfig alias: File Exists
Message-ID:  <20041020091038.P95657@vesihiisi.cksoft.de>
In-Reply-To: <20041019164943.Y98762@ganymede.hub.org>
References:  <20041019162521.N98762@ganymede.hub.org> <20041019214157.Y88138@vesihiisi.cksoft.de> <20041019164943.Y98762@ganymede.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Tue, 19 Oct 2004, Marc G. Fournier wrote:

> On Tue, 19 Oct 2004, Christian Kratzer wrote:
>
>> Hi,
>> 
>> On Tue, 19 Oct 2004, Marc G. Fournier wrote:
>> 
>>> 
>>> Why would I be getting:
>>> 
>>> # ifconfig fxp0 alias 200.46.204.9
>>> ifconfig: ioctl (SIOCAIFADDR): File exists
>>> 
>>> when I know for a fact that it hasn't been configured?
>> 
>> you should use a netmask of 255.255.255.255 for ipv4 aliases.
>> 
>> 	ifconfig fxp0 alias 200.46.204.9 netmask 255.255.255.255
>
> Is that new?  You are right, that fixed it, but didn't think I had to do that 
> before :(

no it's been like that since I know of FreeBSD 2.0 and propably longer.
The BSD ip stack adds a route to the connected network over the
respective interface when you do an ifconfig.

Using the same netmask on all aliases it will cause it to try to add the
same route multiple times causing the error you saw.

Greetings
Christian

-- 
Christian Kratzer                       ck@cksoft.de
CK Software GmbH                        http://www.cksoft.de/
Phone: +49 7452 889 135                 Fax: +49 7452 889 136



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