An administrator is configuring a peering connection from a hub virtual network named VNet-Hub () to a spoke virtual network named VNet-Spoke (). Both virtual networks have virtual machines deployed in their subnets. VNet-Hub contains a virtual network gateway. The administrator wants virtual machines in VNet-Spoke to be able to use the virtual network gateway in VNet-Hub to access on-premises resources. Which two actions must the administrator perform to configure this gateway transit functionality?
- On the peering from VNet-Hub to VNet-Spoke, select 'Allow gateway transit'Answer
- On the peering from VNet-Spoke to VNet-Hub, select 'Use remote gateways'Answer
- COn the peering from VNet-Spoke to VNet-Hub, select 'Allow gateway transit'
- DOn the peering from VNet-Hub to VNet-Spoke, select 'Use remote gateways'
Answer
Enable 'Allow gateway transit' on the peering connection from VNet-Hub to VNet-Spoke, and enable 'Use remote gateways' on the peering connection from VNet-Spoke to VNet-Hub.
To establish gateway transit, the configuration must be set correctly on both sides of the peering connection. The peering link from the virtual network containing the gateway (the hub) must have 'Allow gateway transit' enabled. The peering link from the virtual network that wants to use the gateway (the spoke) must have 'Use remote gateways' enabled.
Step-by-Step Solution
Key Concept
Gateway transit in virtual network peering allows a spoke virtual network to share the virtual network gateway of a peered hub virtual network.