From owner-freebsd-questions Wed Dec 12 11:48:57 2001 Delivered-To: freebsd-questions@freebsd.org Received: from harrier.prod.itd.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by hub.freebsd.org (Postfix) with ESMTP id 41D0B37B419 for ; Wed, 12 Dec 2001 11:48:52 -0800 (PST) Received: from user-33qtm6u.dialup.mindspring.com ([199.174.216.222] helo=gohan.cjclark.org) by harrier.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16EFN4-0005Wz-00; Wed, 12 Dec 2001 11:48:51 -0800 Received: (from cjc@localhost) by gohan.cjclark.org (8.11.6/8.11.1) id fBCJmaZ01516; Wed, 12 Dec 2001 11:48:36 -0800 (PST) (envelope-from cjc) Date: Wed, 12 Dec 2001 11:48:35 -0800 From: "Crist J. Clark" To: =?iso-8859-1?Q?Boris_K=F6ster_?= Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ifconfig alias question Message-ID: <20011212114834.B487@gohan.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <3C160DBF.10471.35E5BD9@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <3C160DBF.10471.35E5BD9@localhost>; from koester@x-itec.de on Tue, Dec 11, 2001 at 01:44:31PM +0100 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Dec 11, 2001 at 01:44:31PM +0100, Boris Köster wrote: > I have a question *g > > Interface: ed0 192.168.0.99/24 255.255.255.0 > > I want to add additional IP to the interface, and this works: > > ifconfig ed0 inet alias 192.168.0.98 netmask 255.255.255.255 > > Question: why netmask 255.255.255.255 instead of 255.255.255.0? Let's say you gave both 192.168.0.98 and 192.168.0.99 the same netmask of 0xffffff00. You decide to fire up telnet/ssh/ftp/whatever to connect to 192.168.0.50. You don't tell the application specifically which IP address to use as a source address. Which should the operating system chose for you? There is no good choice, both addresses are equally good choices. Computers don't like ambigious situations. When you specify a 0xffffffff netmask, suddenly that address is no longer a good choice. Now we have a clear winner and the world is a much happier place. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message