How to deploy a hub virtual network in Azure.

This article provides steps for how to create an Azure-based hub virtual network (VNet) with subnets and address space from scratch, as well as how to configure a virtual network peering. This is to allow for the virtual networks to communicate with each other securely and privately.

A hypothetical Web Application requires network isolation and segmentation in a network for secure and private communication. The virtual networks and subnets will be created in the following steps.

Step 1: Create hub and spoke virtual networks and subnets

I. Creating the virtual networks

II. Create subnets for the first Virtual Network.

  • At the dropdown menu displayed above the address space box on the displayed page, check that the dropdown is set to Add IPv4 address space
    Add IPv4 address space
  • In the address space box, change Subnet address range to 10.1.0.0/16 (This is usually the default IP address so you may not need to change it in this instance).
  • locate a pen icon at the bottom corner, in the address space box (next to the garbage can icon). Click on this icon to edit the default Subnet name.
    The address space box
  • Change Subnet name to frontend
  • Also, change Subnet address range to 10.1.0.0/24 using the size label. Leave all other settings as their defaults.
  • Click Save to close the Edit Subnet pane. This
    completes the creation of the first Subnet.
    Edit Subnet

  • The next step is to create the second subnet. As you can see, the
    frontend subnet is listed in the box. We need to create another
    subnet in this virtual network. Again, locate the pen
    icon at the bottom (next to the garbage can icon). Click on this icon to
    add another Subnet.
    create second subnet

  • Also, change the subnet name to backend, then change the
    Subnet address range to 10.1.0.0/24.
    second subnet

  • Again, leave all other settings as their defaults. Click Add to close the edit subnet pane.

  • Select Review + Create to validate the configurations and Create to create the first virtual network.

Review + Create
Create
Deployment in progress
Deployment completed

III. Creating the second virtual networks

  • Creating the second virtual network is similar to creating the first virtual network.
  • click the hamburger icon at the top left-hand side corner of the Azure portal.
  • Again, in the displayed pane, select “Virtual Networks”.
  • In the “Virtual Networks” portal pane, select “+ Create”.
  • At the Resource group label select from the drop-down menu the first Resource group that was created.
  • Also, give a name to the virtual network at the “virtual network name” label. Here the name I supplied was Hub-vnet.
  • Select a similar Region from the dropdown like the first virtual network list at the Region label. In the previous virtual network, I selected East US.
    Resource group & network name
  • Next, Select the IP Addresses tab at the top of the page.
  • set the IPv4 address space to 10.1.0.0/16

IV. Create a subnet for the second Virtual Network.

Step 2: Setup a peer relationship between the virtual networks

Perring status is connected
Deployment succeded

This article explains how to provide network isolation and segmentation for a web application, in an Azure virtual network with subnets with address space. It’s been great sharing my journey into cloud engineering and I hope to see you soon on the other articles.

Cover Image by Alina Grubnyak on Unsplash


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top