ToolSpark
🧠Explainers--7 min read

Subnetting Made Simple: A Visual Guide to IP Subnets

Understand IP subnetting without the headache. Learn CIDR notation, subnet masks, network addressing, and how to calculate subnets step by step.

networkingsubnettingip addresscidrit

What is Subnetting?

Subnetting divides a large network into smaller, more manageable sub-networks (subnets). Think of it like dividing a building into floors and rooms - each subnet is a separate "room" on your network.

Calculate subnets instantly with our Subnet Calculator.

IP Addresses in Binary

Every IP address is actually a 32-bit binary number:

192.168.1.0

= 11000000.10101000.00000001.00000000

Each of the four octets ranges from 0-255 (8 bits each).

Subnet Masks Explained

A subnet mask determines which part of an IP address identifies the network and which part identifies the host (individual device).

IP:          192.168.1.100

Subnet Mask: 255.255.255.0

|||||||||||_____ Host part (last octet)

||||||||________ Network part (first 3 octets)

Common subnet masks:

MaskCIDRHostsUse Case
255.0.0.0/816,777,214Large enterprise
255.255.0.0/1665,534Medium networks
255.255.255.0/24254Small office/home
255.255.255.128/25126Split /24 in half
255.255.255.192/2662Small department
255.255.255.240/2814Point-to-point

CIDR Notation

CIDR (Classless Inter-Domain Routing) notation uses a slash followed by the number of network bits:

  • /24 means 24 bits for network, 8 bits for hosts = 254 usable addresses
  • /25 means 25 bits for network, 7 bits for hosts = 126 usable addresses
  • /32 means all 32 bits are network = single host address

How to Calculate Subnets

Step 1: Determine hosts needed

How many devices need IP addresses on this subnet?

Step 2: Find the right CIDR

Number of usable hosts = 2^(32-CIDR) - 2 (subtract network and broadcast addresses)

Need hostsUse CIDRGet hosts
Up to 6/296
Up to 14/2814
Up to 30/2730
Up to 62/2662
Up to 126/25126
Up to 254/24254

Step 3: Calculate network boundaries

For 192.168.1.0/26:

  • Block size: 256 - 192 = 64
  • Subnet 1: 192.168.1.0 - 192.168.1.63
  • Subnet 2: 192.168.1.64 - 192.168.1.127
  • Subnet 3: 192.168.1.128 - 192.168.1.191
  • Subnet 4: 192.168.1.192 - 192.168.1.255

Private IP Ranges

These ranges are reserved for internal networks:

  • 10.0.0.0/8 - Class A (16M addresses)
  • 172.16.0.0/12 - Class B (1M addresses)
  • 192.168.0.0/16 - Class C (65K addresses)

Real-World Subnetting Example

Your office has 4 departments: Engineering (45 people), Sales (20), Marketing (12), and Management (8).

Solution:
  • Engineering: /26 (62 hosts) - 192.168.1.0/26
  • Sales: /27 (30 hosts) - 192.168.1.64/27
  • Marketing: /28 (14 hosts) - 192.168.1.96/28
  • Management: /28 (14 hosts) - 192.168.1.112/28

Tools for Network Work

📖 Related Articles