The GATE Grind

GATE 2022 CS – Question 55

Computer Networks · IPv4: Addressing, CIDR, Fragmentation and NAT · 2 marks · Multiple select

Consider routing table of an organization’s router shown below:
Subnet Number | Subnet Mask | Next Hop
12.20.164.0 | 255.255.252.0 | R1
12.20.170.0 | 255.255.254.0 | R2
12.20.168.0 | 255.255.254.0 | Interface 0
12.20.166.0 | 255.255.254.0 | Interface 1
default | | R3
Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?

  1. 12.20.164.0/20
  2. 12.20.164.0/22
  3. 12.20.164.0/21
  4. 12.20.168.0/22

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) 12.20.164.0/20; (B) 12.20.164.0/22; (D) 12.20.168.0/22

Explanation

Work in the third octet (the first two octets are 12.20).

The four subnets cover:
- 12.20.164.0/22: third octet 164–167
- 12.20.166.0/23: 166–167
- 12.20.168.0/23: 168–169
- 12.20.170.0/23: 170–171

Together they span third octet **164–171**.

Answer: A, B, D.

More IPv4: Addressing, CIDR, Fragmentation and NAT questions

All IPv4: Addressing, CIDR, Fragmentation and NAT questions →