An enterprise is designing a hub-and-spoke network topology in Azure. The hub virtual network, `vnet-hub-weur` (), hosts an Azure Firewall at and an ExpressRoute gateway. The spoke virtual network, `vnet-prod-weur` (), contains a subnet named `subnet-app` (). The on-premises network uses the IP address space .
The routing design must meet the following requirements:
1. All internet-bound traffic from `subnet-app` must be routed through the Azure Firewall in the hub.
2. All traffic from `subnet-app` destined for the on-premises network must be routed through the ExpressRoute gateway.
3. Local traffic within `vnet-prod-weur` must bypass the Azure Firewall.
Which two configurations should you recommend to meet these requirements? (Select TWO)
- Configure the virtual network peering connection to allow gateway transit on `vnet-hub-weur` and use the remote virtual network's gateway on `vnet-prod-weur`.Cevap
- In the route table associated with `subnet-app`, add a route for `0.0.0.0/0` with the next hop type set to Virtual appliance and the next hop address set to .Cevap
- CIn the route table associated with `subnet-app`, add a route for `10.101.0.0/16` with the next hop type set to Virtual appliance and the next hop address set to .
- DIn the route table associated with `subnet-app`, add a route for `172.16.0.0/12` with the next hop type set to Virtual network gateway, without configuring gateway transit on the peering connection.
Cevap
Configure the virtual network peering connection to allow gateway transit on the hub VNet and use the remote gateway on the spoke VNet, and add a user-defined route for the default route pointing to the Azure Firewall IP in the subnet's route table.
To route internet-bound traffic through the firewall, a route for the default route is required in the route table associated with the subnet. Azure's Longest Prefix Match ensures that the local virtual network route takes precedence over the default route, keeping local traffic local and bypassing the firewall. To connect to the on-premises network via the hub's gateway, gateway transit must be configured on the peering relationship, which makes the gateway route inheritable by the spoke.
Adım Adım Çözüm
Anahtar Kavram
Hub-and-spoke routing with gateway transit and default route redirection using User-Defined Routes.