AZ-104 practice question 7 of 35

You need to ensure that VM1 can communicate with VM4. The solution must minimize administrative effort. What should you do?

Full set: 569 questions

Domain Implement and manage virtual networking

Answer options
A: Create a user-defined route from VNET1 to VNET3.
B: Create an NSG and associate the NSG to VM1 and VM4.
C: Assign VM4 an IP address of 10.0.1.5/24.
D: Establish peering between VNET1 and VNET3. Correct answer
Correct Answer:
D. Establish peering between VNET1 and VNET3.
Explanation

Virtual machines in different virtual networks (VNETs) cannot communicate by default. The most straightforward and administratively simple method to enable communication between VNET1 and VNET3 is to use VNet peering. VNet peering connects two virtual networks, allowing traffic to flow between them privately over the Microsoft backbone network as if they were a single network. Since the address spaces of VNET1 (10.0.0.0/16) and VNET3 (10.1.0.0/16) do not overlap, peering is a valid and optimal solution that directly meets the requirement with minimal configuration.

Why Incorrect

A. A user-defined route (UDR) only directs traffic to a specific next hop (like a gateway or virtual appliance); it does not create the underlying connectivity path between the VNETs.
B. A Network Security Group (NSG) acts as a firewall to filter traffic. It can permit or deny communication but cannot establish the initial connectivity between separate virtual networks.
C. A virtual machine must be assigned an IP address from the address space of the virtual network it resides in. Assigning an IP from VNET1's range to a VM in VNET3 is not possible.

References

1. Microsoft Learn | Azure Virtual Network Documentation: "Virtual network peering enables you to seamlessly connect two or more Azure virtual networks. The virtual networks appear as one for connectivity purposes. The traffic between virtual machines in peered virtual networks uses the Microsoft backbone infrastructure."

Source: Azure virtual network peering

Section: "Connectivity".

2. Microsoft Learn | Azure Virtual Network Documentation: "Azure routes traffic between subnets

connected virtual networks

on-premises networks

and the Internet

by default. You can override Azure's default routing by creating a route table... A route table contains routes

also known as user-defined routes (UDR)."

Source: Virtual network traffic routing

Section: "User-defined".

3. Microsoft Learn | Azure Virtual Network Documentation: "A network security group contains security rules that allow or deny inbound network traffic to

or outbound network traffic from

several types of Azure resources. For each rule

you can specify source and destination

port

and protocol."

Source: Network security groups

Section: "Introduction".

4. Microsoft Learn | Azure Virtual Network Documentation: "You assign the following IP address settings to an Azure virtual network: Address space... Each subnet within a VNet must have an address space

specified in CIDR format

that's a subrange of the VNet's address space."

Source: Public and private IP addressing in Azure

Section: "Virtual networks".

Question breakdown

Tests
Configure and manage virtual network peering
Difficulty
Easy

Key idea: VMs in different Azure VNets cannot communicate by default, and VNet peering is the lowest-effort way to connect two non-overlapping VNets.

How to reach the answer

  1. VM1 is in VNET1 and VM4 is in VNET3; separate VNets have no connectivity by default.
  2. NSGs only filter traffic and UDRs only steer traffic along paths that already exist; neither creates a path between VNets.
  3. Re-addressing VM4 into VNET1's range means moving the VM, which is disruptive and high effort.
  4. Clue: 'minimize administrative effort' points to peering, assuming the address spaces do not overlap.

Each option

  • AIncorrect. A UDR cannot create connectivity between unconnected VNets; it only overrides next-hop routing.
  • BIncorrect. NSGs allow or deny traffic but do not provide a network path between separate VNets.
  • CIncorrect. Giving VM4 an address in VNET1's range would mean moving it to that VNet, which is a disruptive, high-effort change.
  • DCorrect. Peering VNET1 and VNET3 gives private connectivity over the Microsoft backbone with minimal configuration.

Common trap: A UDR looks like a routing fix, but custom routes cannot reach a VNet that has no peering or gateway connection.

In practice: Peering is the standard way to link workload VNets, often in hub-and-spoke designs. Planning non-overlapping address spaces up front avoids blockers later.

Remember: To connect VMs in different non-overlapping VNets with the least effort, peer the VNets.

Drafted with AI assistance and checked against the answer key.

Keep practicing

Take the free AZ-104 practice test

Ten exam-style questions with answers and explanations, plus the exam facts and study guides.

Start the free practice test

More questions

Other AZ-104 practice questions

Scroll to Top