AZ-104 Implement and Manage Virtual Networking Practice Question
A route table contains a user-defined route for 172.16.0.0/16 to a virtual appliance. The ExpressRoute circuit advertises 172.16.10.0/24. A VM in the subnet sends traffic to 172.16.10.20. Which route does Azure use?
⚠ Common exam trap
Test-takers frequently assume UDRs always override BGP routes, but Azure applies longest prefix match first, so a more specific BGP route will be used over a less specific UDR.
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
✓
The BGP route, because it has the more specific prefix length.
Azure uses the most specific prefix match to determine the next hop. The BGP route for 172.16.10.0/24 has a longer prefix length (24) than the user-defined route for 172.16.0.0/16 (16), so the BGP route is preferred regardless of route source priority. This follows the longest prefix match (LPM) algorithm, which overrides the default preference order of UDRs over BGP routes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The user-defined route, because UDRs always beat BGP routes.
Why it's wrong here
The claim that user-defined routes (UDRs) always beat BGP routes is incorrect because Azure route selection begins with longest-prefix match, not route source. The BGP route for 172.16.10.0/24 is more specific than the UDR for 172.16.0.0/16, so the /24 route is chosen regardless of the UDR. Source precedence (UDR over BGP) applies only when two routes have the exact same prefix length, which is not the case here.
When this WOULD be correct
This option would be correct if the UDR and BGP route had the same prefix length (e.g., both /24) and the UDR was for a different prefix that still matched the destination. In that case, Azure prefers UDRs over BGP routes for equal prefix lengths.
- ✓
The BGP route, because it has the more specific prefix length.
Why this is correct
Azure route selection uses longest-prefix match before considering route source precedence. The BGP route for 172.16.10.0/24 is more specific than the UDR for 172.16.0.0/16, so the /24 route is selected for traffic to 172.16.10.20. Source precedence only matters when multiple routes have the same prefix length.
- ✗
The system route to the virtual network, because system routes are preferred over learned routes.
Why it's wrong here
System routes are not preferred over learned routes; in Azure's route selection hierarchy, system routes have the lowest source precedence, behind UDRs and BGP routes. Moreover, the system route to the virtual network is a /16, while the BGP route is a /24, so the more specific prefix length wins before source precedence is ever evaluated. System routes only apply when no other route has a longer or equal prefix, making this option factually wrong.
When this WOULD be correct
This option would be correct in a scenario where a VM sends traffic to an IP address that falls within the virtual network's address space (e.g., 10.0.0.10 in a VNet with address space 10.0.0.0/16), and there are no more specific user-defined or BGP routes. Azure then uses the system route for virtual network traffic.
- ✗
No route is chosen because Azure does not support overlapping prefixes.
Why it's wrong here
Azure fully supports overlapping routes; overlapping prefix lengths are a common design scenario and do not prevent route selection. When multiple overlapping routes exist, Azure resolves them using a deterministic process: first it compares prefix length and selects the most specific route, then breaks ties using source precedence. Thus a /24 BGP route coexisting with a /16 UDR is valid and the /24 is simply selected for traffic to 172.16.10.20, not rejected as an error.
When this WOULD be correct
If the question stated that the UDR and BGP route had the same prefix length (e.g., both /24) and the UDR was preferred over BGP routes by design, then option D would be incorrect; but for D to be correct, Azure would need to reject overlapping prefixes entirely, which it does not.
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.
✓The BGP route, because it has the more specific prefix length.Correct answer▾
Why this is correct
Azure route selection uses longest-prefix match before considering route source precedence. The BGP route for 172.16.10.0/24 is more specific than the UDR for 172.16.0.0/16, so the /24 route is selected for traffic to 172.16.10.20. Source precedence only matters when multiple routes have the same prefix length.
✗The user-defined route, because UDRs always beat BGP routes.Wrong answer — click to see why▾
Why this is wrong here
Azure uses the most specific prefix match, not a fixed preference for UDRs over BGP routes. Since the BGP route (172.16.10.0/24) is more specific than the UDR (172.16.0.0/16), the BGP route is chosen.
★ When this WOULD be the correct answer
This option would be correct if the UDR and BGP route had the same prefix length (e.g., both /24) and the UDR was for a different prefix that still matched the destination. In that case, Azure prefers UDRs over BGP routes for equal prefix lengths.
Why candidates choose this
Candidates may incorrectly remember a rule that 'UDRs always override BGP routes' without considering the prefix length priority, which is the primary factor in route selection.
✗The system route to the virtual network, because system routes are preferred over learned routes.Wrong answer — click to see why▾
Why this is wrong here
System routes are preferred over learned routes only when there is no more specific route; here, the BGP route (172.16.10.0/24) is more specific than the system route (virtual network address space), so Azure uses the most specific match, which is the BGP route.
★ When this WOULD be the correct answer
This option would be correct in a scenario where a VM sends traffic to an IP address that falls within the virtual network's address space (e.g., 10.0.0.10 in a VNet with address space 10.0.0.0/16), and there are no more specific user-defined or BGP routes. Azure then uses the system route for virtual network traffic.
Why candidates choose this
Candidates may incorrectly remember that system routes are always preferred over learned routes, without understanding that route selection is based on longest prefix match first, and system routes are only preferred when prefix lengths are equal.
✗No route is chosen because Azure does not support overlapping prefixes.Wrong answer — click to see why▾
Why this is wrong here
Azure supports overlapping prefixes between UDRs and BGP routes; the more specific prefix (172.16.10.0/24) is used regardless of route source, so a route is chosen.
★ When this WOULD be the correct answer
If the question stated that the UDR and BGP route had the same prefix length (e.g., both /24) and the UDR was preferred over BGP routes by design, then option D would be incorrect; but for D to be correct, Azure would need to reject overlapping prefixes entirely, which it does not.
Why candidates choose this
Candidates may think that overlapping prefixes cause conflicts or that Azure disallows them, confusing overlapping address spaces with route selection behavior.
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
VPN Gateway and ExpressRoute
Key term
Route
A route is a path that data takes through a network from one device or network to another, determined by routing protocols and configured rules.
Key term
User-defined route
A user-defined route (UDR) is a custom routing rule you create in a cloud or on-premises network to override or supplement the system's default routing behavior, directing network traffic along a specific path.
About these practice questions
Courseiva writes every AZ-104 question from scratch — 1,049 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.