Hi, I'm doing a course on AWS where I have to add a subnet, I already placed one before and it was a success, but I can't create this second one. This is the data I'm using to address:
IPv4 CIDRs: 172.31.0.0/16
and I want to add in the form IPv4 CIDR blockInfo the following: 172.31.0.1/16
It sends me the following error: CIDR Address overlaps with existing Subnet CIDR: 172.31.0.0/16.
but in the calculator it indicates that I can use that address, since it gives me this range: 172.31.0.1 - 172.31.255.254
What am I doing wrong why can't I use 172.31.0.1/16 ?
Networks are identified by an address and netmask.
With these two values sa calculates the network address. This has carried out a binary AND operation between both values.
Thus, for the network 172.31.0.0/16, we have
With what the network address will be
Now, to find out if an IP belongs to a network or not, it will suffice to perform the AND operation on the IP. If the resulting value matches the network address then we are on the same network.
At this point you have tried to register a new network 172.31.0.1/16. If we calculate the network address:
We see that the result obtained is the same as that of the first network. This means that both networks are essentially indistinguishable from each other. If the system allowed you to register both networks, then it would not be able to know if an IP belongs to one network or the other.
For them to be two really different networks you have to change some of the bits for which the mask has a value of 1. For example 172.63.0.0/16