Soru

Zorluk: KolayVPC Connectivity and Routing Troubleshooting

A SysOps administrator launches an Amazon EC2 instance in a subnet that is intended to be public. However, the instance is unable to send or receive traffic from the internet. Which two configurations should the administrator verify to resolve this connectivity issue?

  1. Verify that the subnet's route table contains a route for 0.0.0.0/00.0.0.0/0 pointing to the VPC's Internet Gateway (IGW).Cevap
  2. Verify that the EC2 instance has been assigned a public IPv4 address or an Elastic IP address.Cevap
  3. C
    Verify that a Virtual Private Gateway (VGW) is attached to the VPC and configured as the target for the 0.0.0.0/00.0.0.0/0 route.
  4. D
    Configure the subnet's Network Access Control List (NACL) to allow outbound traffic to 0.0.0.0/00.0.0.0/0 on ports 80 and 443, while blocking ephemeral ports.
  5. E
    Create an AWS Gateway VPC Endpoint for the internet and associate it with the subnet's route table.

Cevap

To resolve the connectivity issue, the administrator must verify that the subnet's route table contains a route for 0.0.0.0/00.0.0.0/0 targeting the Internet Gateway, and verify that the EC2 instance is assigned a public IPv4 address or an Elastic IP address.
For an EC2 instance in a public subnet to communicate with the internet, the subnet's route table must route all non-local traffic (0.0.0.0/00.0.0.0/0) to an attached Internet Gateway, and the instance must have a public IP address (either auto-assigned or an Elastic IP) so the Internet Gateway can translate it to the private IP.

Adım Adım Çözüm

1
Check the route table associated with the subnet of the EC2 instance.
Ensure there is a route with a destination of 0.0.0.0/00.0.0.0/0 pointing to the VPC's Internet Gateway (igw-xxxx).
Without an Internet Gateway target in the route table, the subnet behaves as a private subnet.
2
Check the network configuration of the EC2 instance.
Verify that a public IPv4 address or Elastic IP is assigned to the primary network interface.
An instance needs a public IP to allow the Internet Gateway to perform one-to-one NAT for internet communications.

Anahtar Kavram

Basic public subnet configuration and internet routing requirements
Bu soruyu puanla