What is Subnetting?

1. What is Subnetting?

Subnetting comes from sub (under) + network. It simply means taking one large IP network and splitting it into smaller networks.

You use subnetting when you want each network to match the number of hosts you actually need, no more, no less.

Illustration of what is subnetting: 192.168.1.0/24 split into four /26 subnets (0–63, 64–127, 128–191, 192–255) with network and broadcast addresses.
Figure 1 – Subnetting a /24 into four /26 networks.

For example, if you have 192.168.1.0/24 (256 addresses), subnetting lets you split it into four /26 subnets, each with 64 addresses.

In this lesson, you’ll see why subnetting was created. First, we’ll look at how IPv4 addressing worked before subnetting and the problems it caused. Then, as you progress through the pathway, you’ll learn how to subnet step by step.

2. Before Subnetting: IPv4 Classes

Let me take you back more than 40 years, to 1981, when IPv4 was released, and I’ll show you why subnetting was created.

Back then, addresses were classified into A, B, C, D, and E. Each class had a first-octet range, a default mask, and a typical host capacity per network.

ClassFirst OctetDefault MaskPrefixHostsUse
A0–127255.0.0.0/816,777,214Very large networks
B128–191255.255.0.0/1665,534Medium-sized networks
C192–223255.255.255.0/24254Small networks
D224–239Multicast
E240–255Experimental / Reserved
Table 1 – IPv4 address classes

At that time, companies requested address blocks from IANA (Internet Assigned Numbers Authority), which managed the global pool and ensured each allocation was unique.

For example:

IANA assigning classful IPv4 networks to companies: Class A 15.0.0.0/8, Class B 172.50.0.0/16, Class C 198.51.100.0/24.
Figure 2 – IANA assigns Class A 15.0.0.0/8, Class B 172.50.0.0/16, Class C 198.51.100.0/24.
  • A large company needing about 1,000,000 IPs could receive a Class A (≈16.7M usable).
  • A company needing around 50,000 IPs could receive a Class B (≈65.5k usable).
  • A small company could receive a Class C (254 usable).

This worked at the very beginning of the Internet. But usage grew much faster than expected leading to problems you’ll see in the next section.

3. The Waste Problem

Classful addressing isn’t optimized for real network needs. Fixed block sizes with IPv4 classes mean you reserve far more IP addresses than you actually use, leading to significant waste.

Example 1 — Class C (/24) on a point-to-point link

Imagine you’re the network engineer tasked with assigning a network between two routers for a point-to-point link.

Under the classful model, you might assign a Class C /24, for example: 198.51.100.0/24.

Wasting a /24 IPv4 subnet for a point-to-point link between two routers R1 and R2, using only 4 IP addresses out of 256 available
Figure 3 – Wasting a Class C (/24) Network for a Point-to-Point Link

On that link, you actually use:

  • 1 IP for R1
  • 1 IP for R2
  • 1 network address
  • 1 broadcast address

That’s only 4 addresses used. Out of 256, 252 addresses remain unused and can’t be allocated elsewhere within that /24.

Example 2 — Class B (/16) for ~5,000 hosts

Now imagine your company opens a large branch and needs about 5,000 IP addresses for users, servers, and devices.

A Class C (254 usable) is too small, so under the classful system you’d be assigned a Class B: 172.50.0.0/16 → ~65,000 addresses.

What is subnetting and how it solves IP waste when a company receives a /16 block but only needs 5,000 addresses
Figure 4 – Company receives Class B 172.50.0.0/16 but needs fewer IPs.

Here, you’d use about 5,000 addresses, leaving roughly 60,000 addresses unused again, a major waste caused by class-based allocation.

4. Why We Use Subnetting

When these address classes were introduced in 1981, no one imagined we would one day face an IPv4 address shortage due to growing demand.

Over time, network engineers began looking for ways to design networks that better matched real needs.

That’s when subnetting was introduced in 1985, still within the classful addressing system. At this time, each network still had to follow its original class boundaries, but subnetting allowed engineers to divide large networks into smaller, more manageable sub-networks.

Example – Splitting a Class A into Multiple Class B Networks

For example, a company assigned a Class A /8 (≈16.7 million usable addresses) could use subnetting to split it into multiple Class B networks (/16, ≈65,534 usable addresses each).

Diagram showing how subnetting divides a Class A 10.0.0.0/8 network into multiple Class B–sized /16 subnets, such as 10.0.0.0/16, 10.1.0.0/16, 10.2.0.0/16, and 10.3.0.0/16.
Figure 5 – Subnetting Class A 15.0.0.0/8 into multiple Class B–sized /16 networks.

This way, one large allocation could be turned into several medium networks, reducing wasted addresses and improving network organization.

Later, in 1993, CIDR (Classless Inter-Domain Routing) was introduced. CIDR removed the rigid class boundaries and allowed subnetting with any prefix length, making IP address allocation far more flexible and efficient.

We’ll explore CIDR in the next lesson.

5. Quick Recap

  • What is Subnetting? – From sub (under) + network, it means taking one large IP network and splitting it into smaller, more manageable networks that match the number of hosts you actually need.
  • Before Subnetting – IPv4 originally used fixed address classes (A, B, C…), which often gave organizations far more addresses than they needed.
  • The Waste Problem – Classful addressing led to massive unused address space, such as using a full /24 for a point-to-point link or a /16 for only a few thousand hosts.
  • Subnetting (1985) – Introduced in the classful system to divide large allocations into smaller networks, reducing waste but still bound to the original class sizes.
  • CIDR (1993) – Removed class boundaries, allowing any prefix length and making address allocation far more efficient.

Now, let’s see in the next lessons how CIDR works and why it was a major improvement over subnetting.