Each interface on a router which is connected to a network is required IP address and subnet mask. The IP address and subnet mask are used to identify the specific broadcast domain. Remember that we have
already learned the following topics in the previous chapter:
- Introduction to IP address
- IPv4 Addresses
- IPv4 Host and Network Portions
- Expression of subnet mask
- IPv4 address classes
- Private and Public IP addresses
- Classful and Classless IP addresses
- IPv6 addresses
Here in this chapter, we are going to learn IP address subnetting. As we know that the prefix length and the subnet mask are different ways of identifying the network portion of IP address.
IPv4 Subnetting is done by borrowing host bits and using them as network
bits. This is done by extending the subnet mask to borrow some of the host portion bits of the address to create supplementary network bits. The more host bits that are borrowed, the more sub-network that can be defined.
As we know that IPv4 has 4 octets and the octet boundaries are /8, /16, and /24. Networks are most easily subnetted at these octet boundaries. The table in the figure identifies prefix lengths, subnet masks equivalent to prefix, the network and host bits, and the number of hosts each subnet can connect. observe that longer prefix lengths mean less number of host per network.
Subnetting on the Octet Boundaries
As we already say that subnetting on the octet boundary is so easy. Consider the following example for understanding subnetting on the octet boundary. Assume an organization has selected the private network 10.0.0.0/8 as its internal network address. In a single broadcast domain, there are 16,777,214 hosts can connect. This is a large network and will cause a large broadcast causing slow network performance. So, this is not perfect.
The organization can further subnet the network 10.0.0.0/8 address at the octet boundary of /16 as shown in Figure 2. This can provide 256 sub-networks to an organization (i.e., 10.0.0.0/16 – 10.255.0.0/16) with each subnet containing of 65,534 hosts. Recall that the first two octets identify the network portion of the address while the last two octets are for host portion of IP addresses while using /16 prefix
The organization can also choose to subnet at the /24 octet boundary as shown in Figure 3. This can provide 65536 sub-networks to an organization (i.e., 10.0.0.0/24 – 10.255.255.0/16) with each subnet containing 256 hosts. Recall that the first three octets identify the network portion of the address while the last octets are for host portion of IP addresses while using /24 prefix