mike
mike

Reputation: 21

Azure Virtual Network Gateway - Dynamic Public IP Address Changes

I am setting up a bgp ipsec tunnel with a service provider. The public ip addresses on the Azure side are set to dynamic, and I am wondering if these addresses would ever change?

This is on the docs site regarding assignment of address:

Dynamic: Dynamic addresses are assigned only after the public IP address is associated to a NIC attached to a VM and the VM is started for the first time. Dynamic addresses can change if the VM the NIC is attached to is stopped (deallocated). The address remains the same if the VM is rebooted or stopped (but not deallocated). Static: Static addresses are assigned when the public IP address is created. Static addresses do not change even if the VM is put in the stopped (deallocated) state. The address is only released when the NIC is deleted. You can change the assignment method after the NIC is created.

But it seems to be specific to virtual machines.

Upvotes: 0

Views: 6273

Answers (2)

Majid Qureshi
Majid Qureshi

Reputation: 1

The VPN gateway must have a dynamically allocated public IP address. Even though its DYNAMIC, it remains largely unchanged. The reason for it to be Dynamic is, it gives Azure the capability to allocate the next available IPV4 Address that it has from the available block of IPs.

PowerShell to create a VPNGateway Public IP:

$gwypip01= New-AzPublicIpAddress -Name GwyIP01 -ResourceGroupName RG01 -Location 'Canada Central' -AllocationMethod Dynamic

To view the public IP :

Get-AzPublicIpAddress -Name GwyIP01 -ResourceGroupName RG01

Upvotes: 0

Shui shengbao
Shui shengbao

Reputation: 19205

When dynamic IP is associated to VPN gateway, the IP address will not change.

Please refer to this FAQ.

Can I request a Static Public IP address for my VPN gateway?

No. Only Dynamic IP address assignment is supported. However, this does not mean that the IP address changes after it has been assigned to your VPN gateway. The only time the VPN gateway IP address changes is when the gateway is deleted and re-created. The VPN gateway public IP address doesn't change across resizing, resetting, or other internal maintenance/upgrades of your VPN gateway.

Upvotes: 3

Related Questions