Question:

Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination IP address matches the prefix. The notation “/N” in a prefix indicates a subnet mask with the most significant \( N \) bits set to 1. \begin{center} \begin{tabular}{|c|c|} \hline Prefix & Next hop router
\hline 10.1.1.0/24 & R1
10.1.1.128/25 & R2
10.1.1.64/26 & R3
10.1.1.192/26 & R4
\hline \end{tabular} \end{center} This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are \( 10.1.1.16 \), \( 10.1.1.72 \), \( 10.1.1.132 \), \( 10.1.1.191 \), and \( 10.1.1.205 \). The number of packets forwarded via the next hop router \( R2 \) is \_\_\_\_\_.

Updated On: Jan 22, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Match each IP address to a prefix.
- \( 10.1.1.16 \): Matches \( 10.1.1.0/24 \) (R1).
- \( 10.1.1.72 \): Matches \( 10.1.1.64/26 \) (R3).
- \( 10.1.1.132 \): Matches \( 10.1.1.128/25 \) (R2).
- \( 10.1.1.191 \): Matches \( 10.1.1.128/25 \) (R2).
- \( 10.1.1.205 \): Matches \( 10.1.1.192/26 \) (R4).
Step 2: Count packets forwarded via \( R2 \). 20 packets are forwarded to each host. The hosts \( 10.1.1.132 \) and \( 10.1.1.191 \) are forwarded via \( R2 \): \[ 20 \, (\text{to } 10.1.1.132) + 20 \, (\text{to } 10.1.1.191) = 40. \] Final Answer: \[ \boxed{40} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions