From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 01:02:30 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1734016A417 for ; Tue, 24 Jul 2007 01:02:30 +0000 (UTC) (envelope-from yurtesen@ispro.net) Received: from mail.ispro.net (mail.ispro.net [87.251.0.19]) by mx1.freebsd.org (Postfix) with SMTP id 2CA2C13C461 for ; Tue, 24 Jul 2007 01:02:26 +0000 (UTC) (envelope-from yurtesen@ispro.net) Received: (qmail 80775 invoked by uid 399); 24 Jul 2007 03:35:43 +0300 Received: from unknown (HELO ?84.250.38.203?) (yurtesen@ispro.net@84.250.38.203) by mail.ispro.net with ESMTP; 24 Jul 2007 03:35:43 +0300 X-Originating-IP: 84.250.38.203 Message-ID: <46A5492E.90500@ispro.net> Date: Tue, 24 Jul 2007 03:34:54 +0300 From: Evren Yurtesen User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 24 Jul 2007 04:37:04 +0000 Subject: alias netmask bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 01:02:30 -0000 Hi, I remember from earlier versions of FreeBSD that it had a restriction about alias IP netmasks (somewhere in 3.x,4.x days)... as explained here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html ------------------------------------- The calculation of alias netmasks is important, but fortunately quite simple. For a given interface, there must be one address which correctly represents the network's netmask. Any other addresses which fall within this network must have a netmask of all 1s (expressed as either 255.255.255.255 or 0xffffffff). ------------------------------------- However I tried on the loopback interface to add a 2nd IP with the same netmask as the original IP and it accepts it fine. (on 6.2) lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet 127.0.0.2 netmask 0xff000000 Is FreeBSD allowing this a bug or ??? If this is not a bug. What happens if an interface which is connecting to the machine has 2 IP addresses with same netmask which is not 255.255.255.255? Does FreeBSD use each IP randomly? Thanks, Evren