Subject: Re: inet aliases and routed
To: Gregory McGarry <email@example.com>
From: Andrew Gillham <firstname.lastname@example.org>
Date: 08/16/2000 22:33:26
Gregory McGarry writes:
> Andrew Brown wrote:
> > (1) what's the correct method for adding aliases via rc.d
> > configuration? what i've got now is:
> > # cat /etc/ifconfig.ex0
> > 188.8.131.52 netmask 0xffffff00 media autoselect
> > alias 184.108.40.206
> > but i've just noticed that i can't reach (ie, ping or telnet) the
> > alias from the machine itself.
> I applied a recent kame patch to a 1.4.2 system and saw the same
> result. I wasn't expecting it.
You need a route via the loopback to make this work. This should be
added automatically if you use /etc/ifaliases. I believe 'ifconfig' adds
this automatically when you add the "primary" address.
(e.g. my machine has a route via loopback for it's primary ethernet's
'route add $alias 127.0.0.1'