0

I have my VPC configured with 10.0.0.0/16 CIDR. I want to create around 7-10 subnets in this VPC.

On my calculation, I have decided to have 8 subnets where each subnet can host 8192 resources (8192*8=65536).

As per my calculation, 2^13=8192. Subtracting it from the max size of 32 (32-13)= 19. so is it 10.0.0.0/19? If that is so, this would be the CIDR for first subnet. What would be for the rest 7? I have tired with 10.0.0.0/19, Next when I go with 10.0.1.0/19, it is throwing error.

But I am in confused state as in how can I allocate ipv4 CIDR to 8 subnets? What would be starting and ending range? How can I calculate what IPV4 CIDR can I allocate to each subnet?

Please help

  • (Your math is bit correct as it ignores broadcast and network & although its likely close enough). With no tools at hand, a /19 sounds correct and the second subnet would be 10.0.32.0 – davidgo Apr 22 '20 at 20:08
  • The third 10.0.64.0, then 10.0.96.0,10.0.128.0,10.0.160.0, 10.0.192.0, 10.0.224.0 – davidgo Apr 22 '20 at 20:10
  • I got this by dividing 256 by 8, to get 32, then list all multiples if 32 for the third octet. The end if each range would be 1 less then the start if the next, is 10.0.31.255, 10.0.63.255 etc. This address would be the broadcast and not usable. Similarly 10.0.32.0 is the network and not usable, leaving 10.0.32.1-10.0.63.254 for use. – davidgo Apr 22 '20 at 20:12
  • @davidgo Man!!!!!Thank you so much. Now I understood on how to calculate things. Thank you so much for detailed explanation. You saved my day!! – vivek reddy Apr 22 '20 at 20:50
  • Can you please paste the same as answer? So that I can accept this solution?@davidgo – vivek reddy Apr 22 '20 at 20:51

2 Answers2

0

I use this Online IP Subnet Calculator - it is an invaluable tool for planning and troubleshooting IP networks.

CB_Ron
  • 338
  • 2
  • 10
0

To understand the question, you have to translate normal number between binaries to get it clear. Better get python installed

>>> bin(10)
'0b1010'
>>> int('1010',2)
10

See the real address for computer of "10.0.0.0"?

00001010 00000000 00000000 00000000

Since you want to change the first 3 bits of the second byte for 8 variations. You need to calculate what is the normal number from binary 00100000, 01000000,...11100000

>>> int('00100000',2)
32

So the next subnet after 10.0.0.0/19 is 10.32.0.0/19, all the way up to 10.(32*7).0.0/19 Or 32 = 256/8

George Y
  • 528
  • 6
  • 16