AZURE Reserve Public IP Address – Classic/ARM

Today we will talk about reserving the Public IP Addresses for Azure. This is different for Classic & ARM model.

There is a need for most organizations to reserve some IP addresses as they don’t want to loose these in case if site/vm is down/de-allocated.

Important thing to note here is that you can reserve 20 Public IPs per subscription & reserving a IP address has a cost associated to it.

Refer : https://azure.microsoft.com/en-us/pricing/details/ip-addresses/

DEPLOYMENT MODEL TYPE PRICING
ARM Public IP addresses – Static or Dynamic The first 5 “static” public IP addresses in a region are free. This is applicable irrespective of the type of resource (VM or Load-balancer) to which the IP address is associated. All others are charged at $0.004/hr.
ASM/Classic Cloud Service VIP Every Cloud Service gets a free public VIP. Additional VIPs are charged at $0.004/hr.
ASM/Classic Reserved IP address The first 5 reserved IP addresses that are associated to an in-use cloud service are free. All others are charged at $0.004/hr.
ASM/Classic Instance level public IP address (ILPIP) All ILPIP addresses are charged at $0.004/hr.

Another important aspect is Instance level Public IP address , this is the address that you assign directly to VM instead of cloud service.

These are different from reserved IP addresses and as per I remember from my training its limit is 5.

So how to Reserve the Public IP addresses in Classic Portal, lets use the powershell magic as now a days nothing works without Powershell 🙂

Note: Please install azure shell before you can perform these steps(https://azure.microsoft.com/en-us/downloads/)

Lets logon to azure: ADD-Azureaccount

capture

Check if you already have any reservations by using Get-AzureReservedIP

capture

I don’t have any in my subscription so result is blank 🙂

Now lets reserve the Public Ip for our subscription using : New-AzureReservedIP -ReservedIPName SysCloudProIP -Location “Central US”

capture

Now if you will check again from Shell , you will see that IP is reserved:

capture

Now you can use this reserved IP & assign it to existing cloud service.

New-AzureReservedIP –ReservedIPName SysCloudProIP –Location “Central US” -ServiceName SysCloudProServivce

You can remove the Reserved ip from reservation by using Remove-AzureReservedIP -ReservedIPName “SysCloudProIP”

capture

This is how you reserve/apply/ remove the Public Ip addreses in Classic model, Now lets look at the modern or ARM model.

As in ARM, every object you create is a resource & it should be part of resource group so you have to create reserve IP as a part of resource group.

You can create a separate resource group just for holding Public IPs if you desire(I have created a new resource group with name Res-PubIp-Address)

Lets Logon to Azure Resource manager thru PowerShell.

Add-AzureRmAccount

capture

New-AzureRmPublicIpAddress -ResourceGroupName Res-PubIp-Address -Name SysCloudProIP -AllocationMethod Static -Location “Central US”

capture

Now if you will open the ARM portal & browse thru the resource group you will find that Public IP has been reserved.

capture

Now you can associate it further to NIC whe n you are creating that by using New-AzureRmNetworkInterface

You can remove the reservation simply be deleting the resource from the Res-PubIp-Address resource group.

We can see here how to models behave in a a very different manner for doing the same kind of stuff 🙂

Now everything is moving to new model & all the new deployments we are doing, Classic model is being avoided,

therefore we as admins need to adapt to new ways of doing the stuff in Azure.

Thanks for reading

Sukhija Vikas

http://SysCloudPro.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s