Skip to content
Official PYQ · 2022

GATE CS 2022 Q45 — Fragmentation and IP Addressing, IPv4, CIDR

Explain with AI

Consider routing table of an organization’s router shown below:

Subnet NumberSubnet MaskNext Hop12.20.164.0255.255.252.0R112.20.170.0255.255.254.0R212.20.168.0255.255.254.0Interface 012.20.166.0255.255.254.0Interface 1defaultR3\begin{array} {|l|l|l|} \hline \text{Subnet Number} & \text{Subnet Mask} & \text{Next Hop} \\ \hline 12.20.164.0 & 255.255.252.0 & \text{R1} \\ \hline 12.20.170.0 & 255.255.254.0 & \text{R2} \\ \hline 12.20.168.0 & 255.255.254.0 & \text{Interface 0} \\ \hline 12.20.166.0 & 255.255.254.0 & \text{Interface 1} \\ \hline \text{default} & & \text{R3} \\ \hline \end{array}

Which of the following prefixes in CIDR\text{CIDR} notation can be collectively used to correctly aggregate all of the subnets in the routing table?

Select all correct options
View worked solution

Answer: B;D

To find the CIDR prefixes that collectively aggregate all the subnets, let us determine the IP address range for each subnet in the routing table:

  1. Subnet 1: 12.20.164.012.20.164.0 with mask 255.255.252.0255.255.252.0 (/22)
    Range: 12.20.164.012.20.164.0 to 12.20.167.25512.20.167.255
  2. Subnet 4: 12.20.166.012.20.166.0 with mask 255.255.254.0255.255.254.0 (/23)
    Range: 12.20.166.012.20.166.0 to 12.20.167.25512.20.167.255
    Note: This range is completely contained within Subnet 1. Thus, the prefix 12.20.164.0/2212.20.164.0/22 (Option B) aggregates both Subnet 1 and Subnet 4.
  3. Subnet 3: 12.20.168.012.20.168.0 with mask 255.255.254.0255.255.254.0 (/23)
    Range: 12.20.168.012.20.168.0 to 12.20.169.25512.20.169.255
  4. Subnet 2: 12.20.170.012.20.170.0 with mask 255.255.254.0255.255.254.0 (/23)
    Range: 12.20.170.012.20.170.0 to 12.20.171.25512.20.171.255

Combining the ranges of Subnet 3 and Subnet 2 gives the continuous block 12.20.168.012.20.168.0 to 12.20.171.25512.20.171.255. This block is represented by the aggregated prefix 12.20.168.0/2212.20.168.0/22 (Option D).

Together, the prefixes 12.20.164.0/2212.20.164.0/22 and 12.20.168.0/2212.20.168.0/22 precisely cover the entire range of all four subnets without including any external addresses.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Fragmentation and IP Addressing, IPv4, CIDR questions