Free Class B Subnetting Tutorial, How to subnet Class B Network, Subnetting Study Guides
This lesson is only a part of a series of IPv4 subnetting lessons. All the basic concepts about subnetting are explained in Class C Subnetting Tutorial - Part 1 lesson. You must visit Class C Subnetting Tutorial - Part 1 lesson to understand the basic concepts of subnetting. Please visit below links in order to learn IPv4 subnetting completely.
• Class C Subnetting Tutorial - Part 1
• Class C Subnetting Tutorial - Part 2
• Class B Subnetting Tutorial - Part 1
• Class B Subnetting Tutorial - Part 2
• Class A Subnetting Tutorial - Part 1
• Class A Subnetting Tutorial - Part 2
• Variable Length Subnet Masking (VLSM)
• Supernetting
In this Class B Subnetting Tutorial - Part 1, you will learn how to subnet a Class B network.
Let us try to visualize the unsubnetted Class B network 172.16.0.0 with default subnet mask 255.255.0.0 using below image. Network address is 172.16.0.0, first usable IPv4 address is 172.16.0.1, second usable IPv4 address is 172.16.0.2, third usable IPv4 address is 172.16.0.3 ...... up to last usable IPv4 address 172.16.255.254 and the broadcast address 172.16.255.255.
Class B Subnetting
Remember, the first two octets of a Class B network is used to represent the network and the last two octets are used to represent a host within that network. The default format for a Class B IPv4 address is Network.Network.Host.Host.
Let us consider an example of Class B network 172.16.0.0 - 255.255.0.0. The binary representation of the above network and its subnet mask are shown in below table.
Component | Binary | Decimal |
---|---|---|
Address Part | 10101100.00010000.00000000.00000000 | 172.16.0.0 |
SN Mask | 11111111.11111111.00000000.00000000 | 255.255.0.0 |
Once again,
If all the bits in the host part are "0", that represents the network address.
If all the bits in the host part are "0" except the last bit, it is the first usable IPv4 address.
If all the bits in the host part are "1" except the last bit, it is the last usable IPv4 address.
If all the bits in the host part are "1", that represents the directed broadcast address.
All the IPv4 addresses in a subnet block, except network address and directed broadcast address (first and last IPv4 addresses in a subnet block), can be used to configure the devices in your network. You cannot use network address or directed broadcast address as IPv4 address for devices inside your network.
Class B 1-bit subnetting tutorial
If we include one bit from the host part to the network part in the third octet, the default subnet mask of Class B network 255.255.0.0 is changed into 255.255.128.0. The single bit added to network part from host part in the third octet can have two possible values in third octet, either 0 or 1.
That means, we can get two subnets if we do a single bit subnetting on a Class B network.
Please refer below image.
SN No | Description | Binaries | Decimal |
---|---|---|---|
1 | Network Address | 10101100.00010000.00000000.00000000 | 172.16.0.0 |
First IPv4 address | 10101100.00010000.00000000.00000001 | 172.16.0.1 | |
Last IPv4 address | 10101100.00010000.01111111.11111110 | 172.16.127.254 | |
Broadcast Address | 10101100.00010000.01111111.11111111 | 172.16.127.255 | |
2 | Network Address | 10101100.00010000.10000000.00000000 | 172.16.128.0 |
First IPv4 address | 10101100.00010000.10000000.00000001 | 172.16.128.1 | |
Last IPv4 address | 10101100.00010000.11111111.11111110 | 172.16.255.254 | |
Broadcast Address | 10101100.00010000.11111111.11111111 | 172.16.255.255 |
The network 172.16.0.0 is divided into two subnets, each subnet has 32,768 total IPv4 addresses and 32,766 usable IPv4 addresses. Two IPv4 addresses are used in each subnet to represent the network address and directed broadcast address (first and last IPv4 addresses in a subnet block). As mentioned earlier in this lesson, you cannot use network address or directed broadcast address as the IPv4 address for devices inside your network. The subnet mask to use for 1-bit subnetting for a Class B network is 255.255.128.0.
Visualization of 1-bit subnetting of Class B network 172.16.0.0 with subnet mask 255.255.128.0 is given below.
Subnet 1 has its network address 172.16.0.0 with a subnet mask of 255.255.128.0. First usable IPv4 address is 172.16.0.1, second usable IPv4 address is 172.16.0.2, third usable IPv4 address is 172.16.0.3 ...... up to last usable IPv4 address 172.16.127.254 and the broadcast address 172.16.127.255.
Subnet 2 has its network address 172.16.128.0 with a subnet mask of 255.255.128.0. First usable IPv4 address is 172.16.128.1, second usable IPv4 address is 172.16.128.2, third usable IPv4 address is 172.16.128.3 ...... up to last usable IPv4 address 172.16.255.254 and the broadcast address 172.16.255.255.
Class B 2-bit subnetting tutorial
If we include two bits from the host part to the network part in the third octet, the default subnet mask of Class B network 255.255.0.0 is changed into 255.255.192.0. The two bits added to network part from host part can have four possible values in third octet, 00, 01, 10, and 11.
That means, we can get four networks if we do a 2-bit subnetting on a Class B network.
Please refer below image.
SN No | Description | Binaries | Decimal |
---|---|---|---|
1 | Network Address | 10101100.00010000.00000000.00000000 | 172.16.0.0 |
First IPv4 address | 10101100.00010000.00000000.00000001 | 172.16.0.1 | |
Last IPv4 address | 10101100.00010000.00111111.11111110 | 172.16.63.254 | |
Broadcast Address | 10101100.00010000.00111111.11111111 | 172.16.63.255 | |
2 | Network Address | 10101100.00010000.01000000.00000000 | 172.16.64.0 |
First IPv4 address | 10101100.00010000.01000000.00000001 | 172.16.64.1 | |
Last IPv4 address | 10101100.00010000.01111111.11111110 | 172.16.127.254 | |
Broadcast Address | 10101100.00010000.01111111.11111111 | 172.16.127.255 | |
3 | Network Address | 10101100.00010000.10000000.00000000 | 172.16.128.0 |
First IPv4 address | 10101100.00010000.10000000.00000001 | 172.16.128.1 | |
Last IPv4 address | 10101100.00010000.10111111.11111110 | 172.16.191.254 | |
Broadcast Address | 10101100.00010000.10111111.11111111 | 172.16.191.255 | |
4 | Network Address | 10101100.00010000.11000000.00000000 | 172.16.192.0 |
First IPv4 address | 10101100.00010000.11000000.00000001 | 172.16.192.1 | |
Last IPv4 address | 10101100.00010000.11111111.11111110 | 172.16.255.254 | |
Broadcast Address | 10101100.00010000.11111111.11111111 | 172.16.255.255 |
The network 172.16.0.0 is divided into four subnets, each subnet has 16,384 total IPv4 addresses and 16,382 usable IPv4 addresses. Two IPv4 addresses in each subnet are used to represent the network address and directed broadcast address (first and last IPv4 addresses in a subnet block). The subnet mask to use for 2-bit subnetting for a Class B network is 255.255.192.0.
Visualization of 2-bit subnetting of Class B network 172.16.0.0 with subnet mask 255.255.192.0 is given below.
Class B 3-bit subnetting tutorial
If we include three bits to the network part from the host part, the default subnet mask of Class B network 255.255.0.0 is changed into 255.255.224.0. The three bits added to network part can have eight possible values in the third octet. Those eight possible values are 000, 001, 010, 011, 100, 101, 110 and 111.
That means, we can get eight networks if we do a 3-bit subnetting on a Class B network.
Please refer below image.
SN No | Description | Binaries | Decimal |
---|---|---|---|
1 | Network Address | 10101100.00010000.00000000.00000000 | 172.16.0.0 |
First IPv4 address | 10101100.00010000.00000000.00000001 | 172.16.0.1 | |
Last IPv4 address | 10101100.00010000.00011111.11111110 | 172.16.31.254 | |
Broadcast Address | 10101100.00010000.00011111.11111111 | 172.16.31.255 | |
2 | Network Address | 10101100.00010000.00100000.00000000 | 172.16.32.0 |
First IPv4 address | 10101100.00010000.00100000.00000001 | 172.16.32.1 | |
Last IPv4 address | 10101100.00010000.00111111.11111110 | 172.16.63.254 | |
Broadcast Address | 10101100.00010000.00111111.11111111 | 172.16.63.255 | |
3 | Network Address | 10101100.00010000.01000000.00000000 | 172.16.64.0 |
First IPv4 address | 10101100.00010000.01000000.00000001 | 172.16.64.1 | |
Last IPv4 address | 10101100.00010000.01011111.11111110 | 172.16.95.254 | |
Broadcast Address | 10101100.00010000.01011111.11111111 | 172.16.95.255 | |
4 | Network Address | 10101100.00010000.01100000.00000000 | 172.16.96.0 |
First IPv4 address | 10101100.00010000.01100000.00000001 | 172.16.96.1 | |
Last IPv4 address | 10101100.00010000.01111111.11111110 | 172.16.127.254 | |
Broadcast Address | 10101100.00010000.01111111.11111111 | 172.16.127.255 | |
5 | Network Address | 10101100.00010000.10000000.00000000 | 172.16.128.0 |
First IPv4 address | 10101100.00010000.10000000.00000001 | 172.16.128.1 | |
Last IPv4 address | 10101100.00010000.10011111.11111110 | 172.16.159.254 | |
Broadcast Address | 10101100.00010000.10011111.11111111 | 172.16.159.255 | |
6 | Network Address | 10101100.00010000.10100000.00000000 | 172.16.160.0 |
First IPv4 address | 10101100.00010000.10100000.00000001 | 172.16.160.1 | |
Last IPv4 address | 10101100.00010000.10111111.11111110 | 172.16.191.254 | |
Broadcast Address | 10101100.00010000.10111111.11111111 | 172.16.191.255 | |
7 | Network Address | 10101100.00010000.11000000.00000000 | 172.16.192.0 |
First IPv4 address | 10101100.00010000.11000000.00000001 | 172.16.192.1 | |
Last IPv4 address | 10101100.00010000.11011111.11111110 | 172.16.223.254 | |
Broadcast Address | 10101100.00010000.11011111.11111111 | 172.16.223.255 | |
8 | Network Address | 10101100.00010000.11100000.00000000 | 172.16.224.0 |
First IPv4 address | 10101100.00010000.11100000.00000001 | 172.16.224.1 | |
Last IPv4 address | 10101100.00010000.11111111.11111110 | 172.16.255.254 | |
Broadcast Address | 10101100.00010000.11111111.11111111 | 172.16.255.255 |
The network 172.16.0.0 is divided into eight subnets, each subnet has 8,192 total IPv4 addresses and 8,190 usable IPv4 addresses. Two IPv4 addresses in each subnet are used to represent the network address and directed broadcast address (first and last IPv4 addresses in a subnet block). The subnet mask to use for 3-bit subnetting for a Class B network is 255.255.224.0.
Visualization of 3-bit subnetting of Class B network 172.16.0.0 with subnet mask 255.255.224.0 is given below.
In this Class B Subnetting Tutorial - Part 1, you have learned how do 1-bit, 2-bit and 3-bit subnetting of a Class B network. Click "Next" to view Class B Subnetting Tutorial - Part 2.