Configure Virtual Networks
This Configure Virtual Networks IT Pro Challenge helps learners understand how to use the Azure portal and the Azure CLI to create a virtual network. They will also learn how to connect these virtual networks using VNet Peering.
Already have an account? Sign In »

In this Configure Virtual Networks IT Pro Challenge, learners will understand how to use the Azure portal to create a virtual network for a web server, how to use the Azure CLI to create a virtual network for an application server, how to use VNet Peering to connect the two virtual networks securely, and how to verify that the VNet Peering is active for both virtual networks. The skills acquired in this hands-on lab are necessary for anyone pursuing a career in network administration, systems administration, or cyber defense.
Overview
The scenario for this hands-on lab is that you are a system administrator. The company you work for is migrating its web services from an on-premises datacenter to Azure. To accomplish this, you need to create and deploy two Azure virtual networks that will support a multi-tier web application. You will use VNet Peering between the two virtual networks to promote secure bi-directional communication.
VNet Peering is a means of connecting two virtual networks that are in the same Azure region. For connectivity purposes, VNet Peering makes these two networks appear as the same network. In a virtual peered network, the network traffic is private because it is kept on the Microsoft backbone network.
Create a virtual network for a Web Server tier using the Azure portal
To begin, you will sign in to the Azure portal and create a virtual network (VNet1) with a subnet (called Web) for a web server tier with a specified address range.
Create a virtual network for an Application Server tier using Azure Cloud Shell and Azure CLI
In Azure portal, you will launch Cloud Shell. You can use either Bash or PowerShell; using the existing resource group, you need to create a Storage Account and file share. Then you need to create a virtual network (VNet2) for an application server using the Azure CLI command, az network vnet create. You will also create a subnet (called App) with a specified address range.
The Azure Command Line Interface (CLI) is a set of commands that are used to manage Azure resources. The Azure CLI is similar to PowerShell.
NOTE: The syntax for az network vnet create is: az network vnet create --name [name] --resource-group [resource group name] --location "East US" --address-prefix [x.x.x.x./y] --subnet-name [name]--subnet-prefix [prefix].
Configure VNET Peering between the virtual networks for secure bi-directional communication
To finish, you will create VNet Peering for two virtual networks (VNet1, VNet2), ensuring that VNet1 points to VNet2 and VNet2 points to VNet1. For each peering, you need to enable virtual network access and allow forwarded traffic.
Summary Conclusion
By taking this hands-on lab, you will learn how to use the Azure portal to create a virtual network for a web server, how to use the Azure Cloud Shell and the az network vnet create Azure CLI command to create a virtual network for an application server, and how to configure VNet Peering between the two virtual networks to allow for secure bi-directional communication.