If I set up an AWS VPC with CIDR of 10.0.0.0/20 then the range is 10.0.0.0 to 10.0.15.255
I make a subnet now. Why does 10.0.15.15/28 give an error. Isn't it's range 10.0.15.15 to 10.0.15.30 which is within the VPC?
-
/28 is 16 addresses. 0-15, 16-31, etc. (0 and 15 -- all-zeros and all-ones addresses -- are reserved for network and broadcast)– RickyCommented Jan 8, 2021 at 2:20
Add a comment
|
1 Answer
Isn't it's range 10.0.15.15 to 10.0.15.30 which is within the VPC?
Yes, but it's not a valid /28.
10.0.15.0/28 or 10.0.15.16/28 are valid ranges.
-
2For more details on CIDR subnetting, check out this primer over at Server Fault: serverfault.com/questions/12854/cidr-for-dummies– RobinGCommented Jan 7, 2021 at 19:06
-
Why isn't it a valid /28 and why should it be a multiple of 16 ? Commented Jan 7, 2021 at 19:08
-
1A /28 subnet requires the lowest four bits - the host bits - to be all zero.– Zac67 ♦Commented Jan 7, 2021 at 19:16
-
1@AkramElectroTech, if you read and understand this two-part answer, you will see where you have gone wrong.– Ron Maupin ♦Commented Jan 7, 2021 at 21:55