Finding what's after the slash

Bill Manning bmanning at ISI.EDU
Fri May 12 06:15:10 UTC 2000


 
It may be prudent to review RFC 1878, (tooting his own horn :)



% 
% On Thu, May 11, 2000 at 02:10:53PM -0300, augusto bott wrote:
% > Hi Gurus!
% > 
% > I've seen lots of messages, texts and pages around and was trying to figure
% > out how one can know what to write after a slash ("/") on a subnet...
% > 
% > like, for instance, 10.1.1.0/26 meaning ip's from 10.1.1.1 untill 10.1.1.50
% > (is this statement correct?)
% 
% Let's find out.
% 
% IPv4 has 32 bits.  32 - 26 = 6.  2^6 == 64.  So this subnet must have
% 64 members, STARTING ON A BOUNDARY DIVISIBLE BY 64.  Well, 0 is
% divisible by 64, so the members are 10.1.1.0 - 10.1.1.63.
% 
% BUT ... the first number is the network number (10.1.1.0) and the last
% number is the broadcast address on this subnet (10.1.1.63).  So, the
% USABLE members are 10.1.1.1 - 10.1.1.62.
% 
% > i.e., for a net like 192.168.2.45 untill 192.168.2.221 it would be what?
% > Thanks...
% > 
% > Augusto Bott
% > augusto.bott at via-rs.net
% 
% It would not be anything.  .45 is not divisible by any power of two
% [except 1], and so cannot be the start of any subnet.  Further, there
% are (221 - 45) + 1 = 177 members of the above set.  The next larger
% power of two is 256 (2^8).  This means that the subnet that includes
% all of the above addresses must be 192.168.2.0/24.  This is the network
% whose network number is 192.168.2.0, whose broadcast address is
% 192.168.2.255, and whose useful members are 192.168.2.1 - 192.168.2.254.
% 
% It's all about powers of two!  The most able members of the networking
% community are those who, at a very young age, realized the special
% beauty of the sequence:
% 	0	1
% 	1	2
% 	2	4
% 	3	8
% 	4	16
% 	5	32
% 	6	64
% 	7	128
% 	8	256
% 	...
% 
% All subnets must contain a number of members that is equal to a power
% of two [including the network number and the broadcast address].  All
% subnets must start at an even multiple of the number of members.
% 
% Comprendo?  ;-)
% 
% -- 
% Joe Yao				jsdy at cospo.osis.gov - Joseph S. D. Yao
% COSPO/OSIS Computer Support					EMT-B
% -----------------------------------------------------------------------
% This message is not an official statement of COSPO policies.
% 
% 
% 


-- 
--bill



More information about the bind-users mailing list