Connectivity between Azure Virtual Networks in a Hub and Spoke Topology

Configure Peering Between VNet1, VNet2, and VNet3 in Azure

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.

CE

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.

Note: VNet2 is the hub 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 in a hub and spoke topology, we need to perform the following configurations:

  1. Configure peering between VNet1 and VNet2: We need to configure peering between VNet1 and VNet2, allowing forwarded traffic. This will enable VNet1 to send traffic to VNet2, and VNet2 will forward the traffic to VNet3. To do this, follow these steps: a. Go to the Azure portal and select the Virtual Networks tab. b. Select VNet1 and then select Peerings from the left-hand menu. c. Click Add and fill in the peering details. Select VNet2 as the remote virtual network and allow forwarded traffic. Repeat this process for VNet2 and VNet3.

    Answer: A

  2. Configure peering between VNet2 and VNet3: We also need to configure peering between VNet2 and VNet3, allowing gateway transit. This will enable VNet3 to use VNet2 as a gateway to access resources in VNet1. To do this, follow these steps: a. Go to the Azure portal and select the Virtual Networks tab. b. Select VNet2 and then select Peerings from the left-hand menu. c. Click Add and fill in the peering details. Select VNet3 as the remote virtual network and allow gateway transit.

    Answer: C

  3. Create a route table and assign it to subnets: To enable traffic to flow from VNet1 to VNet3 through VNet2, we need to create a route table that specifies the next hop for the traffic. To do this, follow these steps: a. Go to the Azure portal and select the Route tables tab. b. Click Add and fill in the route table details. Specify the address space for VNet1 and VNet3 and add a route that specifies the next hop as VM2 (the virtual appliance acting as a router). c. Assign the route table to the subnets in VNet1 and VNet3 that need to communicate with each other.

    Answer: D

Therefore, the correct configurations are A and C. We need to allow forwarded traffic on the peering connection between VNet1 and VNet2, and allow gateway transit on the peering connection between VNet2 and VNet3. We also need to create a route table and assign it to the subnets in VNet1 and VNet3.