Question

Difficulty: MediumConfigure Virtual Network Peering

Your company has an Azure environment with two virtual networks in the East US region: `VNet-Prod` (10.10.0.0/1610.10.0.0/16) containing production virtual machines, and `VNet-Shared` (10.20.0.0/1610.20.0.0/16) 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?

  1. Enable 'Allow gateway transit' on the peering link from VNet-Shared to VNet-Prod.Answer
  2. Enable 'Use remote gateways' on the peering link from VNet-Prod to VNet-Shared.Answer
  3. C
    Enable 'Use remote gateways' on the peering link from VNet-Shared to VNet-Prod.
  4. D
    Enable '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

1
Identify the virtual network hosting the Virtual Network Gateway.
VNet-Shared is identified as the host network containing the gateway.
Only the virtual network that contains the gateway can transit gateway traffic.
2
Configure the peering link originating from the gateway host virtual network.
Enable 'Allow gateway transit' on the peering link from VNet-Shared to VNet-Prod.
This allows VNet-Shared to act as a transit point and share its gateway resources with the peered network.
3
Configure the peering link originating from the spoke virtual network.
Enable 'Use remote gateways' on the peering link from VNet-Prod to VNet-Shared.
This allows VMs in VNet-Prod to route their on-premises destined traffic through the gateway located in the peered VNet-Shared.

Key Concept

Virtual Network Peering Gateway Transit
Rate this question