Subnetting & IPv4 Addressing MODULE 01
0 / 20 topics
Interactive IPv4 Breakdown
Drag the slider to change prefix length. See how network/host bits shift in real time.
OCT 1
192
11000000
.
OCT 2
168
10101000
.
OCT 3
1
00000001
.
OCT 4
10
00001010
Prefix Length/24
IP Address
192.168.1.10
Subnet Mask
255.255.255.0
Network Address
192.168.1.0
First Host
192.168.1.1
Last Host / Broadcast
192.168.1.254
Usable Hosts
254
What is Subnetting?
Dividing a network into smaller logical segments

An IPv4 address is 32 bits. Subnetting borrows bits from the host portion to create more network segments with fewer hosts each.

Subnets = 2n  (n = borrowed bits)
Hosts/subnet = 2h − 2  (h = remaining host bits)

Subtract 2 for: Network address (all 0s) + Broadcast (all 1s)
Network addrHost bits all 0
Broadcast addrHost bits all 1
First hostNetwork + 1
Last hostBroadcast − 1
Block size256 − mask octet
IP Address Classes
Classful addressing & private ranges (RFC 1918)
ClassRangeDefaultPrivate
A1–126/810.0.0.0/8
B128–191/16172.16.0.0/12
C192–223/24192.168.0.0/16
D224–239Multicast
E240–255Reserved
127.x.x.x = Loopback (not assignable)
CIDR Reference Table (/8 – /30)
Complete subnet mask, wildcard, block size, and host count reference
PrefixSubnet MaskWildcardBlock SizeHosts/SubnetSubnets from /24
VLSM — Variable Length Subnet Masking
Efficiently allocating address space by using different prefix lengths per subnet
Rule: Sort requirements largest → smallest. Assign smallest /prefix that fits. Next subnet starts at previous broadcast + 1.
VLSM Example — 192.168.5.0/24
Requirements (sorted): LAN A: 100 hosts → /25 (126h) LAN B: 50 hosts → /26 (62h) LAN C: 25 hosts → /27 (30h) WAN: 2 hosts → /30 (2h) Assignments: 192.168.5.0/25 → .0 to .127 192.168.5.128/26 → .128 to .191 192.168.5.192/27 → .192 to .223 192.168.5.224/30 → .224 to .227
SubnetNetwork/Hosts
LAN A192.168.5.025126
LAN B192.168.5.1282662
LAN C192.168.5.1922730
WAN192.168.5.224302

Subnetting Drills

Calculate all 6 subnet parameters from a given IP/prefix.

0
Correct
0
Wrong
0
Streak 🔥
QUESTION 1 · CLASS C
Given this IP address and prefix, calculate all subnet details:
192.168.10.75 /27
Show hint

Packet Tracer Labs

Step-by-step walkthroughs following NetAcad CCNA 1 lab activities.

Network Topologies

Reference diagrams used in subnetting and addressing labs.

Subnetting Cheatsheet

🔑 THE BLOCK SIZE METHOD
Block = 256 − last non-255 mask octet
e.g. /27 → mask .224 → block = 256−224 = 32
Subnets: 0, 32, 64, 96, 128, 160, 192, 224
Host is in subnet where: Network ≤ Host < Next subnet
Prefix → Hosts
/24254
/25126
/2662
/2730
/2814
/296
/302
/1665,534
Mask → Block
.128 (/25)64 block
.128 (/25)128 block
.192 (/26)64 block
.224 (/27)32 block
.240 (/28)16 block
.248 (/29)8 block
.252 (/30)4 block
.0 /16 (3rd oct)256 block
Powers of 2
2⁰1
2
4
8
2⁴16
2⁵32
2⁶64
2⁷128
Step-by-Step Worked Example
Given: 172.16.35.123 /20 1. Mask: 255.255.240.0 2. Block: 256 - 240 = 16 (3rd octet) 3. Subnet series: 0, 16, 32, 48... 4. 35 falls in: 32 ≤ 35 < 48 → subnet = 172.16.32.0 5. Network: 172.16.32.0 6. Broadcast: 172.16.47.255 (32+16-1=47) 7. First host: 172.16.32.1 8. Last host: 172.16.47.254 9. Usable hosts: 2^12 - 2 = 4094
VLSM Steps
1. Sort: largest → smallest
2. Pick smallest /prefix ≥ hosts needed
3. Assign from .0
4. Next = broadcast + 1
5. Repeat for each subnet

Topic Checklist

Track your progress through subnetting concepts.

0%
Complete