jolla
jolla

Reputation: 365

aws vpc subnet design

I'm asked to update our current aws vpc environment, our current vpc cidr is 172.30.0.0/24, below are subnets and avilability zones:

I'm not able to recreate the vpc because some other services have been deployed to them, as you can see, in az2 and az3, there are only one subnet, and I want to add one subnet in az2 and az3

But I don't know how can I split it, could you please give some idea

Upvotes: 1

Views: 298

Answers (2)

John Rotenstein
John Rotenstein

Reputation: 270104

Using a CIDR calculator:

Your VPC 172.30.0.0/24 goes from 172.30.0.0 to 172.30.0.255:

  • Subnet 172.30.0.0/26 goes from 172.30.0.0 to 172.30.0.63
  • Subnet 172.30.0.64/26 goes from 172.30.0.64 to 173.30.0.127
  • Subnet 172.30.0.128/26 goes from 172.30.0.128 to 173.30.0.191
  • Subnet 172.30.0.192/26 goes from 172.30.0.192 to 173.30.0.255

Therefore, the VPC range is full!

Upvotes: 1

Marcin
Marcin

Reputation: 238747

can I use 172.30.1.64/26 for new subnet at az2

Sadly, you can't, as your VPC cidr is 172.30.0.0/24. Since you can't delete any of your current subnets, I think the best way is to add new cidr to your VPC. You can add 172.30.1.0/24, and then you will be able to create 172.30.1.64/26 subnet.

Upvotes: 2

Related Questions