Study guide
9.5 Azure VM Networking, NSGs & Connectivity
Administering Windows Server Hybrid Core Infrastructure AZ-800
Track your progress as you read
Finished sections get a check mark.
1 Introduction & Exam Overview
About Exam AZ-800: Format, Scoring & the September 2026 Retirement
2 Chapter 1: Active Directory Domain Services Architecture & Deployment
1.1 Deploying & Managing Domain Controllers On-Premises 1.2 Domain Controllers in Azure IaaS & Virtualized DC Cloning 1.3 Read-Only Domain Controllers (RODCs) & Password Replication Policies 1.4 Flexible Single Master Operation (FSMO) Roles & Troubleshooting 1.5 Active Directory Sites, Subnets & Site Link Topology 1.6 AD DS Replication: Topology Generation, Convergence & Diagnostics 1.7 Forest and Domain Trust Relationships
3 Chapter 2: AD DS Security Principals, Service Accounts & Domain Join
2.1 Managing Users, Groups & Objects in Multi-Domain and Multi-Forest Environments 2.2 Service Account Types & Group Managed Service Accounts (gMSA) 2.3 Joining Windows Server to AD DS, Microsoft Entra Domain Services & Microsoft Entra ID 2.4 Creating & Managing Users, Groups and Organizational Units at Scale
4 Chapter 3: Hybrid Identity & Microsoft Entra Integration
3.1 Microsoft Entra Connect Sync Architecture, Installation & Filtering 3.2 SourceAnchor, Synchronization Rules & Microsoft Entra Connect Health 3.3 Microsoft Entra Cloud Sync & Disconnected Multi-Forest Topologies 3.4 Hybrid Authentication Methods & Staged Rollout 3.5 Microsoft Entra Domain Services 3.6 Integrating Microsoft Entra ID, AD DS & Entra Domain Services: Choosing an Architecture
5 Chapter 4: Group Policy in AD DS and Hybrid Environments
4.1 Group Policy Architecture & Processing Order (LSDOU) 4.2 Group Policy Filtering, Loopback Processing & Client-Side Extensions 4.3 Group Policy Preferences, Item-Level Targeting & Central Store 4.4 Group Policy in Microsoft Entra Domain Services & Fine-Grained Password Policies
6 Chapter 5: Remote Server Management in Hybrid Environments
5.1 Windows Admin Center (WAC) Deployment On-Premises and in Azure 5.2 PowerShell Remoting, WinRM & the Kerberos Double-Hop Problem 5.3 Just Enough Administration (JEA) for Constrained PowerShell Endpoints 5.4 OpenSSH on Windows Server & PowerShell Remoting over SSH 5.5 Secure RDP Access, Remote Desktop Gateway & Azure Bastion
7 Chapter 6: Hybrid Management with Azure Arc and Azure Services
6.1 Azure Arc-Enabled Servers Architecture & Onboarding 6.2 Azure Machine Configuration & VM Extensions on Arc Servers 6.3 Azure Update Manager: Assessment, Maintenance Configurations & Dynamic Scoping 6.4 Azure Automation for Hybrid Workloads: Runbooks & Hybrid Runbook Workers
8 Chapter 7: Hyper-V Virtualization & Virtual Machine Configuration
7.1 Hyper-V Type 1 Architecture, Installation & Hardware Prerequisites 7.2 VM Generations, Secure Boot, vTPM, Enhanced Session Mode & Direct VM Access 7.3 Compute, Dynamic Memory & Hardware Acceleration 7.4 VM Resource Controls, CPU Groups & Host Compute Partitioning 7.5 Hyper-V Virtual Hard Disks & Checkpoint Management 7.6 Hyper-V Virtual Switches, NIC Teaming & Switch Embedded Teaming (SET) 7.7 Integration Services, Guest Components & Time Synchronization
9 Chapter 8: Hyper-V High Availability, Security & Containers
8.1 Hyper-V Failover Clustering & Cluster Shared Volumes (CSV) 8.2 Hyper-V Replica & Azure Site Recovery (ASR) 8.3 Guarded Fabric & Shielded Virtual Machines 8.4 Windows Server Container Hosts, Isolation Models & Images 8.5 Managing Container Instances & Linux Containers with WSL 8.6 Windows Container Networking & AKS Enabled by Azure Arc 8.7 Managing Container Images, Tags & Azure Container Registry
10 Chapter 9: Azure IaaS Virtual Machine Administration
9.1 Azure VM Sizing, Series Selection & Managed Disk Tiers 9.2 Azure VM Host Caching, Disk Bursting, Ephemeral OS Disks & Disk Operations 9.3 Azure VM High Availability: Availability Sets, Zones & Proximity Placement Groups 9.4 Virtual Machine Scale Sets, Autoscale & Azure Dedicated Hosts 9.5 Azure VM Networking, NSGs & Connectivity
11 Chapter 10: Hybrid DNS Infrastructure & Name Resolution
10.1 Active Directory-Integrated DNS Architecture, Dynamic Updates & Zone Types 10.2 DNS Records, Aging & Scavenging and the GlobalNames Zone 10.3 DNS Forwarding, Conditional Forwarding & Azure DNS Zone Integration 10.4 Hybrid Name Resolution with Azure DNS Private Resolver 10.5 Windows Server DNS Policies & DNSSEC
12 Chapter 11: IP Addressing, DHCP & IPAM Management
11.1 DHCP Server Role, the DORA Lifecycle & Active Directory Authorization 11.2 DHCP Scopes, Option Hierarchy, Reservations & Relay Agents 11.3 DHCP High Availability & Failover Configurations 11.4 IP Address Management (IPAM) Deployment & Auditing 11.5 Resolving IP Address Issues in Hybrid Environments
13 Chapter 12: Hybrid Network Connectivity, Remote Access & Private Access
12.1 Remote Access Role, VPN Protocols & Site-to-Site VPN to Azure 12.2 Network Policy and Access Services (NPAS), RADIUS & Policy Processing 12.3 Azure Network Adapter & Azure Extended Network 12.4 Web Application Proxy & Microsoft Entra Application Proxy 12.5 Microsoft Entra Private Access & Global Secure Access 12.6 Azure Relay & Hybrid Connections
14 Chapter 13: File Services, DFS, SMB & Azure File Sync
13.1 Windows Server File Share Access, NTFS Permissions & Access-Based Enumeration 13.2 File Server Resource Manager: Quotas, File Screens & Storage Reports 13.3 DFS Namespaces (DFS-N) & DFS Replication (DFS-R) 13.4 BranchCache: Distributed Cache and Hosted Cache Modes 13.5 Modern SMB Protocols, SMB Multichannel & SMB over QUIC 13.6 Azure File Shares, Tiers & Hybrid Permissions 13.7 Azure File Sync, Cloud Tiering & Monitoring 13.8 Migrating DFS Namespaces & DFS Replication to Azure File Sync
15 Chapter 14: Windows Server Storage Infrastructure & High Availability
14.1 Disk Partitioning, Volumes & Enterprise File Systems (NTFS vs ReFS) 14.2 Data Deduplication Architecture, Usage Types & Management 14.3 Storage Spaces & Storage Spaces Direct (S2D) 14.4 Storage Replica & Storage Quality of Service 14.5 iSCSI Target Server, IQNs, CHAP Authentication & Multipath I/O
9.5 Azure VM Networking, NSGs & Connectivity
Key Takeaways Explain This Topic AI
Private IP addresses for Windows Server Azure VMs must always be assigned as Static at the Azure Virtual Network Interface (NIC) level, while the guest OS network adapter remains set to DHCP.
Network Security Groups (NSGs) evaluate rules by priority number (100–4096) in ascending numerical order; evaluation stops on the first match, and default rules (AllowVNetInBound, AllowAzureLoadBalancerInBound, DenyAllInBound) apply at priorities 65000+.
Application Security Groups (ASGs) allow grouping VM network interfaces by workload tier (e.g., Web-ASG, DB-ASG), enabling declarative, zero-maintenance NSG rules without maintaining hardcoded IP address lists.
User Defined Routes (UDRs) override Azure default system routes; routing traffic through a Network Virtual Appliance (NVA) requires enabling IP Forwarding on the NVA's Azure NIC.
Azure Private Endpoints assign a private IP from the VNet subnet directly to PaaS services, eliminating public internet exposure, whereas Service Endpoints optimize routing over the Azure backbone while retaining PaaS public IP endpoints.
Last updated: August 2026
Azure VM Networking, NSGs & Connectivity
Network architecture in Microsoft Azure forms the communication and security foundation for hybrid Windows Server environments. Unlike traditional physical datacenters where networking is governed by physical switches, VLAN tags, and hardware firewalls, Azure networking operates as a software-defined network (SDN) overlay. Administering Windows Server virtual machines requires an exact understanding of Azure IP allocation rules, Network Security Group (NSG) evaluation mechanics, Application Security Groups (ASGs), User Defined Routes (UDRs), IP forwarding, and private connectivity to Azure PaaS services.
1. Virtual Network (VNet) Architecture & IP Addressing for Windows Server
An Azure Virtual Network (VNet) is an isolated private network overlay within an Azure subscription. Subnets partition the address space into routable segments. +-----------------------------------------------------------------------------+
- | AZURE VIRTUAL NETWORK IP ALLOCATION ARCHITECTURE |
- | |
- | [AZURE VIRTUAL NETWORK: 10.100.0.0/16] |
- | +---------------------------------------------------------------------+ |
- | | Subnet: IdentitySubnet (10.100.1.0/24) | |
- | | | |
- | | AZURE FABRIC RESERVED IPs: | |
- | | - 10.100.1.0 : Network Address | |
- | | - 10.100.1.1 : Default Gateway (Virtual Router) | |
- | | - 10.100.1.2/3 : Azure DNS Services Mapping | |
- | | - 10.100.1.255 : Broadcast Address | |
- | | (5 IPs Reserved -> 251 Usable IPs in a /24 Subnet) | |
- | | | |
- | | +---------------------------------------------------------------+ | |
- | | | VM: AZ-DC01 | | |
- | | | Azure NIC Resource: IP Allocation = STATIC (10.100.1.4) | | |
- | | | Guest OS Network Adapter: Obtain IP via DHCP (AUTOMATIC!) | | |
- | | +---------------------------------------------------------------+ | |
- | +---------------------------------------------------------------------+ |
- +-----------------------------------------------------------------------------+
Azure Subnet Reserved IP Addresses:
In every Azure subnet, Microsoft reserves 5 IP addresses that cannot be assigned to VMs:
x.x.x.0 : Network address.
x.x.x.1 : Default gateway (the virtual router for the subnet).
x.x.x.2 and x.x.x.3 : Azure DNS mapping addresses used to coordinate Azure fabric name resolution.
x.x.x.255 : Network broadcast address.
Formula: Usable IPs per subnet = 2 ( 32 − CIDR Prefix ) − 5 2^{(32 - \text{CIDR Prefix})} - 5 2 ( 32 − CIDR Prefix ) − 5 .
Static vs. Dynamic Private IP Assignment (The Cardinal Rule):
Caution
The Guest OS DHCP Rule: To assign a permanent, static private IP address to a Windows Server Azure VM (such as a Domain Controller, DNS Server, or SQL Server):
Set the private IP allocation method to Static on the Azure Network Interface (NIC) resource in the Azure Portal, PowerShell, or Bicep.
NEVER configure a static IP inside the Windows Server guest OS Network Connections control panel ( ncpa.cpl ). The guest OS network adapter MUST ALWAYS be set to "Obtain an IP address automatically" (DHCP) .
Failure Mode: If a static IP is manually typed into the Windows network adapter, and the VM is later deallocated, resized, or moved to another subnet or host, the guest adapter loses synchronization with the Azure DHCP server, resulting in catastrophic loss of network connectivity and bricking remote RDP/WinRM access.
Multiple Network Interfaces (Multi-NIC) on Windows VMs:
High-performance enterprise VMs (such as Network Virtual Appliances or multi-homed application servers) can have multiple Azure NICs attached.
Primary vs. Secondary NICs: The primary NIC possesses the default gateway. Secondary NICs do not receive a default gateway from Azure DHCP. Inter-subnet routing over secondary NICs requires configuring static routes inside the Windows Server route table ( route add ) or attaching custom Route Tables in Azure.
2. Network Security Groups (NSGs): Rule Evaluation & Priority Mechanics
A Network Security Group (NSG) acts as a stateful layer-4 packet-filtering firewall that controls inbound and outbound traffic to Azure resources. +-----------------------------------------------------------------------------+
- | NSG 5-TUPLE RULE EVALUATION ENGINE |
- | |
- | TRAFFIC PACKET: [Src: 198.51.100.5 | Dst: 10.100.1.4 | DstPort: 3389 (TCP)]|
- | | |
- | v |
- | [Priority 100] Allow-Corp-VPN (Src: 203.0.113.0/24 -> Port 3389) [NO] |
- | [Priority 200] Allow-Admin-Bastion(Src: 10.100.254.0/26 -> Port 3389)[NO] |
- | [Priority 300] Block-Internet-RDP (Src: Internet -> Port 3389) [MATCH!]|
- | | |
- | v |
- | ---> ACTION: DENY PACKET (Evaluation Stops Immediately!) |
- | (Lower priority rules 400-65500 are never processed) |
- +-----------------------------------------------------------------------------+
5-Tuple Security Rule Structure:
Source: IP address, CIDR block, Service Tag (e.g., VirtualNetwork , Internet , AzureLoadBalancer ), or Application Security Group (ASG).
Source Port Range: Specific port (e.g., 80 ), port range (e.g., 8000-8080 ), or wildcard ( * ).
Destination: IP address, CIDR block, Service Tag, or ASG.
Destination Port Range: Target application port (e.g., 443 , 3389 , 53 ).
Protocol: TCP , UDP , ICMP , AH , ESP , or Any ( * ).
Action: Allow or Deny .
Priority Numbers and Processing Rules:
Priority numbers range from 100 (highest priority) to 4096 (lowest priority) .
Rules are evaluated sequentially in strictly ascending numerical order (100, 110, 120...).
First Match Termination: Once a packet matches a rule's 5-tuple criteria, processing terminates immediately, and the action ( Allow or Deny ) is enforced. Subsequent rules are never evaluated.
Built-in Default Rules (Priorities 65000+):
Default rules cannot be deleted, but they can be overridden by creating custom rules with higher priority (100–4095):
- Direction Priority Rule Name Source Dest Protocol Action
- Inbound 65000 AllowVNetInBound VirtualNetwork VirtualNetwork Any Allow
- Inbound 65001 AllowAzureLoadBalancerInBound AzureLoadBalancer Any Any Allow
- Inbound 65500 DenyAllInBound Any Any Any Deny
- Outbound 65000 AllowVNetOutBound VirtualNetwork VirtualNetwork Any Allow
- Outbound 65001 AllowInternetOutBound Any Internet Any Allow
- Outbound 65500 DenyAllOutBound Any Any Any Deny
NSG Association Hierarchy (Subnet vs. NIC Level): INBOUND TRAFFIC FLOW: [Packet] ---> [Subnet NSG] ---> (Allowed?) ---> [NIC NSG] ---> [VM]
- | (Denied?) | (Denied?)
- v v
- [DROPPED] [DROPPED]
OUTBOUND TRAFFIC FLOW: [VM] ---> [NIC NSG] ---> (Allowed?) ---> [Subnet NSG] ---> [Target]
Inbound Processing: Traffic hits the Subnet NSG first . If allowed, it hits the NIC NSG second . Both must allow the traffic for the packet to reach the VM.
Outbound Processing: Traffic hits the NIC NSG first . If allowed, it hits the Subnet NSG second . Both must allow the traffic for the packet to leave the subnet.
3. Application Security Groups (ASGs)
In dynamic cloud environments, hardcoding individual VM IP addresses into NSG security rules creates massive administrative overhead and frequent configuration drift. +-----------------------------------------------------------------------------+
- | APPLICATION SECURITY GROUP (ASG) ARCHITECTURE |
- | |
- | [AZURE VIRTUAL NETWORK] |
- | +---------------------------------------------------------------------+ |
- | | Subnet A (10.100.1.0/24) Subnet B (10.100.2.0/24) | |
- | | +-----------------------------+ +----------------------------+ | |
- | | | [VM-WEB01] [VM-WEB02] | | [VM-WEB03] | | |
- | | | (Member of: ASG-WebTier) | | (Member of: ASG-WebTier) | | |
- | | +-----------------------------+ +----------------------------+ | |
- | | | | |
- | | | (NSG Rule: Allow Src: ASG-WebTier | |
- | | | Dst: ASG-DBTier, Port: 1433 [TCP]) | |
- | | v | |
- | | Subnet C (10.100.3.0/24) | |
- | | +---------------------------------------------------------------+ | |
- | | | [VM-SQL01] [VM-SQL02] (Members of: ASG-DBTier) | | |
- | | +---------------------------------------------------------------+ | |
- | +---------------------------------------------------------------------+ |
- +-----------------------------------------------------------------------------+
How ASGs Operate:
An Application Security Group (ASG) is a logical metadata container to which virtual machine network interfaces (NICs) are assigned.
In NSG security rules, instead of specifying an explicit IP prefix like 10.100.1.15/32 , administrators specify ASG-WebTier as the Source and ASG-DBTier as the Destination.
Zero Maintenance Scaling: When a new web VM ( VM-WEB04 ) is provisioned and its NIC is associated with ASG-WebTier , all NSG security rules apply to it immediately without updating any NSG rules.
Boundary Constraint: All network interfaces attached to an ASG must reside within the same Azure Virtual Network .
4. User Defined Routes (UDRs) & Route Tables
Azure automatically manages packet routing between subnets, virtual networks, and the internet using Default System Routes :
Traffic destined within the VNet routes directly via VirtualNetwork local routing.
Traffic destined to 0.0.0.0/0 routes directly out the Internet gateway.
Traffic destined to on-premises ranges routes to the VirtualNetworkGateway .
To force traffic through a central firewall or Network Virtual Appliance (NVA) (e.g., Azure Firewall or a third-party Windows/Linux firewall appliance), administrators create Custom Route Tables containing User Defined Routes (UDRs) . +-----------------------------------------------------------------------------+
- | UDR & NVA TRAFFIC INSPECTION WORKFLOW |
- | |
- | [WEB SUB-NET: 10.100.1.0/24] [DMZ SUB-NET: 10.100.0.0/24] |
- | +--------------------------+ +--------------------------+ |
- | | [VM-WEB01] | | [NVA Firewall Appliance] | |
- | | (Attempts out to DB) | | NIC Private IP: | |
- | +--------------------------+ | 10.100.0.4 | |
- | | | (IP Forwarding: ENABLED!)| |
- | v +--------------------------+ |
- | [UDR: 10.100.3.0/24] ^ |
- | [Next Hop: VirtualAppliance (10.100.0.4)] =============> | |
- | | (Inspects) |
- | v |
- | [DB SUB-NET: 10.100.3.0/24] <============================= |
- | +--------------------------+ |
- | | [VM-SQL01] (Port 1433) | |
- | +--------------------------+ |
- +-----------------------------------------------------------------------------+
Next Hop Types in User Defined Routes:
VirtualAppliance : Directs traffic to the private IP address of an NVA or internal load balancer frontend.
VirtualNetworkGateway : Directs traffic to an Azure VPN Gateway or ExpressRoute Gateway.
VNetLocal : Overrides broader routes to force local subnet routing.
Internet : Directs traffic directly to the Azure internet backbone (bypassing default blackholes).
None : Blackholes and drops all matching traffic.
Longest Prefix Match (LPM) Rule:
When multiple routes exist for a destination IP, Azure evaluates routing in the following order:
Most Specific CIDR Prefix (Longest Prefix Match): A route for 10.100.3.0/24 always overrides a broader route for 10.100.0.0/16 or 0.0.0.0/0 .
Tie-Breaking Precedence: If destination prefixes are identical:
User Defined Route (UDR) wins first.
BGP / ExpressRoute Route wins second.
System Route wins last.
Important
The NVA IP Forwarding Requirement: When configuring a Windows Server VM to act as a router, NAT gateway, or Network Virtual Appliance, you MUST enable IP Forwarding ( EnableIPForwarding = $true ) on its Azure NIC resource. By default, Azure drops any packet arriving at a VM's NIC whose destination IP address does not match that NIC's assigned private IP. Enabling IP Forwarding allows the NIC to pass transit traffic through the guest OS routing stack.
5. Azure Private Endpoints vs Service Endpoints
Securing communication between Windows Server VMs and Azure PaaS services (such as Azure Storage accounts, Azure SQL Database, or Azure Key Vault) requires eliminating exposure to the public internet. +-----------------------------------------------------------------------------+
- | SERVICE ENDPOINTS VS PRIVATE ENDPOINTS |
- | |
- | SERVICE ENDPOINT ARCHITECTURE PRIVATE ENDPOINT (PRIVATE LINK) |
- | - Uses PaaS Public IP Address - Allocates Subnet Private IP |
- | - Routes over Microsoft Backbone - Completely Private RFC 1918 IP |
- | - Subnet-level identity injection - Resource-level granular mapping |
- | - No on-prem / VPN connectivity - Fully reachable over VPN/ExpressR.|
- | - Free of charge - Billed hourly + per GB processed |
- +-----------------------------------------------------------------------------+
Detailed Comparison:
Virtual Network Service Endpoints:
Mechanism: Optimizes the network path to Azure PaaS services over the Microsoft backbone network. The client VM continues to communicate with the PaaS service's public IP address , but Azure validates that the connection originates from an authorized VNet subnet.
Limitations: Cannot be accessed from on-premises datacenters over Site-to-Site VPN or ExpressRoute (because traffic must originate inside the Azure VNet subnet).
Azure Private Endpoints (Azure Private Link):
Mechanism: Provisions a dedicated Virtual Network Interface with a private IP address directly inside your VNet subnet (e.g., 10.100.1.50 ).
DNS Integration: Integrates with Azure Private DNS Zones (e.g., privatelink.blob.core.windows.net ) to resolve the PaaS resource FQDN to the internal private IP address.
Hybrid Connectivity: Because the endpoint uses a standard private RFC 1918 IP, on-premises Windows Servers can securely access Azure PaaS services across Site-to-Site VPN and ExpressRoute links without traversing the public internet.
- PowerShell Automation: NSG with ASG & Custom Route Table $rg = 'RG-Networking'
- $loc = 'eastus'
- # 1. Create Application Security Groups
- $asgWeb = New-AzApplicationSecurityGroup -ResourceGroupName $rg -Location $loc -Name 'ASG-WebTier'
- $asgDb = New-AzApplicationSecurityGroup -ResourceGroupName $rg -Location $loc -Name 'ASG-DBTier'
- # 2. Create Network Security Group with ASG Rules
- $nsg = New-AzNetworkSecurityGroup -ResourceGroupName $rg -Location $loc -Name 'NSG-Internal'
- # Allow SQL traffic from Web ASG to DB ASG
- $nsg | Add-AzNetworkSecurityRuleConfig `
- Name 'Allow-Web-to-SQL' `
- Priority 200 `
- Access Allow `
- Direction Inbound `
- Protocol Tcp `
- SourceApplicationSecurityGroup $asgWeb `
- SourcePortRange '*' `
- DestinationApplicationSecurityGroup $asgDb `
- DestinationPortRange 1433 | Set-AzNetworkSecurityGroup
- # 3. Create Route Table with User Defined Route (UDR) to Firewall NVA
- $routeTable = New-AzRouteTable -ResourceGroupName $rg -Location $loc -Name 'RT-SpokeSubnets'
- $routeTable | Add-AzRouteConfig `
- Name 'Route-To-Firewall' `
- AddressPrefix '0.0.0.0/0' `
- NextHopType VirtualAppliance `
- NextHopIpAddress '10.100.0.4' | Set-AzRouteTable
- # 4. Enable IP Forwarding on the Firewall NVA Network Interface
- $nvaNic = Get-AzNetworkInterface -ResourceGroupName $rg -Name 'NIC-Firewall01'
- $nvaNic.EnableIPForwarding = $true
- $nvaNic | Set-AzNetworkInterface