how calculate the number of ip addresses in a range?
Matthew D. Fuller
fullermd at over-yonder.net
Thu Aug 8 21:47:00 UTC 2013
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 at over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.
More information about the freebsd-net
mailing list