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.
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:
| Mask | CIDR | Hosts | Use Case |
|---|
| 255.0.0.0 | /8 | 16,777,214 | Large enterprise |
|---|---|---|---|
| 255.255.0.0 | /16 | 65,534 | Medium networks |
| 255.255.255.0 | /24 | 254 | Small office/home |
| 255.255.255.128 | /25 | 126 | Split /24 in half |
| 255.255.255.192 | /26 | 62 | Small department |
| 255.255.255.240 | /28 | 14 | Point-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 hosts | Use CIDR | Get hosts |
|---|
| Up to 6 | /29 | 6 |
|---|---|---|
| Up to 14 | /28 | 14 |
| Up to 30 | /27 | 30 |
| Up to 62 | /26 | 62 |
| Up to 126 | /25 | 126 |
| Up to 254 | /24 | 254 |
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
- Subnet Calculator - calculate subnets, CIDR, and host ranges
- IP Lookup - find information about any IP address
- Number Base Converter - convert between decimal, binary, and hex
- Binary Calculator - perform bitwise operations