All articles
Networking June 28, 2026 3 min read

Subnetting Made Simple: Carving Up IP Networks

Subnetting looks intimidating but it's just organized division. Learn how subnet masks, CIDR, and hosts-per-subnet work — with a clear worked example.

Subnetting Made Simple: Carving Up IP Networks

Subnetting scares a lot of people learning networking, but the idea is simple: take one big block of IP addresses and divide it into smaller, organized pieces. You do this to improve security, reduce congestion, and use address space efficiently. Let's break it down without the panic.

The two parts of every IP address

An IPv4 address like 192.168.1.10 has two halves:

  • Network portion — which network the device belongs to.
  • Host portion — which specific device on that network.

The subnet mask decides where the split happens. 255.255.255.0 (or /24 in CIDR) means the first 24 bits are the network, and the last 8 bits identify hosts.

Subnetting is just moving that dividing line to borrow host bits and create more, smaller networks.

CIDR notation in one line

CIDR (/24, /26, /30) simply counts how many bits belong to the network:

  • /24 = 256 addresses (254 usable hosts)
  • /25 = 128 addresses (126 usable)
  • /26 = 64 addresses (62 usable)
  • /27 = 32 addresses (30 usable)
  • /30 = 4 addresses (2 usable — perfect for router links)

The two "lost" addresses in each subnet are the network address (all host bits 0) and the broadcast address (all host bits 1).

The formulas you actually need

  • Number of subnets = 2^(bits borrowed)
  • Usable hosts per subnet = 2^(host bits) − 2

A worked example

You're given 192.168.10.0/24 and need 4 subnets.

  1. To get 4 subnets, borrow 2 bits (2² = 4). New mask: /26255.255.255.192.
  2. Each /26 has 2⁶ = 64 addresses → 62 usable hosts.
  3. The four subnets are:
192.168.10.0/26    -> hosts .1  to .62   (broadcast .63)
192.168.10.64/26   -> hosts .65 to .126  (broadcast .127)
192.168.10.128/26  -> hosts .129 to .190 (broadcast .191)
192.168.10.192/26  -> hosts .193 to .254 (broadcast .255)

The jump between subnets (64 here) is called the block size — the fastest way to subnet in your head. Block size = 256 − the mask value in the interesting octet (256 − 192 = 64).

VLSM: right-sizing your subnets

Real networks don't need equal subnets. Variable Length Subnet Masking (VLSM) lets you assign a /30 to a 2-host router link and a /24 to a 250-host office — from the same address space, wasting nothing. Always subnet your largest requirement first, then carve smaller blocks from what's left.

Why bother?

  • Security & segmentation — put servers, staff, and guest Wi-Fi on separate subnets so they can't freely reach each other.
  • Performance — smaller broadcast domains mean less broadcast traffic.
  • Efficiency — allocate exactly the addresses each segment needs.

The takeaway

Subnetting is just structured division: decide how many networks or hosts you need, borrow the right number of bits, and use the block size to lay out your ranges. Practice a few by hand and the "magic" disappears — it becomes second nature, and it's the backbone of every well-designed network.

Share: X LinkedIn