Windows Azure retains existing virtual network extranet IP (cloud service)

Source: Internet
Author: User

Windows Azure retains existing virtual network extranet IP (cloud service)

In our previous article, we described the internal virtual address of a VM bound through Azure PowerShell, and now we can bind the VM's external IP address through PowerShell, because recent world interconnects have updated some of the features of Azure, including the windows that are described today Azure Settings Keep the external IP (cloud service address) of the virtual network that already exists, and we all know that there is a DHCP server inside the Azure service to distribute the VM internal virtual network address, as well as the extranet address of the distribution cloud service; Internal virtual address reservation we don't say that. If there are articles in the Windows Azure related article that need to be accessible to the blog, why should you keep the extranet IP address of the virtual network, because if you want to temporarily shut down the virtual machine or the cloud service and restart again after shutting down, the IP address of the cloud service will change because for Windows On the network address configuration on Azure, there is a DHCP distribution address inside Azure, whether it's internal or external, and if you don't intervene with manual binding, the address will change after the reboot, causing problems with the service we're using. , so that we need to change many domain name resolution to complete the corresponding service operation. Now we can solve the problem of the change of the IP address of the external network caused by restarting the cloud service by binding the external network IP;

Windows Azure for the binding virtual network IP address principle is: the existing virtual network of the external IP set an alias to mark the availability of network address, by adding aliases to define the distribution status of the external network IP, so that the retention state, so not much to say, the concrete operation is as follows:

First configure cloud-only virtual networks in the Management Portal: Select the areas you want, such as:

650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image002" src= "http://s3.51cto.com/wyfs02/M00/6F/B8/wKioL1WmeJbRzDjHAACVy1vp4iY785.jpg" height= "344"/>

To download and install Windows Azurepowershell, we all know that Windows Azure-related operations depend on Windows Azure for PowerShell to manage, so we need to install Azure PowerShell, The first is a user subscription that needs to download Windows Azure, and you can download the Windowsazure subscription in the following ways

Https://manage.windowsauzre.cn/publishsettings

650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image004" src= "http://s3.51cto.com/wyfs02/M01/6F/B8/wKioL1WmeJbRPKv9AAFjD1qB87M153.jpg" height= "338"/>

Then download and install Windowsazure PowerShell, then import the subscription file under Windowsazure PowerShell, Access www.windowsazure.cn---> Documents and Resources---> Azure Command line interface---->windows installation prompts you to download Windowsazure PowerShell

650) this.width=650; "title=" clip_image006 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image006" src= "http://s3.51cto.com/wyfs02/M02/6F/B8/wKioL1WmeJbQ16wHAAEKt3fY80I705.jpg" height= "318"/>

We can also view related documents for Windows PowerShell above

http://www.windowsazure.cn/documentation/articles/install-configure-powershell/

Specific methods can be viewed inside the Web page

After the download is installed, according to the prompt installation of PowerShell can be;

(Get-module Azure). Version

The Azure PowerShell version currently used by the check list

650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image008" src= "http://s3.51cto.com/wyfs02/M00/6F/B8/wKioL1WmeJbxPiXvAABzdSXaj4Q718.jpg" height= "/>"

650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image010" src= "http://s3.51cto.com/wyfs02/M01/6F/B8/wKioL1WmeJaA5Nh3AADkVPMvuzY940.jpg" height= "342"/>

Import-azurepublishsettingsfile Import. publishsettings

Files for use by modules

650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image012" src= "http://s3.51cto.com/wyfs02/M01/6F/BB/wKiom1WmdrzxJeSYAAD7Zom_9tY841.jpg" height= "343"/>

Because I have already imported it, the following information will be prompted for import again

650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image014" src= "http://s3.51cto.com/wyfs02/M02/6F/BB/wKiom1Wmdr3QLZGJAAEmjXpV0P8585.jpg" height= "319"/>

If you import multiple subscription files in Windowsazure PowerShell, we need to select the default

We first view the imported subscription files under the current PowerShell via Get-azuresubscrpit

650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image016" src= "http://s3.51cto.com/wyfs02/M00/6F/BB/wKiom1Wmdr2Bq6YHAAEG4us-ilc946.jpg" height= "309"/>

We found that there are two, so we need to set the default by the following command

Select-azuresubscript-subsciptionname "xxxxx"-default

650) this.width=650; "title=" clip_image018 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image018" src= "http://s3.51cto.com/wyfs02/M01/6F/BB/wKiom1Wmdr3j_fmXAAB294aOXjI001.jpg" height= "/>"

Then we can

GET-AZUREVM View all VM information for the current subscription

"ServiceName" for the cloud service name, "name" for the virtual machine name

650) this.width=650; "title=" clip_image020 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image020" src= "http://s3.51cto.com/wyfs02/M02/6F/BB/wKiom1Wmdr2AscNyAABb23TptK8045.jpg" height= "/>"

We also view the public IP address of the cloud service via the portal

650) this.width=650; "title=" clip_image022 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image022" src= "http://s3.51cto.com/wyfs02/M00/6F/B8/wKioL1WmeJezNKTjAADVy6jc3GM412.jpg" height= "369"/>

We found that the mutli-iternal cloud services public address is: 139.219.13.208, so we temporarily shut down the cloud service 30 minutes later to see if it will change;

Theoretically, because the address of his address is assigned from DHCP, so it will change,

When off, we can see the status prompt---unassigned

650) this.width=650; "title=" clip_image024 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image024" src= "http://s3.51cto.com/wyfs02/M01/6F/B8/wKioL1WmeJfhz0zbAACMJLOxZEs207.jpg" height= "297"/>

When you view the status of a cloud service; the status is also stopped

650) this.width=650; "title=" clip_image026 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image026" src= "http://s3.51cto.com/wyfs02/M02/6F/B8/wKioL1WmeJjgk_9pAACK4_LbCP8096.jpg" height= "301"/>

After a few minutes of waiting, we will restart the virtual machine to view the corresponding public IP:

We found that the corresponding cloud service address has changed and changed from 139.219.13.208 to 139.219.7.165.

650) this.width=650; "title=" clip_image028 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image028" src= "http://s3.51cto.com/wyfs02/M02/6F/B8/wKioL1WmeJiDH0DQAACxXklaVWE438.jpg" height= "340"/>

Therefore, in order to ensure the above problems, we need to fix this public network IP address;

Fix the virtual machine public IP that already exists with the zone virtual network:

We can pass

Get-azuredeployment-servicename iternal

To display information about the cloud service internal;

We can see that the reservedipname is empty;

650) this.width=650; "title=" clip_image030 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image030" src= "http://s3.51cto.com/wyfs02/M00/6F/BB/wKiom1Wmdr6zqQfnAAFXQ4JjCNs041.jpg" height= "" "/>

"ServiceName" is the name of the cloud service, "Reservedipname is named for this fixed IP" (can be arbitrarily defined), "location is the region of the virtual network in which this virtual machine resides".

New-azurereservedip-servicename "iternal"-reservedipname blrvip-location "China North"

650) this.width=650; "title=" clip_image032 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image032" src= "http://s3.51cto.com/wyfs02/M01/6F/B8/wKioL1WmeJiibI3lAAC2dR8eVVg265.jpg" height= "/>"

If your PowerShell version is up-to-date, please downgrade your processing by:

We can view the currently installed Azure version by using the (Get-module Azure). Version command

650) this.width=650; "title=" clip_image008[1] "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "Clip_image008[1]" src= "http://s3.51cto.com/wyfs02/M02/6F/B8/wKioL1WmeJiDIqUkAABzdSXaj4Q913.jpg" height= "114"/ >

Uninstalling Azure PowerShell

Download 0.9.3 version of PowerShell after installation, as: https://s3.amazonaws.com/github-cloud/releases/23891194/ 9a9703c6-0bad-11e5-988d-50028c32532d.msi?response-content-disposition=attachment%3b%20filename% 3dazure-powershell.0.9.3.msi&response-content-type=application/octet-stream&awsaccesskeyid= Akiaistnzfovbijmk3tq&expires=1436507859&signature=dpi9%2fdnvuvqjx0u7nfpiwho3wji%3d

If you cannot download using the following connection download, select 0.9.3 Download

Https://github.com/Azure/azure-powershell/releases

650) this.width=650; "title=" clip_image034 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image034" src= "http://s3.51cto.com/wyfs02/M00/6F/B8/wKioL1WmeJjjG25_AACjLGgbh40589.jpg" height= "310"/>

650) this.width=650; "title=" clip_image035 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image035" src= "http://s3.51cto.com/wyfs02/M00/6F/BB/wKiom1Wmdr7Tx5wjAACsxUhvcso103.jpg" height= "251"/>

We can perform success after replacing Azure PowerShell version;

Note: The name of reservedipname:xxxx can be arbitrarily defined;

New-azurereservedip-servicename "iternal"-reservedipname blrvip-location "China North"

650) this.width=650; "title=" clip_image037 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image037" src= "Http://s3.51cto.com/wyfs02/M00/6F/BB/wKiom1Wmdr_Aed-0AADPc3pmJfc331.jpg" height= "182"/>

We then use the following command to view the fixed public IP address under this subscription

Get-azurereservedip-reservedipname BLRVIP

650) this.width=650; "title=" clip_image039 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image039" src= "http://s3.51cto.com/wyfs02/M02/6F/B9/wKioL1WmeJnDNtp-AAEBUjNhg9c695.jpg" height= "233"/>

We'll go through.

Get-azuredeployment-servicename iternal

To display information about the cloud service internal;

We can see that Reservedipname is the name of BLRVIP.

650) this.width=650; "title=" clip_image041 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image041" src= "http://s3.51cto.com/wyfs02/M00/6F/B9/wKioL1WmeJnDzm0YAAGlzyW2jng557.jpg" height= "362"/>

Next we verify that the public network IP will change;

When the virtual machine is shut down, the public IP is automatically released by default in the management interface.

650) this.width=650; "title=" clip_image043 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image043" src= "http://s3.51cto.com/wyfs02/M01/6F/B9/wKioL1WmeJnxWb6xAADidEQ-LEM974.jpg" height= "345"/>

After 30 minutes, we start the virtual machine again, observe that the public IP has not changed, the public network IP fixed successfully

650) this.width=650; "title=" clip_image045 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image045" src= "http://s3.51cto.com/wyfs02/M02/6F/B9/wKioL1WmeJmSmvkRAAESQo7UzFc698.jpg" height= "353"/>

How to delete the ReservedIP:

Because the ReservedIP is charged, so do not want to use, can be deleted;

Before deleting, we can see which reservedip are under the current subscription with the following command

Get-azurereservedip

650) this.width=650; "title=" clip_image047 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image047" src= "http://s3.51cto.com/wyfs02/M01/6F/B9/wKioL1WmeJrzQ1HiAAJS6hqwIsA663.jpg" height= "501"/>

Then delete the reservedip named Blrvip

Remove-azurereservedip-reservedipname "BLRVIP"

It is important to note that if a virtual machine exists in the relevant cloud service, the virtual machine needs to be deleted before the ReservedIP can be deleted.

650) this.width=650; "title=" clip_image049 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image049" src= "http://s3.51cto.com/wyfs02/M00/6F/BB/wKiom1WmdsCxQ8LUAADtp-6EQcw145.jpg" height= "/>"

After we delete the virtual machine, try to delete it again.

650) this.width=650; "title=" clip_image051 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image051" src= "http://s3.51cto.com/wyfs02/M02/6F/B9/wKioL1WmeN2B8qlyAADxm0vYyjY610.jpg" height= "171"/>

After we delete, again through Get-azurereservedip view, left RVIP.

650) this.width=650; "title=" clip_image053 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image053" src= "http://s3.51cto.com/wyfs02/M02/6F/B9/wKioL1WmeN3S9BSaAAD4mil1ZYU079.jpg" height= "234"/>

To query for a fixed public IP address under this subscription:

Get-azurereservedip-reservedipname Testrip

650) this.width=650; "title=" clip_image054 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image054" src= "http://s3.51cto.com/wyfs02/M00/6F/B9/wKioL1WmeN2BgsIiAAFqGR2YqlA112.jpg" height= "218"/>

Verify that the public IP is changing:

A. Turn off the virtual machine and release the public IP in the admin interface:

650) this.width=650; "title=" clip_image056 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image056" src= "http://s3.51cto.com/wyfs02/M01/6F/B9/wKioL1WmeN2z4DsMAADGP0s8ZY4466.jpg" height= "395"/>

In the management interface, turn on the virtual machine, observe the public network IP has not changed, public IP fixed success:

650) this.width=650; "title=" clip_image058 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image058 "src=" http://s3.51cto.com/wyfs02/M02/6F/B9/wKioL1WmeN3zfwkWAADaG2OsRFg987.jpg "height=" 444 "/>

This article from "Gao Wenrong" blog, reproduced please contact the author!

Windows Azure retains existing virtual network extranet IP (cloud service)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.