In this unit, you will configure DNS name resolution for Contoso Ltd. You will create a private DNS zone named contoso.com, link the VNets for registration and resolution, and then create two virtual machines and test the configuration.
In this exercise, you will:
Note: An interactive lab simulation is available that allows you to click through this lab at your own pace. You may find slight differences between the interactive simulation and the hosted lab, but the core concepts and ideas being demonstrated are the same.
Go to Azure Portal.
On the Azure home page, in the search bar, enter dns, and then select Private DNS zones.
In Private DNS zones, select + Create.
Use the information in the following table to create the private DNS zone.
Tab | Option | Value |
---|---|---|
Basics | Resource group | ContosoResourceGroup |
Name | Contoso.com | |
Tags | No changes required |
Important Note: If you are prompted that Contoso.com is reserved, Check that you are creating a Private DNS Zone and not a DNS Zone.
Select Review + create Wait for validation to complete: Review your settings and select Create
Wait until the deployment is complete, and then select Go to resource.
Verify that the zone has been created.
In Contoso.com, under Settings, select Virtual network links.
On Contoso.com | Virtual network links, select + Add. |
 |
Option | Value |
---|---|
Link name | CoreServicesVnetLink |
Subscription | No changes required |
Virtual Network | CoreServicesVnet (ContosoResourceGroup) |
Enable auto registration | Selected |
Review your settings and select Create. |
Note: You do not need to wait for completion, carry on with the next step.
On Contoso.com | Virtual network links, select + Add. |
Option | Value |
---|---|
Link name | ManufacturingVnetLink |
Subscription | No changes required |
Virtual Network | ManufacturingVnet (ContosoResourceGroup) |
Enable auto registration | Selected |
Review your settings and select Create. |
On Contoso.com | Virtual network links, select + Add. |
Option | Value |
---|---|
Link name | ResearchVnetLink |
Subscription | No changes required |
Virtual Network | ResearchVnet (ContosoResourceGroup) |
Enable auto registration | Selected |
Review your settings and select Create. |
Select Refresh: It may take upto 20 seconds before all 3 Network links show in the blade.
Verify that the CoreServicesVnetLink, ManufacturingVnetLink and the ResearchVnetLink has been created, and that auto-registration is enabled.
In this section, you will create two test VMs to test the Private DNS zone configuration.
On the toolbar of the Cloud Shell pane, select the Manage Files icon, in the drop-down menu, select Upload and upload the following files azuredeploy.json and azuredeploy.parameters.json into the Cloud Shell home directory one by one from the source folder C:\Allfiles\Exercises\M01.
Note: You will be prompted to provide an Admin password. Use Pa55w.rd1234abc
$RGName = "ContosoResourceGroup"
New-AzResourceGroupDeployment -ResourceGroupName $RGName -TemplateFile azuredeploy.json -TemplateParameterFile azuredeploy.parameters.json
When the deployment is complete, go to the Azure portal home page, and then select Virtual Machines.
Verify that both virtual machines have been created.
On the Azure Portal home page, select Private DNS zones.
On Private DNS zones, select contoso.com.
Verify that host (A) records are listed for both VMs, as shown:
On the Azure Portal home page, select Virtual Machines.
Select TestVM1.
On TestVM1, select Connect > Connect.
On TestVM1 | Connect, select Download RDP file. |
Save the RDP file to your desktop.
On the Azure Portal home page, select Virtual Machines.
Select TestVM2.
On TestVM2, select Connect > Connect.
On TestVM2 | Connect, select Download RDP file. |
Save the RDP file to your desktop.
Connect to TestVM1 using the RDP file, and the username TestUser and the password Pa55w.rd1234abc.
If prompted, in Networks, select Yes.
On TestVM1, open a PowerShell console and enter the command ipconfig /all.
Verify that the IP address is the same as the one you noted in the DNS zone.
Enter the command ping TestVM2.contoso.com.
Verify that the FQDN resolves to the IP address that you noted in the Private DNS zone. The ping itself will timeout because of the Windows Firewall that is enabled on the VMs.
Congratulations! You have created a private DNS Zone, added a name resolution and auto-registration link, and tested name resolution in your configuration.
Note: Do not Delete any resources: you will use them in the next LAB Exercise.