AZ-104 Implement and Manage Virtual Networking Practice Question
A subnet already has a user-defined default route (0.0.0.0/0) that sends all outbound traffic to a network virtual appliance. The administrator now needs traffic to the on-premises network 10.50.0.0/16 to use the VPN gateway instead of the appliance. What should be added to the route table?
⚠ Common exam trap
Many candidates assume removing the default route is necessary to force traffic through the VPN gateway, but they overlook that a more specific UDR for the on-premises prefix can coexist with the default route, allowing both paths to function correctly.
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
✓
Add a user-defined route for 10.50.0.0/16 with next hop type Virtual network gateway
Adding a user-defined route (UDR) for the specific prefix 10.50.0.0/16 with next hop type 'Virtual network gateway' creates a more specific route (longest prefix match) than the existing default route (0.0.0.0/0). This ensures traffic destined for the on-premises network is forwarded to the VPN gateway instead of the network virtual appliance, while all other outbound traffic continues to use the appliance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Remove the default route so the system route to the VPN gateway is used
Why it's wrong here
Removing the default route (0.0.0.0/0) would eliminate the route used for all non-specific destinations, potentially breaking internet connectivity and any traffic not covered by other explicit routes. While Azure's system routes do include a route for on-premises networks learned from the virtual network gateway, that system route is only used when no more specific user-defined route exists; if the NVA route for 10.50.0.0/16 remains, it would still override the system route. This approach is overly broad and disruptive compared to the targeted fix of adding a more specific user-defined route for 10.50.0.0/16 that points to the virtual network gateway as the next hop.
When this WOULD be correct
This option would be correct if the question stated that all outbound traffic should use the VPN gateway, and the existing default route to the NVA is no longer needed. For example: 'A subnet currently sends all outbound traffic to an NVA. The administrator now wants all outbound traffic to use the VPN gateway instead. What should be done?'
- ✓
Add a user-defined route for 10.50.0.0/16 with next hop type Virtual network gateway
Why this is correct
A more specific prefix takes precedence over the broader default route. By adding a route for 10.50.0.0/16 that points to the virtual network gateway, traffic to the on-premises network follows the gateway while all other destinations can still follow the default route to the appliance.
- ✗
Change the subnet address space to a smaller CIDR block
Why it's wrong here
Changing the subnet's address space to a smaller CIDR block does not influence Azure's next-hop selection logic. Route selection is based on the longest prefix match of the destination IP address, not on the source subnet's size or boundaries. Even a smaller subnet would still have the existing user-defined default route 0.0.0.0/0, so traffic destined for 10.50.0.0/16 would continue to be sent to the network virtual appliance rather than the virtual network gateway. Resizing the subnet only affects IP address allocation within the VNet and would not alter the effective route table for that subnet.
When this WOULD be correct
This would be correct if the question asked to reduce the number of available IP addresses in a subnet to meet a specific requirement, such as avoiding overlapping address spaces or conserving IP addresses in a VNet.
- ✗
Enable a service endpoint for the on-premises prefix
Why it's wrong here
Service endpoints are designed to provide secure and optimized connectivity from a subnet to Azure PaaS services (e.g., Azure Storage or SQL Database) by routing traffic to the service's public IP addresses via the Azure backbone. They cannot be configured for arbitrary on-premises IP prefixes like 10.50.0.0/16; service endpoints are tied to Azure service tags, not to virtual network gateway or VPN routes. Even if enabled for a service, service endpoints do not alter next-hop behavior for traffic bound for on-premises networks, so they would not cause traffic to go through the virtual network gateway.
When this WOULD be correct
A question where traffic from a subnet to an Azure service (e.g., Azure Storage account) must be routed directly to the service without going through a network virtual appliance or the internet, and the service endpoint must be enabled on the subnet and the service side.
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.
✓Add a user-defined route for 10.50.0.0/16 with next hop type Virtual network gatewayCorrect answer▾
Why this is correct
A more specific prefix takes precedence over the broader default route. By adding a route for 10.50.0.0/16 that points to the virtual network gateway, traffic to the on-premises network follows the gateway while all other destinations can still follow the default route to the appliance.
✗Remove the default route so the system route to the VPN gateway is usedWrong answer — click to see why▾
Why this is wrong here
Removing the default route would break all other outbound traffic that needs to go through the network virtual appliance, not just traffic to 10.50.0.0/16. The requirement is to selectively route only the on-premises traffic via the VPN gateway while keeping the default route for other traffic.
★ When this WOULD be the correct answer
This option would be correct if the question stated that all outbound traffic should use the VPN gateway, and the existing default route to the NVA is no longer needed. For example: 'A subnet currently sends all outbound traffic to an NVA. The administrator now wants all outbound traffic to use the VPN gateway instead. What should be done?'
Why candidates choose this
Candidates may think that removing the default route will allow the system's built-in route for the VPN gateway to take effect, but they overlook that the system route for 10.50.0.0/16 only exists if the VPN gateway is connected to the virtual network, and removing the default route would disrupt other traffic.
✗Change the subnet address space to a smaller CIDR blockWrong answer — click to see why▾
Why this is wrong here
Changing the subnet address space to a smaller CIDR block does not affect routing decisions for traffic destined to 10.50.0.0/16; it only changes the IP range of the subnet itself, not the route table entries.
★ When this WOULD be the correct answer
This would be correct if the question asked to reduce the number of available IP addresses in a subnet to meet a specific requirement, such as avoiding overlapping address spaces or conserving IP addresses in a VNet.
Why candidates choose this
Candidates may mistakenly think that resizing the subnet can influence routing behavior, confusing subnet addressing with route prefixes.
✗Enable a service endpoint for the on-premises prefixWrong answer — click to see why▾
Why this is wrong here
Service endpoints are used to secure Azure service access from a subnet to a specific Azure service (like Azure Storage or SQL Database) by routing traffic directly to the service over the Azure backbone, not to route traffic to an on-premises network via a VPN gateway.
★ When this WOULD be the correct answer
A question where traffic from a subnet to an Azure service (e.g., Azure Storage account) must be routed directly to the service without going through a network virtual appliance or the internet, and the service endpoint must be enabled on the subnet and the service side.
Why candidates choose this
Candidates may confuse service endpoints with VPN or ExpressRoute connectivity, thinking that enabling a service endpoint for an on-premises prefix would somehow route traffic to on-premises, or they may misunderstand that service endpoints are only for Azure services, not on-premises networks.
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 table
A route table is a set of rules, called routes, that determine where network traffic from a subnet or virtual network is directed.
Key term
Subnet
A subnet is a logical subdivision of an IP network, created by partitioning a larger network address space using subnet masks.
About these practice questions
One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.