Satalyst Brilliance on 24 Jul 2015

Dynamic IP and Reserved IP in Azure Virtual Networking

Convert Existing Dynamic VIP to Reserved IP Addresses in Azure

Some of the best changes to Azure announced at Microsoft’s Build Developers’ Conference this year that didn’t get a lot of attention were the change to Azure Virtual Networking.

By default, when you create Azure cloud services they are allocated a Virtual IP (VIP).  This IP address is dynamic in nature and will change when the cloud services are de-allocated or the underlying Azure infrastructure moved your service due to underlying hardware issues.

Converting Existing Dynamic VIP

From the image above (with the IP blurred) we can see that there is a public VIP address and an internal IP address associated with the VM.

This obviously creates issues for customers that have services that require the IP address to be fixed.  For example, customers that have put the Azure IP address into their DNS.

Until recently, the only way to reserve an IP address was to create the Reserved IP before creating the cloud service, and then allocate the IP address to the service after it was created.

Converting Dynamic IP to Reserved IP

The latest release of the Azure Powershell Cmdlets now allows you to create a Reserved IP from an existing Dynamic IP address.

New-AzureReservedIP -ReservedIPName "reservedIp1" -Location "Australia East" -ServiceName "demoServiceName"

The new–ServiceName attribute allows Azure to create a new Reserved IP from the current VIP of the specified service.

Moving a Reserved IP between Cloud Services

If you are practicing Continuous Delivery, you might be interested in being able to change the association of a Reserved IP from one Cloud Service to another one (to facilitate blue-green deployments). This is now possible using an Azure Powershell Cmdlet:

Set-AzureReservedIPAssociation -ReservedIPName "reservedIp1" -ServiceName "demoServiceTwo"


Being able to move IP addresses is a great feature that’s been added to Azure Virtual Networking and opens up a lot more potential scenarios for developers. This technique is however, limited to the same datacentre (as IP ranges are datacentre specific), but will work with Iaas VMs as well as PaaS web and worker roles.