Introduction

IPv4 subnetting defines which destinations are local, how many addresses a segment can contain, and where a router is required. It is not only an exam arithmetic topic: an incorrect prefix can make two hosts disagree about whether to use the local link or the default gateway.

What an IPv4 Prefix Means

An IPv4 address contains 32 bits. A prefix length such as /24 identifies how many leading bits describe the network; the remaining bits identify addresses inside that subnet. Applying the mask to an address produces the network identifier. In an ordinary subnet, the lowest address identifies the network and the highest is the directed broadcast address, leaving the addresses between them for hosts.

Why Subnetting Matters

Subnet boundaries affect broadcast domains, route summaries, security policy, address utilization, and troubleshooting. A valid-looking host address can still be wrong if its prefix or gateway belongs to a different subnet.

Private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. They are not globally routed on the public Internet. Network Address Translation (NAT) commonly translates private source addresses at an edge, but private addressing and NAT are separate design decisions.

Core Concepts

Use a Repeatable Subnet Method

For a required prefix, determine the mask and block size, locate the address inside the correct block, and derive the network and broadcast boundaries. Then confirm the usable host interval. For example, 192.0.2.70/27 uses blocks of 32 in the final octet. It falls in 192.0.2.64-95, so the network is .64, the broadcast is .95, and ordinary host addresses span .65-.94.

For a host requirement, select enough host bits for the required addresses plus reserved network and broadcast values in conventional IPv4 subnets. For a subnet-count requirement, borrow enough host bits to create the required number of equal-size subnets.

Address-Plan Verification

Before deployment, verify that subnets do not overlap, gateway addresses fall inside their segments, reserved ranges are documented, and routing can represent the plan. On a client, inspect the configured address, mask, gateway, and DNS server. On a Cisco device, use platform-appropriate interface and route display commands to confirm that the connected prefix is operationally installed.

Practical Design Guidance

Leave growth space deliberately instead of assigning arbitrary large networks everywhere. Summarization works best when related subnets are contiguous and aligned on prefix boundaries. Avoid overlapping private space across sites or cloud networks that may later connect; NAT can sometimes work around overlap, but it increases complexity.

Common Learning Challenges

  • Treating a subnet mask as decoration rather than forwarding input
  • Forgetting to test whether two endpoints agree on the local prefix
  • Confusing a default gateway with a DNS server
  • Assuming all 172.x.x.x addresses are private
  • Choosing a prefix from memorized host counts without deriving its boundaries
  • Creating an address plan that cannot be summarized or connected without overlap

Conclusion

Accurate IPv4 work combines binary boundaries with operational verification. Calculate the network, usable interval, and broadcast address; then prove that interfaces and routes reflect the intended plan.