- 2074 Asoj
Classful and classless addressing
Short answer
Classful addressing divides IPv4 into fixed classes A-E with rigid network/host boundaries, causing address waste. Classless (CIDR) uses variable prefix lengths (/n) allowing any block size, enabling VLSM and route aggregation to reduce routing tables and conserve addresses. Example: 192.168.8.0/22 provides 1024 addresses with mask 255.255.252.0.
What is classful and classless address?
Classful addressing
In classful IPv4 addressing the 32-bit address space is divided into five fixed classes (A to E). The network part (netid) and host part (hostid) have a fixed boundary by class, identified by the leading bits.
| Class | First bits | First octet | Netid / Hostid | Default mask | Hosts per network |
|---|---|---|---|---|---|
| A | 0 | 1 to 126 | 8 / 24 | 255.0.0.0 | 16,777,214 |
| B | 10 | 128 to 191 | 16 / 16 | 255.255.0.0 | 65,534 |
| C | 110 | 192 to 223 | 24 / 8 | 255.255.255.0 | 254 |
| D | 1110 | 224 to 239 | Multicast | ||
| E | 1111 | 240 to 255 | Reserved |
Problem: it is wasteful. A company needing 500 hosts gets a class B (65,534 hosts) and the rest are wasted, so the address space was soon exhausted.
Classless addressing (CIDR)
In classless addressing (Classless Inter-Domain Routing), the classes are ignored. A block of addresses of any size (power of 2) is given, and the prefix length is written as /n: for example 192.168.8.0/22 (1,024 addresses, 192.168.8.0 to 192.168.11.255). The mask can be any length from /0 to /32, so the network/host boundary can be anywhere.
- Block size is 2^(32 − n); the first address must be divisible by the block size.
- Allows VLSM and route aggregation (supernetting), which reduces routing table size.
- Saves addresses: 500 hosts needs a /23 (512 addresses).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Need of classless IP addressing · Computer Networks and Security, chapter 4