A virtual network is a software-defined network that emulates a physical network, allowing devices and applications to communicate over logical connections rather than physical hardware. This abstraction enables flexible, scalable, and secure networking solutions, particularly in cloud computing environments.​
In essence, a virtual network provides the functionality of a traditional network but is implemented through software. It allows for the creation of isolated network environments where virtual machines (VMs), applications, and services can communicate securely. These networks are managed through software, enabling dynamic configuration and management without the need for physical changes to the underlying infrastructure.​

Scenario
Your organization is migrating a web-based application to Azure. Your first task is to put in place the virtual networks and subnets. You also need to securely peer the virtual networks. You identify these requirements.

Two virtual networks are required, app-vnet and hub-vnet. ** The *app-vnet * will host the application. This virtual network requires two subnets. The **frontend subnet will host the web servers. The backend subnet will host the database servers.The hub-vnet only requires a subnet for the firewall.The two virtual networks must be able to communicate with each other securely and privately through virtual network peering.Both virtual networks should be in the same region.

Steps
Create a virtual network.
Create a subnet.
Configure vnet peering.

Architecture Diagram

Architecture diagram

Steps
Create a virtual network.

(a)Sign in to the Azure portal - https://portal.azure.com.

Azure Login

(b)Search for and select Virtual Networks
Virtual network

(c)Select *+ Create * and complete the configuration of the app-vnet.
This virtual network requires two subnets, frontend and backend.

Resource group= RG1
Virtual network name= app-vnet
Region= East US
IPv4 address space= 10.1.0.0/16
Subnet name= frontend
Subnet address range= 10.1.0.0/24
Subnet name= backend
Subnet address range= 10.1.1.0/24(c)

Create virtual network app-Vnet
Create

Create the Resource group
Resource group

Filling in the Basics
Virtual network name & region

Configuration of the app-net
IP addresses

IPv4 address space

Creating the two subnet

Frontend
frontend

Backend
backend

Leave all other settings as their defaults. When finished select *“Review + create** and then** Create.**

Create to validate and deploy.
Review+Create

Create

(d)Create the Hub-vnet virtual network configuration.
This virtual network has the firewall subnet.

Resource group= RG1
Name= hub-vnet
Region= East US
IPv4 address space= 10.0.0.0/16
Subnet name= AzureFirewallSubnet

Creating the virtual network hub-vnet
virtual network 2

Create

Filling in the Basics
RG1 Resource group

Virtual network name & region

Configuration of the hub-vnet
IP addresses

IPv4 address space

Subnet name & Subnet address range

Validating and deployment
Review+Create

Create

Note:Once the deployments are complete, search for and select your ‘virtual networks'.Verify your virtual networks and subnets were deployed.

Verification of the created virtual networks and complete deployment.

App-vnet
app-vnet

Hub-vnet
hub-vnet

(e)Configure a peer relationship between the virtual networks

Virtual network peering enables you to seamlessly connect two or more Virtual Networks in Azure.

Search for and select the app-vnet virtual network.>>In the Settings blade, >> select Peerings.>> + Add a peering between the two virtual networks.

Remote peering link name= app-vnet-to-hub
Virtual network= hub-vnet
Local virtual network peering link name= hub-to-app-vnet

Virtual network Peering
app-vnet virtual network

settings

+add peering

Peering

peering +Add

Connected and fully syncronized