From owner-freebsd-net@FreeBSD.ORG Thu Aug 8 07:04:25 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9214071C for ; Thu, 8 Aug 2013 07:04:25 +0000 (UTC) (envelope-from sam.gh1986@gmail.com) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B38C2A76 for ; Thu, 8 Aug 2013 07:04:24 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id fq13so1856134lab.39 for ; Thu, 08 Aug 2013 00:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4Mh3UDu3awA/nQ/du4HVDosnoPS0jT31yhAtsAI07AU=; b=pOWk9PccUiJA9B1K4E0CGSW5dk0ymTBxKSy56yyw3Ce4cUiL9Tc5dvPn7V4rU5xnhL KPtrXq82jNeRphmVF5s3inkROLLXsa0MRVDwOzG7KDY+/FzWTS/2ip1J/f/K2D3ifcvn A5vGcgE2orGaVE7Aqtw4Pop/9vNyPqHtF2eqo1/diCj25UnwGi64yWMlSW1YKf4H0mG5 0zMdtb6d4Uo5c0yZ/2zzsKi9WJFwMOlDnwtdNkiTHELCClF7SLjDDaIeXDm+U0hxa9FZ DE8umxSC53qkyC9WBuvT880iqONml+AbWCX5Sb2Wa1wwjeAXibMejhdaI7ueqGhuI8fT PMPA== MIME-Version: 1.0 X-Received: by 10.152.121.73 with SMTP id li9mr3059109lab.42.1375945462968; Thu, 08 Aug 2013 00:04:22 -0700 (PDT) Received: by 10.112.147.230 with HTTP; Thu, 8 Aug 2013 00:04:22 -0700 (PDT) Date: Thu, 8 Aug 2013 11:34:22 +0430 Message-ID: Subject: how calculate the number of ip addresses in a range? From: s m To: FreeBSD Net Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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 07:04:25 -0000 hello guys, i have a question about ip addresses. i know my question is not related to freebsd but i googled a lot and found nothing useful and don't know where i should ask my question. i want to know how can i calculate the number of ip addresses in a range? for example if i have 192.0.0.1 192.100.255.254 with mask 8, how many ip addresses are available in this range? is there any formula to calculate the number of ip addresses for any range? i'm confusing about it. please help me to clear my mind. thanks in advance, SAM