Connect Azure Virtual Networks - Step-by-Step Guide

Connect VNet1 to VNet2

Question

You have two subscriptions named Subscription1 and Subscription2. Each subscription is associated to a different Azure AD tenant.

Subscription1 contains a virtual network named VNet1. VNet1 contains an Azure virtual machine named VM1 and has an IP address space of 10.0.0.0/16.

Subscription2 contains a virtual network named VNet2. Vnet2 contains an Azure virtual machine named VM2 and has an IP address space of 10.10.0.0/24.

You need to connect VNet1 to VNet2.

What should you do first?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C

To connect VNet1 to VNet2, you need to create a virtual network gateway in each VNet and then create a connection between the two gateways.

Option A: Modifying the IP address space of VNet2 is not necessary as the two virtual networks can be connected even if they have different IP address spaces.

Option B: Moving VM1 to Subscription2 is not necessary as the connection needs to be established between the virtual networks, not the virtual machines.

Option C: The correct answer is to provision virtual network gateways in each virtual network. A virtual network gateway is a type of virtual network appliance that is used to send encrypted traffic between Azure virtual networks over the public internet.

To provision a virtual network gateway in each virtual network, follow these steps:

  1. In the Azure portal, go to the virtual network you want to create the gateway for.
  2. Click on "Create Gateway" in the top navigation menu.
  3. Select the type of gateway you want to create ( VPN or ExpressRoute).
  4. Follow the prompts to configure the gateway settings.
  5. Repeat these steps in the other virtual network.

Once the virtual network gateways are provisioned in each virtual network, you can create a connection between them. This can be done using either a VPN connection or an ExpressRoute connection.

Option D: Moving VNet1 to Subscription2 is not necessary as you can connect virtual networks across different subscriptions.