An enterprise is designing a virtual network routing architecture in Azure to support their workload migration. The architecture consists of a hub virtual network named `vnet-prod-hub` () that contains a Virtual Network Gateway (`vgw-prod-hub`) in the `GatewaySubnet` (), and a spoke virtual network named `vnet-prod-spoke1` () hosting an application subnet named `snet-app` (). You need to design a routing solution that forces all internet-bound traffic from the VMs in `snet-app` to go through `vgw-prod-hub` to the on-premises network, while ensuring that VMs within `vnet-prod-spoke1` can communicate directly with each other without routing through the hub. Which two configurations should you include in the design? Select two.
- Configure the virtual network peering from `vnet-prod-spoke1` to `vnet-prod-hub` to use the remote virtual network's gateway, and configure the peering from `vnet-prod-hub` to `vnet-prod-spoke1` to allow gateway transit.Answer
- Create and associate a route table to the `snet-app` subnet in `vnet-prod-spoke1` with a route for and a next hop type of Virtual network gateway.Answer
- CAssociate a route table to the `snet-app` subnet in `vnet-prod-spoke1` with a route for and a next hop type of Virtual appliance pointing to the hub gateway.
- DAssociate a route table to the `snet-app` subnet in `vnet-prod-spoke1` with a route for the Azure DNS service IP address () with a next hop type of Virtual network gateway.
Answer
Configure the virtual network peering from the spoke to the hub to use the remote gateway, configure the peering from the hub to the spoke to allow gateway transit, and associate a route table to the application subnet with a route for pointing to the Virtual network gateway.
To successfully route all internet-bound traffic from a spoke virtual network to an on-premises network via a hub gateway (forced tunneling), you must configure the virtual network peering to allow gateway transit on the hub virtual network and configure the spoke virtual network to use the remote virtual network's gateway. Additionally, you must associate a route table containing a route for with a next hop type of Virtual network gateway to the spoke subnet to override the default system route that sends internet traffic directly to the internet.
Step-by-Step Solution
Key Concept
Forced tunneling in Azure hub-and-spoke topologies requires configuring gateway transit on the peering links and deploying a UDR for pointing to the Virtual network gateway without overriding local subnet or infrastructure routes.