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
posta un anno fa736 visualizzazioni
1 Risposta
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
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande