You need to renumber a live /16 VPC that is running out of space without downtime. How do you approach it?
AdvancedScenarioAddressing, CIDR & Routing
Answer
Situation read → You cannot change a VPC primary CIDR, but you can add CIDRs and move workloads onto them.
What I'd do →
- Associate a secondary CIDR with the VPC and create new subnets in it
- Update route tables, security groups and NACLs to allow the new ranges
- Launch new instances or node groups in the new subnets and shift traffic through the load balancer
- Drain and terminate the old instances, then remove the old subnets
- Keep DNS TTLs low and update any IP-based allow lists in partner systems first
Why → The VPC is only a container; subnets and instances are what you move, which allows a blue-green style migration.
Interview tip → Highlight external IP allow lists: partners hardcoding your IPs are what breaks a renumbering.
More on Addressing, CIDR & Routing
You own 10.0.0.0/16 for a new VPC and need separate /24 subnets for dev, QA and prod across two AZs. How do you carve it up?BeginnerA host is configured as 192.168.1.130/25. What network does it belong to and what is the broadcast address?BeginnerHow many usable IPs does an AWS subnet of /28 have?BeginnerA route table has 10.0.0.0/16 -> local and 10.0.1.0/24 -> vpn-gw. Where does a packet to 10.0.1.5 go?BeginnerA newly built server can ping everything in its subnet but nothing outside. What is the first thing you check?BeginnerYou are picking a private range for a new company network. Which RFC 1918 range do you choose and why?Beginner