The answer is virtual network gateway. This is the correct next hop because the VM’s effective routes table contains a route for the 10.30.5.0/24 prefix with a next hop type of ‘Virtual network gateway’, and the destination IP 10.30.5.10 falls exactly within that range. Azure always applies the most specific prefix match, so this more specific route overrides the default virtual network (local) route for the broader VNet address space. On the AZ-104 exam, this scenario tests your ability to read effective routes and understand route priority—a common trap is assuming the default local route always applies, but a more specific prefix like a gateway subnet or VPN tunnel will take precedence. Remember the memory tip: “Longest prefix wins; gateway routes override local when the mask is tighter.”
AZ-104 Implement and Manage Virtual Networking Practice Question
This AZ-104 practice question tests your understanding of implement and manage virtual networking. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Effective routes on NIC vm-app01:
Address prefix Next hop type Source
10.20.0.0/16 Virtual network System
10.30.0.0/16 Virtual network gateway BGP
0.0.0.0/0 Virtual appliance User
The VM is in 10.20.0.0/16 and is connected to a VPN gateway that advertises 10.30.0.0/16.
Based on the exhibit, what next hop will the VM use when it sends traffic to 10.30.5.10?
Effective routes on NIC vm-app01:
Address prefix Next hop type Source
10.20.0.0/16 Virtual network System
10.30.0.0/16 Virtual network gateway BGP
0.0.0.0/0 Virtual appliance User
The VM is in 10.20.0.0/16 and is connected to a VPN gateway that advertises 10.30.0.0/16.
A
Virtual appliance at the user-defined next hop
Why wrong: The default route is less specific than the route for 10.30.0.0/16, so it does not win.
B
Virtual network gateway
The BGP route to 10.30.0.0/16 is the most specific matching route and therefore takes precedence.
C
Internet
Why wrong: There is no matching route to Internet for this destination, and a more specific route already exists.
D
Virtual network
Why wrong: VNet local applies only to destinations inside 10.20.0.0/16, not to 10.30.5.10.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Virtual network gateway
The VM's effective route table shows a route for 10.30.5.0/24 with a next hop type of 'Virtual network gateway'. Since 10.30.5.10 falls within this prefix, the VM will use the virtual network gateway as the next hop. This overrides the default virtual network (local) route because it is a more specific prefix match.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
Virtual appliance at the user-defined next hop
Why it's wrong here
The default route is less specific than the route for 10.30.0.0/16, so it does not win.
✓
Virtual network gateway
Why this is correct
The BGP route to 10.30.0.0/16 is the most specific matching route and therefore takes precedence.
Related concept
Read the scenario before looking for a memorised answer.
✗
Internet
Why it's wrong here
There is no matching route to Internet for this destination, and a more specific route already exists.
✗
Virtual network
Why it's wrong here
VNet local applies only to destinations inside 10.20.0.0/16, not to 10.30.5.10.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume traffic to an IP within the virtual network's address space (10.0.0.0/16) will always use the 'Virtual network' next hop, but a more specific route (e.g., 10.30.5.0/24) with a different next hop type overrides it, leading to an incorrect choice of Option D.
Detailed technical explanation
How to think about this question
Azure uses longest prefix match (LPM) routing, where the most specific route (highest subnet mask) wins. The virtual network gateway next hop type is used for site-to-site VPN or ExpressRoute connections, forwarding traffic to the on-premises network. If the gateway is not connected or is misconfigured, traffic to 10.30.5.10 would be dropped, as Azure does not fall back to less specific routes.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this AZ-104 question in full detail.
Implement and Manage Virtual Networking — This question tests Implement and Manage Virtual Networking — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Virtual network gateway — The VM's effective route table shows a route for 10.30.5.0/24 with a next hop type of 'Virtual network gateway'. Since 10.30.5.10 falls within this prefix, the VM will use the virtual network gateway as the next hop. This overrides the default virtual network (local) route because it is a more specific prefix match.
What should I do if I get this AZ-104 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.