Subject: Re: How to set a second ip address on a device
To: Oliver Egginger <Oliver.Egginger@dvz.fh-giessen.de>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-users
Date: 10/21/2003 23:02:08
On Mon, Oct 20, 2003 at 03:37:05PM +0200, Oliver Egginger wrote:
> Hello again,
> 
> I have one network adapter and want to have two ip addresses on it. In
> /etc/rc.conf I got:
> 
> ifconfig_ex0="xxx.xxx.xxx.xxx netmask 255.255.255.192"
> defaultroute="xxx.xxx.xxx.xxx"
> hostname="my_hostname.dvz.fh-giessen.de"
> auto_ifconfig=YES
> 
> This works very nice. But now I want to have another ip on ex0. How can
> I do that? I temped this rc.conf line:
> 	ifconfig_ex0:0="192.168.192.88 netmask 255.255.255.0"
> This would be the linux-way, but it don't seems to work with NetBSD.

No. I don't know how to do it from rc.conf.
Remove the ifconfig_ex0 line, and create a /etc/ifconfig.ex0 file with
inet xxx.xxx.xxx.xxx netmask 255.255.255.192
inet 192.168.192.88 netmask 255.255.255.0 alias

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--