Question

Difficulty: MediumConfigure Virtual Network Peering

A company's Azure infrastructure in the East US region uses a hub-and-spoke network topology. The hub virtual network, named `VNet-Hub` (10.50.0.0/1610.50.0.0/16), hosts a Virtual Network Gateway that establishes a Site-to-Site VPN connection to the corporate headquarters. A spoke virtual network, named `VNet-SpokeA` (10.51.0.0/1610.51.0.0/16), contains a subnet hosting an active virtual machine named `VM-A`. To enable hybrid connectivity, you create a virtual network peering connection between `VNet-Hub` and `VNet-SpokeA`. You must ensure that `VM-A` can access resources in the corporate headquarters through the Virtual Network Gateway in `VNet-Hub`.

Which configuration should you apply to the peering links?

  1. On the peering link from VNet-Hub to VNet-SpokeA, select 'Allow gateway transit'. On the peering link from VNet-SpokeA to VNet-Hub, select 'Use the remote virtual network's gateway'.Answer
  2. B
    Keep the default settings for both peering links, as virtual network peering automatically routes traffic to the Virtual Network Gateway in VNet-Hub.
  3. C
    On the peering link from VNet-Hub to VNet-SpokeA, select 'Use the remote virtual network's gateway'. On the peering link from VNet-SpokeA to VNet-Hub, select 'Allow gateway transit'.
  4. D
    On both peering links, select 'Allow forwarded traffic' and leave the gateway settings disabled.

Answer

To allow the spoke virtual network to use the hub's gateway, the peering link from VNet-Hub to VNet-SpokeA must have 'Allow gateway transit' enabled, and the peering link from VNet-SpokeA to VNet-Hub must have 'Use the remote virtual network's gateway' enabled.
The configuration of 'Allow gateway transit' on the hub peering link permits the hub to share its Virtual Network Gateway. Concurrently, enabling 'Use the remote virtual network's gateway' on the spoke peering link instructs the spoke VNet to route traffic destined for on-premises through that remote hub gateway.

Step-by-Step Solution

1
Identify where the Virtual Network Gateway resides.
The gateway is in VNet-Hub.
This determines which network must act as the transit hub.
2
Configure the hub's peering link settings.
Enable 'Allow gateway transit' on the peering link from VNet-Hub to VNet-SpokeA.
This allows VNet-Hub to share its gateway with the peered spoke network.
3
Configure the spoke's peering link settings.
Enable 'Use the remote virtual network's gateway' on the peering link from VNet-SpokeA to VNet-Hub.
This configures the routing in the spoke network to send hybrid traffic through the gateway in the peered hub.

Key Concept

Gateway transit in Azure Virtual Network Peering allows a peered virtual network to use a virtual network gateway in the hub network for cross-premises connectivity.
Rate this question