How to determine subnet IPv4 CIDR address in AWS. Suppose my VPC CIDR block is 172.31.0.0/16 and I want to create a subnet with 172.31.1.0/16 but it says " *** is not within the range of ****/*. Please explain me how to determine CIDR?
172.31.0.0/16
represents these IP ranges:
CIDR Range 172.31.0.0/16
Netmask 255.255.0.0
Wildcard Bits 0.0.255.255
First IP 172.31.0.0
Last IP 172.31.255.255
Total Host 65536
172.31.1.0/16
represents the same IP range because of the /16
subnet mask which would be like 172.31.1.0/255.255.0.0
:
CIDR Range 172.31.1.0/16
Netmask 255.255.0.0
Wildcard Bits 0.0.255.255
First IP 172.31.0.0
Last IP 172.31.255.255
Total Host 65536
Therefore it's not a subset of 172.31.0.0/16
.
Perhaps you'd be comfortable with 256 IPs per subnet? In which case you could use 172.31.1.0/24
which would allow the IP range of 172.31.1.0
- 172.31.1.255
:
CIDR Range 172.31.1.0/24
Netmask 255.255.255.0
Wildcard Bits 0.0.0.255
First IP 172.31.1.0
Last IP 172.31.1.255
Total Host 256
See https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With