Design High-Performing Architectures
An application's subnet route table contains 0.0.0.0/0 to a NAT gateway, 10.40.0.0/16 to a transit gateway, and 10.40.8.0/24 to a VPC peering connection. Where does the VPC router send traffic destined for 10.40.8.25?
Show the answer
Correct answerD. The VPC peering connection
AWhy not this: The /16 route matches, but the /24 peering route is more specific.
BWhy not this: An attached internet gateway is not selected without an applicable route targeting it.
CWhy not this: The default route applies only when no more specific route matches the destination.
DWhy this is right: The destination matches 10.40.8.0/24, which is the longest matching prefix.
VPC routing uses the longest matching destination prefix. The 10.40.8.0/24 route to the peering connection is more specific than the matching /16 transit gateway route and the /0 default route.