π€ What is Subnetting? (Basic Idea)
Subnetting means dividing one large network into multiple smaller networks, called subnets.
π In simple words:
Subnetting breaks a big network into smaller, manageable pieces.
π§ Real-Life Analogy
π’ Apartment Building Example
One big building = One network
Each floor = One subnet
Each flat = One host
π Easier to manage, secure, and organize.
π§ Simple Definition
π Subnetting is the process of dividing a single IP network into multiple smaller logical networks by borrowing bits from the host portion.
π― Why Do We Need Subnetting?
Subnetting is needed to:
π° Reduce IP address wastage
π Improve network performance
π Increase security
π¦ Control broadcast traffic
π§ Make network management easier
π§ Where Does Subnetting Work?
Performed at the Network Layer
Uses IP address + Subnet Mask
π§© Key Concept: Subnet Mask
πΉ What is a Subnet Mask?
A Subnet Mask tells:
Which part of IP is Network
Which part is Host
π Example:
IP Address :192.168.1.10
Subnet Mask:255.255.255.0π’ Binary View (Very Important)
Subnet Mask: 255.255.255.0
Binary:
11111111.11111111.11111111.00000000π
1β Network bit0β Host bit
π§ Default Subnet Masks (Must Remember)
Class | Default Mask |
|---|---|
A | 255.0.0.0 |
B | 255.255.0.0 |
C | 255.255.255.0 |
π Golden Rule of Subnetting
π Subnetting borrows bits from the HOST portion to create more NETWORKS.
πͺ Subnetting Step-by-Step
We always answer subnetting questions using these steps:
β Step 1: Identify the Class
Example IP: 192.168.1.0
First octet = 192
π Class C
β Step 2: Note Default Subnet Mask
Class C default mask:
255.255.255.0 β /24β Step 3: Determine Requirement
Question may ask:
Number of subnets
Number of hosts per subnet
π Example:
Create 4 subnets
β Step 4: Borrow Bits
Formula:
Numberofsubnets=2βΏTo create 4 subnets:
2Β² = 4π Borrow 2 bits from host portion.
β Step 5: New Subnet Mask
Original mask: /24
Borrow 2 bits β New mask = /26
Subnet Mask:
255.255.255.192Binary:
11111111.11111111.11111111.11000000β Step 6: Calculate Hosts per Subnet
Formula:
Hostspersubnet=2Κ° β2Remaining host bits = 6
2βΆ β 2 = 62 hostsπ¦ Subnet Address Calculation
IP: 192.168.1.0/26
Block size:
256 β 192 = 64π Subnet Table
Subnet No | Network | First Host | Last Host | Broadcast |
|---|---|---|---|---|
1 | 192.168.1.0 | .1 | .62 | .63 |
2 | 192.168.1.64 | .65 | .126 | .127 |
3 | 192.168.1.128 | .129 | .190 | .191 |
4 | 192.168.1.192 | .193 | .254 | .255 |
π§ Important Subnetting Formulas
Purpose | Formula |
|---|---|
Subnets | 2βΏ |
Hosts per subnet | 2Κ° β 2 |
Block size | 256 β subnet mask octet |
Efficient IP utilization
Reduced broadcast traffic
Better performance
Enhanced security
Easy fault isolation
More planning required
Slightly complex for beginners
Configuration mistakes can cause issues
π§ Subnetting vs Supernetting (Preview)
Subnetting | Supernetting |
|---|---|
Divide network | Combine networks |
Borrow host bits | Borrow network bits |
More networks | Fewer networks |
π Supernetting is coming next π
π§ Subnetting with Diagram (Conceptual View)

π§ Memory Trick (Very Useful)
/24 β 256 hosts
/25 β 128
/26 β 64
/27 β 32
/28 β 16
/29 β 8
/30 β 4β One-Line Summary
πΉ Subnetting divides a large IP network into smaller, efficient, and manageable sub-networks by borrowing host bits.