Configure Network Connectivity between Azure Virtual Networks | Exam AZ-500 Microsoft Azure Security Technologies

Configure Network Connectivity between VNET1 and VNET2

Question

SIMULATION -

You need to configure network connectivity between a virtual network named VNET1 and a virtual network named VNET2. The solution must ensure that virtual machines connected to VNET1 can communicate with virtual machines connected to VNET2.

To complete this task, sign in to the Azure portal and modify the Azure resources.

Explanations

See the explanation below.

You need to configure VNet Peering between the two networks. The questions states, The solution must ensure that virtual machines connected to VNET1 can communicate with virtual machines connected to VNET2. It doesn't say the VMs on VNET2 should be able to communicate with VMs on VNET1. Therefore, we need to configure the peering to allow just the one-way communication.

1. In the Azure portal, type Virtual Networks in the search box, select Virtual Networks from the search results then select VNET1. Alternatively, browse to

Virtual Networks in the left navigation pane.

2. In the properties of VNET1, click on Peerings.

3. In the Peerings blade, click Add to add a new peering.

4. In the Name of the peering from VNET1 to remote virtual network box, enter a name such as VNET1-VNET2 (this is the name that the peering will be displayed as in VNET1)

5. In the Virtual Network box, select VNET2.

6. In the Name of the peering from remote virtual network to VNET1 box, enter a name such as VNET2-VNET1 (this is the name that the peering will be displayed as in VNET2).

There is an option Allow virtual network access from VNET to remote virtual network. This should be left as Enabled.

7. For the option Allow virtual network access from remote network to VNET1, click the slider button to Disabled.

8. Click the OK button to save the changes.

https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering

To configure network connectivity between VNET1 and VNET2 in Azure, you can use either Virtual Network Peering or VPN Gateway.

Here are the steps to configure Virtual Network Peering:

  1. Sign in to the Azure portal (https://portal.azure.com).
  2. Navigate to the VNET1 resource and select "Peering" from the left-hand menu.
  3. Click the "Add" button to create a new peering connection.
  4. In the "Add peering" blade, provide a unique name for the peering connection and select "Use remote gateways."
  5. In the "Remote virtual network peering" section, select "Add remote virtual network."
  6. Select VNET2 from the dropdown list and click "OK."
  7. Leave the rest of the settings at their default values and click "OK" to create the peering connection.
  8. Repeat the above steps to create a peering connection from VNET2 to VNET1.

Once the peering connections have been established, virtual machines in VNET1 can communicate with virtual machines in VNET2 over the peering connection.

Alternatively, you can use a VPN Gateway to connect the two virtual networks. Here are the steps to configure a VPN Gateway:

  1. Sign in to the Azure portal (https://portal.azure.com).
  2. Navigate to the VNET1 resource and select "Connections" from the left-hand menu.
  3. Click the "Add" button to create a new connection.
  4. In the "Add connection" blade, select "VNet-to-VNet" as the connection type.
  5. Provide a unique name for the connection and select VNET2 as the remote virtual network.
  6. Choose "Route-based" as the connection type and "VpnGw1" as the virtual network gateway SKU.
  7. Leave the rest of the settings at their default values and click "OK" to create the connection.
  8. Repeat the above steps to create a connection from VNET2 to VNET1.

Once the VPN connections have been established, virtual machines in VNET1 can communicate with virtual machines in VNET2 over the VPN connection.