Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2001 20:13:12 -0800
From:      Justin C.Walker <justin@mac.com>
To:        <freebsd-net@FreeBSD.ORG>
Subject:   Re: Quick question about IP aliasing
Message-ID:  <20010228155047.MAEY10024.femail11.sdc1.sfba.home.com@lilith>
In-Reply-To: <007901c0a13a$b4480dd0$1200a8c0@gsicomp.on.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tuesday, February 27, 2001, at 07:58 PM, Matthew Emmerton wrote:

>>> On Tue, Feb 27, 2001 at 07:16:14AM +0100, Rogier R. Mulhuijzen wrote:
>>>>
>>>>>
[snip]
>> no this is incorrect. you just have to make sure that the aliased
>> IP&mask do not generate info which is already in the routing table.
>> E.g. if your primary addr is 1.2.3.4/24 , an alias of 1.2.3.5/24 will
>> give a warning, but an alias of 1.2.4.4/24 will not, and most likely 
>> even
>> 1.2.3.5/25 will not.
>
> I'm just reiterating what I was told 1.5 years ago when I complained 
> that
> the following setup wouldn't work:
>
> Primary IP:  192.168.0.1/255.255.255.0
> Aliased IP:  192.168.0.10/255.255.255.0
>
> With this setup, I could not ping, traceroute or connect to the aliased 
> IP.
> In order to make the aliased IP functional, I had to use a netmask of
> 255.255.255.255 -- a fact which I find totally confusing and
> counter-intuitive, but one that seems to work.

It's only confusing because you're not looking deep enough into the 
mechanics of routing on a BSD system.  The problem is that, using the 
"proper" netmask, assigning an alias leaves the system unable to process 
incoming frames for that IP address.

As was mentioned in a now-defunct tutorial page on IP aliasing, if you 
take this approach (using the "proper" netmask) and the alias is on the 
same subnet as an existing address for this interface, you have to add a 
step in the configuration, namely, to install a static route to permit 
the handling of this new address.

If you use the netmask 255.255.255.255, you are, in essence, saying that 
this needs a host route to the local box, on the interface to which the 
alias is assigned.  The system graciously supplies one.  It can't, in 
the previous case, because it's not clear what you are trying to do.

At least, that's how I understand it.

>
>>>> Everybody is saying use 255.255.255.255 for an alias. Noone is giving
>>>> reasons why.
>
> Exactly.  I never got a good answer to this when I first stumbled upon 
> it,
> and I still haven't.  All I know is that this is the way it needs to be 
> done
> in order for things to work properly.

Hope this helps.  Clarifications and corrections requested.

Regards,

Justin

Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics       |
                                       |   Men are from Earth
Nexsi Corp.                           |   Women are from Earth
1959 Concourse Drive                  |       Deal with it.
San Jose, CA  95131                   |
*-------------------------------------*-------------------------------*


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010228155047.MAEY10024.femail11.sdc1.sfba.home.com>