Exercise 05: Create DNS zones and configure DNS settings
Scenario
Your organization requires workloads to use domain names instead of IP addresses for internal communications. The organization doesn’t want to add a custom DNS solution. You identify these requirements.
- A private DNS zone is required for contoso.com.
- The DNS will use a virtual network link to app-vnet.
- A new DNS record is required for the backend subnet.
Skilling tasks
- Create and configure a private DNS zone.
- Create and configure DNS records.
- Configure DNS settings on a virtual network.
Architecture diagram
Exercise instructions
Note: This exercise requires the Lab 01 virtual networks and subnets to be installed. A template is provided if you need to deploy those resources.
Create a private DNS zone
Azure Private DNS provides a reliable, secure DNS service to manage and resolve domain names in a virtual network without the need to add a custom DNS solution. By using private DNS zones, you can use your own custom domain names rather than the Azure-provided names.
-
On the Azure portal, search for and select
Private dns zones
. -
Select + Create and configure the DNS zone.
Property Value Subscription Select your subscription Resource group RG1 Name private.contoso.com
Region East US -
Select Review + create and then select Create.
-
Wait for the DNS zone to deploy, and then select Go to resource.
Create a virtual network link to your private DNS zone
To resolve DNS records in a private DNS zone, resources must be linked to the private zone. A virtual network link associates the virtual network to the private zone.
-
In the portal, continue working on the private.contoso.com DNS zone.
-
In the DNS Management blade, select + Virtual network links.
-
Select + Add” and configure the virtual network link.
Property Value Link name app-vnet-link
Virtual network app-vnet Enable auto registration Enabled -
Select Create and wait for the deployment to finish. If necessary, Refresh the page.
Create a DNS record set
DNS records provide information about the DNS zone.
-
In the portal, continue working on the private.contoso.com DNS zone.
-
In the DNS Management blade, select + Recordsets.
-
Notice that two A records have automatically been created for each of the virtual machines.
-
Select + Add and configure a record set. When finished select Add.
Property Value Name backend
Type A TTL 1 IP address 10.1.1.5
Note: This record set implies there is a virtual machine in app-vnet with a private IP address of 10.1.1.5.
Learn more with online training
- Introduction to Azure DNS. This module explains what Azure DNS does, how it works, and when you should choose to use Azure DNS as a solution to meet your organization’s needs.
- Host your domain on Azure DNS. In this module, you learn how to create a DNS zone and DNS records.
Key takeaways
Congratulations on completing the exercise. Here are the main takeaways:
- Azure DNS is a cloud service that allows you to host and manage domain name system (DNS) domains, also known as DNS zones.
- Azure DNS public zones host domain name zone data for records that you intend to be resolved by any host on the internet.
- Azure Private DNS zones allow you to configure a private DNS zone namespace for private Azure resources.
- A DNS zone is a collection of DNS records. DNS records provide information about the domain.