dEEpEst
☣☣ In The Depths ☣☣
Staff member
Administrator
Super Moderator
Hacker
Specter
Crawler
Shadow
- Joined
- Mar 29, 2018
- Messages
- 13,861
- Solutions
- 4
- Reputation
- 32
- Reaction score
- 45,552
- Points
- 1,813
- Credits
- 55,350
7 Years of Service
56%
Subnetting & Supernetting for Absolute Beginners

Understanding how IP networks are divided and optimized is essential for system administrators, blue teamers, and pentesters alike. This guide breaks it down in a practical, easy-to-follow way.
What is Subnetting?
Imagine managing a large office with 200 employees. You wouldn't let everyone roam every room—you'd organize them into departments like HR, IT, and Sales.
Subnetting does something similar. It divides a large IP network into smaller, manageable segments called subnets.
Why?
- Improves security by isolating traffic
- Enhances performance and reduces congestion
- Simplifies network management
Understanding IP Addresses
An IPv4 address is 32 bits long, typically written in dotted-decimal format. Example:
192.168.1.100
• 192.168.1 → Network
• 100 → Host (a device in that network)
In binary:
Code:
192.168.1.100 = 11000000.10101000.00000001.01100100
Each of the 4 octets (8 bits) can range from 0 to 255.
What is a Subnet Mask?
A subnet mask determines which portion of the IP address refers to the network and which part refers to the host.
Examples:
- 255.255.255.0 → CIDR: /24
- 255.255.255.128 → CIDR: /25
- 255.255.255.192 → CIDR: /26
Host Capacity per Subnet
Code:
Subnet Mask CIDR Usable Hosts
255.255.255.0 /24 254
255.255.255.128 /25 126
255.255.255.192 /26 62
More subnet bits = more subnets, fewer hosts per subnet
How to Subnet: A Practical Example
Suppose we have a network: 192.168.1.0/24
We want to divide it into 4 equal subnets.
Step 1: Calculate new subnet mask
• Original: /24 → 256 total addresses
• New: /26 → 64 addresses per subnet (62 usable)
Resulting Subnets:
- 192.168.1.0/26
- 192.168.1.64/26
- 192.168.1.128/26
- 192.168.1.192/26
Each subnet supports 62 usable host IPs (we subtract 2: network and broadcast).
What is Supernetting?
Supernetting is the reverse of subnetting. It combines multiple networks into one.
Use Case: Reduce the number of routing table entries.
Example:
Code:
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.4.0/24
→ Summarized as: 192.168.0.0/22
Benefits:
- Fewer routing entries
- Faster and more efficient routing
- Simplified network design
Why Does This Matter?
Understanding subnetting and supernetting is critical for:
- Security: Isolate sensitive segments
- Efficiency: Avoid IP address waste
- Performance: Control broadcast domains
- Pentesting: Analyze and navigate network layouts during recon
Final Thoughts
Whether you're defending infrastructure or probing it during an engagement, subnetting knowledge is foundational. Train your team, build solid network architectures, and always document your subnet plans for clarity and future scaling.