You can't have two CIDR ranges and two private IPs with a NAT Gateway, right?

0

I assume the answer is "no" based on the following documentation, but just wanted to make sure:

You can pick the private IP address to assign to the NAT gateway or have it automatically assigned from the IP address range of the subnet. The assigned private IP address persists until you delete the private NAT gateway. You cannot detach the private IP address and you cannot attach additional private IP addresses.

Source: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-basics

AWS
질문됨 일 년 전690회 조회
1개 답변
1

Short Answer is: No Long Answer is: VPCs can have multiple CIDR ranges but a Subnet can only have a single IPv4 and IPv6 range assigned. As NAT devices have endpoints in the Subnet they can only be allocated a single IP per Subnet. Alternate Solution is: You could create multiple public subnets. The first set of subnets could be out of the primary CIDR and the second set of subnets with IPs out of the secondary CIDR(s). Then when creating the NAT have endpoints created in all subnets.

The question is why would you want a NAT Gateway to have 2 IPs? As both IPs would be considered "VPC Local" you would route to both IPs the same. The would be no real reason to want 2 IPs on the NAT device.

profile picture
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠