Question

Difficulty: MediumConfigure Virtual Network Peering

An administrator is configuring connectivity for a hybrid Azure environment. The environment contains the following resources:
* VNet-Hub (10.10.0.0/1610.10.0.0/16): Contains a virtual network gateway named GW-Hub in GatewaySubnet (10.10.0.0/2410.10.0.0/24), and a virtual machine named VM-Hub in Subnet-Hub (10.10.1.0/2410.10.1.0/24).
* VNet-Spoke (10.20.0.0/1610.20.0.0/16): Contains a virtual machine named VM-Spoke in Subnet-Spoke (10.20.1.0/2410.20.1.0/24).
* GW-Hub is connected to an on-premises network (192.168.1.0/24192.168.1.0/24) via a Site-to-Site VPN connection.

A virtual network peering connection is established between VNet-Hub and VNet-Spoke.

Which configuration must the administrator apply to the peering links to allow VM-Spoke to communicate with the on-premises network?

  1. A
    Enable 'Use remote gateways' on the VNet-Hub peering link, and enable 'Allow gateway transit' on the VNet-Spoke peering link.
  2. Enable 'Allow gateway transit' on the VNet-Hub peering link, and enable 'Use remote gateways' on the VNet-Spoke peering link.Answer
  3. C
    Enable 'Allow forwarded traffic' on both peering links, and create a User-Defined Route in VNet-Spoke with a next hop of Virtual Network Gateway.
  4. D
    Enable 'Allow gateway transit' on both peering links, and configure a local VPN connection directly on VM-Spoke.

Answer

Enable 'Allow gateway transit' on the VNet-Hub peering link, and enable 'Use remote gateways' on the VNet-Spoke peering link.
The correct configuration is to enable 'Allow gateway transit' on the VNet-Hub peering link and 'Use remote gateways' on the VNet-Spoke peering link. In Azure, the virtual network containing the VPN gateway must allow gateway transit so that its gateway can be shared with peered spokes. Conversely, the spoke virtual network must be configured to use remote gateways to route traffic destined for on-premises through the hub's gateway and automatically receive the propagated routes.

Step-by-Step Solution

1
Identify the hosting location of the Virtual Network Gateway.
The Virtual Network Gateway (GW-Hub) is located in VNet-Hub.
VNet Peering transit configurations depend on which network hosts the gateway resource.
2
Configure the transit behavior on the hosting network (VNet-Hub).
Enable 'Allow gateway transit' on the peering link originating from VNet-Hub.
This allows VNet-Hub to share its gateway with the peered spoke network.
3
Configure the consumption behavior on the spoke network (VNet-Spoke).
Enable 'Use remote gateways' on the peering link originating from VNet-Spoke.
This configures the routing table of VNet-Spoke to dynamically learn and use the gateway routes from VNet-Hub.

Key Concept

Virtual Network Gateway Transit in Peered VNets
Rate this question