Connect VNet1 to VNet2 - Azure Infrastructure and Deployment Exam - Microsoft AZ-100

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

The virtual networks can be in the same or different regions, and from the same or different subscriptions. When connecting VNets from different subscriptions, the subscriptions do not need to be associated with the same Active Directory tenant.

Configuring a VNet-to-VNet connection is a good way to easily connect VNets. Connecting a virtual network to another virtual network using the VNet-to-VNet connection type (VNet2VNet) is similar to creating a Site-to-Site IPsec connection to an on-premises location. Both connectivity types use a VPN gateway to provide a secure tunnel using IPsec/IKE, and both function the same way when communicating.

The local network gateway for each VNet treats the other VNet as a local site. This lets you specify additional address space for the local network gateway in order to route traffic.

https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-vnet-vnet-resource-manager-portal

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

Therefore, the correct answer is C. Provision virtual network gateways.

Option A (Move VNet1 to Subscription2) is not necessary for establishing a connection between VNet1 and VNet2. You can create a peering connection between the two VNets, regardless of which subscription they are in.

Option B (Modify the IP address space of VNet2) is also not necessary. Changing the IP address space of a VNet can be a disruptive operation, and it is not required to connect two VNets.

Option D (Move VM1 to Subscription2) is not a viable option because moving a virtual machine from one subscription to another can be a disruptive operation and may result in downtime. Additionally, moving a virtual machine to a different subscription is not necessary for establishing a connection between two VNets.