The GATE Grind

GATE 2025 CS (CS1) – Question 40

Computer Networks · Routing: Distance Vector and Link State Routing · 2 marks · Multiple choice

A packet with the destination IP address 145.36.109.70 arrives at a router whose routing table is shown. Which interface will the packet be forwarded to?

Subnet Address | Subnet Mask | Interface
145.36.0.0 | /16 | E1
145.36.128.0 | /17 | E2
145.36.64.0 | /18 | E3
145.36.255.0 | /24 | E4
Default | -- | E5

  1. E3
  2. E1
  3. E2
  4. E5

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) E3

Explanation

Destination: $145.36.109.70$. Compare the third octet $109=01101101_2$ with each entry.

EntryPrefix covers third octetMatch?
145.36.0.0/16anyyes
145.36.128.0/17128–255no
145.36.64.0/1864–127yes (109 is in 64–127)
145.36.255.0/24exactly 255no

Two entries match: the /16 and the /18. Routers use **longest prefix match**, so the /18 entry wins: interface **E3**.

More Routing: Distance Vector and Link State Routing questions

All Routing: Distance Vector and Link State Routing questions →