From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 07:58:51 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 36DD216A41A for ; Tue, 24 Jul 2007 07:58:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outV.internet-mail-service.net (outV.internet-mail-service.net [216.240.47.245]) by mx1.freebsd.org (Postfix) with ESMTP id 14F9D13C469 for ; Tue, 24 Jul 2007 07:58:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Tue, 24 Jul 2007 00:58:50 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 2058E125AE2; Tue, 24 Jul 2007 00:58:50 -0700 (PDT) Message-ID: <46A5B15D.80805@elischer.org> Date: Tue, 24 Jul 2007 00:59:25 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.5 (Macintosh/20070716) MIME-Version: 1.0 To: Evren Yurtesen References: <46A5492E.90500@ispro.net> <20070724045054.GA81397@eos.sc1.parodius.com> <46A5AEED.4080104@ispro.net> In-Reply-To: <46A5AEED.4080104@ispro.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Jeremy Chadwick Subject: Re: 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 07:58:51 -0000 Evren Yurtesen wrote: > Jeremy Chadwick wrote: >> On Tue, Jul 24, 2007 at 03:34:54AM +0300, Evren Yurtesen wrote: >>> 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 >>> >>> >>> 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 ??? >> >> It's not a bug. Why did you disregard the instructions, though? > > I didnt disregard the instructions. I read somebody suggesting not using > 255.255.255.255 in some forum. Then I tried it out and FreeBSD accepted > the netmask for the alias IP. > > Why does FreeBSD accept such netmask which can cause problems when > earlier it was rejecting it? > >>> 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? I'm not sure but it is possible that lo0 is treated more like a P2P interface in which case the netmask is not used in routing decisions. >> >> Don't know, but my guess is no, it probably does not use "each IP >> randomly", and I cannot even fathom the network breakage that would >> ensue as a result of such. > > I understand, I will try to test that sometime to see what FreeBSD does > in this kind of situation. > > However, it might be nice if ifconfig did not allow this kind of wrong > setting. > > Thanks, > Evren > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"