This article on virtual networking (VN) is going to be shared in the form of a series, where we shall cover several hands-on exercises to appreciate the idea of virtual networks in Microsoft Azure.
This series will include the following exercises on:
How to create and configure virtual networks (which we shall cover in this article).
How to create and configure a network security group
How to create and configure Azure Firewall
How to configure network routing
How to create DNS Zones and configure DNS settings
The steps applied in this article are from Microsoft learn
Let's swing into action by learning how to create and configure virtual networks.
Let's assume your organization is migrating a web-based application to Azure, and you've been tasked to put in place the virtual networks and subnets, followed by securely peering the virtual networks.
Outline of Tasks:
- Create a virtual network.
- Create a subnet.
- Configure VNet peering.
Step 1. Sign in to the Azure Portal
Step 2. Search for and select virtual networks
Step 3. Select + Create and complete the configuration of the VN
-
Resource Group(RG): Create a resource with a name of your choice and ensure you select it. I'm using
DemoRG
as my RG for this exercise. -
Virtual network name: enter
app-vnet
- Region: Select a region closer to you in the drop-down menu. I'm using (Europe)UK South for mine.
Step 4. Select next to be at the IP Address page, then select Add IPv4 address space, and ensure the IP address range is configure to 10.1.0.0
and the size is 16
Delete the default address space
as shown in step 2 above, then select Add a subnet to create a subnet.
Step 5. In the Add a subnet
page, enter the following details
-
Name:
frontend
-
IPv4 address range: the one we added above (in step 4) from the drop-down menu
10.1.0.0/16
-
Starting address:
10.1.0.0
-
Size:
24
Select Add to add the frontend subnet to our VN.
We need to repeat the same process above to create another subnet called backend
.
However, ensure the Starting address is 10.1.1.0
and the Size is 24
as shown below. Leave all other settings as default, then select Add to add the backend subnet in the VN.
Now select Review + create to create the app-vnet
virtual network.
Step 6. We need to create another VN called hub-vnet
, which requires only a subnet for the firewall.
We'll repeat the same process from Step 3 to create the second VN.
However, at the IP address page, use the default IPv4 address space and proceed to add a subnet.
For the subnet, select Azure Firewall
as the Subnet purpose, then ensure the following:
-
IPv4 address range: select the default address space with the range
10.0.0.0/16
-
Starting address:
10.0.1.0
. -
Size:
26
is selected by default.
Leave other configurations as default and select Add.
The next step is to select Review + create
Step 7. Since our app-vnet and hub-vnet virtual networks are now ready with their respective configurations, we can peer them using the following steps.
- Search for and select the
app-vnet
virtual networks. - In the Settings blade, select Peerings.
- Select + Add a peering between the two virtual networks.
- Remote peering link name:
api-vnet-to-hub
- Select your subscription
- Virtual network: select
hub-vnet
here. - Local peering link name: use
hub-to-app-vnet
.
- Remote peering link name:
Leave other settings as their defaults. Select Add to create the virtual network peering.
Finally, once the deployment completes, verify the Peering status is Connected.
Conclusion
Congratulations, we've completed this phase of the virtual network series. The next exercise will be "creating and configuring network security groups".
Top comments (0)