Azure Virtual Network (VNet) is the foundation of Azure networking. It allows you to securely connect Azure resources to each other, to the internet, and to your on-premises environment.
A VNet provides logical isolation in Azure—your own private network environment in the cloud.
Resources inside a VNet can communicate privately.
When you create a VNet, you define an address space using CIDR format, such as 10.0.0.0/16.
This space is further divided into subnets.
CIDR = Classless Inter-Domain Routing10.0.0.0/16 means there are 65,536 IP addresses available.
You divide your VNet into subnets to group resources logically.
10.0.1.0/24 for Web tier, 10.0.2.0/24 for App tierSubnets segregate traffic and help apply network security rules.
Dynamic IP: Assigned automatically by Azure (default)
Static IP: Manually assigned and never changes (useful for DNS, firewalls)
Applies to:
Private IPs (within the VNet)
Public IPs (internet-facing)
Public IPs can be:
Basic: Static or dynamic, not zone-aware
Standard: Always static, zone-aware
DNS label:
Gives your public IP a friendly name
Example: mywebapp.eastus.cloudapp.azure.com
Subnets are used to organize resources like:
VMs
Load balancers
App services (via integration)
Helps apply different security rules and route tables to each segment.
Allows you to dedicate a subnet to a specific Azure service.
Delegation enables the service to fully manage the subnet.
Each VM must have at least one NIC.
The NIC defines:
IP configuration (static/dynamic)
NSG rules
DNS settings
Associated subnet
You can:
Attach or detach NICs (secondary only)
Change IP assignment
Apply NSGs at the NIC level
Primary NICs cannot be detached from the VM.
Name resolution (or DNS) ensures that IP addresses can be translated to human-readable names (and vice versa) within your Azure environment.
Azure provides built-in DNS services to resolve hostnames to internal IP addresses within a VNet.
No configuration needed for most scenarios.
Example: A VM named vm1 in VNet contoso-vnet can be resolved as:
vm1.contoso-vnet.internal.cloudapp.net
Azure auto-registers and resolves VMs by hostname within the same VNet.
Works only if:
VMs are in the same region
Default DNS is used
It does not support cross-VNet resolution unless using VNet peering + custom DNS.
You can override Azure’s default DNS by specifying your own:
On-premises DNS server
BIND or Windows DNS in Azure
Configuration is at the VNet level:
Go to VNet > DNS Servers
Choose Custom
Add one or more DNS server IPs
VM NICs must be restarted to apply DNS changes.
You can configure your DNS server to forward specific requests to:
Azure internal DNS (for .azure.com)
On-prem DNS servers
This is useful for hybrid cloud scenarios or split-horizon DNS.
No need to manage or maintain your own DNS servers
Supports:
Automatic registration of VM names (with auto-registration enabled)
Custom DNS names
VNet linking
Create a private DNS zone (e.g., internal.contoso.com)
Link it to one or more VNets
Enable auto-registration if needed
Create A records, CNAMEs, or allow Azure to register VMs automatically
Use cases:
Custom internal DNS names
Cross-VNet name resolution
Hybrid network setups
Securing your network in Azure is essential to control traffic flow, prevent unauthorized access, and ensure compliance. Azure provides multiple layers of network security.
An NSG is a firewall-like filter that controls inbound and outbound traffic to:
Subnets
Network interfaces (NICs)
Each NSG contains security rules.
Each rule includes:
Name
Priority (lower number = higher priority)
Source/Destination (IP, range, tag)
Protocol (TCP, UDP, * for any)
Port range
Action (Allow or Deny)
NSG rules are stateful: if inbound traffic is allowed, the response is automatically allowed.
Apply NSGs at the subnet level for shared rules.
Apply at NIC level for fine-grained control.
Use deny-by-default and only allow what’s needed.
Predefined labels for common Azure services and groups of IPs.
Examples:
Internet
VirtualNetwork
AzureLoadBalancer
Storage
Simplifies NSG rules by abstracting IP addresses.
Logical groups for VMs with similar functions.
Can be used in NSG rules to define source/destination by group name rather than IP.
Makes rules more readable and maintainable.
Example: Allow traffic from Web-ASG to App-ASG on port 80.
Azure Firewall is a stateful, fully managed network security service.
Features:
Packet filtering (L3/L4)
Application rules (L7 filtering for HTTP/S)
FQDN filtering
Threat intelligence
SNAT/DNAT
Centralized control in hub-and-spoke architectures
Audit and log all traffic
Restrict access to known domains
Azure Firewall is highly scalable and integrates with Azure Monitor logs.
JIT allows time-limited access to VMs via RDP/SSH. It’s part of Microsoft Defender for Cloud (formerly Security Center).
RDP/SSH ports are blocked by default.
When needed, an admin can request access:
NSG rules are opened temporarily, then closed automatically.
Protects VMs from constant port scanning and brute-force attacks.
Go to Microsoft Defender for Cloud > JIT VM access
Select a VM and enable JIT
Configure access ports and allowed source IPs
VNet Peering allows you to connect two virtual networks seamlessly and securely, enabling private communication between them without using public IPs, VPNs, or gateways.
Low-latency, high-bandwidth connection between two VNets in the same region.
Peered VNets can:
Share resources
Communicate via private IP addresses
Appear as one network to resources
No need for a VPN or public internet access.
Peers VNets across different regions.
Still private and secure, using Microsoft’s backbone.
Use case: multi-region applications, disaster recovery setups.
Supports cross-region workloads without traffic going over the public internet.
To peer two VNets:
Go to Virtual Network > Peerings > + Add
Choose:
The remote VNet
Name of the peering (on both sides)
Traffic settings:
Allow VNet access
Allow forwarded traffic
Allow gateway transit (for shared VPN connections)
Peering is non-transitive:
If VNet A peers with B, and B with C, A cannot communicate with C unless directly peered.
Maximum peering connections per VNet: 500 (may vary with region/SKU)
Each peering must be configured in both VNets
Cannot directly peer VNets in different Azure AD tenants without extra configuration
All traffic between peered VNets remains within Azure’s private backbone, not exposed to the internet.
Azure provides options to connect your on-premises network to Azure securely, either over the public internet (VPN) or through a private dedicated connection (ExpressRoute).
A Site-to-Site VPN connects your on-premises network to an Azure Virtual Network using IPsec/IKE tunnels over the internet.
Best for:
Permanent hybrid connectivity
Businesses with on-premises data centers or offices
An on-prem VPN device (must be compatible with Azure)
A public IP address for the VPN device
A Virtual Network Gateway in Azure
A local network gateway (represents the on-prem network)
A P2S VPN is for individual users to connect securely from their devices (e.g., laptops) to Azure over the internet.
Best for:
Remote workers or small teams
Testing or development use cases
Certificate-based authentication (generate and install client certs)
Azure AD authentication (use user credentials and MFA)
ExpressRoute provides a private connection from your on-premises infrastructure to Azure via a Microsoft partner provider.
Key Benefits:
Not over the public internet
High availability
Consistent latency
High bandwidth options (up to 10 Gbps)
Enterprise-grade workloads
Large-scale data transfers
Financial services, healthcare, or regulated industries
A Virtual Network Gateway is required to create:
S2S and P2S VPNs
ExpressRoute connections
You must choose the gateway type:
VPN: for IPsec/IKE-based tunnels
ExpressRoute: for dedicated lines
Choose a gateway SKU based on:
Bandwidth needs
Connection count
Features (e.g., BGP support)
| SKU | Type | Use |
|---|---|---|
| Basic | VPN | Entry-level, limited features |
| VpnGw1-5 | VPN | Production-grade VPN |
| ErGw1-3 | ExpressRoute | Dedicated private connectivity |
Gateway creation may take up to 45 minutes. Plan accordingly.
Azure provides multiple load balancing options to distribute traffic, ensure high availability, and support global scalability. The right choice depends on traffic type, protocol layer, and deployment scope.
A Layer 4 (TCP/UDP) load balancer that distributes incoming traffic across backend resources (e.g., VMs) in a virtual network.
Best for:
Load balancing VM traffic within a region
Supporting high availability
Inbound NAT rules: Route specific ports to VMs (e.g., port 3389 to VM1)
HA ports: Enable load balancing across all ports
Health probes: Check VM status before forwarding traffic
Outbound rules: Control internet traffic from backend pool
| Feature | Basic | Standard |
|---|---|---|
| Backend pool size | Limited | Up to 1000 |
| Availability zones | No | Yes |
| Diagnostics and metrics | No | Yes |
| SLA | None | 99.99% |
Use Standard Load Balancer for production workloads.
A Layer 7 (HTTP/HTTPS) load balancer for web applications.
Best for:
Load balancing web traffic
Advanced HTTP features
SSL termination: Offload HTTPS decryption
Web Application Firewall (WAF): Protects against OWASP top 10 threats
Cookie-based session affinity
URL path-based routing: Send /images to server A, /api to server B
Multi-site hosting: Host multiple domains on one gateway
Traffic Manager is a DNS-based load balancer that routes users to the best endpoint globally, based on various rules.
Best for:
Global web applications
Disaster recovery routing
| Method | Purpose |
|---|---|
| Performance | Route to closest endpoint |
| Priority | Use primary, failover to secondary |
| Geographic | Route based on user’s region |
| Weighted | Distribute based on percentages |
Traffic Manager doesn’t handle actual traffic—it only resolves DNS to the right endpoint.
Front Door is a global HTTP/HTTPS load balancer and content delivery service.
Best for:
High-performance, low-latency global apps
Advanced edge-based features
SSL offload
Web Application Firewall (WAF)
Global anycast IP
URL-based routing
Caching and CDN integration
Health probes
Unlike Application Gateway, Front Door operates at the edge, not within a VNet.
User-Defined Routes allow you to override Azure’s default system routes and define custom traffic flow.
Create a route table:
Add custom routes:
Specify address prefix (e.g., 0.0.0.0/0)
Choose next hop type: Virtual appliance, VPN gateway, or None (blackhole)
Associate the route table with a subnet.
Next hop = NVA (Network Virtual Appliance):
Redirect traffic to a firewall or inspection device.
Blackhole route:
Route traffic to None to block all traffic to a destination (e.g., 0.0.0.0/0 to block internet).
Force tunneling:
Redirect all internet-bound traffic back to on-premises via a VPN.
Exam Tip: Expect scenarios involving traffic control to/from subnets, and choosing between system route, UDR, or BGP route precedence.
Definition: A technique that forces outbound internet traffic from Azure resources to go through on-premises infrastructure, typically for auditing or inspection purposes.
Use a custom route:
0.0.0.0/0 → VPN Gateway IPCombine with a Site-to-Site VPN Gateway.
Regulatory compliance
Centralized monitoring and egress filtering
Set up a Site-to-Site VPN to on-premises.
Create a UDR for 0.0.0.0/0 with next hop set to VPN gateway.
Associate this route with the target subnet(s).
Exam Tip: Understand the routing order precedence and that forced tunneling requires disabling default internet access via UDR.
Purpose: To troubleshoot and understand the actual security rules affecting a VM’s network interface.
Azure Portal:
VM → Networking → Network interface → Effective security rulesAzure CLI:
az network nic list-effective-nsg --name <NIC_NAME> --resource-group <RG_NAME>
Diagnosing conflicts between NSGs at subnet and NIC levels
Verifying rule priority
Confirming inbound and outbound allowed/denied traffic
Exam Tip: Effective security rules are calculated after all NSGs, priorities, and service tags are evaluated.
App Services can connect to VNets, but the behavior depends on the integration mode.
Works with VNets in the same region.
Used for outbound access only (e.g., access to databases, APIs in VNet).
Uses delegated subnet and private IPs.
For cross-region scenarios.
Uses a VPN Gateway to route traffic.
Slower, more complex setup, but allows integration with remote VNets.
App Service cannot be accessed inbound from the VNet using VNet integration alone.
To allow inbound access from a VNet, use Private Endpoint.
Exam Tip: Many questions test whether App Service can be accessed by other services inside a VNet—answer is No, unless Private Endpoint is configured.
Azure provides Network Watcher for diagnosing and monitoring network-related issues.
IP Flow Verify:
NSG Flow Logs:
Packet Capture:
Connection Troubleshoot:
Exam Tip: You may be given a scenario with failed connectivity and asked which Network Watcher tool to use (e.g., use IP Flow Verify for NSG blockage).
What is the key difference between Azure Private Endpoints and Service Endpoints?
Private Endpoints provide a private IP address for the service inside a virtual network, while Service Endpoints extend the VNet identity to Azure services.
Private Endpoints integrate an Azure service directly into a virtual network by assigning it a private IP address using Azure Private Link. Traffic stays entirely within the Azure backbone network. Service Endpoints allow secure connectivity to Azure services but still use the service’s public endpoint while restricting access to specific VNets. Because Private Endpoints eliminate exposure to public endpoints, they are generally preferred for highly secure architectures.
Demand Score: 86
Exam Relevance Score: 94
Why might two virtual networks that are peered fail to communicate?
Network security group rules or user-defined routes may be blocking traffic.
Although VNet peering enables connectivity between virtual networks, traffic can still be restricted by network security groups attached to subnets or network interfaces. Additionally, user-defined routes may redirect or block traffic between networks. Administrators should verify NSG rules, routing tables, and subnet configurations to ensure that required traffic ports and protocols are allowed.
Demand Score: 84
Exam Relevance Score: 91
When should Azure Application Gateway be used instead of Azure Load Balancer?
When layer-7 HTTP/HTTPS routing features such as path-based routing or SSL termination are required.
Azure Load Balancer operates at layer 4 (TCP/UDP) and distributes traffic based on network protocols. Azure Application Gateway operates at layer 7 and supports advanced web application routing features such as URL path routing, host-based routing, SSL termination, and Web Application Firewall (WAF). Therefore, Application Gateway is typically used for web applications requiring intelligent HTTP routing.
Demand Score: 83
Exam Relevance Score: 92
What is the purpose of a Network Security Group in Azure?
To filter network traffic using inbound and outbound security rules.
Network Security Groups contain rules that allow or deny traffic based on source, destination, port, and protocol. They can be applied to subnets or network interfaces and act as a basic firewall within Azure virtual networks. Administrators commonly use NSGs to restrict access to management ports or limit communication between application tiers.
Demand Score: 80
Exam Relevance Score: 90
What Azure service provides centralized network security filtering across multiple VNets?
Azure Firewall.
Azure Firewall is a managed network security service that provides centralized policy enforcement and traffic filtering. It supports application rules, network rules, and threat intelligence filtering. Organizations commonly deploy Azure Firewall in hub-and-spoke architectures to control traffic between multiple VNets and external networks.
Demand Score: 78
Exam Relevance Score: 89