An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
Hello Abrar Adil S,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are unable to Migrate the VPN Public IP from basic to Standard due to Subnet Limitation.
The failure is caused by the GatewaySubnet size/IP availability requirement for the Azure VPN Gateway Basic Public IP migration workflow. For VPN Gateway SKUs such as VpnGw1-5 and legacy Standard/HighPerformance, Microsoft requires sufficient free IP capacity in GatewaySubnet; so, if the subnet is /28 or smaller, the migration tool may fail. The supported remediation is to add additional address prefix space to GatewaySubnet so it reaches /27 or larger effective capacity, then run the official VPN Gateway Basic Public IP to Standard Public IP migration workflow. - https://learn.microsoft.com/en-us/azure/vpn-gateway/basic-public-ip-migrate-about, and https://learn.microsoft.com/en-us/azure/vpn-gateway/basic-public-ip-migrate-howto.
The best practice for resolution is to:
- Do not delete the existing VPN Gateway first if the spoke VNet has available non-overlapping address space.
- Add another valid prefix to the existing
GatewaySubnetto satisfy the VPN Gateway migration prerequisite. - Run the official Azure VPN Gateway “Migrate to Standard IP” workflow from the Virtual Network Gateway configuration blade.
- Validate that the Public IP SKU becomes Standard and that the VPN tunnel remains functional.
- Use hub gateway transit only as a separate redesign option, not as the primary migration path, because a spoke VNet cannot use a remote hub gateway while it still has its own VPN Gateway.
This is the reliable supported path that can preserve the existing VPN Gateway public IP address and avoid the longer delete/recreate outage., although the VPN Gateway SKU may be migrated from a non-AZ SKU to an AZ SKU, for example VpnGw2 to VpnGw2AZ. - https://learn.microsoft.com/en-us/azure/vpn-gateway/basic-public-ip-migrate-howto, and https://learn.microsoft.com/en-us/azure/vpn-gateway/basic-public-ip-migrate-about Therefore, if the spoke VNet has no available address space to expand GatewaySubnet, then near-zero downtime is not realistically achievable with your current design. In that case, the supported alternatives are either a planned VPN Gateway redeployment or a planned hub gateway transit cutover after deleting the existing spoke VPN Gateway. - https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal, and https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-peering-gateway-transit
Use the below official resource links for more reading and implementation steps:
- https://learn.microsoft.com/azure/vpn-gateway/basic-public-ip-migrate-about
- https://learn.microsoft.com/azure/vpn-gateway/basic-public-ip-migrate-howto
- https://learn.microsoft.com/azure/virtual-network/how-to-multiple-prefixes-subnet
- https://learn.microsoft.com/azure/vpn-gateway/vpn-gateway-peering-gateway-transit
- https://learn.microsoft.com/azure/virtual-network/ip-services/public-ip-basic-upgrade-guidance
I hope this is helpful! Do not hesitate to let me know if you have any other questions, steps or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.