*BSD News Article 44419


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!DIALix!haywire.DIALix.COM!not-for-mail
From: peter@haywire.DIALix.COM (Peter Wemm)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: ifconfig alias problems
Date: 26 May 1995 02:58:44 +0800
Organization: DIALix Services, Perth, Australia.
Lines: 54
Sender: peter@haywire.DIALix.COM
Message-ID: <3q2k14$hjb$1@haywire.DIALix.COM>
References: <D8oypu.G5F@beach.silcom.com>
NNTP-Posting-Host: haywire.dialix.com
NNTP-Posting-User: peter

clarence@beach.silcom.com (Clarence Gardner) writes:

>I have installed FreeBSD 2.0-RELEASE #2.  A vital feature I
>need in any unix is the ability to bind more than one IP address
>to a network interface.  So I'm using the ifconfig .... alias command.

>But, I have a problem.  The ifconfig gets this error:
>	ifconfig: ioctl (SIOCAIFADDR): File exists
>Even with the error, the new address is then functional, but only
>from -other- systems.  I have seen this behavior on other systems, where
>a followup 'arp -s' command made the address work from its own system
>also, but that's not helping here.

The "correct" way to add aliases within an existing subnet:

Eg: suppose you have a C-class 192.9.200, you could:

ifconfig ed0 192.9.200.1 netmask 0xffffff00 broadcast 192.9.200.255
ifconfig ed0 192.9.200.2 netmask 0xffffffff alias
ifconfig ed0 192.9.200.3 netmask 0xffffffff alias
ifconfig ed0 192.9.200.4 netmask 0xffffffff alias
ifconfig ed0 192.9.200.5 netmask 0xffffffff alias
ifconfig ed0 192.9.200.6 netmask 0xffffffff alias
......etc......

Your machine will respond to the aliases both from locally and from
other machines remotely.

I hear that in theory, the more you add, the slower certain operations
become.. I've not seen anybody say exactly _what_ becomes slower or by
how much..   

Also, I've only tested this on freebsd-current.. I dont know how well
it will work on 2.0R.

-Peter

>Also, on the other system, after the ifconfig and trying to use the new
>address, you would see something like this in an 'arp -a' output:
>	? (the.new.ip.address) at (incomplete)
>and then after the 'arp -s', it would change to
>	? (the.new.ip.address) at the:same:old:boring:ethernet:address
>This is the case on FreeBSD also, except that after 'arp -s', the address
>is still not usable from that system.

>Any info on this?

>Thanks

>--
>Clarence Gardner
>Silicon Beach Communications
>Software Products and Services Division
>clarence@silcom.com