Study guide

7.2 VNet Peering and Cross-Network Connectivity

AZ-104 Microsoft Azure Administrator Study Guide Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Orientation and Microsoft Learn Source Control

1.1 Current AZ-104 Exam Facts 1.2 Administrator Role and Candidate Profile 1.3 Skills Outline and Weighted Study Map 1.4 Exam Duration, Question Types, Labs, and Learn Access 1.5 Scoring, Retakes, Renewal, and Account Choice 1.6 Using the Practice Bank, Labs, and Error Log

2 Chapter 2: Identity, RBAC, and Governance Foundations

2.1 Microsoft Entra Users, Groups, and Properties 2.2 Licenses, External Users, and SSPR 2.3 Azure RBAC Built-In Roles and Scopes 2.4 Role Assignment Interpretation and Deny Effects 2.5 Management Groups, Subscriptions, and Resource Groups 2.6 Azure Policy, Locks, Tags, and Governance Controls 2.7 Identity and Governance Case Lab

3 Chapter 3: Subscriptions, Policy, Costs, and Resource Organization

3.1 Subscription Design and Management Groups 3.2 Resource Groups, Lifecycle, and Move Operations 3.3 Tagging Strategy and Cost Allocation 3.4 Budgets, Alerts, and Azure Advisor Cost Recommendations 3.5 Policy, Initiative, Assignment, and Remediation 3.6 Resource Locks, RBAC, Policy, and Tags Combined 3.7 Governance and Cost Case Lab

4 Chapter 4: Storage Accounts, Access, and Data Protection

4.1 Storage Account Design, Redundancy, and Encryption 4.2 Storage Firewalls, Private Access, and Network Rules 4.3 SAS Tokens, Stored Access Policies, and Access Keys 4.4 Identity-Based Access for Azure Files 4.5 Blob Tiers, Lifecycle, Soft Delete, and Versioning 4.6 Azure Files, Snapshots, File Sync, and AzCopy 4.7 Storage Case Lab

5 Chapter 5: Compute, Virtual Machines, Scale Sets, and Bicep

5.1 ARM Templates, Bicep, and Deployment Workflow 5.2 Create, Configure, and Manage Virtual Machines 5.3 VM Disks, Sizes, Encryption, and Host Settings 5.4 Availability Zones, Sets, and VM Scale Sets 5.5 Move VMs Across Resource Groups, Subscriptions, and Regions 5.6 Backup, Restore, and Operational Maintenance for VMs 5.7 VM Compute Case Lab

6 Chapter 6: Containers, App Service, and Platform Compute

6.1 Azure Container Registry and Image Workflow 6.2 Azure Container Instances and Container Apps 6.3 Container Sizing, Scaling, and Environment Choices 6.4 App Service Plan, Apps, and Runtime Configuration 6.5 App Service Certificates, TLS, Custom Domains, and Networking 6.6 App Service Backups, Deployment Slots, and Scaling 6.7 Platform Compute Case Lab

7 Chapter 7: Virtual Networking, Routing, and Secure Access

7.1 VNet, Subnet, and Address Space Design 7.2 VNet Peering and Cross-Network Connectivity 7.3 Public IP Addresses and NAT Patterns 7.4 User-Defined Routes and Effective Routes 7.5 NSGs, ASGs, and Effective Security Rules 7.6 Azure Bastion, Service Endpoints, and Private Endpoints 7.7 Secure Networking Case Lab

8 Chapter 8: Name Resolution, Load Balancing, and Connectivity Troubleshooting

8.1 Azure DNS, Private DNS, and Name Resolution 8.2 Public and Internal Load Balancer Design 8.3 Backend Pools, Health Probes, and Load Balancing Rules 8.4 Load Balancing Troubleshooting Workflow 8.5 Network Watcher: IP Flow, Next Hop, and Connection Troubleshoot 8.6 Hybrid Connectivity, VPN, ExpressRoute, and DNS Considerations 8.7 Connectivity Troubleshooting Case Lab

9 Chapter 9: Monitoring, Alerting, Backup, and Site Recovery

9.1 Azure Monitor Metrics, Logs, and Diagnostic Settings 9.2 Log Analytics, KQL, and Operational Queries 9.3 Alert Rules, Action Groups, and Alert Processing Rules 9.4 VM, Storage, and Network Insights 9.5 Recovery Services Vault, Backup Vault, and Backup Policies 9.6 Azure Site Recovery, Failover, and Replication 9.7 Monitoring and Recovery Case Lab

10 Chapter 10: AZ-104 Integration and Troubleshooting Case Labs

10.1 Domain Weight Triage and Study Prioritization 10.2 Identity, Storage, and Compute Integrated Cases 10.3 Networking, Monitoring, and Security Integrated Cases 10.4 Migration, Move, Backup, and Recovery Cases 10.5 Permissions, Network, and Storage Troubleshooting Chain 10.6 Microsoft Learn Lookup Strategy Under Time Pressure 10.7 Full-Domain Case Lab

11 Chapter 11: Final Review, Exam Experience, Renewal, and Career Path

11.1 Final Two-Week Study Plan 11.2 Hands-On Lab Checklist and Command Review 11.3 Exam Day, Pearson VUE, Breaks, and Learn Access 11.4 Retake Plan, Score Report, and Weak-Domain Repair 11.5 Renewal Assessment and Annual Certification Maintenance 11.6 After AZ-104: AZ-305, AZ-400, SC-500, and Job Paths

7.2 VNet Peering and Cross-Network Connectivity

Key Takeaways Explain This Topic AI

VNet peering connects non-overlapping VNets over the Azure backbone and is configured from both sides of the relationship.

Peering is not transitive, so hub-and-spoke designs need explicit peerings or a routing appliance pattern.

Gateway transit and remote gateway use are common exam clues in hub-and-spoke hybrid connectivity scenarios.

Peering flags for forwarded traffic, gateway transit, and remote gateways must match the intended routing design.

Connectivity failures after peering usually involve address overlap, missing reciprocal peering, NSGs, UDRs, DNS, or peering option mismatches.

Last updated: May 2026

What peering provides

VNet peering connects two Azure virtual networks so resources can communicate by private IP across Microsoft's backbone. It can be used within a region or across regions. It does not require public IPs on the workload VMs, and it does not send traffic over the public internet. For AZ-104, peering is a common answer when two Azure VNets need private connectivity and their address spaces do not overlap.

A peering relationship is effectively configured in both directions. In the portal, creating a peering can create both links when you have permissions to both VNets. In scripts, you may create each side separately. If only one side is present or one side is disconnected, traffic does not behave as intended.

  • Basic model: VNet-A 10.10.0.0/16 <==== peering ==== > VNet-B 10.20.0.0/16
  • VM-A 10.10.1.4 VM-B 10.20.1.4

When peering is healthy and no NSG or route blocks traffic, VM-A can reach VM-B by 10.20.1.4 . No public IP is required. If the question asks for private connectivity between Azure VNets with low administrative overhead, peering is usually a stronger answer than deploying a VPN gateway between the VNets.

Peering is not transitive

The major exam trap is transitivity. If VNet-A is peered with VNet-Hub, and VNet-Hub is peered with VNet-B, VNet-A is not automatically peered with VNet-B. Traffic from A to B needs direct peering, a network virtual appliance, Azure Firewall routing, VPN routing, or another explicit design.

  • Hub-and-spoke diagram: on-premises
  • |
  • VPN gateway
  • |
  • hub-vnet 10.0.0.0/16
  • / \
  • spoke-web 10.1.0.0/16 spoke-data 10.2.0.0/16

In this design, each spoke peers with the hub. If web and data spokes must communicate through a firewall in the hub, you must configure routes that send traffic to the firewall and peering options that allow forwarded traffic. If the spokes should not communicate, do not create direct peering and do not route them through the firewall.

Gateway transit and remote gateways

Gateway transit lets a peered VNet use a gateway in another VNet, commonly the hub. The hub peering side allows gateway transit. The spoke peering side uses the remote gateway. This is an AZ-104 favorite because the settings are paired and directional.

  • Requirement Hub peering setting Spoke peering setting
  • Spoke uses hub VPN or ExpressRoute gateway Allow gateway transit Use remote gateway

Spoke sends traffic through hub firewall or NVA Allow forwarded traffic as needed Allow forwarded traffic as needed, plus UDRs

  • Spoke has its own gateway Do not use remote gateway Use local gateway instead
  • Direct spoke-to-spoke through hub gateway only Not automatic Requires explicit routing design

A spoke VNet cannot use a remote gateway and also have its own virtual network gateway. In exam wording, if a spoke already has a gateway, using the hub gateway through remote gateway is not available unless the design changes.

Forwarded traffic and route design

Forwarded traffic means traffic that did not originate in the peered VNet but is being passed through it. A common example is traffic from spoke-web to spoke-data through Azure Firewall in the hub. The firewall forwards packets, so peering must allow forwarded traffic where required. A UDR on the spoke subnets may send traffic for the other spoke prefix to the firewall private IP.

Example route table entry on spoke-web workload subnet:

  • Address prefix Next hop type Next hop address
  • 10.2.0.0/16 Virtual appliance 10.0.1.4
  • 0.0.0.0/0 Virtual appliance 10.0.1.4

This route only changes the next hop. It does not automatically allow the traffic. The NSGs on source and destination subnets, firewall policy, VM host firewall, and return route must also permit the flow.

Portal and CLI workflow

Portal path: Virtual networks > <vnet> > Peerings > Add . Review the local VNet settings, remote VNet settings, traffic to remote virtual network, forwarded traffic, gateway transit, and remote gateway options. After creation, check that the peering status is connected on both sides.

  • CLI outline: az network vnet peering create \
  • -resource-group rg-network \
  • -name hub-to-spoke-web \
  • -vnet-name hub-vnet \
  • -remote-vnet spoke-web-vnet \
  • -allow-vnet-access \
  • -allow-forwarded-traffic \
  • -allow-gateway-transit
  • az network vnet peering create \
  • -resource-group rg-network \
  • -name spoke-web-to-hub \
  • -vnet-name spoke-web-vnet \
  • -remote-vnet hub-vnet \
  • -allow-vnet-access \
  • -allow-forwarded-traffic \
  • -use-remote-gateways
  • Troubleshooting peered connectivity

Use a layered workflow. First, confirm the address spaces do not overlap. Second, confirm peering exists and is connected on both sides. Third, check whether the target IP is correct and whether DNS resolves to the expected private address. Fourth, inspect effective routes on the source NIC. Fifth, inspect effective security rules on both source and destination NICs. Sixth, test the VM operating system firewall or application listener.

Network Watcher tools help here. IP flow verify can tell whether an NSG allows or denies a packet. Next hop can show whether Azure sends the packet to a peering, virtual appliance, internet, or none. Connection troubleshoot can test a specific endpoint and port.

Troubleshooting tree: Can source resolve the name?

no -> check private DNS, custom DNS, host records

yes -> does the resolved IP belong to reachable VNet prefix?

  • no -> fix DNS or endpoint configuration
  • yes -> check effective route next hop
  • next hop missing -> peering or route issue
  • next hop firewall -> inspect firewall policy and return route
  • next hop peering -> inspect NSG and guest firewall
  • Scenario traps

Do not choose peering if address spaces overlap. Do not assume peering makes all hub-connected spokes talk to each other. Do not forget both sides of gateway transit. Do not allow remote gateway on a spoke that already has its own gateway. Do not assume public DNS names resolve to private IPs just because peering exists.

A frequent case study says that a VM in a spoke cannot reach an on-premises server through the hub VPN gateway. The likely checks are hub peering allows gateway transit, spoke peering uses remote gateway, routes are learned or configured, NSGs allow the traffic, and on-premises routes return to Azure. Creating a public IP on the VM is not the right fix for private hybrid connectivity.