Create and Configure a vNet in Azure

Lab overview

In this lab, you'll learn how to create and configure a Virtual Network (vNet) and Subnet in Microsoft Azure.

Virtual networks are essential for organizing and managing network traffic within the Azure environment, and subnets allow you to segment your vNet for better control over resource communication. This lab walks you through the process of creating a new vNet, configuring address spaces, and setting up subnets to meet the needs of different applications. You'll also apply network security features like encryption and use tags to categorize your vNet.

Why you'd do this

Nothing with a private IP address can exist in Azure until there's a virtual network for it to live in. VMs, scale sets, private endpoints, App Service integration, Azure Firewall, and VPN gateways all need a vNet and a subnet before you can deploy them, so this is usually the first resource an administrator creates in a new subscription and the one everything else depends on. Get the design right here and the next hundred resources slot in cleanly; get it wrong and you're re-addressing a production network later.

The address space is the decision with the longest shadow. It can't overlap with any network you'll ever peer or connect to, including your on-premises ranges and other vNets, and it can't be shrunk once resources are using it. The 192.168.0.0 range in this lab is a private block that's easy to recognize; in practice you'd choose a range from a plan that covers every region and every site the company has. Subnets carve that space into segments that network security groups and route tables attach to, which is how you keep web tiers, databases, and management hosts from talking to each other freely. Watch the subnet purpose dropdown: Default is right for a general workload subnet, and the other options reserve subnets for specific services like gateways and firewalls.

Two settings on the way through are easy to click past. Virtual network encryption encrypts traffic between VMs inside the vNet at the hardware level, which matters for compliance and costs nothing to turn on; it's a newer option and not every VM size supports it, so enabling it at creation is the simplest path. The Environment = Production tag looks cosmetic and isn't: tags are how cost reports, Azure Policy, and automation scripts tell production resources from test ones, and a vNet is a good place to start because resources inherit nothing from it, so you have to tag deliberately.

For certification prep, configuring virtual networks, IP addressing, and subnets is core AZ-104 material, address-space planning appears in AZ-305, and this is the foundation for everything in AZ-700.

Lab details

  • vNet Name: vNet-App in resource group Prod-RG
  • Address Space: 192.168.0.0
  • Subnet Name: apps · Subnet Purpose: Default
  • Encryption: Virtual network encryption enabled
  • Tag: Environment = Production

Learning objectives

  1. Understand how to create a Virtual Network in Azure.
  2. Learn how to configure address spaces and assign custom IP ranges for your vNet.
  3. Gain experience setting up subnets to segment resources within a vNet.
  4. Apply encryption to secure network traffic within your virtual network.
  5. Use tags to categorize and manage virtual networks for production or development environments.
  6. Review and finalize the vNet and subnet settings before deployment.

Exam relevance

  • AZ-104 — Azure Administrator — Configure virtual networks, Manage IP addressing, Implement subnets.
  • AZ-305 — Azure Solutions Architect — Design network solutions, Plan address spaces, Segment network infrastructure.
  • AZ-700 — Azure Network Engineer — Design and implement VNets, Configure subnets and address spaces, Implement network security.

Step-by-step instructions

  1. Click Virtual networks in the Azure portal to view and manage virtual networks.
  2. Click Create to begin setting up a new vNet.
  3. Configure the basics:
    • Select resource group Prod-RG from the dropdown.
    • Enter vNet-App as the virtual network name.
  4. Click Next to proceed to the Security tab.
  5. Check Virtual network encryption to secure traffic within the vNet.
  6. Click Next to proceed to the IP Addresses tab.
  7. Configure the address space:
    • Double-click the default address space and replace it with 192.168.0.0.
  8. Click Add a subnet to create a new subnet:
    • Set Subnet purpose to Default.
    • Rename the subnet from default-2 to apps.
    • Click Add to save the subnet.
  9. Click Next to proceed to the Tags tab.
  10. Add a tag to categorize the vNet:
    • Set Name to Environment.
    • Set Value to Production.
  11. Click Next to review all settings, then click Create to deploy the vNet.
  12. Wait for deployment to complete, then click Go to resource.
  13. Explore the vNet settings:
    • Expand Settings and click Address space to review the IP range.
    • Click Subnets to view the subnet list.

An Introduction to Microsoft Entra ID

Learn what you need to know to get started with Microsoft Entra ID with this easily-digestible 5-hour bootcamp from best-selling instructor, Thomas Mitchell.

Disable these ads by becoming a labITpro Supporter!

Azure vNets Explained

Want to learn about Azure virtual networks? In this quick-hitting explanation, you’ll learn what they are, what they do, and you’ll learn about key Azure vNet features.

Disable these ads by becoming a labITpro Supporter!