DEV Community

Cover image for Inside Azure Networking: How I Created a Virtual Network with Custom Subnets
David Cletus
David Cletus

Posted on

Inside Azure Networking: How I Created a Virtual Network with Custom Subnets

If you've ever stared at the Azure portal wondering where to even begin with networking, you're not alone. I was right there a few weeks ago. In this post, I'm walking you through exactly what I did β€” from creating a resource group to building a virtual network with three custom subnets. No fluff, just real steps with real screenshots.
Let's get into it.

Head over to portal.azure.com
Once logged in,

Step 1 β€” Search for Resource Groups

The first thing you want to do is head to the Azure portal and use the search bar at the top to look up "resource group". You'll see it pop up under Services β€” click on Resource groups.

πŸ’‘ Quick note: I covered resource group creation in a previous blog too, but I'm including the steps here again so this post is fully self-contained. No jumping around needed.

Step 2 β€” Create a New Resource Group

Once you're on the Resource Groups page, you'll see a list of any existing groups or an empty list with a create button visible on the page. To create a new one, click the + Create button at the top left.

Step 3 β€” Fill in the Resource Group Details

On the creation form, you need to fill in three things:

Subscription β€” select your active subscription (mine is Azure subscription 1)
Resource group name β€” I named mine Netaccess
Region β€” I chose (Africa) South Africa North since that's closest to me

Once filled in, click Review + create.

Step 4 β€” Review and Create the Resource Group

You'll be taken to a summary screen. Confirm the details look right β€” subscription, name, and region. Then hit the Create button at the bottom.

Step 5 β€” Resource Group Created!

Once Azure finishes provisioning (it's pretty fast β€” usually a few seconds), you'll see a notification on the right confirming that the resource group was created successfully. Your new Netaccess group will now appear in the list.

Step 6 β€” Search for Virtual Networks

Now that our resource group is ready, it's time to create a Virtual Network inside it. Use the top search bar again and type "virtual networks". Click on Virtual networks from the Services dropdown.

Step 7 β€” Create a Virtual Network

You'll land on the Virtual Networks overview page. Since we don't have any yet, it'll say "No virtual networks to display." Click the + Create button (either at the top or the one in the centre of the page).

Step 8 β€” Fill in the Virtual Network Basics

On the Basics tab of the creation wizard, configure the following:

Subscription β€” Azure subscription 1
Resource group β€” Select the Netaccess group we just created
Virtual network name β€” I named it Netaccess-VM
Region β€” (Africa) South Africa North

Then click Next to move to the next tab.

Step 9 β€” Configure Address Space and Delete the Default Subnet

Skip past the Security tab (leave everything as default) and head to the Address space tab. Here Azure has already set up a default address space of 10.0.0.0/16 β€” that gives us 65,536 IP addresses, which is way more than enough.
Now here's the important part: Azure also pre-creates a default subnet with the range 10.0.0.0 - 10.0.0.255 (/24). We're going to delete this because we want to create our own subnets with custom names and IP ranges.
Click the trash/delete icon on the right side of the default subnet row to remove it.

Why delete the default subnet? Because accepting defaults means Azure names and organises things on your behalf. When you create your own subnets from scratch, you control the naming convention, IP ranges, and how traffic is logically segmented. Clean slate = cleaner architecture.

Step 10 β€” Review and Create the Virtual Network

Click through to the Review + create tab. You'll see a green "Validation passed" banner at the top β€” Azure confirming everything looks good. Take a moment to review the summary:

Subscription: Azure subscription 1 βœ…
Resource Group: Netaccess βœ…
Name: Netaccess-VM βœ…
Region: South Africa North βœ…
Security (Bastion, Firewall, DDoS): all Disabled βœ…

Hit the Create button at the bottom.

Step 11 β€” Deployment Complete β€” Click "Go to Resource"

Azure will now provision your virtual network. It usually takes just a minute or less. Once done, you'll land on the deployment overview showing "Your deployment is complete" with a green checkmark.
Click Go to resource to open your newly created Netaccess-VM virtual network.

Step 12 β€” Explore the VNet Overview and Navigate to Subnets

You're now inside the Netaccess-VM virtual network overview page. You can see all the essentials β€” resource group, location, address space (10.0.0.0/16), and notice it currently shows 0 subnets (because we deleted the default one earlier).
In the left sidebar under Settings, click on Subnets. This is where we'll build all three of our custom subnets.

Step 13 β€” Click "+ Subnet" to Start Adding Subnets

Once you're on the Subnets page, you'll see "No items found" β€” exactly as expected. Click the + Subnet button at the top of the page to open the "Add a subnet" panel on the right side.

Step 14 β€” Add Subnet 1 (Netaccess-subnet1)

The "Add a subnet" panel slides in from the right. Fill in the following:

Subnet purpose β€” Default
Name β€” Netaccess-subnet1
IPv4 address range β€” 10.0.0.0/16 (this is auto-populated from your VNet address space)
Starting address β€” 10.0.0.0
Size β€” /24 (256 addresses)

This creates a subnet range of 10.0.0.0 - 10.0.0.255. Leave IPv6 unchecked and scroll down to click Add.

Step 15 β€” Add Subnet 2 (Netaccess-subnet2)

Click + Subnet again to add the second subnet. You'll notice the panel now shows the existing subnet1 listed on the left β€” that's just confirmation it was saved. Fill in the new details:

Name β€” Netaccess-subnet2
Starting address β€” 10.0.1.0
Size β€” /24 (256 addresses)

Subnet range: 10.0.1.0 - 10.0.1.255. Click Save.

Notice how we moved the third octet from .0.0 to .1.0 for the second subnet β€” that's how we keep each subnet in its own separate IP block within the same /16 space. No overlap, no conflict, no headaches so we do the same to create Netaccess-subnet3.

Step 16 β€” All Three Subnets Created Successfully

Repeat the same process one final time for the third subnet:

Name β€” Netaccess-subnet3
Starting address β€” 10.0.2.0
Size β€” /24

After saving, your Subnets page will now show all three subnets neatly listed with their IPv4 ranges highlighted:
NameIPv4 RangeAvailable IPsNetaccess-subnet110.0.0.0/24251Netaccess-subnet210.0.1.0/24251Netaccess-subnet310.0.2.0/24251

Each subnet has 251 usable IP addresses β€” When a resource is created, it uses one IP address from its subnet, and that IP is no longer available in the virtual network's address range. However, IP usage is managed at the subnet level, so a subnet can run out of addresses while the virtual network still has many unused IPs available in other subnets.

Cleanup β€” Deleting the Resources

Once I was done with the lab, I cleaned everything up to avoid unnecessary charges. Here's how:
Delete the Netaccess Resource Group
Go back to Resource groups, select Netaccess, click Delete resource group, type the name to confirm, and hit Delete.

Delete the NetworkWatcherRG

Azure automatically creates a NetworkWatcherRG resource group when you deploy networking resources. Delete this one too β€” same process: select it, click Delete resource group, type the name, confirm.

All Resource Groups Deleted

Once both are gone, your resource groups list is clean again β€” back to just the ones you had before (in my case, only Je-mega-soft remains).

Summary

Here's the full recap of what we did:

βœ… Searched for and opened Resource Groups
βœ… Created the Netaccess resource group in South Africa North
βœ… Searched for and navigated to Virtual Networks
βœ… Filled in VNet Basics β€” name Netaccess-VM, resource group Netaccess
βœ… On the Address space tab, deleted the auto-generated default subnet
βœ… Reviewed and created the Virtual Network (validation passed)
βœ… Deployment completed β€” clicked Go to resource
βœ… Navigated to the Subnets section inside the VNet
βœ… Clicked + Subnet to start adding custom subnets
βœ… Created Netaccess-subnet1 β†’ 10.0.0.0/24
βœ… Created Netaccess-subnet2 β†’ 10.0.1.0/24
βœ… Created Netaccess-subnet3 β†’ 10.0.2.0/24
βœ… Cleaned up both Netaccess and NetworkWatcherRG resource groups

Why This Matters
Understanding how to manually structure your subnets gives you real control over how traffic flows in your cloud environment. Instead of accepting defaults, you're deliberately choosing IP ranges β€” which becomes crucial when you start doing things like:

Separating frontend and backend application tiers
Connecting on-premises networks via VPN Gateway or ExpressRoute
Setting up Network Security Groups (NSGs) with rules per subnet
Deploying services that require dedicated subnets (like Azure Bastion or App Gateway)

This is foundational Azure networking.

If this helped you, drop a ❀️ or leave a comment β€” especially if you ran into something different in your own setup. I'd love to hear about it.
Until next time β€” keep building! πŸš€

Top comments (0)