What Is a Subnet? Detailed Explanation with Real-World Examples

What Is a Subnet? Full Explanation of Subnetting, CIDR, and Real-World Use Cases

While going through my learning journey in networking, I came across the term subnet quite frequently. At first, it was a bit abstract to me, but the more I studied, the more it started to make sense. This post is my attempt to write down what I’ve understood so far — partly for my own reference, and partly to share with others who are also learning.

1. What Is a Subnet?

Simple definition:
A subnet (short for “subnetwork”) is a logically segmented part of a larger IP network.

In other words, you take an IP block and divide it into smaller pieces to create manageable, isolated, and optimized network segments. These smaller segments are what we call subnets.

2. Why Use Subnets?

What’s the point of breaking a network into subnets? Here are some reasons:

ReasonExplanation
ManageabilityBreaking large networks into segments makes them easier to handle.
SecurityYou can apply access restrictions between different subnets. (e.g. finance can access only its own resources)
PerformanceBroadcast traffic stays within the subnet → less load on the whole network.
Address PlanningHelps use IP addresses more efficiently.
Logical SeparationYou can group users by department or physical location.

3. How Are Subnets Created? (CIDR and Netmask)

Every IP address consists of two parts:

  • The network part
  • The host (device) part

Subnetting is how we split those parts. A subnet mask (or CIDR notation) defines that split.

Example:

  • IP: 192.168.1.10
  • Subnet Mask: 255.255.255.0 → this is also written as /24

This means:

  • First 24 bits = network portion
  • Last 8 bits = used for devices (hosts)

So:

  • Network address: 192.168.1.0
  • Broadcast address: 192.168.1.255
  • Usable IPs: 192.168.1.1192.168.1.254 (254 in total)

4. What Is CIDR and How Is It Related?

CIDR (Classless Inter-Domain Routing) is a method of writing subnet masks using a slash and number format (e.g. /24).

CIDRIP CountDescription
/24256Standard small network
/25128Half of a /24
/2664Smaller network
/1665,536Large organizations

Rule: The higher the CIDR number, the smaller the subnet → fewer available IPs.

5. Subnet Calculation

Example:
Say I have the 192.168.0.0/24 block → that’s 256 IP addresses.

I want to split it into 4 equal subnets.

Solution:

256 / 4 = 64 IPs per subnet
→ Each subnet will be a /26:

SubnetCIDRIP Range
A192.168.0.0/26192.168.0.0 – 192.168.0.63
B192.168.0.64/26192.168.0.64 – 192.168.0.127
C192.168.0.128/26192.168.0.128 – 192.168.0.191
D192.168.0.192/26192.168.0.192 – 192.168.0.255

Each of these can now be assigned to a different department!

6. Types of Subnets

Public Subnet

  • Accessible from the internet (e.g. web server)
  • Usually paired with an internet gateway

Private Subnet

  • Internal resources (e.g. database server)
  • Requires a NAT device to reach the internet
  • Not directly reachable from outside

7. Real-World Scenario

Let’s say a company has three departments:

  • IT (50 people)
  • HR (20 people)
  • Management (10 people)

The company owns the 192.168.0.0/24 block.
I can split it like this:

  • 192.168.0.0/26 → IT (62 hosts)
  • 192.168.0.64/27 → HR (30 hosts)
  • 192.168.0.96/28 → Management (14 hosts)
  • Remaining space → guests, printers, backup systems

This way each group is isolated, secure, and easier to manage.

8. Things to Know About Subnets

TipDetail
First IP → Network addressNot usable by hosts
Last IP → Broadcast addressNot usable by hosts
IP ranges must not overlapTwo subnets cannot share the same IP
CIDR is fixed once definedCannot be changed afterward — plan ahead!
Each subnet is its own broadcast domainSwitch broadcasts stay within the subnet only

Subnetting might look complicated at first glance, but it’s a powerful and essential tool in network design. Understanding how to logically divide a network makes everything — from security to performance — easier and more efficient. I’ll keep digging deeper as I learn, but for now, this is what I’ve gathered.

Leave a Reply

Your email address will not be published. Required fields are marked *