1
votes

I'm trying to create point to site VPN. I have created new virtual network. Its address space is 172.16.0.0/24 I'm trying to do step 2 of linked article to add new gateway subnet. However I cannot figure out what is wrong with my address range. If I add 172.16.0.0/24 it says "The specified address range overlaps with subnet default which has a range of 172.16.0.0/24". If I modify IP I get "is not valid CIDR block. Use 172.16.0.0/24 instead." https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal

2
The root reason is Azure VPN gateway needs a independent subnet, when you create VNet on Portal, by default default subnet uses whole ip ranges. You could not create a new subnet, so you get the warn log.Shui shengbao
When you create VM, modify VNet adress range to 172.16.0.0/16, default subnet uses 172.16.0.0/24.Shui shengbao

2 Answers

4
votes

you need to extend your vnet address space, say change it to 172.16.0.0/23 and then you can add 172.16.1.0/24 as your gateway subnet.

You really need to read up on basics of subnetting if you don't understand the concept behind it. its simple and useful.

Reference:
https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-vnet-arm-pportal
https://blogs.technet.microsoft.com/solutions_advisory_board/2016/12/01/calculating-the-gateway-subnet-address-space-for-azure-virtual-networks/

0
votes

You can extend the address space by adding another address range CIDR block by clicking "Address Space" inside the settings of Virtual Network Resource, above the "Subnets" link. You can add as many ranges as you want to extend your Virtual Network.