How to preserve/reserve an IP address for a Web Role?

Answered How to preserve/reserve an IP address for a Web Role?

  • Tuesday, July 26, 2011 7:47 AM
     
     

    I have a Web Role in my Hosted Services with a public facing IP address.

    I needed to add a new endpoint, so the Web Role needed to be re-staged, which gave it a new public IP address.

    Ouch. Had to update my DNS records at the registrar.

    How can I preserve or reserve an IP address in case of a Web Role re-staging?

    Regards,

    Magnus


    My blog: InsomniacGeek.com

All Replies

  • Tuesday, July 26, 2011 8:10 AM
     
     Proposed Answer

    To my knowledge, you cannot reserve the IP address.

    The way to handle this is to register a CNAME record in the DNS instead of an A (address) record. In other words, your custom DNS name should point to <service name>.cloudapp.net instead of pointing to the IP address. Then, the Azure infrastructure will handle resolving <service name>.cloudapp.net to the Virtual IP address where your service is at.

     

    Hope this helps.

    BR, 

    Vidar


    http://www.kongsli.net/blog.cgi
  • Wednesday, July 27, 2011 3:33 AM
    Answerer
     
     

    There was a recent change in the documented permanence of the VIP address. The Windows Azure team blog post announcing this change specifies:

     

    -- A VIP is associated with the deployment and not the hosted service. When a deployment is deleted, the VIP associated with that deployment will return to the pool and be re-assigned accordingly, even if the hosted service is not deleted. Windows Azure currently does not support a customer reserving a VIP outside of the lifetime of a deployment.

     

    As Vidar points out, the solution is to use a CNAME record.

  • Wednesday, July 27, 2011 8:33 AM
     
     

    @Vidar.

    Well, this sounds good in theory.

    However, neither DynDns nor GoDaddy lets me create root CNAME records for my domain. It's not possible in their DNS tools.

    When contacting DynDns support they replied that:

    "You cannot make xxxxxx.com a CNAME as RFC does not allow CNAME at the root. You can only have CNAMEs for subdomains. "

    Regards,

    Magnus

     


    My blog: InsomniacGeek.com
  • Thursday, July 28, 2011 9:21 AM
    Moderator
     
     Answered

    Hi Magnus,

    It is true. We cannot create CName record for root domain. So for root domain, you might use A record and revise it everytime you redeploy the service. Also you may find an interesting blog:

    CNAME on a Domain Root Does Work, and It's Not Evil

    Thanks.


    Wenchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
  • Thursday, October 20, 2011 7:32 AM
     
     Answered

    Well, thank you:

    http://blogs.msdn.com/b/windowsazure/archive/2011/10/19/announcing-improved-in-place-updates.aspx

    "Best of all, these updates are easily made without changing the public IP of the service.

    The newly allowed in-place updates are:

    • Change the virtual machine size (scale-up or scale-down)
    • Increase local storage
    • Add or remove roles to a deployment
    • Change the number or type of endpoints"

    Great,  thanks.

    /M


    My blog: InsomniacGeek.com
  • Tuesday, August 28, 2012 4:10 PM
     
     

    The article mentioned as http://pzxc.com/cname-on-domain-root-does-work

    is not complete. The magic Cnaming with an A record is still elusive.