From owner-freebsd-net@FreeBSD.ORG Wed Feb 11 14:40:53 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65AB2F10; Wed, 11 Feb 2015 14:40:53 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 428FB9C8; Wed, 11 Feb 2015 14:40:53 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-24-125-214-90.hsd1.va.comcast.net [24.125.214.90]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 29C8D56467; Wed, 11 Feb 2015 08:40:46 -0600 (CST) Message-ID: <54DB69E7.60602@vangyzen.net> Date: Wed, 11 Feb 2015 09:40:39 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Julian Elischer , Matt Churchyard , "freebsd-net@freebsd.org" Subject: Re: Invalid subnet masks References: <7e069c1946454793b1c7e0be988877c4@SERVER.ad.usd-group.com> <54DB343E.7090008@freebsd.org> In-Reply-To: <54DB343E.7090008@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 14:40:53 -0000 On 02/11/2015 05:51, Julian Elischer wrote: > On 2/11/15 5:55 PM, Matt Churchyard wrote: > >> >> Are there actually valid use cases for these types of network? > yes. > I've had networks that were the first and last quarter of a /24, and > the middle two quarters were separate nets. > > Sure, it made my skin crawl, but I was in a pinch to get more machines > onto that /26. > all four were served by the same router so only one router needed to > know.. > > I have however at times though we could think about making ifconfig at > give a warning. > (but not an error). > >> I'm learning towards the opinion that they should be rejected unless >> the user specifically overrides it (with something like an ifconfig >> flag or sysctl). These valid use cases are so rare, I would favor making this an error in ifconfig, but also providing a flag to silence the message and accept the mask. The error message could even mention the name of the flag, to be helpful. For example: # ifconfig igb0 netmask 250.250.250.0 ifconfig: netmask should be contiguous and left-justified; specify "incontiguous" to override # ifconfig igb0 incontiguous netmask 250.250.250.0 # If it's just a warning, that warning will get very annoying to people who are forced to use such a mask. (They're already forced to use such a network!) Eric