Hi I'm trying to deploy a virtual network in Azure and I'm getting this strange error. I've checked the CIDR notation online and it seems valid. 172.19.20.0/22, we've managed to use 172.19.16.0/22 and the next one we're deploying is failing.
The address prefix 172.19.20/22 in resource /subscriptions/xxxxxxx-xxxxxxx-xxxxxxxx-xxxx/resourceGroups/rg-network-01/providers/Microsoft.Network/virtualNetworks/VNET2-UKS-01 has an invalid CIDR notation. For the given prefix length, the address prefix should be 172.19.0.0/22." Details=[]
Any help would be appreciated, I'm not great with networking :(
CodePudding user response:
As per my understanding from your question and comments, you have a Vnet address space of 172.19.0.0/16 and you want to create subnet with address space 172.19.12.0/22, 172.19.16.0/22 and 172.19.20.0/22. You are facing issue while creating 172.19.20.0/22 subnet space with error
The address prefix 172.19.20/22 in resource /subscriptions/xxxxxxx-xxxxxxx-xxxxxxxx-xxxx/resourceGroups/rg-network-01/providers/Microsoft.Network/virtualNetworks/VNET2-UKS-01 has an invalid CIDR notation. For the given prefix length, the address prefix should be 172.19.0.0/22." Details=[]
I think the issue here is due to a wrong subnet address provided in the command 172.19.20/22 it should be 172.19.20.0/22 instead. I get a similar error if try it on my end.