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)
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)
| Class | Range | Default | Private |
|---|---|---|---|
| A | 1β126 | /8 | 10.0.0.0/8 |
| B | 128β191 | /16 | 172.16.0.0/12 |
| C | 192β223 | /24 | 192.168.0.0/16 |
| D | 224β239 | β | Multicast |
| E | 240β255 | β | Reserved |
127.x.x.x = Loopback (not assignable)
CIDR Reference Table (/8 β /30)
Complete subnet mask, wildcard, block size, and host count reference
| Prefix | Subnet Mask | Wildcard | Block Size | Hosts/Subnet | Subnets 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
| Subnet | Network | / | Hosts |
|---|---|---|---|
| LAN A | 192.168.5.0 | 25 | 126 |
| LAN B | 192.168.5.128 | 26 | 62 |
| LAN C | 192.168.5.192 | 27 | 30 |
| WAN | 192.168.5.224 | 30 | 2 |
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
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ΒΉ2
2Β²4
2Β³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
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