Soru

Zorluk: KolayVPC Connectivity and Routing Troubleshooting

A SysOps administrator has created a new subnet within a VPC and launched a test Amazon EC2 instance inside it. The instance is assigned a public IPv4 address, and its security group allows all outbound traffic. However, the administrator is unable to connect to the internet from the instance. Upon checking the subnet's associated route table, the administrator notices it only contains the default local route.

Which route must be added to the route table to enable internet access from this subnet?

  1. A
    A route with a destination of 0.0.0.0/00.0.0.0/0 pointing to a Gateway VPC Endpoint.
  2. A route with a destination of 0.0.0.0/00.0.0.0/0 pointing to the Internet Gateway (IGW) attached to the VPC.Cevap
  3. C
    A route with a destination of 0.0.0.0/00.0.0.0/0 pointing to a NAT Gateway in a peered VPC.
  4. D
    An outbound Network Access Control List (NACL) rule that allows traffic to ports 8080 and 443443 while blocking ephemeral ports.

Cevap

A route with a destination of 0.0.0.0/00.0.0.0/0 pointing to the Internet Gateway (IGW) attached to the VPC.
To enable outbound and inbound internet access for EC2 instances with public IP addresses in a public subnet, the subnet's route table must include a default route (0.0.0.0/00.0.0.0/0) pointing to the Internet Gateway (IGW) attached to the VPC. This allows the VPC to route external traffic to and from the public internet.

Adım Adım Çözüm

1
Review the subnet's current route table rules.
The route table only contains the default local route (e.g., 10.0.0.0/1610.0.0.0/16 pointing to local).
To identify if a path to the internet is defined at the network routing layer.
2
Determine the appropriate target for internet-bound traffic in a public subnet.
An Internet Gateway (IGW) must be targeted for public subnets where instances have public IP addresses.
The IGW performs the necessary 1-to-1 NAT translation between the instance's private IP and its public IP, allowing direct communication with the internet.
3
Add the default route to the route table.
A route with destination 0.0.0.0/00.0.0.0/0 is added, pointing to the IGW ID (e.g., igw-xxxxxxxx).
This directs all non-local traffic to the Internet Gateway, enabling internet connectivity.

Anahtar Kavram

Configuring a public subnet route table with a route to an Internet Gateway (IGW) to enable internet connectivity for EC2 instances with public IP addresses.
Bu soruyu puanla