Bird
0
0

How should you configure the route tables?

hard📝 Best Practice Q15 of 15
AWS - VPC Fundamentals
You have two subnets: Subnet A (10.0.1.0/24) and Subnet B (10.0.2.0/24). You want instances in Subnet A to access the internet via a NAT gateway in Subnet B, but Subnet B should not have direct internet access. How should you configure the route tables?
AAssociate Subnet A's route table with 0.0.0.0/0 to the NAT gateway; Subnet B's route table with no route to internet gateway
BAssociate Subnet A's route table with 0.0.0.0/0 to the internet gateway; Subnet B's route table with 0.0.0.0/0 to the NAT gateway
CAssociate both subnets' route tables with 0.0.0.0/0 to the internet gateway
DAssociate Subnet A's route table with a route 0.0.0.0/0 to the NAT gateway; Subnet B's route table with 0.0.0.0/0 to the internet gateway
Step-by-Step Solution
Solution:
  1. Step 1: Understand NAT gateway purpose

    NAT gateway allows instances in private subnet (Subnet A) to access internet outbound.
  2. Step 2: Configure Subnet B's route table (NAT subnet)

    Subnet B must have 0.0.0.0/0 to internet gateway so NAT can reach internet. Direct access for instances in B can be restricted via security groups.
  3. Step 3: Configure Subnet A's route table

    Subnet A has 0.0.0.0/0 to NAT gateway.
  4. Final Answer:

    Associate Subnet A's route table with a route 0.0.0.0/0 to the NAT gateway; Subnet B's route table with 0.0.0.0/0 to the internet gateway -> Option D
  5. Quick Check:

    Private to NAT; NAT subnet to igw [OK]
Quick Trick: Private subnet (A) routes to NAT; NAT subnet (B) routes to igw [OK]
Common Mistakes:
MISTAKES
  • Omitting igw route in NAT subnet (B), breaking NAT functionality
  • Routing private subnet (A) directly to igw
  • Confusing NAT gateway and internet gateway roles

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes