An IP router implementing Classless Inter-domain Routing (CIDR) receives a…

2014

An IP router implementing Classless Inter-domain Routing (CIDR) receives a packet with address 131.23.151.76. The router’s routing table has the following entries:

\(\begin{array}{|c|c|c|} \hline \textbf {Prefix} & \textbf {Outer Interface Identifier} \\\hline \text {131.16.0.0/12} & \text{3 } \\\hline \text{131.28.0.0/14} & \text{5} \\\hline \text{131.19.0.0/16} & \text{2} \\\hline \text{131.22.0.0/15} & \text{1} \\\hline \end{array}\)

The identifier of the output interface on which this packet will be forwarded is ______.

Attempted by 76 students.

Show answer & explanation

Correct answer: 1

Answer: The packet will be forwarded on output interface 1.

Reasoning (longest-prefix match):

  • 131.16.0.0/12 covers 131.16.0.0 through 131.31.255.255.

  • 131.28.0.0/14 covers 131.28.0.0 through 131.31.255.255.

  • 131.19.0.0/16 covers 131.19.0.0 through 131.19.255.255.

  • 131.22.0.0/15 covers 131.22.0.0 through 131.23.255.255.

The destination address 131.23.151.76 falls within the ranges of 131.16.0.0/12 and 131.22.0.0/15, but not within 131.28.0.0/14 or 131.19.0.0/16.

Between the matching prefixes, the /15 prefix is more specific (longer) than the /12 prefix, so the router uses the /15 entry.

Therefore the packet is forwarded on output interface 1.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir