AZ-104 Implement and Manage Virtual Networking Practice Question
A company has frontend and backend VMs in the same subnet. Security rules must allow the frontend tier to reach only the backend tier on TCP 443, without assigning rules to individual VM IP addresses. What should the administrator use in the NSG rule?
⚠ Common exam trap
Candidates often assume subnet-based NSG rules are sufficient for tier isolation, but since both tiers share the same subnet, a subnet-to-subnet rule would allow all VMs in that subnet to communicate, failing the requirement to restrict traffic to only frontend-to-backend on TCP 443.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Application security groups for the frontend and backend VMs.
Application Security Groups (ASGs) allow you to group VMs logically by their application tier (e.g., frontend, backend) without relying on individual IP addresses. You can then create an NSG rule that uses the frontend ASG as the source and the backend ASG as the destination, restricting traffic to TCP 443. This meets the requirement of not assigning rules to individual VM IPs while ensuring only frontend VMs can reach backend VMs within the same subnet.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A user-defined route that sends frontend traffic to the backend subnet.
Why it's wrong here
A user-defined route (UDR) changes the next-hop path for traffic; it cannot block or allow flows. Within a single VNet, Azure already routes traffic between subnets on the same virtual network, and a custom route to the backend subnet would only override that default path, not provide any filtering logic. Moreover, because both VMs are in the same subnet, a UDR cannot even distinguish the frontend VM from the backend VM at the routing layer, making it irrelevant to selecting on application role.
When this WOULD be correct
An administrator needs to force traffic from the frontend subnet to the backend subnet through a network virtual appliance (NVA) for inspection. A UDR with the next hop set to the NVA IP would be correct.
- ✗
A network security group rule that references both subnets by address prefix only.
Why it's wrong here
An NSG rule that references both subnets by address prefix only is too broad and, in this exact topology, impossible: the frontend and backend VMs are in the same subnet, so a single subnet prefix cannot tell them apart. Even if they were in separate subnets, a prefix-based rule would apply the same access policy to every VM in those subnets, preventing any per-role or per-VM granularity. Proper least-privilege design requires identity of the workload, such as an ASG, rather than a coarse L3 prefix.
When this WOULD be correct
This option would be correct if the question required allowing traffic between all VMs in two subnets (e.g., allow all traffic from subnet A to subnet B on TCP 443) without needing to specify individual VM IPs. For example: 'Allow all VMs in the frontend subnet to communicate with all VMs in the backend subnet on TCP 443.'
- ✓
Application security groups for the frontend and backend VMs.
Why this is correct
Application security groups (ASGs) are the correct mechanism because they let you group VM NICs by workload role (frontend or backend) and then write NSG rules that use those groups as source and destination. This works even when both tiers share the same subnet because the grouping is by application attribute, not IP topology. ASG-based rules also survive IP address changes and simplify maintenance by centralizing the role definition outside the NSG.
- ✗
A VNet peering connection between the two tiers.
Why it's wrong here
VNet peering connects two separate virtual networks to enable private routing between them; it has no role in filtering traffic between tiers. Here the frontend and backend VMs are placed in the same subnet, so there is no VNet boundary to peer, and peering would not add any security policy. At best, peering changes reachability, but you still need NSG rules (typically with ASGs) to enforce which workloads may communicate.
When this WOULD be correct
A question where two VNets need to communicate, such as connecting a hub VNet to a spoke VNet, and the goal is to enable cross-VNet traffic without using a VPN gateway or ExpressRoute.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓Application security groups for the frontend and backend VMs.Correct answer▾
Why this is correct
Application security groups (ASGs) are the correct mechanism because they let you group VM NICs by workload role (frontend or backend) and then write NSG rules that use those groups as source and destination. This works even when both tiers share the same subnet because the grouping is by application attribute, not IP topology. ASG-based rules also survive IP address changes and simplify maintenance by centralizing the role definition outside the NSG.
✗A user-defined route that sends frontend traffic to the backend subnet.Wrong answer — click to see why▾
Why this is wrong here
User-defined routes control traffic routing, not security filtering. The question requires allowing traffic on TCP 443, which is a security rule function, not a routing decision.
★ When this WOULD be the correct answer
An administrator needs to force traffic from the frontend subnet to the backend subnet through a network virtual appliance (NVA) for inspection. A UDR with the next hop set to the NVA IP would be correct.
Why candidates choose this
Candidates may confuse routing (UDR) with security filtering (NSG), thinking that directing traffic to the backend subnet inherently permits it, overlooking that NSGs still block by default.
✗A network security group rule that references both subnets by address prefix only.Wrong answer — click to see why▾
Why this is wrong here
Option B is wrong because using subnet address prefixes in an NSG rule would allow traffic between any VMs in the two subnets, not just between the specific frontend and backend tiers. The requirement is to restrict traffic to only the frontend and backend VMs, not all VMs in the subnets.
★ When this WOULD be the correct answer
This option would be correct if the question required allowing traffic between all VMs in two subnets (e.g., allow all traffic from subnet A to subnet B on TCP 443) without needing to specify individual VM IPs. For example: 'Allow all VMs in the frontend subnet to communicate with all VMs in the backend subnet on TCP 443.'
Why candidates choose this
Candidates may think that referencing subnets by address prefix is sufficient to control traffic between tiers, overlooking that it applies to all VMs in the subnet, not just the intended application tiers.
✗A VNet peering connection between the two tiers.Wrong answer — click to see why▾
Why this is wrong here
VNet peering connects entire virtual networks, not individual tiers within the same subnet. The question specifies frontend and backend VMs are in the same subnet, so peering is irrelevant and cannot restrict traffic between tiers.
★ When this WOULD be the correct answer
A question where two VNets need to communicate, such as connecting a hub VNet to a spoke VNet, and the goal is to enable cross-VNet traffic without using a VPN gateway or ExpressRoute.
Why candidates choose this
Candidates may confuse VNet peering with a method to control traffic between tiers, not realizing it operates at the VNet level and cannot filter traffic within the same subnet.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Visual reference
Go deeper
Related to this question
Learn chapter
Dynamic Membership Groups
Key term
TCP
TCP (Transmission Control Protocol) is a core internet protocol that ensures data is sent reliably and in order between devices over a network.
Key term
NSG rule
An NSG rule is a set of security rules in Microsoft Azure that controls whether network traffic is allowed or denied to and from Azure resources.
About these practice questions
This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.