BSIG: Subnetting - Class B Address

| Class B | Class C |

Class B Borrowed-Bits Summary
Borrowed_BitsSubnet MaskSubnetsHostsRange
2255.255.192.021638216384
3255.255.224.0681908192
4255.255.240.01440944096
5255.255.248.03020462048
6255.255.252.06210221024
7255.255.254.0126510512
8255.255.255.0254254256
9255.255.255.128510126128
10255.255.255.19210226264
11255.255.255.22420463032
12255.255.255.24040941416
13255.255.255.248819068
14255.255.255.2521638224

Question: If you have a Class B IP network with a 10-bit subnet mask, how many subnets and hosts are usable?

Answer: 1022 subnets, each with 62 hosts.

Class B (16 bits for networks by default)

10 additional borrowed bits:

Subnets:

2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 [10] 4 8 16 32 64 128 256 512 1024 [-2] = 1022 subnets

Hosts:

Bits Remaining: 16 (default for Class B) + 10 Borrowed Bits = 26 32 - 26 = [ 8 Bits Remaining - 2 ] = 6

2 x 2 x 2 x 2 x 2 x 2 4 8 16 32 64 [-2] = 62 [ range is .0 .1 - .62 .63 ]

Another way:

Class B with 10-bit subnet mask: [ 16 (default for Class B) + 10 = 26 ] /26

26 - 16 = 10

10 = 8 + 2

8 bits = 255 or [ 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 ]

2 bits = 192 or [ 128 + 64 = 192 ]

Default subnet mask for a class B: 255.255.0.0

New subnet mask with 10-bit subnet mask: 255.255.255.192

Magic Number: 256 - 192 = 64

Subnet IP Range Broadcast address .0 .1 - .62 .63 .64 .65 - .126 .127 .128 .129 - .190 .191 .192 .193 - .254 .255

Question: You have a subnet mask of 255.255.255.248 in a Class B network. How many usable subnets and hosts are available?

Answer: 8190 subnets, each with 6 hosts.

Magic Number: 256 - 248 = 8

Default subnet mask for a Class B: 255.255.0.0 (16 bits)

We can use up 14 borrowed bits:

Using: 8 bits = 255 or [ 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 ]

Using: 5 bits = 248 or [ 128 + 64 + 32 + 16 + 8 = 248 ]

Total of 13 bits: 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 [ 8192 - 2 = 8190 subnets]

2 Subnet Host IP Range Broadcast address .0 .1 - .6 .7 Hosts = 6 .8 .9 - .14 .15 .16 .16 - .22 .23 .24 .25 - .30 .31 -->

Question: Given the IP address of 162.53.21.12 -- plan for 126 hosts on the subnet that includes this address. What subnet mask would you use?

Answer: 255.255.255.128

Default subnet mask for Class B: 255.255.0.0 [ Default 16-bits used for networks ]

Hosts:

2 x 2 x 2 x 2 x 2 x 2 x  2 [ 6 bits used for hosts]
    4   8  16  32  64  128 [ 128 - 2 = 126 hosts]

New Subnet mask:

We have already used up 7 bits for hosts.


16 - 7 = 9 BB bits for networks

Using: 8 bits = 255 or [ 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 ]

Using: 1 bit = 128 or [ 128 = 128 ]

Total of 9 bits:

255.255.255.128

Magic Number:

256 - 128 = 128

Subnet		Host IP Range	Broadcast address
255.255.0	.0     .1    -  .126	.127			Hosts = 126
255.255.0	.128   .129  -  .254	.255
255.255.1	.0     .1    -  .126	.127
255.255.1	.128   .129  -  .254	.255
255.255.2	.0     .1    -  .126	.127	
255.255.2	.128   .129  -  .254	.255	
-->

Note: Memorize the table above or understand the "anding" math operation. Either will stand you in good stead.

BSIG: Subnetting - Class B Address