Subject: Re: Multiple IP addresses...
To: None <netbsd-help@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: netbsd-help
Date: 06/10/1999 14:58:37
Stuart Carter <StuartC@omnibus.co.uk> typed:
:Having looked through the NetBSD documentation and also some Linux docs,
:I'm still having trouble setting multiple IP addresses. I may have the 
:wrong end of the stick.
:
:I need to:
: Access anything on a 1.x.x.x network.
: Access a couple of addresses with 194.x.y.z addresses.
:
:I need to be accessible by both networks.

Read ifconfig(8)

% ifconfig @@@ inet 1.x.x.x netmask 0xff000000
% ifconfig @@@ inet 194.x.y.z netmask 0xff000000

1) Change IP addresses and netmasks appropriately.  
2) Change @@@ to your ethernet interface name ("ifconfig -a" will tell you)

If you use standard /etc/rc* files, then you could do
% echo >/etc/ifconfig.@@@ "inet 1.x.x.x netmask 0xff000000"
% echo >/etc/ifaliases "194.x.y.z @@@ 0xff000000"

:I only have one ethernet interface... I think this is what is causing my
:problem, since I can only see how to set up one network on the device.
:I wish I'd done the networking course that my colleague just went on!
:Any help will be most appreciated.

Regards,
-- 
Geoff Wing   <gcw@pobox.com>            Mobile : (Australia) 0413 431 874
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/