Lab 16 – DNS & Name Resolution

Objectives

Prerequisites

Estimated time

30 minutes


Part 1 – Public DNS zone

ℹ️

tip

Record TTL (Time To Live) controls how long DNS clients cache the response. Lower TTL (e.g., 300s) allows faster updates but increases DNS query load. Typical values are 3600s for stable records.

  1. Search for DNS zones > Create.
  2. Basics:

- Resource group: Create new rg-az104-lab16

- Name: contoso-az104lab.com (doesn't need to be a real domain)

- Create.

  1. Go to contoso-az104lab.com > Record sets > + Record set:

- Name: www

- Type: A

- TTL: 3600

- IP Address: 203.0.113.10 (a test IP)

- Create.

  1. Create another record set (CNAME):

- Name: app

- Type: CNAME

- TTL: 3600

- Canonical name: www.contoso-az104lab.com

- Create.

  1. Create an MX record:

- Name: @ (root)

- Type: MX

- TTL: 3600

- Mail exchange: mail.contoso-az104lab.com

- Preference: 10

- Create.

View nameservers

  1. Go to contoso-az104lab.com > Overview — the Nameservers are

listed (e.g., ns1-07.azure-dns.com, etc.). In a real scenario, you'd

update these NS records at your domain registrar to delegate the domain to

Azure DNS.

Part 2 – Private DNS zone

  1. Search for Private DNS zones > Create.
  2. Basics:

- Resource group: rg-az104-lab16

- Name: contoso.internal

- Create.

  1. Create a VNet (or reuse from a prior lab):

- Virtual networks > Create. Resource group: rg-az104-lab16,

Name: vnet-dns16, Address space: 10.90.0.0/16,

Subnets: subnet-vms with 10.90.1.0/24. Create.

  1. Link the private DNS zone to the VNet:

- Go to contoso.internal > Virtual network links (under Settings) >

+ Add.

- Link name: link-vnet-dns16

- Virtual network: vnet-dns16

- Enable autoregistration: Checked

- Create.

Part 3 – Test autoregistration

  1. Create a VM:

- Virtual machines > Create > vm-dns01, Ubuntu 22.04 LTS,

Standard_B1s, vnet-dns16/subnet-vms. Create.

  1. After the VM deploys, go to contoso.internal > Record sets. The VM

should automatically appear as vm-dns01 with an A record pointing to

its private IP (e.g., 10.90.1.4).

Part 4 – Custom/manual A record in private zone

  1. Go to contoso.internal > Record sets > + Record set:

- Name: db01

- Type: A

- TTL: 3600

- IP Address: 10.90.1.50 (a custom IP for a database server)

- Create.

Part 5 – Custom DNS servers for a VNet (overview)

  1. Go to vnet-dns16 > DNS servers (under Settings).
  2. Default is Inherited from Azure (uses Azure-provided DNS 168.63.129.16).
  3. To use custom DNS:

- Set to Custom.

- Add custom DNS server IPs (e.g., 10.90.1.4, 168.63.129.16 for failover).

- Save.

📝

note

Changing DNS servers requires VMs to restart to pick up new settings — discuss,

no need to apply for this lab.

Validation

Cleanup

  1. Resource groups > select rg-az104-lab16 > Delete resource group.

Exam Tips