Computer Networks · TEE · papers
Q1(c) · Classful versus classless addressing
2024-12-06 · AI-only Sem V variant
Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.
Q1(c). Explain classful IPv4 addressing and its advantages and disadvantages compared with classless addressing. [5 marks]
Answer
An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.
| Class | First octet | Default mask | Network / host split | Purpose |
|---|---|---|---|---|
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |
Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.
| Classful | CIDR/classless |
|---|---|
| Fixed A/B/C boundaries /8,/16,/24 | Prefix length explicitly states any suitable network boundary |
| Simple historical classification | Flexible allocation and aggregation |
| Wastes addresses when demand lies between fixed classes | Matches sizes more closely, reducing waste |
| Network determined partly by leading bits | Network determined by prefix mask |
Example: an organization needing roughly1000 addresses can receive a /22 block (1024 addresses) rather than an entire old ClassB /16. Classless routing relies on the prefix length; the first octet alone is insufficient. Advantages of CIDR are flexible allocations, less address wastage and route aggregation. Disadvantages are more involved prefix/mask planning and longest-prefix lookup; badly fragmented allocations may prevent aggregation.