Subject: ifconfig alias (solution)
To: None <current-users@NetBSD.ORG>
From: Randy Terbush <>
List: current-users
Date: 11/14/1995 08:03:18
Yet another which did not make it to the list....

------- Forwarded Message

Subject: ifconfig alias (solution)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Sat, 11 Nov 1995 09:57:53 -0600
From: Randy Terbush <>

Getting longer and longer between reboots, so this thread from a
few weeks back may have been somewhat lost. However, none of the
suggested solutions worked as advertised. I share the solution
that is working for me below. The initial suggested change is
from Perry Metzger(sp?) below. (if memory serves) Note that I
*must* point to the loO device in order for this to work. ??

>From /etc/netstart:

# /etc/hostaliases, if it exists, contains the names of additional ip
# addresses for each interface. It is formatted as a series of lines
# that contain
# interface address
if [ -f /etc/hostaliases ]; then
    set -- `cat /etc/hostaliases`

    while [ $# -ge 2 ] ; do
    ifconfig $1 inet alias $2 netmask
    route add $2 localhost 
        shift 2

>From /etc/hostaliases:


------- End of Forwarded Message