From owner-freebsd-net@FreeBSD.ORG Thu Aug 8 21:47:00 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C951DF3F; Thu, 8 Aug 2013 21:47:00 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9568F2585; Thu, 8 Aug 2013 21:47:00 +0000 (UTC) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 136B637B4A6; Thu, 8 Aug 2013 16:46:53 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3cB37w3TVyz9jM; Thu, 8 Aug 2013 16:46:52 -0500 (CDT) Date: Thu, 8 Aug 2013 16:46:52 -0500 From: "Matthew D. Fuller" To: Michael Sierchio Subject: Re: how calculate the number of ip addresses in a range? Message-ID: <20130808214652.GZ34979@over-yonder.net> References: <20130808133055.15e53b94@davenulle.org> <1F113410-18DE-47CF-96C1-5EE4E8BC4980@dataix.net> <1375977240.3930.7571559.74F89736@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.21-fullermd.4 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.8 at thyme.infocus-llc.com X-Virus-Status: Clean Cc: "freebsd-net@freebsd.org" , Mark Felder X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2013 21:47:00 -0000 On Thu, Aug 08, 2013 at 08:55:38AM -0700 I heard the voice of Michael Sierchio, and lo! it spake thus: > > pkg_add -r ipsc For another, there's a "cidrcalc" program installed by devel/libcidr (full disclosure: of which I'm the author) that does similar things: % cidrcalc -bs 10.80.128.35/27 Address: 10.80.128.35 Netmask: 255.255.255.224 (/27) BinAddr: 00001010 01010000 10000000 00100011 10 80 128 35 BinMask: 11111111 11111111 11111111 11100000 255 255 255 224 Wildcard: 0.0.0.31 Network: 10.80.128.32/27 Broadcast: 10.80.128.63 Hosts: 10.80.128.33 - 10.80.128.62 NumHosts: 30 Supernet: 10.80.128.0/26 Subnets: 10.80.128.32/28 10.80.128.48/28 -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream.