Connectivity Between Azure Virtual Networks in a Hub and Spoke Topology - AZ-100 Exam Guide

Configure Peering Between VNet1, VNet2, and VNet3

Question

You have an Azure subscription that contains three virtual networks named VNet1, VNet2, and VNet3. VNet2 contains a virtual appliance named VM2 that operates as a router.

You are configuring the virtual networks in a hub and spoke topology that uses VNet2 as the hub network.

You plan to configure peering between VNet1 and VNet2 and between VNet2 and VNet3.

You need to provide connectivity between VNet1 and VNet3 through VNet2.

Which two configurations should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

AB

Allow gateway transit: Check this box if you have a virtual network gateway attached to this virtual network and want to allow traffic from the peered virtual network to flow through the gateway.

The peered virtual network must have the Use remote gateways checkbox checked when setting up the peering from the other virtual network to this virtual network.

https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering#requirements-and-constraints

To provide connectivity between VNet1 and VNet3 through VNet2, you need to perform the following configurations:

A. Allow Gateway Transit on the peering connections between VNet1 and VNet2 and between VNet2 and VNet3.

Gateway Transit allows traffic to flow through a virtual network gateway in the hub network (VNet2 in this case) to reach other virtual networks (VNet1 and VNet3). To enable Gateway Transit, you need to select the "Use remote gateways" option in the peering configuration.

B. Allow Forwarded Traffic on the peering connections between VNet1 and VNet2 and between VNet2 and VNet3.

By default, peered virtual networks cannot forward traffic between each other. To enable traffic forwarding, you need to enable the "Allow forwarded traffic" option in the peering configuration.

C. Create a Route Filter.

To ensure that traffic between VNet1 and VNet3 is routed through VNet2, you need to create a route filter. A route filter is used to control the propagation of routes between virtual networks. You can create a route filter in Azure and apply it to a subnet or a route table.

D. Create Route Tables and Assign the Table to Subnets.

You also need to create route tables and assign them to the subnets in VNet1, VNet2, and VNet3. Route tables allow you to control traffic flow by defining routes that specify the next hop type and next hop address for traffic leaving a subnet. By creating a route table and associating it with a subnet, you can override the default system routes that Azure creates.

In summary, to provide connectivity between VNet1 and VNet3 through VNet2, you need to allow Gateway Transit and enable Forwarded Traffic on the peering connections between VNet1 and VNet2 and between VNet2 and VNet3. You also need to create a route filter and route tables and assign them to the subnets.