GATE 2014 CS (CS3) – Question 36
A CIDR router receives a packet for 131.23.151.76. Routing entries (prefix → output interface) are 131.16.0.0/12 → 3; 131.28.0.0/14 → 5; 131.19.0.0/16 → 2; 131.22.0.0/15 → 1. Find the forwarding interface identifier.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 1 to 1
Explanation
131.23lies in the /12range131.16–31and the /15range131.22–23. It does not match131.28/14or131.19/16. Among matching entries,/15is longer, so forward on **interface1**. A longer nonmatching prefix cannot win.