A company's Azure infrastructure in the East US region uses a hub-and-spoke network topology. The hub virtual network, named `VNet-Hub` (), hosts a Virtual Network Gateway that establishes a Site-to-Site VPN connection to the corporate headquarters. A spoke virtual network, named `VNet-SpokeA` (), contains a subnet hosting an active virtual machine named `VM-A`. To enable hybrid connectivity, you create a virtual network peering connection between `VNet-Hub` and `VNet-SpokeA`. You must ensure that `VM-A` can access resources in the corporate headquarters through the Virtual Network Gateway in `VNet-Hub`.
Which configuration should you apply to the peering links?
- On the peering link from VNet-Hub to VNet-SpokeA, select 'Allow gateway transit'. On the peering link from VNet-SpokeA to VNet-Hub, select 'Use the remote virtual network's gateway'.Answer
- BKeep the default settings for both peering links, as virtual network peering automatically routes traffic to the Virtual Network Gateway in VNet-Hub.
- COn the peering link from VNet-Hub to VNet-SpokeA, select 'Use the remote virtual network's gateway'. On the peering link from VNet-SpokeA to VNet-Hub, select 'Allow gateway transit'.
- DOn both peering links, select 'Allow forwarded traffic' and leave the gateway settings disabled.
Answer
To allow the spoke virtual network to use the hub's gateway, the peering link from VNet-Hub to VNet-SpokeA must have 'Allow gateway transit' enabled, and the peering link from VNet-SpokeA to VNet-Hub must have 'Use the remote virtual network's gateway' enabled.
The configuration of 'Allow gateway transit' on the hub peering link permits the hub to share its Virtual Network Gateway. Concurrently, enabling 'Use the remote virtual network's gateway' on the spoke peering link instructs the spoke VNet to route traffic destined for on-premises through that remote hub gateway.
Step-by-Step Solution
Key Concept
Gateway transit in Azure Virtual Network Peering allows a peered virtual network to use a virtual network gateway in the hub network for cross-premises connectivity.