edited by
463 views
0 votes
0 votes

The routing table of a router  is shown below:
$$\begin{array}{|l|l|l|} \hline \textbf {Destination} & \textbf {Subnet Mask} & \textbf{Interface}  \\\hline \text {128.75.43.0} &  \text{255.255.255.0} & \text{Eth0} \\\hline\text {128.75.43.0} &  \text{255.255.255.128} & \text{Eth1} \\\hline\text {192.12.17.5} &  \text{255.255.255.255} & \text{Eth3}\\\hline \text {default} &  \text{Eth2} & \\\hline\end{array}$$


On which interfaces will the router forward packets addressed to destinations $128.75.43.16$ and $192.12.17.10$ respectively?

  1. Eth$1$ and Eth$2$
  2. Eth$0$ and Eth$2$
  3. Eth$0$ and Eth$3$
  4. Eth$1$ and Eth$3$
edited by

1 Answer

0 votes
0 votes

( A)  Eth1 and Eth2 …..

 

To find the interface,

we need to do AND of incoming IP address and Subnet mask. Compare the result of AND with the destination.

Note that if there is a match between multiple Destinations, then we need to select the destination with longest length subnet mask.

128.75.43.16, matches with 128.75.43.0 and 128.75.43.0, the packet is forwarded to Eth1 as length of subnet mask in Eth11 is more….

If a result is not matching with any of the given destinations then the packet is forwarded to the default interface (here Eth2)….

Therefore the packet’s addressed to 192.12.17.10 will be forwarded to Eth2….

 

Related questions

1 votes
1 votes
0 answers
4
soujanyareddy13 asked Apr 12, 2022
877 views
Match the following:$$\begin{array} {ll} \qquad \quad\textbf{List-I} & \qquad \quad \textbf{List-II} \\ \text{(P) Condition coverage} & \text{(1) Black-box testing} \\ \t...