Question

Difficulty: MediumConfigure Virtual Network Peering

An administrator is configuring virtual network peering to establish hybrid connectivity. The environment contains the following resources:
- VNet-Transit-Hub with the address space 172.16.0.0/16172.16.0.0/16 contains a virtual network gateway named `VPNGateway-Hub` in a subnet named `GatewaySubnet` (172.16.0.0/24172.16.0.0/24). `VPNGateway-Hub` is connected to an on-premises network.
- VNet-Client-Spoke with the address space 172.24.0.0/16172.24.0.0/16 contains a subnet named `Subnet-Application` (172.24.1.0/24172.24.1.0/24) where a virtual machine named `VM-App` is deployed.
- A virtual network peering link is established between `VNet-Transit-Hub` and `VNet-Client-Spoke`.

You need to ensure that `VM-App` can communicate with the on-premises network by routing traffic through `VPNGateway-Hub`.

Which two configurations must you enable? (Select two.)

  1. Enable "Use remote gateways" on the peering link from VNet-Client-Spoke to VNet-Transit-Hub.Answer
  2. Enable "Allow gateway transit" on the peering link from VNet-Transit-Hub to VNet-Client-Spoke.Answer
  3. C
    Enable "Allow forwarded traffic" on the peering link from VNet-Client-Spoke to VNet-Transit-Hub.
  4. D
    Enable "Use remote gateways" on the peering link from VNet-Transit-Hub to VNet-Client-Spoke.

Answer

Enable "Use remote gateways" on the peering link from VNet-Client-Spoke to VNet-Transit-Hub, and enable "Allow gateway transit" on the peering link from VNet-Transit-Hub to VNet-Client-Spoke.
To allow the virtual machine in the spoke network to use the gateway in the hub network, two settings must be configured. First, on the hub's side of the peering link, you must allow gateway sharing by enabling 'Allow gateway transit'. Second, on the spoke's side of the peering link, you must configure the network to use that remote gateway by enabling 'Use remote gateways'. Together, these settings establish the path for hybrid traffic traversal.

Step-by-Step Solution

1
Configure the hub-to-spoke peering link configuration.
"Allow gateway transit" is enabled on the peering from VNet-Transit-Hub to VNet-Client-Spoke.
This configuration allows the hub VNet to share its virtual network gateway with the peered spoke VNet.
2
Configure the spoke-to-hub peering link configuration.
"Use remote gateways" is enabled on the peering from VNet-Client-Spoke to VNet-Transit-Hub.
This configuration allows resources in the spoke VNet to route traffic through the remote gateway in the hub VNet.
3
Verify end-to-end data plane connectivity.
VM-App in VNet-Client-Spoke can successfully route traffic to the on-premises network.
Both sides of the gateway transit configuration must be enabled for transit routing to work correctly.

Key Concept

Gateway transit in virtual network peering allows a peered virtual network to use the virtual network gateway of another virtual network for cross-premises connectivity.

Alternative Method

Instead of virtual network peering with gateway transit, you could deploy a separate virtual network gateway in the spoke network and establish a separate VPN connection to the on-premises network, although this increases administrative overhead and cost.
Estimated Time:1m 30s
Rate this question