The GATE Grind

GATE 2023 CS – Question 65

Computer Networks · IPv4: Addressing, CIDR, Fragmentation and NAT · 2 marks · Numerical answer

The forwarding table of a router is shown below.
Subnet Number / Subnet Mask / Interface ID:
200.150.0.0 / 255.255.0.0 / 1
200.150.64.0 / 255.255.224.0 / 2
200.150.68.0 / 255.255.255.0 / 3
200.150.68.64 / 255.255.255.224 / 4
Default / - / 0
A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID ______.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 3

Explanation

200.150.68.118 matches /16, /19 (range 64–95 in the third octet) and /24. It does not match 200.150.68.64/27, whose range is .64–.95. The longest matching prefix is /24, so interface 3.