From owner-freebsd-questions@FreeBSD.ORG Tue Jul 23 15:10:47 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 19AE2471 for ; Tue, 23 Jul 2013 15:10:47 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from bs1.fjl.org.uk (bs1.fjl.org.uk [84.45.41.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 97BDA2354 for ; Tue, 23 Jul 2013 15:10:46 +0000 (UTC) Received: from [10.39.210.108] ([212.183.128.207]) (authenticated bits=0) by bs1.fjl.org.uk (8.14.4/8.14.4) with ESMTP id r6NFAYv0064802 (version=TLSv1/SSLv3 cipher=DHE-DSS-CAMELLIA256-SHA bits=256 verify=NO); Tue, 23 Jul 2013 16:10:40 +0100 (BST) (envelope-from frank2@fjl.co.uk) Message-ID: <51EE9CEF.6030105@fjl.co.uk> Date: Tue, 23 Jul 2013 16:10:39 +0100 From: Frank Leonhardt Organization: Frank Leonhardt User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: J.McKeown@ru.ac.za Subject: Re: dhcp server returns core dump when i define network with mask 8 References: <51EE3E2C.2090203@fjl.co.uk> <51EE4A63.9040909@fjl.co.uk> <20130723143522.818353lrdr4lo5u2@webmail.ru.ac.za> In-Reply-To: <20130723143522.818353lrdr4lo5u2@webmail.ru.ac.za> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: frank2@fjl.co.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 15:10:47 -0000 On 23/07/2013 13:35, J.McKeown@ru.ac.za wrote: > Quoting Frank Leonhardt : > >> >> There are two common ways of defining a subnet mask - one is a dotted >> quad (e.g. 255.255.255.0) and the other is with a slash and the >> number of low-order bits - e.g. 192.168.1.0/8. Eight bits here means >> you get 2^8 addresses (i.e. 256). Don't use the first and last >> address in the range - the first is "complicated" (the network >> address) and the last is for broadcast packets. This doesn't always >> hold true but you're unlikely to come across exceptions. > > This is the wrong way round. the number after the slash indicates the > number of bits in the network address - the high-order bits. > >> So, when you say you want to define a "network with mask 8" I don't >> really know what you mean from your example. Do you mean a /8? >> >> 192.168.1.0/8 = range 192.168.1.1 192.168.1.254 with a subnet mask >> of 255.255.255.0 (0xFFFFFF00) > > Nope. 192.168.1.0/24 = 192.168.1.1-255 mask 255.255.255.0. > 192.168.1.0/8 doesn't start where you think it does (and is arguably > the wrong way to specify that network) because all but the first 8 > bits are masked out - it's 192.0.0.0 - 192.255.255.255. Quite correct - for some reason I got that bit backwards when I'm using it every day the right way around. It's ludicrously hot and humid in London at the moment, lack of sleep caused thereby &c...