GATE CSE 2023 Q65: Longest prefix match for 200.150.68.118
- Computer Networks
- 2 marks
- NAT
- No negative marking
Question
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 _______.
Try it: numerical answer: type the value
Numerical answer. No negative marking.
Show answer and explanation
Answer: 3 (official GATE 2023 final answer key)
Concept used: Routers forward on the longest matching prefix.
First step: AND the address with each mask, starting from the longest (/27), and compare with the subnet number.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2023 CS question paper and final answer key, organised by IIT Kanpur. Question paper · Answer key
More Computer Networks PYQs
- 2026 Session 1 · Q18True statement about TCP connection setup and closing
- 2026 Session 1 · Q19HTTP 1.1 persistent connections and pipelining
- 2026 Session 1 · Q44When segment 2000 is sent under TCP slow start
- 2026 Session 1 · Q45Minimum sliding window size for full link utilisation
- 2026 Session 1 · Q56Valid CIDR blocks for 6000 addresses inside 202.16.0.0/15
- 2026 Session 2 · Q21File transfer time over three links of different bandwidth