Subject: Re: ifconfig alias routing problems...
To: Randy Terbush <randy@zyzzyva.com>
From: Andrew Gillham <gillham@andrews.edu>
List: current-users
Date: 10/19/1995 14:37:20
Randy Terbush wrote:
> I'll confirm the same behaviour. The only solution I have found was to
> first:
>
> route delete IP
> route add IP localhost
The delete is only necessary if you are not adding the alias at bootup.
> The following from 'netstat -rn' after doing a delete/add for .200
>
> 198.183.2.200 127.0.0.1 UGHS 0 2 lo0
> 198.183.2.201 127.0.0.1 UGHS 0 3 ep0
> 198.183.2.202 127.0.0.1 UGHS 0 0 ep0
I have:
158.52.19.3 127.0.0.1 UGHS 1 5329 - lo0
158.52.19.5 127.0.0.1 UGHS 1 31660 - lo0
158.52.19.7 127.0.0.1 UGHS 0 1443 - lo0
19.3 is in hostname.ep0, .5 and .7 are aliases add in /etc/netstart:
ifconfig ep0 158.52.19.5 alias netmask 255.255.255.0
route add 158.52.19.5 localhost
ifconfig ep0 158.52.19.7 alias netmask 255.255.255.0
route add 158.52.19.7 localhost
> Hmmm. Seems that perhaps changing the alias command to:
>
> ifconfig lo0 inet alias 198.183.2.200
>
> might do the trick? Maybe someone who knows this code my have
> the answer?
To me it looks like everything is working correctly. I know that
doing something like:
# ifconfig ep0 IP1
# ping foo
# ifconfig ep0 IP2
# ping foo
Doesn't do exactly what you would expect either. It seems that the
aliases need to be set in /etc/netstart to work 'correctly.'
-Andrew
--
============================ Real 32bit multi-tasking UN*X System
Andrew Gillham | TCP/IP,NFS,PPP,4.4BSD-lite,multi-user
gillham@andrews.edu | i386,sparc,alpha,mac68k,amiga,others
LAN/WAN/NW/UN*X specialist | ---> http://www.NetBSD.org <---