*BSD News Article 59717


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!gatech!newsfeed.internetmci.com!news.sprintlink.net!news.electrotex.com!prefect.tenagra.com!not-for-mail
From: asutton@prefect.tenagra.com (Allan Sutton)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: Need Help With ifconfig alias...
Date: 13 Jan 1996 22:12:01 -0600
Organization: The Tenagra Corporation, Houston Texas, USA
Lines: 33
Message-ID: <4d9vqh$35a@prefect.tenagra.com>
References: <30F4E4EE.E4C@cdepot.net>
NNTP-Posting-Host: prefect.tenagra.com

In article <30F4E4EE.E4C@cdepot.net>,
Scott Taggart  <taggart@cdepot.net> wrote:
>I give up - I connot get ifconfig aliasing to work correctlly.  
>Yesterday, i did:
>
>	    ifconfig ef0 www.taggart.com alias
>
>which worked fine - I could ping the virtual host, etc.  Now, no 
>matter what I do I get the following error message:
>
>	    ifconfig: ioctl (SIOCAIFADDR): File exists

I see this question come up a lot, and the fact of the matter is that it 
really isn't much of a problem. In a nutshell, after ifconfig adds the IP 
address to the particular interface, it then tries to add a route to that 
address. If you already have an address on the same subnet, then it is 
complaining that a route already exists, which is the message you are 
seeing. The net result is you have added an address that works perfectly 
fine from the outside world, but is unreachable from the machine itself. 
This is usually not a problem for things like web servers on virtual 
hosts, etc. I never worry about it, myself, and things work fine. If the 
lack of a route does cause a problem, then here's a one possible 
solution. Instead of the command above, use:

ifconfig ef0 www.taggart.com netmask 255.255.255.255 alias

That allows ifconfig to add a host specific route without getting the 
error that the route already exists.

Allan Sutton
System Administrator
asutton@tenagra.com
http://www.tenagra.com/