From owner-freebsd-net@FreeBSD.ORG Mon May 28 07:43:29 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0100F16A421 for ; Mon, 28 May 2007 07:43:29 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id AC41413C45E for ; Mon, 28 May 2007 07:43:28 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=XsMeV0suASMuRC2ZAx02G/tHY96gvu+LsQPCZMG11v/cUdLc2qXTI9EMA8V8WYmnFtUUf7HNAPFeZI4rEORt+1dVWW/r7YLXEpYPTsfkKMOKb4x5yuGepwg+OYesbMAL3l/Bi8K7OZRfBTgPqv6JeMv13eCFqY/3kDvmX2FvX4o=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1HsZsz-000AT8-QK; Mon, 28 May 2007 11:43:25 +0400 Date: Mon, 28 May 2007 11:43:21 +0400 From: Eygene Ryabinkin To: freebsd-net@freebsd.org, Andrei Manescu Message-ID: <20070528074321.GF35160@void.codelabs.ru> References: <000e01c79f03$b2cfce70$5501a8c0@ivorde> <08556012-CA57-4B2A-A142-F5C1BC8D9009@mac.com> <20070527110741.GC78927@obelix.dsto.defence.gov.au> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20070527110741.GC78927@obelix.dsto.defence.gov.au> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-3.0 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_00 Cc: alex.wilkinson@dsto.defence.gov.au Subject: Re: two public ip addresses on one interface X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2007 07:43:29 -0000 Alex, good day. Sun, May 27, 2007 at 07:07:41PM +0800, Wilkinson, Alex wrote: > > If your aliases are part of the same subnet as the "primary" or first configured IP, then you want to > > use the all-1's netmask. In your case, however, the second IP is part of a completely different subnet, > > and you can (and should) use a /24 netmask.... > > I have always wondered why we need to use the "all-1's" netmask. Why is this ? Because if you're stuffing two addresses from the same subnet to one interface it will not work: there can be only one route to the specified network in the FreeBSD routing table. And adding IP to the interface creates the entry in the routing table. So you should specify the different mask and most probably 0xffffffff will be the best choice, but your mileage may vary with your routing needs. -- Eygene