Answer: 3
To determine the forwarding interface, we apply the Longest Prefix Match (LPM) rule. We perform a bitwise AND between the destination IP address 200.150.68.118 and each subnet mask to see which entries match.
-
Interface 1: Mask 255.255.0.0 (/16)
200.150.68.118 AND 255.255.0.0=200.150.0.0 (Match)
-
Interface 2: Mask 255.255.224.0 (/19)
68 in binary=010001002 and 224 in binary=111000002.
68 AND 224=64.
200.150.68.118 AND 255.255.224.0=200.150.64.0 (Match)
-
Interface 3: Mask 255.255.255.0 (/24)
200.150.68.118 AND 255.255.255.0=200.150.68.0 (Match)
-
Interface 4: Mask 255.255.255.224 (/27)
118 in binary=011101102 and 224 in binary=111000002.
118 AND 224=96.
200.150.68.118 AND 255.255.255.224=200.150.68.96=200.150.68.64 (No Match)
Comparing the matching prefixes, the longest mask is 255.255.255.0 (/24) corresponding to Interface 3.