From owner-freebsd-net Wed Nov 28 22:29:10 2001 Delivered-To: freebsd-net@freebsd.org Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by hub.freebsd.org (Postfix) with ESMTP id 1DD7437B442 for ; Wed, 28 Nov 2001 22:29:05 -0800 (PST) Received: from dialup-209.247.138.241.dial1.sanjose1.level3.net ([209.247.138.241] helo=blossom.cjclark.org) by albatross.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 169Kgy-0002aT-00; Wed, 28 Nov 2001 22:29:04 -0800 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id fAT6T0E06578; Wed, 28 Nov 2001 22:29:00 -0800 (PST) (envelope-from cjc) Date: Wed, 28 Nov 2001 22:29:00 -0800 From: "Crist J. Clark" To: Ahsan Ali Cc: freebsd-net@freebsd.org Subject: Re: netmask for aliased ip Message-ID: <20011128222900.L3985@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <200111281637.fASGbgd07767@mail2.bigmailbox.com> <20011128170815.G3985@blossom.cjclark.org> <002d01c1788c$8388f4f0$be026b83@ahsanali> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <002d01c1788c$8388f4f0$be026b83@ahsanali>; from ahsan@khi.comsats.net.pk on Thu, Nov 29, 2001 at 09:15:34AM +0500 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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