问题描述
我是新来的Azure(罢工1),完全在网络(罢工2)吸。
I'm new to Azure (strike 1) and totally suck at networking (strike 2).
不过,我有两个虚拟机并在同一个虚拟网络中运行;一会作为Web服务器和其他将作为SQL数据库服务器
Nevertheless, I've got two VMs up and running in the same virtual network; one will act as a web server and the other will act as a SQL database server.
虽然我可以看到他们的内部IP地址都在同一个网络,我无法验证该机器可以相互沟通,我有点糊涂关于合适的地方来解决这一英寸
While I can see that their internal IP addresses are both in the same network I'm unable to verify that the machines can communicate with each other and am sort of confused regarding the appropriate place to address this.
微软自己的文档中说
这是你在Windows Azure中创建的所有虚拟机就可以
自动使用通讯与其他专用网络通道
在同一个云服务或虚拟的网络虚拟机。
但是,你需要一个端点添加到其他资源的计算机
因特网或其他虚拟网络上与它进行通信。您
可以将特定的端口和协议到端点关联。资源
可以通过使用TCP或UDP的协议连接到端点。在TCP
协议包括HTTP和HTTPS通信。
那么,为什么不能在机器至少互相ping通通过内部IP?在方式是它的Windows防火墙的故事吗?我开始怀疑,如果我选择了一个简单的Web服务器/数据库服务器设置错误的做法。请原谅我的无知。任何帮助将大大AP preciated。
So why can't the machines at least ping each other via internal IPs? Is it Windows Firewall getting in the way? I'm starting to wonder if I've chose the wrong approach for a simple web server/database server setup. Please forgive my ignorance. Any help would be greatly appreciated.
推荐答案
如果两台计算机都在同一个虚拟网络,然后就关闭Windows防火墙,他们将能够互相ping通。另一种方式是只允许在Windows防火墙中所有传入ICMP流量与高级设置。
If both the machines are in the same Virtual Network, then just turn off Windows Firewall and they will be able to ping each other. Other way is to just allow all incoming ICMP traffic in Windows Firewall with Advanced Settings.
不过有一个小窍门。无论是机器会看到彼此的IP地址,但会有否名称如此定义的虚拟网络解决方案。这意味着你将无法按名称ping通,但只能通过直接IP地址。所以,如果想让你的网站(在VM1)连接到SQL Server(上VM2),您必须通过完整的IP地址来解决它,而不是机器名。
However there is a trick. Both the machines will see each other by IP Addresses, but there will be no name resolution in so defined Virtual Network. Meaning that you won't be able to ping by name, but only by direct IP address. So, if want your Website (on VM1) to connect to SQL Server (on VM2), you have to address it by full IP Address, not machine name.
做一个虚拟网络中的名称解析的唯一方法是使用一个专用的DNS服务器,您维护和配置导通premises。
The only way to make name resolution within a Virtual Network is to use a dedicated DNS server, which you maintain and configure on-premises.
这篇文章在Windows Azure的细节名称解析方案介绍。你的具体情况是这样的:
This article describes in details name resolution scenarios in Windows Azure. Your particular case is this:
名称解析
相同的虚拟网络,但不同的云服务
您可能实现域名解析,如果你把你的虚拟机是一样的云服务。因此,你甚至不会需要专用的虚拟网络。
You could potentially achieve name resolution, if you put your VMs is same cloud service. Thus you will not even require dedicated virtual network.
这篇关于Azure的VM的虚拟网络互联互通的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!