AZ-700 Question 34
Single answerYou manage an Azure environment with two virtual networks (VNet-A and VNet-B), both in the same subscription. You plan to create a single private DNS zone named company.internal and want newly created VMs in both VNets to automatically register their hostnames in that zone. You also want traffic between VNet-A and VNet-B to remain private. Which solution should you implement?
- A
Create the private DNS zone in the same subscription. Link both VNet-A and VNet-B to the zone with auto registration enabled. Then peer VNet-A and VNet-B.
- B
Create the private DNS zone in a different subscription and link both VNet-A and VNet-B as 'registration' VNets. Then peer VNet-A and VNet-B.
- C
Create separate private DNS zones for VNet-A and VNet-B, each with 'registration' enabled. Because they are in the same subscription, peering is not necessary.
- D
Create the private DNS zone in the same subscription, link VNet-A with auto registration, link VNet-B in 'resolution only' mode, and configure a custom DNS forwarder for VNet-B.
Show answer and explanation
Correct answer: A
Explanation
Azure private DNS zones allow linking multiple VNets in the same subscription for both resolution and auto registration. When both VNets and the private DNS zone reside in the same subscription, setting each VNet link type to 'registration' will ensure that new VMs in both VNets automatically register DNS records. VNet peering preserves private IP traffic flow between VNets. For more details, see the official Azure Private DNS documentation at https://learn.microsoft.com/azure/dns/private-dns-overview.
- A. Correct.
CORRECT. If both VNets are in the same subscription as the private DNS zone, you can enable auto registration on both VNet-A and VNet-B. Peering ensures that traffic remains private between the VNets.
- B. Incorrect.
INCORRECT. If the private DNS zone is in a different subscription, you cannot enable automatic registration for both VNets. At least one VNet would need a 'resolution only' link.
- C. Incorrect.
INCORRECT. Creating two separate private DNS zones is unnecessary and complicates DNS management. This also fails the requirement of using one zone for both VNets.
- D. Incorrect.
INCORRECT. Linking VNet-B in 'resolution only' mode does not meet the requirement that VMs in VNet-B automatically register their hostnames in the private DNS zone.