Consider routing table of an organization’s router shown below: Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2022 · Q55
Time

Select all that applyOne or more correct
Solution
Official answer: B) 12.20.164.0/22; D) 12.20.168.0/22
CIDR NotationTo find the aggregated CIDR prefixes, let us determine the range of IP addresses represented by each subnet entry in the third octet (since the first two octets are identical):
Subnet 1:12.20.164.0 with mask 255.255.252.0 (/22)
Number of third-octet values
Range: to
Subnet 2:12.20.170.0 with mask 255.255.254.0 (/23)
Number of third-octet values
Range: to
Subnet 3:12.20.168.0 with mask 255.255.254.0 (/23)
Range: to
Subnet 4:12.20.166.0 with mask 255.255.254.0 (/23)
Range: to (subsumed within Subnet 1)
Combining all subnets, the total address space spans from to (a total of consecutive blocks in the third octet: through ):
The block to forms the CIDR block 12.20.164.0/22 (Option B).
The block to forms the CIDR block 12.20.168.0/22 (Option D).
Together, they collectively aggregate all the subnets.
Option A (12.20.164.0/20) and Option C (12.20.164.0/21) are invalid CIDR prefixes because is not a valid starting boundary for (multiple of ) or (multiple of ).
Therefore, options B and D are correct.
Try the question first, then check your work.
Examiner trap
Analyze the address ranges for each subnet in the third octet and find which valid power-of-two blocks cover the range from to .
This CIDR Notation previous year question is Q55 of the GATE CSE 2022 paper. Find more GATE CSE PYQs on CIDR Notation in Computer Networks, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related CIDR Notation PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
CIDR Notation has 7 GATE CSE PYQs across 7 papers from 2022 to 2026. 2 of them are 2-mark MSQs like this one, and it is the only one in GATE CSE 2022.
How GATE tests CIDR NotationIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.