In this article let us understand how to assign your organization's DNS servers IPs Addresses to Azure hosted virtual machines. Before we see that couple of important points.
- Azure by default assigns an Azure-hosted DNS IP address which you can override.
- We don't assign a DNS IP address to the Nic at the OS layer as shown below image
Azure allows you to define your own DNS Servers IP address at the VNET and at the Network Interface Card of the VM. DNS IPs defined at Network Interface Card will always override the ones defined VNET level.
Assigning your own DNS Server IPs to Vnet:
Navigate to the DNS Servers option under the settings of the Vnet to which you want to assign the DNS Server IPs, select custom option, and provide you organization DNS server IPs and save.
If there are Virtual Machines in this Vnet that are running you need to reboot them to get a new DNS Server IP Address, any new virtual machines that are deployed will automatically pick the new DNS IPs configured at the Vnet level.
Assigning your own DNS Server IPs to Network Interface of Azure Virtual Machines:
You can also assign DNS Server IPs to the Network interface card attached to the VM as shown below.
Select custom DNS option to assign DNS Server IPs.
If DNS IPs are assigned at the VNET level they will be overridden by the IPs defined at the Network interface card of the Virtual Machine.
You can assign 20 DNS server IPs both at VNET and Network interface card of the VM.