Skip to content

ISRO Scientist/Engineer CSE 2015Computer Networks › IP Addressing and Subnetting

ISRO Scientist/Engineer CSE 2015 PYQ: A router uses the following routing table: $$\begin{array}{|l|l|l|} \hline \textbf {Destination} & \textbf {…

A router uses the following routing table:

$$\begin{array}{|l|l|l|} \hline \textbf {Destination} & \textbf { Mask} & \textbf{Interface} \\\hline \text {144.16.0.0} & \text{255.255.0.0} & \text{eth00} \\\hline\text {144.16.64.0} & \text{255.255.224.0} & \text{eth11} \\\hline\text {144.16.68.0} & \text{255.255.255.0} & \text{eth22}\\\hline \text {144.16.68.64} & \text{255.255.255.224} & \text{eth33}\\\hline\end{array}$$

Packet bearing a destination address $144.16.68.117$ arrives at the router. On which interface will it be forwarded?

  1. A
    eth 0
  2. B
    eth 1
  3. C
    eth 2
    Correct answer
  4. D
    eth 3

Answer

(C) eth $2$

Approach

For each routing table entry, compute the network address by ANDing the destination IP with the subnet mask. The packet is forwarded via the entry whose network address matches the destination, choosing the longest prefix (most specific mask) among all matches.

Reviewed by ISRO IQ Editorial Team.