Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2001 22:29:00 -0800
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Ahsan Ali <ahsan@khi.comsats.net.pk>
Cc:        freebsd-net@freebsd.org
Subject:   Re: netmask for aliased ip
Message-ID:  <20011128222900.L3985@blossom.cjclark.org>
In-Reply-To: <002d01c1788c$8388f4f0$be026b83@ahsanali>; from ahsan@khi.comsats.net.pk on Thu, Nov 29, 2001 at 09:15:34AM %2B0500
References:  <200111281637.fASGbgd07767@mail2.bigmailbox.com> <20011128170815.G3985@blossom.cjclark.org> <002d01c1788c$8388f4f0$be026b83@ahsanali>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 29, 2001 at 09:15:34AM +0500, Ahsan Ali wrote:
> > Somebody told you wrong. When adding an alias _which is on the same
> > logical network_ as other addresses, it should have an 0xffffffff
> > mask. That is, only one address on an interface should have the "real"
> > netmask for any one network.
> >
> > The simple explanation for this is that if you have,
> >
> >   a.b.c.d/24
> >   a.b.c.e/24
> >
> > On an interface and you try to initiate a connection to another
> > machine through this interface, should your connection use a.b.c.d or
> > a.b.c.e as the source address? It is ambiguous and can make problems.
> 
> 
> Surely this does not hold true for situations in which you're doing IP based
> virtual hosting?

Sure it does.

> Or is it acceptable because most hosting requests will come
> in through the gateway and thus be routed to this IP? Wouldn't that break
> testing from local machines in the sense that traffic would HAVE to go
> through the router?

I am not sure what this means. The traffic will have to go through a
gateway to get anywhere.

> If all IP's have a /24 netmask and you set your default route through one
> specific instance of an interface, wouldn't that be the one thats always
> used?

For TCP, that is what is always used by default when creating an
outbound connection. For incoming connections, the machine will of
course reply using the IP address the connection came in on. And a
program can always request to use a specific address if it wants to.

I am not sure where you see a problem.
-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

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?20011128222900.L3985>