edited by
92,928 views
57 57 votes

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{eth$0$} \\\hline\text {144.16.64.0} &  \text{255.255.224.0} & \text{eth$1$} \\\hline\text {144.16.68.0} &  \text{255.255.255.0} & \text{eth$2$}\\\hline \text {144.16.68.64} &  \text{255.255.255.224} & \text{eth$3$}\\\hline\end{array}

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

  1. eth$0$
  2. eth$1$
  3. eth$2$
  4. eth$3$

11 Answers

0 0 votes

 

Destination IP Address (144.16.68.117):

  • 144 = 10010000

  • 16 = 00010000

  • 68 = 01000100

  • 117 = 01110101

  • Complete Binary IP: 10010000.00010000.01000100.01110101


 

Step-by-Step Analysis (Binary)

 

We will now perform the logical AND operation for each entry in the routing table, from the most specific mask to the least specific.

 

Entry 1: eth3

 

  • Destination: 144.16.68.64 (10010000.00010000.01000100.01000000)

  • Mask: 255.255.255.224 (11111111.11111111.11111111.11100000)

  • Destination IP (144.16.68.117): 10010000.00010000.01000100.01110101

  • Logical AND:

    • 10010000.00010000.01000100.01110101 AND 11111111.11111111.11111111.11100000

    • Result: 10010000.00010000.01000100.01100000 (144.16.68.96)

  • Comparison: The result of the logical AND (144.16.68.96) does not match the destination network address (144.16.68.64).


 

Entry 2: eth2

 

  • Destination: 144.16.68.0 (10010000.00010000.01000100.00000000)

  • Mask: 255.255.255.0 (11111111.11111111.11111111.00000000)

  • Destination IP (144.16.68.117): 10010000.00010000.01000100.01110101

  • Logical AND:

    • 10010000.00010000.01000100.01110101 AND 11111111.11111111.11111111.00000000

    • Result: 10010000.00010000.01000100.00000000 (144.16.68.0)

  • Comparison: The result of the logical AND (144.16.68.0) matches the destination network address (144.16.68.0). This is a valid route.


 

Entry 3: eth1

 

  • Destination: 144.16.64.0 (10010000.00010000.01000000.00000000)

  • Mask: 255.255.224.0 (11111111.11111111.11100000.00000000)

  • Destination IP (144.16.68.117): 10010000.00010000.01000100.01110101

  • Logical AND:

    • 10010000.00010000.01000100.01110101 AND 11111111.11111111.11100000.00000000

    • Result: 10010000.00010000.01000000.00000000 (144.16.64.0)

  • Comparison: The result of the logical AND (144.16.64.0) matches the destination network address (144.16.64.0). This is also a valid route.


 

Entry 4: eth0

 

  • Destination: 144.16.0.0 (10010000.00010000.00000000.00000000)

  • Mask: 255.255.0.0 (11111111.11111111.00000000.00000000)

  • Destination IP (144.16.68.117): 10010000.00010000.01000100.01110101

  • Logical AND:

    • 10010000.00010000.01000100.01110101 AND 11111111.11111111.00000000.00000000

    • Result: 10010000.00010000.00000000.00000000 (144.16.0.0)

  • Comparison: The result of the logical AND (144.16.0.0) matches the destination network address (144.16.0.0). This is also a valid route.


 

Final Decision

 

We have three valid routes: eth2, eth1, and eth0. To find the best route, we apply the longest prefix match rule. This means we choose the entry with the longest subnet mask.

  • eth2 mask: 255.255.255.0 (24 bits)

  • eth1 mask: 255.255.224.0 (19 bits)

  • eth0 mask: 255.255.0.0 (16 bits)

The longest prefix is 24 bits, which corresponds to the mask 255.255.255.0. Therefore, the router will choose the interface associated with this entry.

The correct interface is eth2.

–5 –5 votes
Answer: D

Select the longest mask as the packet is eligible to be forwarded to all interfaces.
Answer:
Position:
Show:

Related questions

92 92 votes
11 answers 11 answers
22.4k
22.4k views
Ishrat Jahan asked Nov 1, 2014
22,385 views
A subnetted Class $B$ network has the following broadcast address: $144.16.95.255$Its subnet maskis necessarily $255.255.224.0$is necessarily $255.255.240.0$is necessaril...
9 9 votes
2 answers 2 answers
7.0k
7.0k views
go_editor asked Jun 19, 2016
6,960 views
In a class B subnet, we know the IP address of one host and the mask as given below:IP address $: 125.134.112.66$Mask $: 255.255.224.0$What is the first address(Network a...
31 31 votes
2 answers 2 answers
10.6k
10.6k views
Ishrat Jahan asked Nov 1, 2014
10,563 views
The wait and signal operations of a monitor are implemented using semaphores as follows. In the following,$x$ is a condition variable,mutex is a semaphore initialized to ...
106 106 votes
9 answers 9 answers
42.0k
42.0k views
Rucha Shelke asked Sep 17, 2014
42,009 views
Consider the following log sequence of two transactions on a bank account, with initial balance $12000,$ that transfer $2000$ to a mortgage payment and then apply a $5\%$...