Subject: Re: ifconfig question
To: None <port-prep@netbsd.org>
From: Jesse Peterson <jpeterson275@attbi.com>
List: port-prep
Date: 02/11/2003 20:23:07
The netmask for the aliased IP on the interface needs to be 0xffffffff 
(255.255.255.255).

Erik Osheim wrote:
> Hi again,
> 
> As long as I'm emailing the list about the mc0 interface, I should ask 
> about a problem that's stumped me for a couple of days.
> 
> I need to use aliasing with my internal interface; I can set it up 
> manually and it works great. I'd like to set both the actual IP and the 
> aliased IP on startup using the /etc/ifconfig.rtk1 file. However, so far 
> I haven't been able to get it to work. I remember doing something like 
> this awhile ago, but the syntax has escaped me.
> 
> I've naively tried something like this in the file:
> 
> -- 
> inet 1.2.3.4 netmask 255.255.255.0 broadcast 1.2.3.255
> alias 192.168.0.1 netmask 255.255.0.0 broadcast 192.168.255.255
> -- 
> 
> but this doesn't work (it sets up the first IP, but doesn't do any 
> aliasing). I tried adding a semicolon-- no luck there either. I tried 
> putting it all on one line, but this doesn't work with the actual 
> command, so of course it didn't work in the file (didn't even set up the 
> 1st IP). If I do this from the commandline as two ifconfig commands 
> everything is peachy.
> 
> The manpage doesn't have any info on this and I'm not sure what to 
> search under on the net... anyone know how to do this?
> 
> Thanks,
> 
> -- Erik
> 
> 

-- 
Jesse Peterson  /  jesse@pixeltechs.com