computer network - Class B Subnetting

Subnetting Class B Addresses:

Let's look at all the possible Class B subnet masks. Notice that we have a lot more possible subnet masks than we do with a Class C network address:

255.255.0.0 /16

255.255.128.0                   /17
255.255.192.0                   /18
255.255.224.0                   /19
255.255.240.0                   /20
255.255.248.0                   /21
255.255.252.0                   /22
255.255.254.0                   /23
255.255.255.0                   /24
255.255.255.128                 /25
255.255.255.192                 /26
255.255.255.224                 /27
255.255.255.240                 /28
255.255.255.248                 /29
255.255.255.252                 /30

We know the Class B network address has 16 bits available for host addressing. This means we can use up to 14 bits for subnetting (because we have to leave at least 2 bits for host addressing). Using a /16 means we are not subnetting with Class B, but it is a mask we can use.

The process of subnetting a Class B network is pretty much the same as it is for a Class C, except that you have more host bits and you start in the third octet.

               Let’s start:
               Example as follows
               172.16.0.0 = Network Address
               255.255.128.0 = Subnet Mask
               (11111111.11111111.10000000.00000000)

Now we are applying top 5 formulas to find out subnets, hosts, valid subnets, broadcast address.

  • How many subnets?

Formula is: 2x = number of subnets. x is the number of masked bits, or the 1s. Because 128 is 1 bit on (10000000), the answer is 21=2.


  • How many hosts per subnet?

Formula is: 2Y-2 = number of hosts per subnet. y is the number of unmasked bits, or the 0. We have 15 host bits off (10000000.00000000), so the equation is 215-2 = 32,766 hosts.


  • What are the valid subnets?

Formula is: 256-subnet mask = block size, or increment number.

So, 256-128=128. Remember, we'll start at zero and count in our block size, so our subnets are 0, 128.

The following table shows the two subnets available, the valid host range, and the broadcast address of each:


Class B Subnet Table
implementing Class C /26 network
Here we used two octets, because we are doing subnetting of class B address.