Classful vs Classless Addressing: What is the Difference?
Understand the difference between classful (Class A/B/C) and classless CIDR addressing, and why CIDR replaced the old system.
Expected Interview Answer
Classful addressing divides the IPv4 space into fixed-size classes (A, B, C) with rigid boundaries determined by the leading bits of the address, while classless addressing (CIDR) uses an explicit prefix length so networks can be any size, eliminating the massive address waste classful design caused.
Under the old classful scheme, Class A networks got a fixed /8 mask (16 million hosts), Class B got /16 (65,536 hosts), and Class C got /24 (254 hosts) โ an organization needing 300 hosts had to take a wasteful Class B block, throwing away over 65,000 unused addresses, or squeeze into two Class C blocks awkwardly. Classless Inter-Domain Routing (CIDR), introduced in 1993, replaced this by letting the prefix length be any value from /1 to /32, so a network can be sized to fit exactly what is needed (e.g., a /27 for 30 hosts). CIDR also enabled route aggregation (supernetting) since networks no longer had to fall on rigid class boundaries. This flexibility was essential to slowing IPv4 exhaustion and is why virtually all modern routing, from ISPs to home routers, is classless today; the term "Class C block" survives only as informal shorthand, not as an enforced rule.
- Eliminates massive address waste from rigid class boundaries
- Lets network size match actual host-count needs precisely
- Enables route aggregation across arbitrary prefix boundaries
- Slowed IPv4 exhaustion and underpins modern internet routing
AI Mentor Explanation
Classful addressing is like a stadium that only sells tickets in fixed blocks of exactly 100, 1,000, or 10,000 seats regardless of how many fans actually want to attend, wasting thousands of empty seats when only 300 fans show up. Classless addressing is like a modern box office that can issue exactly 300 tickets, no more, no less, matching supply to demand precisely. The old rigid seating tiers map to Class A/B/C, while the flexible ticket count maps to CIDR prefix lengths. This flexibility is why nearly every ground now sells tickets the classless way.
Step-by-Step Explanation
Step 1
Classful era
IPv4 addresses were split into fixed Class A (/8), B (/16), and C (/24) blocks based on leading bits.
Step 2
The waste problem
An organization needing a few hundred hosts often had to take a much larger, mostly-empty class block.
Step 3
CIDR introduced
In 1993, CIDR replaced fixed classes with an explicit prefix length that can be any value from /1 to /32.
Step 4
Right-sized allocation
Networks are now sized to actual need, and CIDR also enables route aggregation across non-class boundaries.
What Interviewer Expects
- Correctly explains Class A/B/C fixed boundaries and their host counts
- Explains why classful addressing wastes address space
- Knows CIDR replaced classful addressing with variable prefix lengths
- Connects CIDR to both efficient allocation and route aggregation
Common Mistakes
- Thinking Class A/B/C designations still functionally govern routing today
- Not knowing the year/motivation CIDR was introduced (exhaustion pressure)
- Confusing classless addressing with private vs public addressing
- Forgetting CIDR also enables supernetting/route aggregation
Best Answer (HR Friendly)
โClassful addressing was the original system that carved the internet into fixed-size chunks โ small, medium, and huge โ which wasted enormous numbers of addresses when a company only needed a few hundred. Classless addressing, or CIDR, replaced that with a flexible system where a network can be sized to fit exactly what is needed, which is a big part of why the internet was able to keep growing efficiently.โ
Code Example
# Classful Class C default mask would always be /24 (254 hosts)
# regardless of actual need -- wasteful for a 30-host office
# Classless CIDR sizes the network to fit exactly 30 hosts
ipcalc 192.168.1.0/27
# Netmask: 255.255.255.224 = 27
# HostMin: 192.168.1.1
# HostMax: 192.168.1.30
# Broadcast: 192.168.1.31
# Modern routers only understand CIDR prefixes, not legacy classes
ip route add 192.168.1.0/27 via 10.0.0.1Follow-up Questions
- What year was CIDR introduced and what problem did it solve?
- How do Class A, B, and C default masks differ?
- How does CIDR enable route summarization/supernetting?
- Why do we still informally say "Class C block" today?
MCQ Practice
1. What is the default mask for a classful Class B network?
Class B networks use a fixed /16 mask, providing about 65,536 addresses.
2. What core problem did CIDR solve compared to classful addressing?
CIDR let networks be sized precisely, eliminating the waste of rigid class boundaries.
3. Which range of prefix lengths does classless (CIDR) addressing allow?
CIDR allows any prefix length from /1 to /32, unlike the fixed classful boundaries.
Flash Cards
Classful addressing? โ Fixed-size Class A (/8), B (/16), C (/24) network blocks based on leading address bits.
Classless addressing? โ CIDR, where the prefix length can be any value from /1 to /32, sized to actual need.
Why was CIDR introduced? โ To stop the massive address waste and routing table bloat caused by rigid classful blocks.
CIDR side benefit? โ It enables route aggregation (supernetting) across arbitrary prefix boundaries.