AZ-700 Question 52
Single answerYou manage an Azure Virtual Network (VNet) named 'corpVnet' with multiple subnets. You have created a custom route table named 'OnPremRouteTable' that contains user-defined routes directing outbound traffic to an on-premises environment via ExpressRoute. You want the routes in 'OnPremRouteTable' to apply specifically to a subnet called 'DataSubnet' so traffic from that subnet will be routed to your on-premises environment. Which action should you take to accomplish this?
- A
Add 'OnPremRouteTable' as a tag on the virtual machines within 'DataSubnet'.
- B
In the Azure portal, open 'OnPremRouteTable', select 'Subnets', and associate 'DataSubnet'.
- C
Attach 'OnPremRouteTable' to the existing Network Security Group assigned to 'DataSubnet'.
- D
Assign 'OnPremRouteTable' at the VNet level so it automatically applies to all subnets in 'corpVnet'.
Show answer and explanation
Correct answer: B
Explanation
To direct traffic from a specific Azure subnet through custom or user-defined routes, you must explicitly associate the route table with that subnet. In the Azure portal, you navigate to the route table, select the 'Subnets' menu, and choose the relevant subnet. For more details, refer to the Microsoft documentation on 'Create a route table' and 'Associate or dissociate a subnet to a route table' at https://learn.microsoft.com/azure/virtual-network/tutorial-create-route-table-portal.
- A. Incorrect.
Incorrect. Adding tags (such as the route table name) to VMs does not apply custom routes. Tags are purely metadata and do not affect routing behavior.
- B. Correct.
Correct. Associating a route table with a subnet is the required step to ensure that the subnet uses the user-defined routes. You do this in the route table's 'Subnets' blade.
- C. Incorrect.
Incorrect. A Network Security Group (NSG) controls inbound and outbound traffic based on security rules, not routing. Attaching a route table to an NSG does not apply routing changes.
- D. Incorrect.
Incorrect. Route tables must be associated with a specific subnet. Associating a route table at the VNet level is not a valid option; routing must be configured per subnet.