how calculate the number of ip addresses in a range?

Jason Hellenthal jhellenthal at dataix.net
Thu Aug 8 15:44:42 UTC 2013


Try subcalc, it's in ports.

-- 
 Jason Hellenthal
 Inbox: jhellenthal at DataIX.net
 Voice: +1 (616) 953-0176
 JJH48-ARIN


On Aug 8, 2013, at 7:30, Patrick Lamaiziere <patfbsd at davenulle.org> wrote:

> Le Thu, 8 Aug 2013 11:34:22 +0430,
> s m <sam.gh1986 at gmail.com> a écrit :
> 
>> 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 have 192.0.0.1 192.100.255.254 with mask 8
> 
> This doesn't mean anything ?
> 
> There are few tools to deal with ip addresses, you can study the code :
> python: IPy https://github.com/haypo/python-ipy
> perl : ipcalc: /usr/ports/net-mgmt/ipcalc
> ...
> 
> Basically, an ip address is just a number. IPy associates also a
> prefix length in an "IP" object. So it can represent a host or
> a network which is nice.
> 
> Regards.
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6118 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20130808/0a2803e5/attachment.bin>


More information about the freebsd-net mailing list