|Azure Virtual Network – Blog No 1|
|Time to Read|
|Who should read this blog?|
|Do you want to learn about the Azure virtual network and its configuration?|
Azure Virtual Network is just like a LAN network, but there are no physical cables, switches, or modems visible, still, everything in a virtual network connects like a charm. Interesting isn’t it? Let’s understand it.
The Physical LAN Network we know
Devices in the same network talk to each other, also called Local Area Networks (LAN) in the physical world.
LAN can be of different types based on the medium- Wired/Wireless and they would have their own standards and type of devices that support the communication within the network.
Like in Wired LAN – You would need a cable to connect at least two devices however if they are more you may have to use either a Hub or Switch along with cables and as the Network grows you would need more cables and such devices.
Similarly in Wireless LAN – You would need Access-Points / Wireless Modems to connect the devices within LAN and as the Network grows you connect more.
How Azure Virtual Network is different?
Azure Virtual Network is the same but different in many ways.
As the name suggests It is virtual which means though there is a network there are no cables or devices that need to be connected. It is just like a container where you place your Virtual machines, Load balancers, Firewalls, NVAs, Application Gateways, and Azure Services and they can talk to each other freely if they are deployed in the same Virtual Network.
Virtual Network is a container that has a name given by you, a Network id, and a prefix size. Based on the Network id it is unique and based on prefix size it can host a limited no of devices.
Example – 10.1.1.0/24 is a virtual network – A container which will have all the devices and services within it has the same network id 10.1.1.0 and its subnets and a limit on basis of its prefix size (256 – 5 = 251).
A total of 251 usable IPs for Virtual Machine and Azure Services are to be deployed within the virtual network 10.1.1.0/24
First IP is Network id and Last IP is broadcast address, and 3 ip’s are reserver by Azure for their service usage.
Punch Line – Everything within a Virtual Network connects and talks to each other by default without you laying any connectivity between them.
So if I am not laying any cables or connecting any switch who is doing it, Well it is taken care of by Microsoft. They have an underlying network that has an actual physical network but that is none of your concern as you as a network engineer/IT engineer will have to focus on Overlay Networking.
Imagine you’re trying to build a city with different neighborhoods and roads connecting them.
The underlay network is like the city’s infrastructure, such as the water, sewage, and electrical systems that run underneath the ground. These systems are essential for the city to function properly, but they’re not visible to the people who live and work in the city. Similarly, the underlay network is the physical network infrastructure that provides basic connectivity between different devices and subnets, but it’s not visible to the applications and services that use the network.
On the other hand, the overlay network is like the city’s transportation system, such as the buses, trains, and taxis that people use to get around the city. The overlay network is built on top of the underlay network, and it provides additional features and services that are specific to the needs of the applications and services that use it. For example, just as the transportation system can provide different routes and modes of transportation to different parts of the city, the overlay network can provide different paths and protocols to different parts of the network.
Subnet and its role
I would not be doing justice if, in this blog, I don’t explain the subnet and how they are associated with the virtual network.
Remember! I said that a Virtual Network is just a LAN identified by a Network id with prefix size and everything within Virtual Network talks by default, It is a universal truth.
Azure gives us to option to break the virtual network further into smaller parts and each part is called a subnet. Why? because a Virtual Network in azure could be a bigger prefix and you would like to assign smaller address prefixes as per the requirement hence the slice.
Just think a cake was sliced into multiple parts and each slice was reserved for different people.
Just like a slice is still part of the cake, each subnet is still a part of the virtual network. So any resources on the different subnets still talk to each other by default, however, Azure provides an option of NSG(Network Security Group) to block the communication between the subnets of the same Virtual Network.
Login to Azure Portal
In the Search box Type Virtual Network or you can also see Virtual networks under the Azure Services section.
Select Virtual networks
Click on Create
Under your subscription, you can see the Resource group name under which Virtual Network will be created and you may choose the region where you want to create your virtual network.
As you can see you may create your new virtual network under a new Resource group as highlighted.
I am creating a Virtual network with the name Production-vnet01 under Region East US.
After filling in details under the Basics tab click the Next button.
You are on the Security tab now, you may use the suggested paid services to secure your virtual network. It is an optional page so you can click the Next button.
This is the main page IP addresses ( Kindly note the UI interface might look different in your case but outlay of configuration remains the same ) –
Here the virtual network and subnet details are auto-filled
10.0.0.0/16 is the virtual network ( highlighted with a Red line)
default is the subnet name with 10.0.0.0/24 as the subnet ( highlighted with Green line)
If I want to use another address space I will choose the Delete address space option by clicking the three dots option highlighted by the arrow sign. In this way, the existing address space will be deleted and I will get an option to create a new address space.
I can also choose to Resize address space but using that option I can only change the prefix size of the address from currently /16 , the network id will still remain the same as 10.0.0.0.
Kindly note that it is possible to add multiple address prefixes under a virtual network,
To demo this I have not deleted the address space added by default as shown in the previous snapshot.
Instead, I will add another address space.
Follow the sequence as defined in the below snapshot for adding the new address space.
I am creating a Network id 10.1.1.0 with the prefix size /24.
As seen in the below snapshot. I can see 2 address spaces now under the same virtual network.
virtual network – 10.0.0.0/16 and default subnet – 10.0.0.0/24 created by default ( highlighted in red )
virtual network – 10.1.1.0/24 and default1 subnet – 10.0.0.0/26 created by me ( highlighted in Green)
Now on the Next page, we are on the Tags page. tags are used for identification purposes.
You may ignore it if you don’t want to add any tags.
Click on Review + create.
After this Azure will run a validation check if all the entries are filled correctly
once validation checks are successful you will summary of the details filled, in if you are satisfied with the details.
Click on Create
With in 5 Minutes Deployment will be completed. Click on Go to Resource button
Our Virtual Network Production-vnet01 is created and both the address space can be seen from Adress space field under settings ( highlighted in Green )
In conclusion, Azure Virtual Network is a powerful tool that allows businesses to create and manage their own virtual network infrastructure in the cloud.