ip - AWS setting CIRD -


i know topic has lot information on can't find answer simple question.

i willing have subnet each availability zone in region (3 zones). vpc cidr 10.0.0.0/19 , want each subnet have same amount of ips. question cidr block should assign each subnet?

10.0.0.0/19 has 8,192 ip addresses, 10.0.0.0 through 10.0.31.255

when dividing supernet subnets of equal size, can divide powers of 2 -- 2, 4, 8, 16, etc., block can't divided 3 blocks of equal size, can divided 4.

10.0.0.0/21 has 2,048 addresses 10.0.8.0/21 has 2,048 addresses 10.0.16.0/21 has 2,048 addresses 10.0.24.0/21 has 2,048 addresses 

since 3 of these, reserve 1 of them use in 4th availability zone if given access 1 (some accounts have access more 3 availability zones in @ least 1 region) or other purposes.

however, though may not realize yet, you need @ least 2 subnets in each availability zone in each vpc. typically, instances go on private subnets, nat gateways or instances , elastic load balancers need in public subnets. see why need private subnets in vpc? more detail on how works.

so, need @ least 6 blocks. again, can't make 6 even-sized blocks, can make 8, , stash 2 leftovers away.

10.0.0.0/22 has 1,024 addresses 10.0.4.0/22 has 1,024 addresses 10.0.8.0/22 has 1,024 addresses 10.0.12.0/22 has 1,024 addresses 10.0.16.0/22 has 1,024 addresses 10.0.20.0/22 has 1,024 addresses 10.0.24.0/22 has 1,024 addresses 10.0.28.0/22 has 1,024 addresses 

another important factor in vpc not need worry subnet machine on if communicating machine in same availability zone. there no difference in performance within availability zone whether 2 communicating instances on same subnets or not... may make sense use smaller subnets these, or variable length subnet masks, , segregate machines administrative convenience.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -