Subnet an IPv4 Network
Subnet an IPv4 Network

Subnet an IPv4 Network

Subnet an IPv4 Network


This topic calculate IPv4 subnets for a /24 prefix. Start learning CCNA 200-301 for free right now!!

Note: Welcome: This topic is part of Chapter 11 of the Cisco CCNA 1 course, for a better follow up of the course you can go to the CCNA 1 section to guide you through an order.

Subnet on an Octet Boundary

In the previous topic you learned several good reasons for segmenting a network. You also learned that segmenting a network is called subnetting. Subnetting is a critical skill to have when administering an IPv4 network. It is a bit daunting at first, but it gets much easier with practice.

IPv4 subnets are created by using one or more of the host bits as network bits. This is done by extending the subnet mask to borrow some of the bits from the host portion of the address to create additional network bits. The more host bits that are borrowed, the more subnets that can be defined. The more bits that are borrowed to increase the number of subnets reduces the number of hosts per subnet.

Networks are most easily subnetted at the octet boundary of /8, /16, and /24. The table identifies these prefix lengths. Notice that using longer prefix lengths decreases the number of hosts per subnet.

Subnet Masks on Octet Boundaries

Prefix Length Subnet Mask Subnet Mask in Binary (n = network, h = host) # of hosts

To understand how subnetting on the octet boundary can be useful, consider the following example. Assume an enterprise has chosen the private address as its internal network address. That network address can connect 16,777,214 hosts in one broadcast domain. Obviously, having more than 16 million hosts on a single subnet is not ideal.

The enterprise could further subnet the address at the octet boundary of /16 as shown in the table. This would provide the enterprise the ability to define up to 256 subnets (i.e., – with each subnet capable of connecting 65,534 hosts. Notice how the first two octets identify the network portion of the address whereas the last two octets are for host IP addresses.

Subnetting Network using a /16

Subnet Address
(256 Possible Subnets)
Host Range
(65,534 possible hosts per subnet)
Broadcast – – – – – – – – –

Alternatively, the enterprise could choose to subnet the network at the /24 octet boundary, as shown in the table. This would enable the enterprise to define 65,536 subnets each capable of connecting 254 hosts. The /24 boundary is very popular in subnetting because it accommodates a reasonable number of hosts and conveniently subnets at the octet boundary.

Subnetting Network using a /24 Prefix

Subnet Address
(65,536 Possible Subnets)
Host Range
(254 possible hosts per subnet)
Broadcast – – – – – – – – – 10.2255.255.254

Subnet within an Octet Boundary

The examples shown thus far borrowed host bits from the common /8, /16, and /24 network prefixes. However, subnets can borrow bits from any host bit position to create other masks.

For instance, a /24 network address is commonly subnetted using longer prefix lengths by borrowing bits from the fourth octet. This provides the administrator with additional flexibility when assigning network addresses to a smaller number of end devices.

Refer to the table to see six ways to subnet a /24 network.

Subnet a /24 Network

Prefix Length Subnet Mask Subnet Mask in Binary
(n = network, h = host)
# of subnets # of hosts
2 126
4 62
8 30
16 14
32 6
64 2

For each bit borrowed in the fourth octet, the number of subnetworks available is doubled, while reducing the number of host addresses per subnet:

  • /25 row – Borrowing 1 bit from the fourth octet creates 2 subnets supporting 126 hosts each.
  • /26 row – Borrowing 2 bits creates 4 subnets supporting 62 hosts each.
  • /27 row – Borrowing 3 bits creates 8 subnets supporting 30 hosts each.
  • /28 row – Borrowing 4 bits creates 16 subnets supporting 14 hosts each.
  • /29 row – Borrowing 5 bits creates 32 subnets supporting 6 hosts each.
  • /30 row – Borrowing 6 bits creates 64 subnets supporting 2 hosts each.

Video – The Subnet Mask

Click Play to view an explanation of the subnet mask.

Video – Subnet with the Magic Number

Click Play to view an explanation of the magic number.

Packet Tracer – Subnet an IPv4 Network

In this activity, starting from a single network address and network mask, you will subnet the Customer network into multiple subnets. The subnet scheme should be based on the number of host computers required in each subnet, as well as other network considerations, like future network host expansion.

After you have created a subnetting scheme and completed the table by filling in the missing host and interface IP addresses, you will configure the host PCs, switches and router interfaces.

After the network devices and host PCs have been configured, you will use the ping command to test for network connectivity.

Glossary: If you have doubts about any special term, you can consult this computer network dictionary.

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.

CCNA Dump App Now AvailableApp Store