Subject: Help on loopback configuration
To: None <netbsd-help@netbsd.org>
From: None <sutre@labri.fr>
List: netbsd-help
Date: 11/18/2003 01:08:31
Hi,
I'm trying to set up NetBSD 1.6.1 on a laptop (i386). As this laptop mig=
ht
get several IPs, I intend to map my laptop's (FQDN) hostname to the loopb=
ack
address 127.0.0.2 (in /etc/hosts).
So I guess I need to add an alias on the loopback interface (which defaul=
ts
to 127.0.0.1, netmask 0xff000000).
My question is: should the alias (127.0.0.2) be given a netmask of 0xffff=
ffff,
or should it be given a netmask of 0xff000000 (as the main loopback addre=
ss
127.0.0.1)? Or another netmask?
It seems that these two netmask options work: the system seems to behave =
the
same whether I use 1) or 2) below:
1) ifconfig lo0 alias 127.0.0.2 netmask 0xffffffff
(there a route 127.0.0.2 -> 127.0.0.2 on lo0 is automatically created)
2) ifconfig lo0 alias 127.0.0.2 netmask 0xff000000
route add 127.0.0.2 127.0.0.2 -interface
Is there a preferred solution?
Thanks for your help,
Gregoire.
p.s. BTW, if it's a bad idea to map my hostname to 127.0.0.2 in /etc/host=
s,
please tell me!
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/