The address space for a given VNet can be as small as a CIDR /29 with 8 available IP addresses- please don't ever assign that small or an address space to VNet! So, that address space can go all the way up to a CIDR /16 with 65,536 IP addresses (maximum amount of IP's available per VNet). Another fun fact is that subnets, that make up the allocated address space for a VNet, can only have a maximum of 3,000 provisioned per given VNet (source). So subnetting at that scale needs a bit of planning. More on that another time perhaps.
Now that we've got some constraints laid out, I thought I'd share the bellow table that is particularly relevant to subnet provisioning for VNets.
Whats interesting is that the smaller the subnets that are provisioned, the more wasted IP addresses there are. Lets define that statement- this is because with any given subnet, the Azure network fabric requires 5 IP addresses which can't be used by customers (therefore, thats why a /29 is the smallest available subnet).
Assuming we want to leverage a /16 address range in a given VNet, its not until you lay out (like bellow) the amount of different subnets available that you see the potential for wasted IP addresses when subnetting, especially when you're considering the use lots of smaller subnets.
Note: this can also apply and extend to multiple VNets if you are working with a single /16 address space for your entire Azure IP address allocation on say a subscription basis, or region basis.
|CIDR||IP addresses||Fit within a /16||Wasted IP's||Left with|
Enjoy and happy subnetting..
Follow or start a discussion for this blog (Azure VNet wasted IP addresses) on Twitter. If you're after something more in depth, or want to ask me an expanded question: raise an issue in my open GitHub AMA repo.