GateAI
CIDR Notation

GATE CSE 2022 · Q55

MSQ2 marksMedium

Time

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?

GATE CSE 2022 Q55 diagram

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: B) 12.20.164.0/22; D) 12.20.168.0/22

CIDR Notation

To 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 12.2012.20 are identical):

  1. Subnet 1:12.20.164.0 with mask 255.255.252.0 (/22)

    • Number of third-octet values =256−252=4= 256 - 252 = 4

    • Range: 12.20.164.012.20.164.0 to 12.20.167.25512.20.167.255

  2. Subnet 2:12.20.170.0 with mask 255.255.254.0 (/23)

    • Number of third-octet values =256−254=2= 256 - 254 = 2

    • Range: 12.20.170.012.20.170.0 to 12.20.171.25512.20.171.255

  3. Subnet 3:12.20.168.0 with mask 255.255.254.0 (/23)

    • Range: 12.20.168.012.20.168.0 to 12.20.169.25512.20.169.255

  4. Subnet 4:12.20.166.0 with mask 255.255.254.0 (/23)

    • Range: 12.20.166.012.20.166.0 to 12.20.167.25512.20.167.255 (subsumed within Subnet 1)

Combining all subnets, the total address space spans from 12.20.164.012.20.164.0 to 12.20.171.25512.20.171.255 (a total of 88 consecutive blocks in the third octet: 164164 through 171171):

  • The block 12.20.164.012.20.164.0 to 12.20.167.25512.20.167.255 forms the CIDR block 12.20.164.0/22 (Option B).

  • The block 12.20.168.012.20.168.0 to 12.20.171.25512.20.171.255 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 164164 is not a valid starting boundary for /20/20 (multiple of 1616) or /21/21 (multiple of 88).

Therefore, options B and D are correct.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

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

Where do you stand for GATE?

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.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

CIDR Notation in GATE CSE

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 Notation

More from GATE CSE 2022

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2022 · Q55 · MSQ

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

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.