Subject: ifconfig alias and route?
To: NetBSD Users <netbsd-users@netbsd.org>
From: Jukka Marin <jmarin@pyy.jmp.fi>
List: netbsd-users
Date: 08/30/2001 18:00:22
Hi,
Under NetBSD 1.3 and 1.4, is it possible set up a route to multiple IP
addresses of a local Ethernet interface? Ie.
ifconfig ne0 10.0.0.1 netmask 0xffffff00
ifconfig ne0 alias 10.0.0.2 netmask 0xffffff00
Now, you can locally ping 10.0.0.1, but not 10.0.0.2. If you try to
route add 10.0.0.2 -interface lo0
you get
route: bad value: lo0
and if you try to
route add 10.0.0.2 127.1
you get
writing to routing socket: File exists
add host 10.0.0.2: gateway 127.1: File exists
Under 1.5W, it seems that "ifconfig alias" is all that is needed (the
route doesn't show up immediately, but it appears if you try to ping
the localhost's aliased address).
Any ideas?
-jm