Azure Public IP DNS域名
在某些环境下,PIP是Azure上的一种比较好的解决方案处理一些特殊的环境。比如大量的端口需要打开、向外部的访问非常多等等。
但目前,Azure的Reserved IP address不用应用到PIP上,只能应用到VIP上。
但当用户需要使用PIP,又需要一个固定的连接方式时,我们建议采用DNS域名的方式来实现。
对于一个Azure上的虚拟机:

默认是VIP地址映射虚拟机。但当开启了PIP后,默认向外访问的地址为PIP地址。PIP具体方法见:http://www.cnblogs.com/hengwei/p/4779166.html
此时的PIP是不能预留IP地址的。如果不配置,这个地址也没有默认的DNS域名。如果VM关机等情况,其IP地址更换,将影响客户的应用。
我们可以通过增加PIP DNS域名的方法解决这个问题。
通过Powershell配置:
Get-AzureVM
ServiceName Name Status
----------- ---- ------
hwmysql hwubt1 ReadyRole
get-azurevm -ServiceName hwmysql -Name hwubt1 | set-AzurePublicIP -PublicIPName hwpip -DomainNameLabel hwpip | Update-AzureVM
OperationDescription OperationId OperationStatus
-------------------- ----------- ---------------
Update-AzureVM 785ce71c-c5a6-42f5-84e0-a5dcea6b47b5 Succeeded
get-azurevm -ServiceName hwmysql -Name hwubt1
|
DeploymentName |
hwmysql1 |
|
Name |
hwubt1 |
|
Label |
|
|
VM |
Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM |
|
InstanceStatus |
RoleStateUnknown |
|
IpAddress |
10.1.1.100 |
|
InstanceStateDetails |
|
|
PowerState |
Started |
|
InstanceErrorCode |
|
|
InstanceFaultDomain |
|
|
InstanceName |
hwubt1 |
|
InstanceUpgradeDomain |
|
|
InstanceSize |
Standard_D1 |
|
HostName |
hwubt1 |
|
AvailabilitySetName |
|
|
DNSName |
http://hwmysql.chinacloudapp.cn/ |
|
Status |
RoleStateUnknown |
|
GuestAgentStatus |
Microsoft.WindowsAzure.Commands.ServiceManagement.Model.GuestAgentStatus |
|
ResourceExtensionStatusList |
{} |
|
PublicIPAddress |
42.159.236.183 |
|
PublicIPName |
hwpip |
|
PublicIPDomainNameLabel |
hwpip |
|
PublicIPFqdns |
{hwpip.hwmysql.chinacloudapp.cn hwpip.0.hwmysql.chinacloudapp.cn} |
|
NetworkInterfaces |
{} |
|
VirtualNetworkName |
hwvnet |
|
ServiceName |
hwmysql |
|
OperationDescription |
Get-AzureVM |
|
OperationId |
dac94b4d49994ea292b82499bbb3503c |
|
OperationStatus |
OK |
其中-DomainNameLabel hwpip是指明需要DNS域名的参数,添加了这个参数,可以在get-azurevm中看到这个PIP地址以及关联了hwpip.hwmysql.chinacloudapp.cn的域名。
这时在cmd中解析:
nslookup hwpip.hwmysql.chinacloudapp.cn
Server: xxxx
Address: x.x.x.x
Name: hwpip.hwmysql.chinacloudapp.cn
Address: 42.159.236.183
这时此PIP地址已经可以通过DNS解析到。
我们通过Powershell释放VM的资源:
stop-azurevm -ServiceName hwmysql -Name hwubt1
OperationDescription OperationId OperationStatus
-------------------- ----------- ---------------
Stop-AzureVM 4d9929b7-351e-4452-afd5-7596d6061b75 Succeeded
此时通过get-azurevm可以看到PIP地址以及释放:
|
DeploymentName |
hwmysql1 |
|
Name |
hwubt1 |
|
Label |
|
|
VM |
Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM |
|
InstanceStatus |
StoppedDeallocated |
|
IpAddress |
|
|
InstanceStateDetails |
|
|
PowerState |
Stopped |
|
InstanceErrorCode |
|
|
InstanceFaultDomain |
|
|
InstanceName |
hwubt1 |
|
InstanceUpgradeDomain |
|
|
InstanceSize |
Standard_D1 |
|
HostName |
|
|
AvailabilitySetName |
|
|
DNSName |
http://hwmysql.chinacloudapp.cn/ |
|
Status |
StoppedDeallocated |
|
GuestAgentStatus |
|
|
ResourceExtensionStatusList |
{} |
|
PublicIPAddress |
|
|
PublicIPName |
|
|
PublicIPDomainNameLabel |
|
|
PublicIPFqdns |
{} |
|
NetworkInterfaces |
{} |
|
VirtualNetworkName |
hwvnet |
|
ServiceName |
hwmysql |
|
OperationDescription |
Get-AzureVM |
|
OperationId |
6534b10dc6054872a495700ddf7ff49b |
|
OperationStatus |
OK |
通过start-azurevm开机,再观察PIP情况:
|
DeploymentName |
hwmysql1 |
|
Name |
hwubt1 |
|
Label |
|
|
VM |
Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM |
|
InstanceStatus |
ReadyRole |
|
IpAddress |
10.1.1.100 |
|
InstanceStateDetails |
|
|
PowerState |
Started |
|
InstanceErrorCode |
|
|
InstanceFaultDomain |
|
|
InstanceName |
hwubt1 |
|
InstanceUpgradeDomain |
|
|
InstanceSize |
Standard_D1 |
|
HostName |
hwubt1 |
|
AvailabilitySetName |
|
|
DNSName |
http://hwmysql.chinacloudapp.cn/ |
|
Status |
ReadyRole |
|
GuestAgentStatus |
Microsoft.WindowsAzure.Commands.ServiceManagement.Model.GuestAgentStatus |
|
ResourceExtensionStatusList |
{} |
|
PublicIPAddress |
42.159.239.59 |
|
PublicIPName |
hwpip |
|
PublicIPDomainNameLabel |
hwpip |
|
PublicIPFqdns |
{hwpip.hwmysql.chinacloudapp.cn hwpip.0.hwmysql.chinacloudapp.cn} |
|
NetworkInterfaces |
{} |
|
VirtualNetworkName |
hwvnet |
|
ServiceName |
hwmysql |
|
OperationDescription |
Get-AzureVM |
|
OperationId |
945a9299ff6647af8398f2f07fc17b31 |
|
OperationStatus |
OK |
此时再进行DNS解析:
nslookup hwpip.hwmysql.chinacloudapp.cn
Server: xxxx
Address: x.x.x.x
Name: hwpip.hwmysql.chinacloudapp.cn
Address: 42.159.239.59
可以观察到,PIP地址发生变化,但DNS地址没有变。
Azure Public IP DNS域名的更多相关文章
- Azure PowerShell (9) 使用PowerShell导出订阅下所有的Azure VM的Public IP和Private IP
<Windows Azure Platform 系列文章目录> 笔者在之前的工作中,有客户提出想一次性查看Azure订阅下的所有Azure VM的Public IP和Private IP. ...
- Windows Azure Virtual Machine (28) 使用Azure实例级别IP,Instance-Level Public IP Address (PIP)
<Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的Azure China 熟悉Azure平台的读者都知道,我们在使用Azure Virtual ...
- Azure VM Public IP设置
Azure虚拟机的Public IP是用于客户端直连云中的虚拟机,可以认为是一个外网IP,一般我们为虚拟机设置终结点,例如HTTP的80端口,如果使用Public IP可以不使用Azure Porta ...
- Azure PIP (Instance Level Public IP)
微软的Azure平台已经支持Instance Level Public IP功能.当有复杂协议的情况下,需要开启多个端口的情况下,可以考虑开启PIP功能. 先介绍几个概念: VIP – virtual ...
- IP地址,子网掩码,网段表示法,默认网关,DNS服务器详解,DNS域名设计
本文参考:<计算机网络: IP地址,子网掩码,网段表示法,默认网关,DNS服务器详解> IP地址 概述 计算机要实现网络通信,就必须要有一个用于快速定位的网络地址.IP地址就是计算机在网络 ...
- c#中HttpWebRequest使用Proxy实现指定IP的域名请求
原文:http://www.cnblogs.com/greenerycn/archive/2010/04/11/httpwebreques_host_modify_By_set_proxy.html ...
- 全面了解移动端DNS域名劫持等杂症:原理、根源、HttpDNS解决方案等
1.引言 对于互联网,域名是访问的第一跳,而这一跳很多时候会“失足”(尤其是移动端网络),导致访问错误内容.失败连接等,让用户在互联网上畅游的爽快瞬间消失. 而对于这关键的第一跳,包括鹅厂在内的国 ...
- Java实现通过IP获取域名,通过域名获取IP
一.通过Linux命令实现 ping www.baidu.com nslookup www.baidu.com nslookup 14.215.177.166 为什么这个命令会有一个192.168.1 ...
- DNS域名配置
1.什么是DNS 2.DNS层次介绍及基础内容 3.DNS的工作原理及过程 域名服务器配置实战: 4.主域名服务器配置 5.辅域名服务器配置 6.缓存域名服务器配置 1.什么是D ...
随机推荐
- YY大厅接受不到documentcompleted事件处理
多玩大厅在接受到了页面的documentcompleted事件,才会把遮在页面前面的YY游戏中去掉,我们的游戏页面,YY大厅接收不到事件,所以就排查了下 发现原因在于js脚本里有个用iframe做上报 ...
- Django在不启动server的情况下调用方法
from django.conf import settingsfrom django import template settings.configure() a = template.Templa ...
- Hadoop Pig
Pig包括两部分: 用于描述数据流的语言,称为Pig Latin. 用于执行Pig Latin程序的执行环境,当前有两个环境:单JVM中的本地执行环境和Hadoop集群上的分布式执行环境. Pig内部 ...
- Data Structure Binary Tree: Connect nodes at same level using constant extra space
http://www.geeksforgeeks.org/connect-nodes-at-same-level-with-o1-extra-space/ recursive: #include &l ...
- flex DataGroup
示例1: <?xml version="1.0" encoding="utf-8"?> <s:DataGroup xmlns:fx=" ...
- 尽量不要在viewWillDisappear:方法中移除通知
1.iOS7新增加了导航控制器侧滑手势,当触发侧滑返回时,会调用系统的viewWillDisappear:方法,取消侧滑返回时又会调用viewWillAppear:方法. 2.在做手势和通知等一系 ...
- 【leetcode刷题笔记】Word Search
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from l ...
- ibdata1文件非常大如何解决,ibdata单独存储
启用独立表空间innodb_file_per_table(如果这个参数没有开启,mysql会将数据.索引.元数据都存入到ibdata中的) 数据表 表索引 MVCC(多版本并发控制)数据 回滚段 撤销 ...
- Servlet的过滤器(Fliter)
Servlet过滤器与Servlet十分相似,但具有拦截客户端(浏览器)请求的功能,可以改变请求中的内容来满足实际开发的需求.对于开发人员而言,过滤器实质就是在Web应用服务器上的一个Web应用组件, ...
- django使用html模板减少代码
看下面两个页面: —————————————————————————————————————————————————————————————————————————————————— 一个显示文章列表 ...