Subject: Re: How do I properly add aliased IPs
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Mark Saad <nonesuch@bad-apples.org>
List: netbsd-users
Date: 04/04/2006 15:48:34
Steven, Jukka,
   What do you know it worked like a charm. It was the fact that I had 
the "typo" in rc.conf . I use FreeBSD more often and I think I was hung 
up on the FreeBSD way to do aliased IPs in rc.conf

The FreeBSD way

ifconfig_fxp0="inet 209.18.118.10 netmask 255.255.255.0"
ifconfig_fxp0_alias0="209.18.118.11 netmask 255.255.255.255"
ifconfig_fxp0_alias1="209.18.118.12 netmask 255.255.255.255"

Thanks for you help.


Steven M. Bellovin wrote:
> On Tue, 4 Apr 2006 20:45:04 +0200, Jukka Salmi <j+nbsd@2006.salmi.ch>
> wrote:
>
>   
>> Mark Saad --> netbsd-users (2006-04-04 14:06:21 -0400):
>>     
>>> Jukka
>>>   Thanks that worked . One thing I am not sure of is the message that 
>>> shows up when I restart networking, any ideas  ?
>>>
>>> # /etc/rc.d/network restart
>>> Stopping network.
>>> Deleting aliases.
>>> ifconfig: SIOCDIFADDR: Can't assign requested address
>>> ifconfig: SIOCDIFADDR: Can't assign requested address
>>> ifconfig: SIOCDIFADDR: Can't assign requested address
>>> Downing network interfaces: fxp0.
>>>       
>> No, I can't reproduce this. Do you have a /etc/ifaliases? If yes, what
>> does it contain?
>>
>>     
> My guess is that you got the messages the first time because it was
> trying to delete addresses that didn't yet exist.  Now, they exist;
> restarting the network can therefore successfully delete them.
>
> Here's a test: change your variables to add a new address -- say, a
> 1918 address on a net you're not using -- and try the restart again.
> If I'm right, you'll get one such message.
>
> 		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb
>   


-- 
Mark Saad
nonesuch@bad-apples.org