From owner-freebsd-questions@FreeBSD.ORG Tue Jul 23 12:35:33 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 AF72326A for ; Tue, 23 Jul 2013 12:35:33 +0000 (UTC) (envelope-from J.McKeown@ru.ac.za) Received: from mail.ru.ac.za (mail.ru.ac.za [IPv6:2001:4200:1010:0:250:56ff:fe8d:5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 361582C37 for ; Tue, 23 Jul 2013 12:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ru.ac.za; s=ru-msa; h=X-Authenticated-User:Content-Type:MIME-Version:Subject:To:From:Date:Message-ID; bh=isfyxFeREmwQrHQLm+/DaQI4si906H04q5HgG/0mivA=; b=jkZCB/IbxfSrMhIbx5yZdqoMZe8lXI6c77O8fntULvyEH7C0hx/c8sq7MdkIGAI6R9tf8rTK9Xvdh9yXaXBEDaI6zg2sqo91S5lEC+S++zwzZpp6DmADpZjV3sgZdHdc; Received: from webmail.ru.ac.za ([146.231.128.26]:43737 helo=localhost) by mail.ru.ac.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1V1boI-000NSX-PO; Tue, 23 Jul 2013 14:35:22 +0200 Received: from vorkosigan.ru.ac.za (vorkosigan.ru.ac.za [2001:4200:1010:1058:219:d1ff:fe9f:a932]) by webmail.ru.ac.za (Horde Framework) with HTTP; Tue, 23 Jul 2013 14:35:22 +0200 Message-ID: <20130723143522.818353lrdr4lo5u2@webmail.ru.ac.za> Date: Tue, 23 Jul 2013 14:35:22 +0200 From: J.McKeown@ru.ac.za To: Frank Leonhardt 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> In-Reply-To: <51EE4A63.9040909@fjl.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.10) / FreeBSD-8.2 X-Remote-Browser: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.0.7) Gecko/2009031915 Firefox/3.0.7 X-Virus-Scanned: mail.ru.ac.za (146.231.128.20) X-Authenticated-User: s0900137 from webmail.ru.ac.za (146.231.128.26) using auth_plaintext Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 12:35:33 -0000 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.