Is there a way to change DHCP config in a subnet to point new instances to a different gateway?

0

I am looking for a way other than modify user data of EC2 instances or setting it up for every instance by different mechanism. Custom routing in RTB is already in place.

AWS
posta 5 mesi fa172 visualizzazioni
2 Risposte
0

https://docs.aws.amazon.com/vpc/latest/userguide/DHCPOptionSet.html#ChangingDHCPOptionsofaVPC

DHCP option sets are per VPC. It sounds like your question is geared toward a per-subnet modification? "After you create a DHCP option set, you can associate it with one or more VPCs. You can associate only one DHCP option set with a VPC at a time. If you do not associate a DHCP option set with a VPC, this disables domain name resolution in the VPC."

Can the subnet in question be moved/re-created in a different VPC, as an option?

AWS
KAS
con risposta 5 mesi fa
  • But the DHCP option set does not contain default gateway. If I understand correctly - new instances coming to live in the particular subnet will always have default GW set to a particular (not configurable) address by DHCP unless modified by user data or otherwise.

0

Hello @Piotr Boetzel,

Attaching a Customized Route Table to a subnet will be the only solution that can be taken from the networking side, where you can modify the 0.0.0.0/0 to the new Default Gateway and that will affect all resources inside this subnet.

AWS
Shmosa
con risposta 5 mesi fa
  • Agree with this response. Route table using the "catch-all" 0.0.0.0/0 will define the Default G/W per subnet.

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