---
title: "Need of classless IP addressing"
subject: "Computer Networks and Security"
chapter: 4
key: "semester_7/computer_networks_and_security:classless-need-example"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/classless-need-example
site: BCT Engineering
---

# Need of classless IP addressing

Computer Networks and Security · Chapter 4: Network Layer

- Asked in: 2071 Chaitra, 4+4 marks
- Video: [Lec-48: What is Classless Addressing (CIDR) in Hindi | CIDR vs Classful Addressing](https://www.youtube.com/watch?v=N-ywmOpWehE) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/classless-need-example
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-4

## Question

Why do we think that there arose the need of classless IP address although class based IP address was in use? Show the classless IP with an example.

## Short answer

Classful addressing wasted addresses (e.g., 1000 hosts needed Class B wasting 64k), exhausted address space, bloated routing tables, and prevented aggregation. Classless CIDR allows variable prefix lengths; example 200.23.16.0/22 gives 1024 addresses (mask 255.255.252.0) for 1000 hosts, aggregating four Class C networks into one routing entry.

## Answer

Class-based addressing divides the IPv4 space into fixed blocks (Class A /8, Class B /16, Class C /24). Classless addressing (CIDR, Classless Inter-Domain Routing) removes the fixed class boundaries and lets the network part be any length, written as *a.b.c.d/n*.

#### Why classless addressing was needed
1. **Wasted addresses.** An organisation needing 1,000 hosts is too big for a Class C (254 hosts) and received a Class B (65,534 hosts), wasting about 64,000 addresses.
2. **Address exhaustion.** Class A and B blocks were handed out quickly, and the 32-bit space was running out in the early 1990s.
3. **Huge routing tables.** Giving an organisation many separate Class C blocks added one routing entry per block, and backbone routers could not keep up.
4. **No aggregation.** Class-based addresses cannot be summarised, but CIDR blocks can be combined into one prefix (supernetting).
5. **Fixed sizes.** Only three block sizes exist; real needs (500, 1,000, 2,000 hosts) do not fit.

#### Classless IP with an example
An address block is given as a prefix and mask: the first *n* bits are the network prefix, the remaining 32 − n bits identify hosts.

Example: an ISP gives a company with 1,000 hosts the block **200.23.16.0/22**.

```text
Prefix length  : 22 bits  -> mask 255.255.252.0
Host bits      : 10       -> 2^10 = 1024 addresses
Network address: 200.23.16.0
Usable hosts   : 200.23.16.1 - 200.23.19.254
Broadcast      : 200.23.19.255
```

The block is equal to four Class C networks (200.23.16.0, .17.0, .18.0, .19.0). Outside routers keep **one** entry (200.23.16.0/22) instead of four. Only 22 usable host addresses are unused, instead of about 64,000 with a Class B.

| Point | Classful | Classless (CIDR) |
|---|---|---|
| Block size | /8, /16, /24 only | any /n |
| Mask | implied by first bits | always given with the address |
| Aggregation | not possible | possible |
| Wastage | high | low |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. A 1,000-host organisation under classful addressing gets:
   A. Class C
   B. Class B, wasting about 64,000 addresses
   C. Class A
   D. Two class Ds
   Answer: B. Class C is too small. (Key point: Waste)

2. How did classful allocation enlarge routing tables?
   A. Fewer entries
   B. Many separate Class C blocks each needed an entry
   C. Aggregation
   D. Masks
   Answer: B. CIDR aggregates them. (Key point: Routing tables)

3. What is the mask for /22?
   A. 255.255.255.0
   B. 255.255.252.0
   C. 255.255.248.0
   D. 255.255.254.0
   Answer: B. 22 bits = 255.255.252.0. (Key point: Example mask)

4. How many addresses are in 200.23.16.0/22?
   A. 256
   B. 512
   C. 1024
   D. 2048
   Answer: C. 2^10 = 1024, equal to four Class C networks. (Key point: Block size)

## Related in Computer Networks and Security

- [Classful and classless addressing](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aclassful-classless-address) — Computer Networks and Security, chapter 4
- [Why IP address when MAC exists](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Amac-vs-ip-address) — Computer Networks and Security, chapter 4
- [Class C pool for 32, 65, 10, 21, 9](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asubnetting-class-c-five-depts) — Computer Networks and Security, chapter 4, asked 2×
- [Class C pool for 10, 12, 8, 14](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asubnetting-class-c-four-depts) — Computer Networks and Security, chapter 4, asked 2×
- [Firewall, its need and types](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Afirewall-types-working) — Computer Networks and Security, chapter 8, asked 7×

## Related in other subjects

- [Why do we need DFT](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Awhy-need-dft) — Digital Signal Analysis and Processing, chapter 7, asked 6×
- [Why do we need FFT](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Awhy-need-fft) — Digital Signal Analysis and Processing, chapter 7, asked 2×
- [IANA, ICANN functions and IP address role](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aiana-icann-ip-role) — Internet and Intranet, chapter 1
- [VLSM preventing IP address loss](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Avlsm-prevents-ip-loss) — Internet and Intranet, chapter 2
