uday
uday

Reputation: 6713

Public Static IP - can't figure out the powershell options

I got a new Microsoft Azure / Windows 2008 R2 subscription and when I login it displays a "Public IP" within the desktop's screen saver. However when I tried to set up a DNS Server using Server Management->Roles->Server Roles->DNS Server, the pop up gives me that no Static IP exists (I want to setup FTP/HTTP sites).

I contact the help who redirected me to a Billing guy who told me that they have given my subscription a "Reserved IP" address. Even after his email, when I tried to setup a DNS Server it says that there is no Static IP.

When I contact back the Billings person about what is the "Reserved IP" address - the Azure Billing responded You can check the status if the Reserved IP through PowerShell. [Get-AzureReservedIP].

So, I logged into the server by RDP, I installed the Microsoft Azure PowerShell (after spending a few hours to realize that regular PowerShell doesn't have all the Azure commands), and then tried various commands like Get-AzureSubscription, Set-AzureSubscription, Get-AzureVM, but nothing seems to be working.

For example, (1) Get-AzureReservedIP says that there is No current Subscription (which seems weird given that I am already RDP-ing into an active virtual machine

(2) I tried Get-AzureSubscription -Current and it gave me an error that says "No subscription is currently selected".

(3) So then I tried Get-AzureSubscription -SubscriptionName c4fasdasdasdas-asdas-asdasd where c4fasdasdasdas-asdas-asdasd is my Azure Subscription ID, which gave me no error. But then I tried to see the subscription using Get-AzureSubscription | Format-Table and it gave me no results.

I tried a lot of sites that supposedly provide the steps for getting the Reserved IP address such as this: step-by-step but in my case I am not able to get past the "No current subscription has been designated" part.

Another example, the site: gives a list of steps to set a subscription and I tried Set-AzureSubscription, but I get an error "Parameter set cannot be resolved using the specified named parameters."

This seems way too complicated. With other vendors like say 1and1.com, they simply assign you a Static IP and if one tries to setup a DNS Server it just works. Not sure what's the issue here ... why is it too complicated to set up a Public Static ID.

Can someone help me understand the steps to (a) find out what is the Reserved IP address that the Azure Billings guy charged me for, and (b) how to assign it to my virtual machine?

Upvotes: 0

Views: 543

Answers (1)

Neil Mackenzie
Neil Mackenzie

Reputation: 2847

I did a blog post describing the various types of IP address an Azure VM can have, which should help clarify things. For an FTP site the one you should focus on is a public instance IP address (PIP), this is a public IP address directly attached to an individual VM. Traffic to it comes directly from the internet, so needs to be firewalled on the VM. You do not need to worry about creating endpoints on the Azure Load Balancer (and the VIP on the cloud service hosting the VM) other than those you need to administer the VM. The motivation for using a PIP is that you have access to all the ports while the traditional method of adding endpoints on the VIP is limited to 150 ports, which is not sufficient for an FTP server. Both the VIP and PIP are static as long as you have the VM deployed.

You probably don't need to bother about reserved IP addresses, which are intended for cases where an organization wants to keep an IP address "clean" and not ever allow anyone else to use it. By default in Azure, you give up any IP address allocated by Microsoft when all VMs using it are deleted.

Upvotes: 1

Related Questions