GATE / CS ARCHIVE

GATE CSE 2008 / QUESTION 57

Usable hosts under a /21 IPv4 mask

Computer Networks · IP Addressing, Fragmentation & Address Resolution · Full GATE CSE 2008 paper

GATE 2008, Q57 2 marks · MCQ
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 57, GATE 2008: A Class B network uses subnet mask 255.255.248.0. What is the maximum number of hosts per subnet?

(A) 1022
(B) 1023
(C) 2046
(D) 2047
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step through it (3 steps)

Step 1: 255.255.248.0 has 8+8+5=21 leading one bits because 248=11111000₂. Thus 32−21=11 host bits remain.
Step 2: A subnet has 211=2048 addresses; reserving the all-zero host part for the subnet address and the all-one host part for broadcast leaves 2046 usable host addresses, option C. The original Class B label does not change the host count once the subnet mask is supplied.

Original paper, page 11