π§ PART 1 β What is an IP Address?
An IP address is a unique identifier for a device in a network.
Example:
192.168.1.10
Every IP has 2 parts:
[ NETWORK PART ] [ HOST PART ]
π PART 2 β Network vs Host (MOST IMPORTANT)
Example:
IP: 192.168.1.10
Mask: 255.255.255.0 (/24)
π This means:
Network: 192.168.1
Host: .10
π§ Rule
Subnet mask decides the split.
π PART 3 β Subnet Mask Explained (Power Concept)
Example:
255.255.255.0
Binary:
11111111.11111111.11111111.00000000
π Count 1s:
24 bits β NETWORK
8 bits β HOST
π₯ POWER RULE (THIS IS YOUR βPOWER 8β)
π Number of hosts =
2^(host bits) - 2
Example:
For /24:
Host bits = 8
2^8 = 256
256 - 2 = 254 usable IPs
π‘ WHY -2?
Because:
- 1 = Network address
- 1 = Broadcast address
π QUICK TABLE (VERY IMPORTANT FOR TEACHING)
| Subnet | Host Bits | Total IPs | Usable |
|---|---|---|---|
| /24 | 8 | 256 | 254 |
| /25 | 7 | 128 | 126 |
| /26 | 6 | 64 | 62 |
| /27 | 5 | 32 | 30 |
| /28 | 4 | 16 | 14 |
π§ PART 4 β What is Subnetting?
Subnetting = dividing one network into smaller networks.
Example:
192.168.1.0/24
Split into 2:
192.168.1.0/25
192.168.1.128/25
π₯ PART 5 β HOW SPLITTING WORKS
Example: /24 β /25
Borrow 1 bit
So:
2^1 = 2 subnets
Result:
| Subnet | Range |
|---|---|
| 192.168.1.0/25 | 1β126 |
| 192.168.1.128/25 | 129β254 |
π§ͺ PART 6 β LAB (VERY IMPORTANT)
π― Goal:
Understand:
- network vs host
- subnetting
- IP allocation
π§ LAB SETUP
Use ONE network:
192.168.1.0/24
STEP 1 β Split into 2 subnets
Subnet mask β /25
Now you have:
Subnet 1:
Network: 192.168.1.0
Range: 192.168.1.1 β 192.168.1.126
Gateway: 192.168.1.126 or .1
Subnet 2:
Network: 192.168.1.128
Range: 192.168.1.129 β 192.168.1.254
Gateway: 192.168.1.254 or .129
STEP 2 β Build in Packet Tracer
Devices:
- 1 Router
- 2 Switches
- 4 PCs (2 per subnet)
STEP 3 β Assign IPs
Subnet 1:
PC1 β 192.168.1.10
PC2 β 192.168.1.20
Gateway β 192.168.1.1
Mask β 255.255.255.128
Subnet 2:
PC3 β 192.168.1.130
PC4 β 192.168.1.140
Gateway β 192.168.1.129
Mask β 255.255.255.128
STEP 4 β Configure Router
enable
configure terminal
interface g0/0
ip address 192.168.1.1 255.255.255.128
no shutdown
interface g0/1
ip address 192.168.1.129 255.255.255.128
no shutdown
end
STEP 5 β TEST
Same subnet:
ping 192.168.1.20
β works
Different subnet:
ping 192.168.1.130
β works via router
π§ PART 7 β EXPLAIN LIKE A PRO
π You can say:
βAn IP address is divided into network and host portions based on the subnet mask. Subnetting allows us to split a large network into smaller networks. For example, a /24 network can be divided into two /25 subnets by borrowing one bit. Each subnet has its own range of usable IP addresses. This improves organization, scalability, and security.β
π₯ BONUS β VISUAL EXPLANATION (VERY POWERFUL)
Think:
/24 = one big apartment building
/25 = two floors
/26 = four floors
Each split:
2^n networks
Top comments (0)