From owner-freebsd-net Thu Nov 29 14:11:39 2001 Delivered-To: freebsd-net@freebsd.org Received: from scaup.prod.itd.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by hub.freebsd.org (Postfix) with ESMTP id A430137B41A for ; Thu, 29 Nov 2001 14:11:33 -0800 (PST) Received: from dialup-209.244.107.113.dial1.sanjose1.level3.net ([209.244.107.113] helo=blossom.cjclark.org) by scaup.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 169ZOq-0003c5-00; Thu, 29 Nov 2001 14:11:26 -0800 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id fATMAbU09926; Thu, 29 Nov 2001 14:10:37 -0800 (PST) (envelope-from cjc) Date: Thu, 29 Nov 2001 14:10:37 -0800 From: "Crist J. Clark" To: Ahsan Ali Cc: freebsd-net@FreeBSD.ORG Subject: Re: netmask for aliased ip Message-ID: <20011129141037.F8815@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <200111281637.fASGbgd07767@mail2.bigmailbox.com> <20011128170815.G3985@blossom.cjclark.org> <002d01c1788c$8388f4f0$be026b83@ahsanali> <20011128222900.L3985@blossom.cjclark.org> <001301c178da$90108550$0100a8c0@ahsanalikh> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <001301c178da$90108550$0100a8c0@ahsanalikh>; from ahsan@khi.comsats.net.pk on Thu, Nov 29, 2001 at 06:01:04PM +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 06:01:04PM +0500, Ahsan Ali wrote: > > 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. > > What I am saying is that if you have (for instance) 192.168.0.0/24 as a > network. > > Interface A has the IP 192.168.0.10 with a netmask of 255.255.255.0 (/24) > Alias A:1 has the IP 192.168.0.11 with a netmask of 255.255.255.255 (/32) > > Now Host B (192.168.0.20 mask 255.255.255.0) tries to access Alias A:1 which > is 192.168.0.11/32 so B sends to A:1 which it (correctly) assumes to be on > its own network, Alias A:1 cannot however reach B without sending the data > to its configured gateway. If routing is enabled on this host then it may be > able to send the reply routed through Interface A only... Hmmm? Routing is always enabled if you plan on talking to any other machines at all. But all of this is a non-issue. The selection of a route for a packet has _nothing_ to do with the source address, only the destination. How a packet finds its way to 192.168.0.20 is the same no matter what the source address is. 192.168.0.20 is local to the interface A, so it is sent directly to B. -- 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