Similar questions 5 more →
Routing Algorithms

Answer & solution
Official answer: A
Step through it (6 steps)
Longest-prefix matching sends 171.92 through 170.0/23 to interface 0; 167.151 matches 166.0/23 and 164.0/22, choosing the longer/23 to R2; 163.151 matches only default R4; 165.121 matches 164.0/22 to R3. Thus i-a, ii-c, iii-e, iv-d, A.
A /23 mask covers two adjacent third-octet values, so 170.0/23 covers 170–171 and 166.0/23 covers 166–167. A /22 mask starting 164 covers 164–167. Thus 171 uses interface 0; 167 matches both R2 and R3 but the longer/23 wins; 163 matches neither specific block and uses default R4; 165 matches only 164/22 and uses R3. Never stop at the first matching broad prefix without checking whether a more specific one exists.