GATE | GATE CS 2020 | Question 48

An organization requires a range of IP address to assign one to each of its 1500 computers. The organization has approached an Internet Service Provider (ISP) for this task. The ISP uses CIDR and serves the requests from the available IP address space 202.61.0.0/17. The ISP wants to assign an address space to the organization which will minimize the number of routing entries in the ISP’s router using route aggregation. Which of the following address spaces are potential candidates from which the ISP can allot any one of the organization ?

I. 202.61.84.0 / 21
II. 202.61.104.0 / 21
III. 202.61.64.0 / 21
IV. 202.61.144.0 / 21 

(A) I and II only
(B) II and III only
(C) III and IV only
(D) I and IV only


Answer: (B)

Explanation: Subnet Mask for given IP address:

202.61.0.0/17 
⇒ 11111111 11111111 10000000 00000000
⇒ 255.255.128.0 

Now, since we need 1500 hosts, so, bits for host address,

= ceiling (log2 (1500)) 
= ceiling (10.55) 
= 11 bits for host address 

So, last 11 bits will for in host addresses:

00000000.00000000 → 00000111.11111111 (0.0  →  7.255)

00001000.00000000 → 00010000.00000000 (8.0 - 15.255)

00001111.11111111 → 00010111.11111111 (16.0 - 23.255) 

Sequence is 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 96, 104, 112, 120.

Hence 64 and 104 is present in sequence so it is the possible IP addresses.

So option (B) is correct.


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.