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!ihnp4.ucsd.edu!agate!sklower From: sklower@oboe.CS.Berkeley.EDU (Keith Sklower) Newsgroups: comp.unix.bsd.bsdi.misc Subject: Re: Need Help With ifconfig alias... Date: 12 Jan 1996 00:41:41 GMT Organization: University of California, Berkeley Lines: 49 Message-ID: <4d4ao5$7ko@agate.berkeley.edu> References: <30F4E4EE.E4C@cdepot.net> NNTP-Posting-Host: oboe.cs.berkeley.edu In article <30F4E4EE.E4C@cdepot.net>, Scott Taggart <taggart@cdepot.net> wrote: }Yesterday, i did: } } ifconfig ef0 www.taggart.com alias } }which worked fine - I could ping the virtual host, etc. So, what's the problem? }Now, no matter what I do I get the following error message: } } ifconfig: ioctl (SIOCAIFADDR): File exists My guess it that you are adding a second address on the same subnet as the first one. What the kernel is complaining already exists is an entry in the routing table for that subnet (which is computed as the bitwise "and" of the address and whatever netmask you assigned). The current design of the routing table only allows one entry for a given (key, mask) pair. So, the ifconfig command is telling you that the kernel couldn't add an entry. It shouldn't be causing a problem, and the only impact is that when you connect() to something so that the route is associated with that interface, it's going to pick the first address as the source address, rather than the second one. If you really care, you can "route delete" the route in question before doing the second ifconfig. }I have read that you can use "-alias" to undo an alias. While this }ifconfig seems to not complain and I can in fact do the ifconfig }again (with the alias, not -alias) and get no complaints, I can }never get a ping to work. Sounds like a bug to me. But I don't have time to track it down right now (I don't work for BSDI), and if you can just live with warning you get doing the ifconfig <first address> ifconfig alias <second address> without stepping on the bug by trying to ifconfig -alias things, that is what I would recommend }What is going on here? See above explanation.