Re: ifconfig question

Jesse Peterson <[email protected]>
Newsgroups gmane.os.netbsd.ports.prep
Message-ID <[email protected]>
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  /  [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.