A quick subnet method

On your Brain dump sheet make a table showing the decimal

values of the first 8 binary positions.

An easy way to do this is start at the right side with 1 (one) and

each position to the left is double the previous position, like this:

128 64 32 16 8 4 2 1

Then starting at the leftmost column write 128 under the 128, then

add each previous column, one at a time, and place the result

under the number you added on. Your table looks like this:

128+64=192,192+32=224,224+16=240, etc

128 64 32 16 8 4 2 1

128 192 224 240 248 252 254 255

Now, to get the subnet mask, you take the number of subnets

needed and using the TOP ROW starting from the left find the first

number that will divide INTO your number of subnets. (It doesn't

have to be an even division).

Then count the number of columns back to one (towards the

right). Move to the leftmost column (128) and count THAT

SAME NUMBER of columns to the right again. The number in

the second row of THAT column is your subnet mask.

An example:

Say you need 18 subnets. The first number, starting from the left,

that will go into 18 is 16;

X

128 64 32 16 8 4 2 1

128 192 224 240 248 252 254 255

Count the columns to the right, down to one; (five columns)

X(1) (2) (3) (4) (5)

128 64 32 16 8 4 2 1

128 192 224 240 248 252 254 255

 

Now go back to 128, and count five columns to the right;

(1) (2) (3) (4) (5)

128 64 32 16 8 4 2 1

128 192 224 240 248 252 254 255

X

Put an X in that column.

248 is your subnet mask!

A class A address subnet becomes 255.248.0.0

A class B address subnet becomes 255.255.248.0

And a class C address subnet is 255.255.255.248

 

Now, the number of hosts per subnet is easy also.

In this example you used 5 bits for your subnet mask (five

columns), so you have three bits left over in that octet. Add 3 and

8 times the number of octets to the right. Take 2 to THAT power,

subtract 2, and you have the number of hosts per subnet.

Using the example above for a class b address; 3+8(1 octet)=11.

Take 2 to the 11th power gives 2048.

Subtract 2 (for all zeros and all ones); 2048-2 = 2046 The

number of hosts per subnet.

 

Another example;

This time lets use a class C address of 195.13.24.0. And you

need 8 subnets. We will also figure the host address ranges.

The first number from the left that will go into 8 is 8;

X(1) (2) (3) (4)

128 64 32 16 8 4 2 1

128 192 224 240 248 252 254 255

X

(1) (2) (3) (4)

 

Count the columns down to one (4 columns), count down four

from 128, giving 240 as the subnet mask.

So our class C subnet mask for 8 subnets is 255.255.255.248

Number of hosts; 4 bits left over+8*zero(no octets)=4, 2 to the

4th=16,16-2=14 hosts per subnet.

Now to get the host IP addresses you start with the decimal

number in row one and keep adding it to itself till you get to the

mask number;

16, 16+16=32, 32+16=48, 48+16=64, 64+16=80, 80+16=96,

96+16=112, 112+16=128, 128+16=144,

144+16=160, 160+16=178, 178+16=192, 192+16=208,

208+16=224, 224+16=240.

We can't use 240 as a host ID.

These numbers give your STARTING host subnet addresses.

So our host addressing ranges are;

195.13.24.16 - 195.13.24.31

195.13.24.32 - 195.13.24.47

195.13.24.48 - 195.13.24.63

195.13.24.64 - 195.13.24.79

195.13.24.80 - 195.13.24.95

195.13.24.96 - 195.13.24.111

195.13.24.112 - 195.13.24.127

195.13.24.128 - 195.13.24.143

 

 

195.13.24.144 - 195.13.24.159

195.13.24.160 - 195.13.24.177

195.13.24.178 - 195.13.24.191

195.13.24.192 - 195.13.24.207

195.13.24.208 - 195.13.24.223

195.13.24.224 - 195.13.24.239

Now, we only needed 8 subnets. That's up to 195.13.24.128.

The other six can be counted on for GROWTH!

Now a class A example. InterNIC address 101.0.0.0. Subnets

needed 5. The table on the braindump sheet would look like this.

4 goes into 5, then count three columns to the right.

128 64 32 16 8 4 2 1

128 192 224 240 248 252 254 255

X

Then count three columns right from 128. Subnet mask is

255.224.0.0.

Host address ranges are ;

101.32.1.1 - 101.63.254.254

101.64.1.1 - 101.95.254.254

101.96.1.1 - 101.127.254.254

101.128.1.1 - 101.159.254.254

101.160.1.1 - 101.191.254.254

 

 

101.192.1.1 - 101.223.254.254 (one for growth)

 

Five subnets with 5+8(2)=21, 2 to the 21st=2,097,152, subtract

2;

2,097,152-2=2,097,150 hosts per subnet. With another subnet

for growth.