Your company has an Azure environment with two virtual networks in the East US region: `VNet-Prod` () containing production virtual machines, and `VNet-Shared` () hosting shared services. An Azure Virtual Network Gateway is deployed in `VNet-Shared` to facilitate connectivity to your on-premises network. You are configuring a virtual network peering connection between `VNet-Prod` and `VNet-Shared`. You need to ensure that the virtual machines in `VNet-Prod` can access your on-premises resources by using the Virtual Network Gateway in `VNet-Shared`. Which two configurations should you perform?
- Enable 'Allow gateway transit' on the peering link from VNet-Shared to VNet-Prod.Answer
- Enable 'Use remote gateways' on the peering link from VNet-Prod to VNet-Shared.Answer
- CEnable 'Use remote gateways' on the peering link from VNet-Shared to VNet-Prod.
- DEnable 'Allow gateway transit' on the peering link from VNet-Prod to VNet-Shared.
Answer
Enable 'Allow gateway transit' on the peering link from VNet-Shared to VNet-Prod, and enable 'Use remote gateways' on the peering link from VNet-Prod to VNet-Shared.
To allow the spoke virtual network to use a gateway in the peered virtual network, you must establish a bidirectional peering where: the gateway-hosting virtual network (VNet-Shared) permits transit by enabling 'Allow gateway transit', and the spoke virtual network (VNet-Prod) is configured to use the remote gateway by enabling 'Use remote gateways'.
Step-by-Step Solution
Key Concept
Virtual Network Peering Gateway Transit