Azure architectureIntermediate29 min read

What Does Azure Virtual Network Mean?

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security
On This Page

Quick Definition

Think of an Azure Virtual Network as your own private, secure network in the cloud. It allows you to connect multiple cloud resources, like virtual machines and databases, and control who can talk to what. You can also link it to your office network to extend your company’s network into the cloud. It’s the foundation for building cloud applications securely.

Common Commands & Configuration

az network vnet create --name MyVNet --resource-group MyRG --location eastus --address-prefix 10.0.0.0/16

Creates a new Azure Virtual Network with a specified address space.

Tests understanding of address prefix assignment and resource group scoping in AZ-104.

az network vnet subnet create --name SubnetA --resource-group MyRG --vnet-name MyVNet --address-prefix 10.0.1.0/24

Adds a subnet to an existing virtual network.

Exams like AWS SAA and Azure AZ-104 test subnet CIDR allocation within VNet address space.

az network vnet peering create --name Peer1 --resource-group MyRG --vnet-name MyVNet --remote-vnet /subscriptions/{sub-id}/resourceGroups/RemoteRG/providers/Microsoft.Network/virtualNetworks/RemoteVNet --allow-vnet-access

Establishes VNet peering to connect two virtual networks.

Appears in AWS and Azure exams to test cross-VNet connectivity and transitive routing understanding.

az network vnet check-ip-address --resource-group MyRG --name MyVNet --ip-address 10.0.1.5

Checks if a specific IP address is available within a VNet.

Tests IP address allocation and conflict detection, common in Azure Fundamentals and Google ACE exams.

az network nsg rule create --resource-group MyRG --nsg-name MyNSG --name AllowSSH --priority 1000 --direction Inbound --protocol Tcp --source-address-prefixes '*' --source-port-ranges '*' --destination-address-prefixes 10.0.1.0/24 --destination-port-ranges 22 --access Allow

Creates a network security group rule to allow SSH access to a subnet.

Exams test NSG rule priority, source/destination prefixes, and protocol restrictions as security controls.

az network vnet subnet update --resource-group MyRG --vnet-name MyVNet --name SubnetA --network-security-group MyNSG --route-table MyRouteTable

Associates an NSG and route table to an existing subnet.

Tests subnet-level security and routing configuration, key for AZ-104 and AWS cloud-practitioner integration questions.

az network vnet list-endpoint-services --location eastus

Lists available VNet endpoint services (e.g., Azure Storage, SQL) for service endpoints.

Exams like Google ACE and Azure Fundamentals assess service endpoints for secure VNet-to-Azure service access.

Azure Virtual Network appears directly in 83exam-style practice questions in Courseiva's question bank — one of the most-tested concepts on AZ-104. Practise them →

Must Know for Exams

For exams like the AZ-104 (Microsoft Azure Administrator) and Azure Fundamentals (AZ-900), Azure Virtual Network is a core topic that appears in multiple question formats. In the AZ-900 exam, you are expected to understand the basic purpose of VNet, how it provides isolation, and the difference between VNet and on-premises networking. You may encounter questions asking you to identify which Azure service provides network isolation, or to choose between VNet peering and VPN gateway for a given connectivity scenario.

For the AZ-104 exam, VNet questions are far more detailed. You need to know how to design IP addressing schemes (including CIDR notation), how to create and configure subnets, and how to associate NSGs. You will likely face scenario-based questions where you must decide how to connect two VNets (peering vs. VPN gateway) or how to connect to an on-premises network. You also need to understand the difference between service endpoints and private endpoints, a distinction that often appears in the exam. Troubleshooting connectivity issues between VMs in different subnets or VNets is also a common exam objective.

The AWS-related exams listed (AWS Cloud Practitioner, AWS Developer Associate, AWS SAA) do not cover Azure VNet directly, but understanding the concept of a Virtual Private Cloud (VPC) in AWS is analogous. The glossary term helps learners draw parallels for multi-cloud understanding. For Google Cloud exams (Google ACE, Cloud Digital Leader), the equivalent is a VPC network. The key exam objective across all platforms is understanding network isolation, subnets, firewalls (security groups), and hybrid connectivity.

Question types vary. You might see a diagram showing two VNets with subnets and be asked to configure NSG rules to allow specific traffic. Or you might be asked to select the correct IP address range for a VNet that needs to be connected to an on-premises network that already uses the 10.0.0.0/8 range. Another common question type is choosing between a point-to-site VPN, site-to-site VPN, and ExpressRoute for a given latency and bandwidth requirement. Knowing the differences in cost, security, and performance is crucial.

for exam preparation, you must memorize the features of VNet, including the range of private IP addresses, the transitive nature (or lack thereof) of peering, and the purpose of NSGs and route tables. Practice building VNets and subnets in the Azure portal or using CLI commands to reinforce your learning.

Simple Meaning

Imagine you live in a large apartment building. Each apartment is isolated, but there are hallways that connect them. Your apartment is like a virtual machine, and the hallway is like a network cable. But in a real building, anyone could walk down the hallway and knock on your door. An Azure Virtual Network is like building a private, gated community within that apartment building. You get to decide who gets a key to the gate, which houses are connected by special paths, and whether there is a direct road to your office downtown.

In more technical terms, when you create a virtual network, you are defining a private IP address space, like 10.0.0.0/16. Within that space, you create subnets, which are like smaller neighborhoods. You can then place virtual machines (VMs) into specific subnets. For example, you might put your web servers in a subnet called “frontend” and your databases in a subnet called “backend.” You can use security rules to say that only the frontend subnet can talk to the backend subnet, and that the frontend can be accessed from the internet but the backend cannot.

This is different from the physical world because you can change this network instantly without buying new cables or routers. If you need more VMs, you just add them. If you want to connect your cloud network to your office, you can set up a VPN or a dedicated connection. So, Azure Virtual Network gives you total control over your cloud networking, ensuring that your applications are secure and performant.

For a beginner, the most important thing is to understand that this is the fundamental building block for almost everything you do in Azure. Without a virtual network, your VMs would be isolated and unable to communicate. With one, you have a fully functional, secure, and scalable network that mirrors what you would have in a physical data center, but without the hardware.

Full Technical Definition

Azure Virtual Network (VNet) is a fundamental building block for your private network in Azure. It enables many types of Azure resources, such as Azure Virtual Machines (VMs), to securely communicate with each other, the internet, and on-premises networks. A VNet is a representation of your own network in the cloud. It is a logical isolation of the Azure cloud dedicated to your subscription. You can fully control the IP address blocks, DNS settings, security policies, and route tables within this network.

At the core, an Azure VNet is defined by its IP address space, expressed in Classless Inter-Domain Routing (CIDR) notation, such as 10.1.0.0/16. This defines the range of private IP addresses available for resources inside the VNet. You can then divide this address space into one or more subnets. Each subnet is a contiguous block of IP addresses, like 10.1.1.0/24. Subnets allow you to segment your network logically, improving security and management. For example, you might place web servers in one subnet and database servers in another.

Communication within a VNet is handled by the Azure fabric. By default, all resources in the same VNet can communicate with each other using their private IP addresses. You can control this traffic using Network Security Groups (NSGs), which act as a stateful firewall. An NSG contains a set of security rules that allow or deny inbound and outbound traffic based on source and destination IP addresses, ports, and protocols. You can associate an NSG with a subnet or a specific virtual machine’s network interface.

VNet peering allows you to connect two different VNets within the same Azure region or across different regions (global peering). This creates a low-latency, high-bandwidth connection between the VNets, enabling resources in one VNet to communicate with resources in another as if they were on the same network. Peering is non-transitive, meaning that if VNet A is peered with VNet B, and VNet B is peered with VNet C, VNet A does not automatically communicate with VNet C unless you explicitly create that peering.

To connect an Azure VNet to an on-premises network, you have several options. A site-to-site VPN (Virtual Private Network) uses IPsec to create an encrypted tunnel over the internet between your on-premises VPN device and the Azure VPN Gateway attached to your VNet. For higher bandwidth and a more reliable connection, Azure ExpressRoute provides a dedicated private connection from your on-premises network to Azure, bypassing the public internet. You can also use point-to-site VPN for individual client computers to connect to the VNet.

Azure DNS is integrated with VNets. You can use Azure-provided DNS or your own custom DNS servers. You can also create private DNS zones within your VNet so that you can resolve hostnames without exposing them to the public internet. For example, you could create a private zone for "contoso.local" so that your VMs can resolve each other by name.

Route tables (User Defined Routes, or UDRs) allow you to override Azure’s default system routes. For example, you can force all traffic from a subnet to go through a network virtual appliance (NVA) for inspection. This is crucial for implementing hub-and-spoke network topologies, where a central hub VNet (containing shared services like firewalls or VPN gateways) is peered to multiple spoke VNets.

From a protocol standpoint, Azure VNet supports IPv4 and, with some limitations, IPv6. It also supports common networking protocols like TCP, UDP, and ICMP. Network traffic within a VNet is encapsulated using a technology called Virtual Extensible LAN (VXLAN), which is handled by the Azure fabric and is transparent to the user. The VNet itself is a software-defined network (SDN) construct, meaning that all routing, switching, and security policies are implemented in software by the Azure platform.

In an enterprise IT implementation, Azure VNets are used to host production workloads, development environments, and disaster recovery sites. They are often connected to corporate networks via ExpressRoute for compliance and performance reasons. Network segmentation is critical; for example, using service endpoints (now largely replaced by Private Endpoints) to securely access Azure PaaS services (like Azure Storage or SQL Database) without exposing them to the public internet. Private Link and Private Endpoints allow you to access these services as if they were on your own VNet. Overall, the Azure VNet is the equivalent of a physical network switch and router in a traditional data center, but with the benefits of cloud elasticity, automation, and global reach.

Real-Life Example

Imagine you are organizing a large, private conference at a convention center. The convention center itself is like the Azure cloud. You rent a specific, roped-off section of the hall just for your conference – this is your Azure Virtual Network. Within your section, you set up different areas: a registration desk, a main presentation hall, and a quiet networking lounge. These areas are your subnets.

You want the registration desk to be accessible to everyone coming in from the main convention hall (the internet). So you put that area near the entrance and give it a sign (a public IP address). However, the networking lounge is only for registered VIP attendees, so you place it deeper inside your section and put a security guard (a Network Security Group) at the door who only lets in people with a special VIP badge (a rule allowing traffic only from a specific source).

The main presentation hall contains the stage and the audio-visual equipment. You don’t want attendees wandering into the technical backstage area where the cabling and servers are. So you create a separate, locked backstage area (another subnet) and put a rule that only the stage manager (a specific application) can go from the hall to the backstage. This is like controlling traffic between subnets.

Now, your main office for the conference is across the street at your company headquarters. You want your on-site registration team at the convention center to be able to access the company’s central database to check in attendees. You build a secure, private tunnel (a site-to-site VPN or ExpressRoute) from your roped-off section at the convention center directly to your office building’s network. This allows the registration computers in your section to see the database as if they were in the office, without sending data over the public streets (the internet).

Finally, you have a partner organization also hosting a conference in a different hall of the same convention center. You both decide to set up a special walkway between your sections so your VIPs can visit each other’s networking lounge. This is VNet peering. You control who can use the walkway and set rules that your attendees cannot just wander into their backstage areas.

In this analogy, the entire convention center is the Azure infrastructure. Your roped-off section is the VNet. The areas inside are subnets. The security guards are NSGs and route tables. The tunnel to your office is a VPN or ExpressRoute. The walkway to the other section is VNet peering. This helps you grasp how you can build complexity in a controlled, secure way, just like in an Azure Virtual Network.

Why This Term Matters

In a practical IT context, the Azure Virtual Network is the first resource you typically create after setting up your Azure subscription, because almost every other resource needs a network to communicate. Without a VNet, your virtual machines would be isolated, and you couldn't run any meaningful application. It matters because it provides the isolation and security that enterprises require. In a traditional data center, you have physical routers, switches, and firewalls that you configure. In Azure, the VNet is the software-defined equivalent of that entire physical network.

From a security perspective, the VNet is your first line of defense. By properly segmenting your network into subnets and applying Network Security Groups (NSGs), you can enforce the principle of least privilege. For example, you can ensure that a web server can talk to a database server on port 1433 (SQL), but that the database server cannot initiate outbound connections to the internet. This containment is critical for preventing lateral movement in case of a breach.

From a cost perspective, understanding VNets helps you avoid unnecessary data transfer costs. Resources in the same VNet and same region can communicate using private IP addresses at no additional charge. But if you force traffic to go through a VPN or over the internet, you incur outbound data transfer costs. Also, using VNet peering incurs a small cost for data transfer between VNets, but it is still cheaper than routing traffic through a firewall for every packet.

Finally, it matters because Azure’s most advanced features, such as Private Endpoints, Azure Bastion, and Azure Firewall, are all built on top of the VNet. If you don’t understand VNets, you cannot properly implement a secure hybrid cloud architecture. For any IT professional working with Azure, mastering VNets is non-negotiable. It is the foundation that determines whether your cloud solution is secure, performant, and cost-effective.

How It Appears in Exam Questions

Azure Virtual Network can appear in several distinct question patterns. The first and most common is a scenario-based question that asks: “You need to deploy two virtual machines in Azure that must be able to communicate with each other using their private IP addresses. What should you do?” The correct answer is to place both VMs in the same virtual network or in peered VNets. The trap here is that a candidate might choose to assign public IP addresses to both VMs, which works but is insecure and not the best practice.

Another pattern involves subnetting and IP address allocation. For example: “You create a VNet with an address space of 10.0.0.0/16 and need to create four subnets. Which subnet addresses are valid?” You need to understand that subnets must be contiguous ranges within the /16 block, such as 10.0.1.0/24, 10.0.2.0/24, etc. A common mistake is to choose overlapping addresses, which Azure does not allow.

A third pattern deals with hybrid connectivity. For example: “Your on-premises network uses the 192.168.0.0/16 range. You want to connect it to an Azure VNet using a site-to-site VPN. Which address space should you assign to the VNet to avoid overlap?” The correct answer would be something like 10.0.0.0/16, because overlapping address space would prevent the VPN from working. This tests your understanding of IP addressing and CIDR.

Troubleshooting questions are also common. For instance: “Users report that they cannot connect to a web server hosted on an Azure VM from the internet. You have already assigned a public IP address to the VM. What is the likely cause?” The answer often involves an NSG rule blocking inbound traffic on port 80 or 443, or a missing route. Or the VM might be in a subnet that does not have an internet gateway.

Finally, you might see questions about VNet peering. For example: “You have two VNets in the same region. VNet A has VNet B peered to it. VNet B is peered to VNet C. Can VNet A communicate with VNet C?” The correct answer is no, because peering is non-transitive. The trap is that candidates assume it works like a physical network bridge. Azure requires you to create a direct peering between VNet A and VNet C. This is a classic exam trap.

Practise Azure Virtual Network Questions

Test your understanding with exam-style practice questions.

Practise

Example Scenario

A company called Contoso Ltd. is moving its internal HR application to Azure. They have an on-premises data center with a network range of 10.10.0.0/16. They want to deploy two virtual machines in Azure: one web server and one database server.

First, you create an Azure Virtual Network with the address space 10.20.0.0/16 to avoid overlapping with the on-premises range. Inside this VNet, you create two subnets: Frontend (10.20.1.0/24) and Backend (10.20.2.0/24). You deploy the web server VM in the Frontend subnet and the database server VM in the Backend subnet.

You want the web server to be accessible from the internet, so you give it a public IP address and create an NSG rule that allows inbound HTTP (port 80) and HTTPS (port 443) traffic from the internet. You attach this NSG to the Frontend subnet. You do not want the database server to be accessible from the internet, so you create a separate NSG for the Backend subnet that only allows inbound traffic from the Frontend subnet on port 1433 (SQL Server).

Next, you need to connect the Azure VNet to the on-premises network so that employees can access the HR application from the office. You set up a site-to-site VPN between an on-premises VPN device and an Azure VPN Gateway attached to the same VNet. You configure the local network gateway with the on-premises IP address range (10.10.0.0/16) and ensure the route tables are set correctly.

Finally, you test connectivity. An employee in the office can access the web server via its public IP address or via the VPN using its private IP (10.20.1.4). The web server can communicate with the database server using the private IP (10.20.2.4). The database server cannot initiate outbound internet connections, and no one from the internet can reach it directly. This simple scenario illustrates how VNets, subnets, NSGs, and VPNs work together in a real-world migration.

Common Mistakes

Assuming VNet peering is transitive across multiple VNets.

Azure VNet peering is non-transitive. If VNet A is peered to VNet B, and VNet B is peered to VNet C, VNet A cannot communicate with VNet C unless you explicitly create a peering between them. Learners often assume it works like a physical network switch.

Create a direct peering between VNet A and VNet C if needed, or use a hub-and-spoke topology with a network virtual appliance in the hub to route traffic between spokes.

Using overlapping IP address ranges when connecting to on-premises network.

If your on-premises network uses 10.0.0.0/8 and you create a VNet with 10.0.1.0/24, the address spaces overlap. The VPN or ExpressRoute connection will fail because Azure will not know where to route traffic destined for 10.0.1.x.

Always choose a VNet address space that is completely separate from your on-premises and other connected networks. For example, use 172.16.0.0/16 if your on-premises uses 10.0.0.0/8.

Forgetting to update route tables or DNS settings after peering VNets.

By default, peering does not automatically configure DNS resolution between VNets. VMs in peered VNets cannot resolve each other's hostnames unless you configure Azure DNS private zones or custom DNS servers. Also, route tables from one VNet do not automatically affect the other.

Configure a private DNS zone for the VNets or use Azure-provided DNS with custom suffixes. Verify that route tables are correctly applied to subnets in both VNets if you need to force traffic through an NVA.

Applying NSGs to the VNet itself instead of subnets or NICs.

NSGs can only be associated with subnets or individual network interfaces (NICs), not the VNet itself. A learner might think they can set a global rule for the entire VNet, which is not possible.

Associate the NSG with the subnet that contains the resources you want to protect. If you need different rules for specific VMs within the same subnet, associate the NSG directly with the VM's NIC. Always remember: VNet-level security is achieved through route tables and Azure Firewall, not NSGs.

Believing that a public IP address on a VM automatically makes it accessible from the internet without NSG rules.

By default, a new VM has an NSG that blocks all inbound internet traffic, even if it has a public IP. You must explicitly add inbound rules to allow traffic (e.g., HTTP, RDP, SSH). Learners often forget this and then cannot connect to the VM.

After creating a VM with a public IP, check the associated NSG rules. Add an inbound rule to allow the specific port you need (e.g., port 22 for SSH, port 3389 for RDP, port 80 for HTTP). The source can be 'Internet' or a specific IP range.

Exam Trap — Don't Get Fooled

{"trap":"Choosing VNet peering when the requirement is to connect a VNet to an on-premises network.","why_learners_choose_it":"Learners see 'connect two networks' and immediately think of VNet peering because it's the most common way to connect VNets. They overlook that peering is only for connecting two Azure VNets, not for hybrid connectivity to on-premises."

,"how_to_avoid_it":"Read the question carefully. If the scenario involves connecting a VNet to a corporate data center, home office, or any non-Azure network, the answer must involve a Site-to-Site VPN, Point-to-Site VPN, or ExpressRoute. VNet peering is strictly for VNet-to-VNet connections.

Remember: 'Peering for Azure to Azure, VPN for on-premises to Azure.'

Commonly Confused With

Azure Virtual NetworkvsAzure VPN Gateway

An Azure Virtual Network is the private network itself, while an Azure VPN Gateway is a specific resource you attach to a VNet to enable encrypted connectivity to on-premises networks or other VNets. You can have a VNet without a VPN Gateway, but a VPN Gateway cannot exist without a VNet. Think of the VNet as the city and the VPN Gateway as the secure tunnel entrance.

A VNet is like a private office building. The VPN Gateway is like a secure tunnel that connects that office building to your home office across the city. You need the building (VNet) to attach the tunnel (VPN Gateway) to.

Azure Virtual NetworkvsNetwork Security Group (NSG)

An Azure Virtual Network is the networking container that provides isolation and routing. A Network Security Group is a firewall rule set that you attach to a subnet or a VM's network interface to filter traffic. The VNet is the highway system; the NSG is the security checkpoint that controls which cars can enter a specific neighborhood or driveway.

Your VNet is the entire gated community. An NSG applied to a subnet is like a guard at the entrance of a specific street inside that community, only allowing delivery trucks (certain traffic) to pass.

Azure Virtual NetworkvsAzure ExpressRoute

An Azure VNet is your cloud-based private network. Azure ExpressRoute is a service that provides a dedicated, private, high-bandwidth connection from your on-premises network to Azure, bypassing the internet. You can connect a VNet to Azure via ExpressRoute, but ExpressRoute is not a VNet itself. It's more like a private fiber-optic cable directly from your office to the cloud.

Your VNet is your cloud office. ExpressRoute is a private, fast highway that directly connects your office building to the cloud office. The VPN Gateway (above) is like a slower, public road with encryption. Both connect your office to the cloud, but ExpressRoute is faster and more reliable.

Azure Virtual NetworkvsAzure Virtual Network Peering

VNet peering is a feature that connects two Azure VNets, allowing resources in each to communicate as if they were on the same network. It is not the same as the VNet itself. Peering is a relationship between two existing VNets. The VNet is the individual network; peering is the virtual bridge connecting them.

You have two separate VNets: VNet-A and VNet-B. They are like two separate office buildings in different parts of the city. VNet peering is like building a private skybridge between them. The skybridge is not a building itself, just the connection.

Step-by-Step Breakdown

1

Planning the IP Address Space

Before creating a VNet, you must decide on a private IP address range using CIDR notation, such as 10.0.0.0/16. This range must not overlap with any other network you plan to connect to, such as on-premises networks or other VNets. For example, if your office uses 192.168.1.0/24, choose a different range like 172.16.0.0/16. This prevents routing conflicts later.

2

Creating the Virtual Network in Azure

In the Azure portal, you navigate to 'Create a resource' and search for 'Virtual network.' You provide a name (e.g., 'MyVNet'), select a region (e.g., 'East US'), and enter the IP address space you planned. Azure reserves a few IP addresses in each subnet for internal use (e.g., the first four and the last IP), so you need to account for that when sizing your subnets.

3

Defining Subnets

Within the VNet, you create one or more subnets. A subnet is a segment of the IP address space. For example, from the 10.0.0.0/16 VNet, you can create a subnet 'Frontend' with 10.0.1.0/24 and a subnet 'Backend' with 10.0.2.0/24. Subnets help organize resources and apply different security policies. Each subnet can have its own Network Security Group and route table.

4

Creating Network Security Groups (NSGs)

You create NSGs to control traffic to and from subnets or specific VMs. For example, create an NSG for the Frontend subnet with inbound rules allowing HTTP (port 80) and HTTPS (port 443) from the internet. Create another NSG for the Backend subnet allowing inbound traffic only from the Frontend subnet on port 1433 (SQL) and denying all other inbound traffic from the internet.

5

Associating NSGs with Subnets or NICs

After creating the NSGs, you associate them with the appropriate subnets. Associate the 'Frontend-NSG' with the 'Frontend' subnet and the 'Backend-NSG' with the 'Backend' subnet. You can also associate an NSG directly with a VM’s network interface for more granular control, but subnet-level association is more common for consistency.

6

Deploying Resources into Subnets

Now you can create virtual machines and other resources (e.g., Azure App Service via VNet integration) and place them into the desired subnets. When you create a VM, you specify the VNet and subnet in the networking tab. Azure automatically assigns a private IP address from that subnet's range. You can also assign a static private IP if needed.

7

Connecting to On-Premises (Optional)

If you need to connect the VNet to your on-premises network, you create a VPN Gateway or ExpressRoute circuit. For a site-to-site VPN, you create a gateway subnet (a special subnet named 'GatewaySubnet') within your VNet, then create a Virtual Network Gateway. You also configure a Local Network Gateway with your on-premises VPN device’s public IP and address space, then create the connection.

8

Configuring VNet Peering (Optional)

To connect two VNets, you set up VNet peering. From one VNet’s menu, select 'Peerings' and add a new peering to the other VNet. You must do this from both sides. Once established, resources in both VNets can communicate using private IP addresses. You can choose to allow traffic from peered VNets to use remote gateways if needed.

9

Testing Connectivity

After configuring the VNet, subnets, NSGs, and any connections, you should test connectivity. RDP or SSH into a VM in the Frontend subnet and try to ping a VM in the Backend subnet (if ICMP is allowed by the NSG). Test connectivity from on-premises to the Azure VMs via the VPN. If connectivity fails, check NSG rules, route tables, and DNS settings.

Practical Mini-Lesson

In practice, designing an Azure Virtual Network requires careful upfront planning that goes beyond just creating a VNet. One of the most critical decisions is the IP address space. Many new professionals make the mistake of using the default 10.0.0.0/16 without considering future growth or connectivity to other networks. In an enterprise, you often need to connect multiple VNets (e.g., for different environments like dev, test, and prod) and also connect to an on-premises network. If you choose overlapping IP ranges, you will be unable to establish VPN connections or peering, leading to a costly redesign.

A common best practice is to reserve a large address space for your Azure deployments, such as 10.0.0.0/8, and then allocate specific /16 ranges for different regions and environments. For example, you might use 10.1.0.0/16 for production in East US, 10.2.0.0/16 for non-production in East US, and 10.3.0.0/16 for production in West Europe. Inside each /16, you can create /24 subnets for specific functions like web, app, and data tiers. This systematic approach avoids overlap and makes routing easier.

Another practical consideration is the use of service endpoints and private endpoints. Service endpoints allow you to secure Azure PaaS services (like Storage or SQL) to your VNet by extending your VNet’s identity to the service over the Microsoft backbone. However, Microsoft now recommends using private endpoints instead, because they place the service directly into your VNet with a private IP, eliminating data exfiltration risks. In a professional setup, you should always prefer private endpoints for PaaS services that support them.

Network virtual appliances (NVAs) are another real-world component. You might deploy a third-party firewall (e.g., from Palo Alto or Fortinet) as an NVA in a hub VNet. Then, you peer spoke VNets to the hub and configure route tables in the spokes to send all internet-bound traffic through the NVA for inspection. This centralizes security and compliance. The tricky part is ensuring that the NVA can handle the traffic volume and that route tables are correctly configured to avoid asymmetric routing.

What can go wrong? One common issue is that after peering two VNets, traffic does not flow. The cause is often missing NSG rules or route table entries. For example, if you have an NVA in a hub VNet that routes traffic between spokes, you must create the peering connections, add routes in the spoke route tables to send traffic to the NVA’s IP, and ensure the NVA itself is configured to forward traffic. Another issue is DNS resolution: if you do not set up private DNS zones, VMs in peered VNets will resolve each other by hostname only if you use custom DNS servers. Azure's default DNS does not resolve across VNets.

Finally, cost management is a real concern. Data transfer between resources in the same VNet is free, but data transfer between VNets using peering incurs a charge per GB. Also, VPN gateways and ExpressRoute circuits have hourly costs. Knowing when to use peering vs. a single large VNet is a practical decision. For example, if you have multiple application tiers that need to be isolated but still communicate, a single VNet with subnets and proper NSGs is often simpler and cheaper than multiple VNets with peering.

Troubleshooting Clues

VNet peering not working

Symptom: Resources in peered VNets cannot communicate despite configured peerings.

Peering requires both sides to be in 'Connected' state; mismatched address spaces, overlapping CIDRs, or disabled forwarded traffic can cause failures.

Exam clue: Exam questions often present a peering issue where one side is initiated but not approved, or address space overlaps.

Cannot connect to VM via public IP

Symptom: VM has a public IP but RDP/SSH timeout occurs.

Missing or incorrect NSG rules for inbound traffic on port 3389 (RDP) or 22 (SSH) despite VM having a public IP.

Exam clue: Tests understanding that NSGs filter traffic before reaching the VM; common in AWS SAA and AZ-104 scenario questions.

Subnet IP range exhaustion

Symptom: Cannot deploy new resources to a subnet; error 'Insufficient address space'.

Subnet address prefix is too small or all IPs are in use by existing resources like VMs, internal load balancers, or reserved addresses (first 4, last 1).

Exam clue: Exams test CIDR planning and subnet sizing; often a question gives a subnet and asks why scaling fails.

VPN gateway connection drops intermittently

Symptom: Site-to-site VPN disconnects after a few minutes; logs show 'lost connectivity'.

Mismatched shared keys, incorrect BGP settings, or on-premises firewall blocking IPsec packets (e.g., UDP 500/4500).

Exam clue: AZ-104 and AWS cloud practitioner exams may present a hybrid network issue focusing on VPN tunnel configuration errors.

Service endpoint not working for Azure Storage

Symptom: Traffic from VNet to Storage account fails, even with service endpoint enabled.

Storage account firewall rules block VNet subnet; or endpoint is not enabled on the subnet, or DNS resolution points to public IP instead of private endpoint.

Exam clue: Tests service endpoint vs. private endpoint concepts; Google ACE and Azure Fundamentals questions highlight routing differences.

Cannot delete a VNet

Symptom: Azure portal or CLI returns error 'VNet has active resources'.

VNet still has associated resources (e.g., VMs, load balancers, peered VNets) that must be removed first.

Exam clue: Exams like AZ-104 test dependency chains; deletion order (resource, subnet, VNet) is a common topic.

DNS resolution fails for resources in VNet

Symptom: Azure VMs cannot resolve each other's hostnames, though IP communication works.

Custom DNS server configured incorrectly, missing forwarders, or VNet DNS settings not updated.

Exam clue: Tests DNS integration in VNet, often with custom DNS vs. Azure-provided DNS; appears in Microsoft and Google exams.

UDR (User Defined Route) not taking effect

Symptom: Traffic still flows through default route instead of specified next hop.

UDR has lower priority than a system route for the same destination; or subnet not associated with the route table.

Exam clue: Route priority and subnet association are common pitfalls tested in AZ-104 and AWS SAA scenario questions.

Memory Tip

Remember 'VNet is a Private Cloud Network' – VNet stands for Virtual Network, and it gives your resources a private, isolated space in Azure. For exams, think 'Isolation, Subnets, NSGs, Peering, VPN.'

Learn This Topic Fully

This glossary page explains what Azure Virtual Network means. For a complete lesson with labs and practice, see the topic guide.

Covered in These Exams

Current Exam Context

Current exam versions that test this topic — use these objectives when studying.

Related Glossary Terms

Quick Knowledge Check

1.You need to connect two Azure Virtual Networks in the same region to allow private communication. What should you use?

2.A subnet has an address prefix of 10.0.0.0/24. How many usable IP addresses are available for resources?

3.You have a VM in VNet-A that cannot reach a VM in VNet-B despite VNet peering being configured. What is the most likely cause?

4.Which Azure service allows you to filter inbound and outbound traffic at the subnet or NIC level in a VNet?

5.What is the purpose of a service endpoint in an Azure Virtual Network?

6.You deploy a VM in a subnet and assign it a public IP, but RDP connections fail. What is the first thing to check?