Question

Difficulty: HardConfigure Virtual Network Peering

An administrator is establishing a hybrid network connection in Azure. The infrastructure consists of two virtual networks in the North Europe region:

* `VNet-Hub` (192.168.50.0/24192.168.50.0/24) has a virtual network gateway named `GW-Hub` and virtual machines running in `Subnet-Hub`.
* `VNet-Spoke` (10.120.0.0/1610.120.0.0/16) has virtual machines running in `Subnet-Spoke` but does not contain a virtual network gateway.

The administrator configures virtual network peering between `VNet-Hub` and `VNet-Spoke`.

To enable the virtual machines in `VNet-Spoke` to access the on-premises resources by routing through `GW-Hub`, which two Peering configurations must be set? (Select two.)

  1. Configure 'Allow gateway transit' on the peering link from VNet-Hub to VNet-Spoke.Answer
  2. Configure 'Use remote gateways' on the peering link from VNet-Spoke to VNet-Hub.Answer
  3. C
    Configure 'Allow gateway transit' on the peering link from VNet-Spoke to VNet-Hub.
  4. D
    Configure 'Use remote gateways' on the peering link from VNet-Hub to VNet-Spoke.
  5. E
    Configure 'Allow forwarded traffic' on the peering link from VNet-Hub to VNet-Spoke.

Answer

To allow virtual machines in VNet-Spoke to route through the virtual network gateway in VNet-Hub, you must configure 'Allow gateway transit' on the peering link from VNet-Hub to VNet-Spoke, and configure 'Use remote gateways' on the peering link from VNet-Spoke to VNet-Hub.
The correct configurations allow VNet-Spoke to leverage the gateway in VNet-Hub. To establish gateway transit, the peering link from VNet-Hub to VNet-Spoke must have 'Allow gateway transit' enabled, which permits VNet-Hub to share its gateway. Simultaneously, the peering link from VNet-Spoke to VNet-Hub must have 'Use remote gateways' enabled, allowing VNet-Spoke to route its traffic through the remote gateway.

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.
Determining where the gateway resides specifies which VNet acts as the transit provider and which acts as the consumer.
2
Configure the hub-side peering link (from VNet-Hub to VNet-Spoke).
Enable 'Allow gateway transit' on the peering link from VNet-Hub to VNet-Spoke.
This allows VNet-Hub to act as a transit hub and share its gateway with VNet-Spoke.
3
Configure the spoke-side peering link (from VNet-Spoke to VNet-Hub).
Enable 'Use remote gateways' on the peering link from VNet-Spoke to VNet-Hub.
This configures the virtual machines in VNet-Spoke to route on-premises-bound traffic to GW-Hub.

Key Concept

Gateway transit in virtual network peering allows peered virtual networks to share a gateway and obtain connectivity to on-premises resources.
Rate this question