Subnet a /16 and a /8 Prefix
This topic calculate IPv4 subnets for a /16 and /8 prefix. Start learning CCNA 200-301 for free right now!!
Create Subnets with a Slash 16 prefix
Some subnetting is easier than other subnetting. This topic explains how to create subnets that each have the same number of hosts.
In a situation requiring a larger number of subnets, an IPv4 network is required that has more hosts bits available to borrow. For example, the network address 172.16.0.0 has a default mask of 255.255.0.0, or /16. This address has 16 bits in the network portion and 16 bits in the host portion. The 16 bits in the host portion are available to borrow for creating subnets. The table highlights all the possible scenarios for subnetting a /16 prefix.
Subnet a /16 Network
|Prefix Length||Subnet Mask||Network Address
(n = network, h = host)
|# of subnets||# of hosts|
Although you do not need to memorize this table, you still need a good understanding of how each value in the table is generated. Do not let the size of the table intimidate you. The reason it is big is that it has 8 additional bits that can be borrowed, and, therefore, the numbers of subnets and hosts are simply larger.
Create 100 Subnets with a Slash 16 prefix
Consider a large enterprise that requires at least 100 subnets and has chosen the private address 172.16.0.0/16 as its internal network address.
When borrowing bits from a /16 address, start borrowing bits in the third octet, going from left to right. Borrow a single bit at a time until the number of bits necessary to create 100 subnets is reached.
The figure displays the number of subnets that can be created when borrowing bits from the third octet and the fourth octet. Notice there are now up to 14 host bits that can be borrowed.
Number of Subnets Created
To satisfy the requirement of 100 subnets for the enterprise, 7 bits (i.e., 27 = 128 subnets) would need to be borrowed (for a total of 128 subnets), as shown in the figure.
Recall that the subnet mask must change to reflect the borrowed bits. In this example, when 7 bits are borrowed, the mask is extended 7 bits into the third octet. In decimal, the mask is represented as 255.255.254.0, or a /23 prefix, because the third octet is 11111110 in binary and the fourth octet is 00000000 in binary.
The figure displays the resulting subnets from 172.16.0.0 /23 up to 172.16.254.0 /23.
Resulting /23 Subnets
After borrowing 7 bits for the subnet, there is one host bit remaining in the third octet, and 8 host bits remaining in the fourth octet, for a total of 9 bits that were not borrowed. 29 results in 512 total host addresses. The first address is reserved for the network address and the last address is reserved for the broadcast address, so subtracting for these two addresses (29 – 2) equals 510 available host addresses for each /23 subnet.
As shown in the figure, the first host address for the first subnet is 172.16.0.1, and the last host address is 172.16.1.254.
Address Range for 172.16.0.0/23 Subnet
Create 1000 Subnets with a Slash 8 prefix
Some organizations, such as small service providers or large enterprises, may need even more subnets. For example, take a small ISP that requires 1000 subnets for its clients. Each client will need plenty of space in the host portion to create its own subnets.
The ISP has a network address 10.0.0.0 255.0.0.0 or 10.0.0.0/8. This means there are 8 bits in the network portion and 24 host bits available to borrow toward subnetting. Therefore, the small ISP will subnet the 10.0.0.0/8 network.
To create subnets, you must borrow bits from the host portion of the IPv4 address of the existing internetwork. Starting from the left to the right with the first available host bit, borrow a single bit at a time until you reach the number of bits necessary to create 1000 subnets. As shown in the figure, you need to borrow 10 bits to create 1024 subnets (210 = 1024). This includes 8 bits in the second octet and 2 additional bits from the third octet.
Number of Subnets Created
This figure displays the network address and the resulting subnet mask, which converts to 255.255.192.0 or 10.0.0.0/18.
This figure displays the subnets resulting from borrowing 10 bits, creating subnets from 10.0.0.0/18 to 10.255.128.0/18.
Resulting /18 Subnets
Borrowing 10 bits to create the subnets, leaves 14 host bits for each subnet. Subtracting two hosts per subnet (one for the network address and one for the broadcast address) equates to 214 – 2 = 16382 hosts per subnet. This means that each of the 1000 subnets can support up to 16,382 hosts.
This figure displays the specifics of the first subnet.
Address Range for 10.0.0.0/18 Subnet
Video – Subnet Across Multiple Octets
Click Play to view an explanation of how to use the magic number across octet boundaries.
Lab – Calculate IPv4 Subnets
In this lab, you will complete the following objectives:
- Part 1: Determine IPv4 Address Subnetting
- Part 2: Calculate IPv4 Address Subnetting
Ready to go! Keep visiting our networking course blog, give Like to our fanpage; and you will find more tools and concepts that will make you a networking professional.