From owner-freebsd-questions@FreeBSD.ORG Fri Nov 14 18:03:21 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06F40106564A for ; Fri, 14 Nov 2008 18:03:21 +0000 (UTC) (envelope-from freebsd@optimis.net) Received: from mail.optimis.net (mail.optimis.net [69.104.191.124]) by mx1.freebsd.org (Postfix) with ESMTP id B7ABB8FC08 for ; Fri, 14 Nov 2008 18:03:20 +0000 (UTC) (envelope-from freebsd@optimis.net) Received: from marvin.optimis.net (marvin.optimis.net [192.168.1.3]) by mail.optimis.net (8.14.2/8.14.2) with ESMTP id mAEHd7OZ050250; Fri, 14 Nov 2008 09:39:07 -0800 (PST) (envelope-from freebsd@optimis.net) Received: from marvin.optimis.net (localhost [127.0.0.1]) by marvin.optimis.net (8.14.2/8.14.2) with ESMTP id mAEHd7xf099451; Fri, 14 Nov 2008 09:39:07 -0800 (PST) (envelope-from freebsd@optimis.net) Received: (from george@localhost) by marvin.optimis.net (8.14.2/8.14.2/Submit) id mAEHd74C099450; Fri, 14 Nov 2008 09:39:07 -0800 (PST) (envelope-from freebsd@optimis.net) Date: Fri, 14 Nov 2008 09:39:07 -0800 From: George Davidovich To: freebsd-questions@freebsd.org Message-ID: <20081114173907.GA98636@marvin.optimis.net> References: <000001c94666$5eb02360$1c106a20$@com> <491D9699.5000103@unsane.co.uk> <491DAA89.80808@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491DAA89.80808@infracaninophile.co.uk> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: Re: inet hosts question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 18:03:21 -0000 On Fri, Nov 14, 2008, Matthew Seaman wrote: > Vincent Hoffman wrote: > > Gary Hartl wrote: > > > > I thought I could do it by using the /class ie /32 for class c but > > > i can't remember what the class delegation is for that size of > > > pool, I think it is a class B. > > > 192.168.0.0/16 for your example. and yes this is a class B (not all > > /16s are though.) > > > > the /x notation is called CIDR (classless interdomain routing.) > > http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing > > Class C surely? 192.168.0.0/16 is the RFC1918 Class C reserved > range of 256 /24 networks. > > Yes, Class B networks were /16s, but the A, B, C... classification is > derived from the number of leading 1's in the binary representation of > the first octet of the address, not the netmask. Thus > > Binary: Decimal: Class: Used for: > ----------------------------------------------------------------- > 0000 0000 -- 0111 1111 (0 - 127) Class A /8 Networks > 1000 0000 -- 1011 1111 (128 - 191) Class B /16 Networks > 1100 0000 -- 1101 1111 (192 - 223) Class C /24 Networks > 1110 0000 -- 1110 1111 (224 - 239) Class D Multicast > 1111 0111 -- 1111 1111 (240 - 255) Class E Reserved, experimental As a suggestion to the OP, installing the ipcalc port might help make things more understandable, or otherwise facilitate learning[1] about networking generally. The output is optionally coloured, so the first three bits of the Network address, for example, would appear in red to serve as a reminder that an address beginning with 110 does indeed define it as a Class C address. % ipcalc 192.168.0.0 Address: 192.168.0.0 11000000.10101000.00000000. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.0.0/24 11000000.10101000.00000000. 00000000 HostMin: 192.168.0.1 11000000.10101000.00000000. 00000001 HostMax: 192.168.0.254 11000000.10101000.00000000. 11111110 Broadcast: 192.168.0.255 11000000.10101000.00000000. 11111111 Hosts/Net: 254 Class C, Private Internet ----------- 1. Handy utilities in conjunction with a requisite amount of laziness may be considered an adequate substitute. -- George