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 ...
随机推荐
- iOS9 3D Touch使用
http://www.cnblogs.com/zhanglinfeng/p/5133939.html
- Flask 进阶session和上下文管理解析
session的源码流程 将session放置在redis中 安装 pip install flask-session 使用 import redis from flask import Flask, ...
- 简易bootloader重定位问题
单板选择NandFlash启动,则硬件上电后,系统会自己主动将NandFlash中的前4K内容复制到STEPSTONE即4K SRAM中.然后从SRAM中的0X0地址启动. 基于mini ...
- sprintf在51单片机中的使用
sprintf在51单片机中的使用 unsigned char ch20_str[4]; unsigned char ch2o_m_str[6]; ch2o = 123; ch2o_m = 23456 ...
- Django——自定义分页(可调用)
1.view from django.shortcuts import render,HttpResponse # Create your views here. from app01.models ...
- 【转载】Java定时器的学习
前几看了一下<thinking in java>了解到java原生的Times类有两个问题: (1)Timer是启动单个线程来处理所有的时间任务,如果一个任务耗时很久,那么如果在执行这个过 ...
- 【leetcode刷题笔记】Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the l ...
- 20145229 《Java程序设计》第10周学习总结
20145229 <Java程序设计>第10周学习总结 教材学习内容总结 Java网络编程技术 数据交换 在计算机网络中,现在命名IP地址的规定是IPv4协议,该协议规定每个IP地址由4个 ...
- Linux 上关于iptables
有几个命令: 1.service iptables staus 2.service iptables start 3.service iptables restart 有个配置文件/ec ...
- 解决css的float父div没有高度
在做页面设计常会碰到css的float父div没有高度的情况,HTML代码设计 <div class='box'> <div class='float_left'></d ...