Reputation: 835
I created a virtual network and put 2 VMs in one subnet. But they were not able to ping each other using their hostnames. I need a DNS Server implemented so that hostnames in the subnet can be resolved to IP addresses. How do I do that? Any help will be appreciated. :)
Upvotes: 0
Views: 6293
Reputation: 389
the simplest scenario is to add your hostnames and ips to your localhost file if you are on Windows or you /etc/resolv.conf if you are on Linux. Deploy your VMs with fixed private IPs to avoid changes if they are rebooted or shutdown.
However, if the scenario is more complex with more than two machines, the best way is to deploy a DNS Server inside your VNET. The steps are the following ones:
An example: http://www.ytechie.com/2013/06/setting-up-a-dns-server-in-azure-iaasvms/
Upvotes: 1