IP Address Class B Subnetting- Explained with Examples.

By | December 3, 2023

How to Subnet Class B Addresses.

Subnetting a Class B network is very similar to subnetting a Class C network, with the only difference being that when subnetting a Class B network, you will be focusing on the third octet, whereas in Class C, you will be working on the fourth octet.

Take a look at this:

To subnet Class B, simply use the same subnet numbers for the third octet as in Class C. Just add a zero (0) to the network portion and a 255 to the broadcast section in the fourth octet. Keep in mind that Class B has more possible subnet masks than Class C.

83% discount on VPN

I’ll bring in the cram table again, but this time we’ll apply it to the THIRD octet.

Class B cram table:

VLSM cram table

VLSM cram table

Class B network address has 16 bits available for host addressing (14 bits for subnetting, 2 bits for host addressing).

Example 1

Let’s look at some examples, using the table above, remember we are working on the THIRD octet of Class B.  Given network address:172.16.0.0 /20

From the above network IP address, the mask will be 255.255.240.0 which means we are using the bit value or block size of 16.

We are going to subnet it to three different networks with equal host IP addresses; remember we are working on the THIRD octet with the block size of 16.

Network A

Network address:  172.16.16.0

First Host address:  172.16.16.1

Last host address:   172.16.31.254

Broadcast address: 172.16.31.255

What we did above is to add the bit value or size (16+16=32) to obtain the next network address which is 172.16.32.0

Network B

Network address:  172.16.32.0

First Host address:  172.16.32.1

Last host address:   172.16.47.254

Broadcast address: 172.16.47.255

We carried out the same addition here to get the next network address (32+16=48)

Network C

Network address:  172.16.48.0

First Host address:  172.16.48.1

Last host address:   172.16.63.254

Broadcast address: 172.16.63.255

The same addition before for the next network.

For the WAN (serial links) We need only  4 bits value or block size here due to the number of network and hosts involved so as not to waste much address space. looking at the  cram table, the 4-bit value gives us /30 which results in mask 255.255.252.0 (just like Class C) so we continue from the next network which is (48+16=64)

WAN 1

Connection from Router A to Router B

Network address:  172.16.64.0

Network A to B address: 172.16.64.1 255.255.252.0

Network B to A address: 172.16.64.2 255.255.252.0

The next network will also have 4 bits value added to the last network; (64+4=68)

The same four-bit value is used. The next network is:

WAN 2

Connections from Router A to Router C

Network address: 172.16.68.0

Network A to C address:  172.16.68.1 255.255.252.0

Network C to A address: 172.16.68.2 255.255.252.0

There are different ways to subnet; you have to devise a way to make it simple for yourself! I think using the cram table saves you a lot of time from all the equations of all sorts. Let’s apply it to a topology:

Subnetting Class B1

Router A:

RA(config)#interface fa0/0

RA(config-if)#ip address 172.16.16.1 255.255.240.0

RA(config-if)#no shutdown

RA(config-if)#exit

RA(config)#interface se0/0/0

RA(config-if)#ip address 172.16.64.1 255.255.252.0

RA(config-if)#no shutdown

RA(config-if)#exit

RA(config)#interface se0/0/1

RA(config-if)#ip address 172.16.68.1 255.255.252.0

RA(config-if)#no shutdown

RA(config-if)#exit

Router B

RB#config t

RB(config)#interface fa0/0

RB(config-if)#ip address 172.16.32.1 255.255.240.0

RB(config-if)#no shutdown

RB(config-if)#exit

RB(config)#interface se0/0/0

RB(config-if)#ip address 172.16.64.2 255.255.252.0

RB(config-if)#no shutdown

RB(config-if)#exit

Router C

RC#config t

RC(config)#interface fa0/0

RC(config-if)#ip address 172.16.48.1 255.255.240.0

RC(config-if)#no shutdown

RC(config-if)#exit

RC(config)#interface se0/0/0

RC(config-if)#ip address 172.16.68.2 255.255.252.0

RC(config-if)#no shutdown

RC(config-if)#exit

Ping from Network RA to RB networks will work.

In conclusion, When subnetting a Class B network, the process involves dividing the third octet into smaller subnets to accommodate the desired number of hosts per subnet. This allows for more efficient use of IP addresses and better organization of network resources.

Read More on IP Address Class B Subnet

VLSM Subnetting Example

How to Calculate Subnets Using Binary Method

CIDR