You manage three Azure virtual networks in the West US region:
* `VNet-Transit` () contains a Virtual Network Gateway configured for an ExpressRoute connection to your on-premises datacenter.
* `VNet-App` () contains virtual machines running web applications.
* `VNet-Database` () contains virtual machines running database instances.
You configure virtual network peering between `VNet-Transit` and `VNet-App`, and between `VNet-Transit` and `VNet-Database`.
You need to ensure that the virtual machines in both `VNet-App` and `VNet-Database` can connect to the on-premises datacenter through the Virtual Network Gateway in `VNet-Transit`.
Which configuration must you apply to the peering links?
- Configure the peering links from `VNet-Transit` to enable Allow gateway transit, and configure the peering links from `VNet-App` and `VNet-Database` to enable Use remote gateways.Answer
- BConfigure the peering links from `VNet-Transit` to enable Use remote gateways, and configure the peering links from `VNet-App` and `VNet-Database` to enable Allow gateway transit.
- CConfigure the peering links from `VNet-Transit` to enable Allow forwarded traffic, and configure the peering links from `VNet-App` and `VNet-Database` to enable Allow forwarded traffic.
- DDeploy a Virtual Network Gateway in both `VNet-App` and `VNet-Database`, and configure the peering links to enable Allow gateway transit on all connections.
Answer
Configure the peering links from `VNet-Transit` to enable Allow gateway transit, and configure the peering links from `VNet-App` and `VNet-Database` to enable Use remote gateways.
To allow spoke virtual networks (`VNet-App` and `VNet-Database`) to use the VPN or ExpressRoute gateway in a hub virtual network (`VNet-Transit`), you must enable gateway transit. This is done by configuring Allow gateway transit on the peering link from the hub virtual network (`VNet-Transit`) to the spokes and configuring Use remote gateways (or 'Use this virtual network's gateway or Route Server') on the peering links from the spoke virtual networks (`VNet-App` and `VNet-Database`) to the hub.
Step-by-Step Solution
Key Concept
Gateway Transit in Virtual Network Peering