GATE / CS ARCHIVE

GATE CSE 2022 / QUESTION 55

GATE CSE 2022 Q55

Computer Networks · Routing Algorithms · Full GATE CSE 2022 paper

GATE 2022, Q55 2 marks · MSQ
Report issue

Routing Algorithms

Question 55, GATE 2022: Routing entries are 12.20.164.0 mask 255.255.252.0→R1; 12.20.170.0 mask 255.255.254.0→R2; 12.20.168.0 with /23→interface 0; 12.20.166.0 with /23→interface 1; default→R3. Which offered prefixes collectively aggregate the nondefault address set? A 12.20.164.0/20; B 12.20.164.0/22; C 12.20.164.0/21; D 12.20.168.0/22.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B,D

The nondefault entries cover third-octet ranges 164-167, 170-171, 168-169 and 166-167. Their union is exactly 164-171. It is covered by the two aligned prefixes 12.20.164.0/22 (164-167) and 12.20.168.0/22 (168-171), giving B, D. A /21 containing 164 begins at 160 and covers 160-167; a /20 containing it begins at 160 and covers 160-175. The offered /21 and /20 addresses are not canonical network starts and would include extra destinations when masked. This answer describes address-set aggregation, not replacing all forwarding entries with two routes while preserving their different next hops; the more-specific routes are still needed for those next-hop distinctions.

A /22 fixes the top six bits of the third octet, so its network begins on a multiple of four and covers four consecutive values. Ranges 164–167 and 168–171 straddle a /21 boundary and cannot be replaced by the offered /21 without changing the address set. Longest-prefix forwarding details remain distinct from this coverage calculation.

Original paper, page 37 · Answer key