Network Connectivity Design
AZ-305 AZ-305 · Design infrastructure solutions
Networking is the connective tissue of every Azure solution, and it is where architects make some of their most expensive mistakes — an address space that is too small, a hub that cannot scale, a hybrid link that becomes a bottleneck. This guide covers the connectivity building blocks: virtual networks, peering, hybrid connections, and private access to PaaS services.
Virtual networks: design once, carefully
A virtual network (VNet) is the isolated network boundary in Azure. The critical design decisions are made up front and are hard to change: the address space (choose a large, non-overlapping CIDR range — you cannot easily shrink or overlap later, and overlapping ranges block peering and hybrid connectivity), subnets (segment by workload tier and by service requirements — some services need dedicated subnets, such as GatewaySubnet for VPN/ExpressRoute, AzureFirewallSubnet, and AzureBastionSubnet), and DNS (Azure-provided DNS works for simple cases; custom DNS servers are needed for hybrid name resolution). Reserve address space generously: a /16 VNet with room to grow beats a /24 that forces a painful rebuild. Network security groups (NSGs) filter traffic at subnet and NIC level with allow/deny rules evaluated by priority — the basic segmentation control. Route tables override Azure's default routing, typically to force traffic through a firewall (user-defined routes with a 0.0.0.0/0 next hop of the firewall's private IP).
Hub-and-spoke and VNet peering
The standard enterprise topology is hub-and-spoke: a central hub VNet holds shared services (firewall, VPN/ExpressRoute gateway, Bastion, DNS), and spoke VNets hold workloads, connected by VNet peering. Peering is low-latency, high-bandwidth, and non-transitive: spoke A cannot reach spoke B through the hub unless the hub routes it (which requires peering configured with "allow forwarded traffic" and route tables, or a network virtual appliance in the hub). Peering works within a region and across regions (global peering), and across subscriptions and tenants. Design rules: keep the hub small and stable; put the firewall in the hub and route spoke traffic through it; use Azure Virtual Network Manager to manage connectivity and security rules centrally at scale. The alternative to peering is Virtual WAN (below), which replaces manual peering with a managed hub.
Hybrid connectivity: VPN Gateway vs ExpressRoute
Connecting on-premises to Azure offers two main paths. VPN Gateway creates an encrypted IPsec tunnel over the public internet: cheap, quick to set up, but bandwidth-limited (up to ~10 Gbps with the highest SKUs, and realistically much less) and subject to internet variability. ExpressRoute provides a private, dedicated connection through a connectivity provider: consistent bandwidth (up to 100 Gbps), lower latency, and no internet traversal — but higher cost and weeks of provisioning lead time. The exam's decision rule: VPN for low bandwidth, cost-sensitive, or temporary connections; ExpressRoute for high bandwidth, predictable latency, or regulatory requirements forbidding internet traversal. Many designs use both: ExpressRoute as the primary path with VPN as a failover (or vice versa for cost). ExpressRoute Global Reach connects on-premises sites through Microsoft's backbone, and ExpressRoute Direct provides 100 Gbps ports for the largest workloads. For branch offices, Azure Virtual WAN is the managed hub-and-spoke service that aggregates VPN, ExpressRoute, and SD-WAN connections into a single hub with centralised routing and security.
Private access to PaaS: Private Link and service endpoints
PaaS services (Storage, SQL, Key Vault) are public by default. Azure Private Link gives them a private IP address inside your VNet via a private endpoint: traffic never leaves the Microsoft backbone, and the service can be locked down to private access only. Service endpoints are the older mechanism: they extend the VNet's identity to the PaaS service over the Microsoft backbone, but the service still has a public endpoint (secured by firewall rules). The exam distinction: Private Link provides a private IP and full private access; service endpoints secure the public endpoint by network. Private Link is the recommended approach for new designs, especially when data exfiltration protection matters — with a private endpoint and public access disabled, data cannot leave over the public internet. Private DNS zones resolve the PaaS service's public DNS name to the private IP inside the VNet; for hybrid scenarios, a DNS forwarder on-premises must resolve the same names.
DNS design for hybrid
DNS is the silent killer of hybrid designs. Azure VMs use Azure-provided DNS (168.63.129.16) by default, which resolves Azure resources but not on-premises names. For hybrid name resolution, deploy custom DNS servers (or use Azure DNS Private Resolver) that forward on-premises queries to on-premises DNS and Azure queries to Azure DNS. Azure Private DNS zones host the private records for PaaS private endpoints and must be linked to every VNet that needs them. The exam tests this: if on-premises users cannot resolve a private endpoint's name, the answer is DNS forwarding, not a network change.
Segmentation and network security groups
Segmentation is the network layer of defence in depth. Use subnets to separate tiers (web, application, data) and use network security groups to control traffic between them: the web tier accepts traffic from the internet (via the load balancer), the application tier accepts traffic only from the web tier, and the data tier accepts traffic only from the application tier. NSG rules are evaluated by priority (lowest number first), with default rules allowing traffic within the VNet and denying inbound internet traffic. Application security groups (ASGs) let you write rules against logical groups of VMs (for example, "web-servers" and "app-servers") instead of IP addresses, so rules survive IP changes and scaling. For micro-segmentation inside Kubernetes, use network policies. For centralised management at scale, Azure Virtual Network Manager applies security admin rules across many VNets. A common exam scenario presents a flat network and asks how to isolate tiers: the answer is subnets plus NSGs (or ASGs), not new VNets — VNets are for broader isolation boundaries, subnets and NSGs are for tier segmentation within a workload.
Addressing and IPv6
Address planning deserves a final word because it is the most expensive mistake to fix. Azure VNets support IPv4 primarily, with IPv6 available for dual-stack deployments (public IPv6 addresses on load balancers and VMs, and IPv6 in VNets). Most enterprise designs remain IPv4-only, but the exam occasionally tests IPv6 awareness: dual-stack VNets let resources communicate over IPv6 while keeping IPv4 for compatibility. Reserve address space generously and document the allocation: a central IP address management (IPAM) plan prevents the overlaps that block peering and hybrid connectivity. Remember that a VNet's address space can be extended after creation (adding ranges) but cannot be shrunk, and that subnets can be resized only if the address space allows. When in doubt, allocate a /16 per VNet and a /24 or larger per subnet — address space is cheap, renumbering is not.
Exam traps to watch for
- Choosing an address space that overlaps with on-premises — overlapping ranges block peering and hybrid connectivity and are painful to fix.
- Assuming VNet peering is transitive — spokes cannot reach each other through the hub without explicit routing configuration.
- Choosing VPN Gateway when the scenario needs guaranteed bandwidth and low latency — that is ExpressRoute.
- Using service endpoints when the requirement is no public access at all — only Private Link with public access disabled achieves that.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A company is designing a new Azure VNet that will connect to its on-premises network (10.0.0.0/8) via ExpressRoute and peer with an existing VNet (172.16.0.0/16). Which address space should the architect choose for the new VNet?
Explanation: The new VNet must not overlap with the on-premises range (10.0.0.0/8) or the existing VNet (172.16.0.0/16); 192.168.0.0/16 overlaps with neither. Option C is wrong because 10.0.0.0/16 falls inside the on-premises 10.0.0.0/8 range. Option A is wrong because it exactly overlaps the existing VNet, which would block peering. Option B is wrong because 10.1.0.0/16 also falls inside the on-premises 10.0.0.0/8 range.
Exam objective: AZ-305 Domain 4: Design network solutions
Q2.A company needs to connect its datacentre to Azure with guaranteed 5 Gbps bandwidth, consistent low latency, and no traffic over the public internet. Which connectivity option should the architect recommend?
Explanation: ExpressRoute provides a private dedicated connection with guaranteed bandwidth up to 100 Gbps, consistent latency, and no internet traversal — matching all requirements. Option C is wrong because VPN Gateway runs over the public internet with variable latency and lower practical bandwidth. Option D is wrong because point-to-site VPN connects individual clients, not a datacentre. Option A is wrong because Bastion provides secure VM management access, not datacentre connectivity.
Exam objective: AZ-305 Domain 4: Design network solutions
Q3.A company has a hub-and-spoke topology. Spoke A needs to communicate with Spoke B, but traffic between spokes is currently blocked. What is the most likely cause?
Explanation: VNet peering is non-transitive: spoke-to-spoke traffic through the hub requires the hub peering to allow forwarded traffic plus route tables directing the traffic (usually through a firewall NVA). Option D is wrong because global peering supports cross-region connectivity. Option A is wrong because the gateway subnet is for VPN/ExpressRoute gateways, not spoke-to-spoke routing. Option B is wrong because NSGs allow traffic within a VNet by default.
Exam objective: AZ-305 Domain 4: Design network solutions
Q4.A security team requires that an Azure SQL Database be accessible only from within the corporate VNet, with no public endpoint. Which solution should the architect recommend?
Explanation: A private endpoint gives the database a private IP inside the VNet, and disabling public network access removes the public endpoint entirely — the only option that meets the 'no public endpoint' requirement. Option B is wrong because service endpoints secure the public endpoint but do not remove it. Option C is wrong because NSGs filter traffic to VMs and subnets, not PaaS public endpoints. Option D is wrong because Azure Firewall cannot remove a PaaS service's public endpoint.
Exam objective: AZ-305 Domain 4: Design network solutions
Q5.On-premises users cannot resolve the DNS name of an Azure Storage account's private endpoint. Azure VMs resolve it correctly. What is the most likely cause?
Explanation: Azure VMs resolve the name through the linked private DNS zone; on-premises DNS servers need conditional forwarding (or Azure DNS Private Resolver) to resolve the same private zone names. Option C is wrong because the endpoint works from Azure VMs. Option A is wrong because a firewall block would cause connection failure, not DNS resolution failure. Option B is wrong because peering is irrelevant to on-premises DNS resolution.
Exam objective: AZ-305 Domain 4: Design network solutions
Q6.A company with 50 branch offices needs to connect them all to Azure with centralised routing and security, without managing individual VPN connections per office. Which service should the architect recommend?
Explanation: Virtual WAN provides managed hubs that aggregate VPN, ExpressRoute, and SD-WAN connections from many branches with centralised routing and security — built for exactly this scale. Option C is wrong because 50 individual VPN gateways are unmanageable. Option A is wrong because 50 ExpressRoute circuits would be enormously expensive. Option D is wrong because point-to-site VPN connects individual clients, not branch networks.
Exam objective: AZ-305 Domain 4: Design network solutions
Q7.A company wants all internet-bound traffic from its spoke VNets to be inspected by the firewall in the hub VNet. What should the architect configure?
Explanation: A 0.0.0.0/0 user-defined route forces all internet-bound traffic to the hub firewall, and peering with forwarded traffic allows the spoke-to-hub transit — the standard forced-tunnelling design. Option D is wrong because an NSG deny rule blocks traffic rather than routing it through the firewall. Option B is wrong because service endpoints connect to PaaS services, not firewalls. Option A is wrong because a firewall per spoke defeats the hub-and-spoke model and multiplies cost.
Exam objective: AZ-305 Domain 4: Design network solutions
Q8.A company has an ExpressRoute connection and wants a low-cost backup path if ExpressRoute fails. What should the architect recommend?
Explanation: A site-to-site VPN provides a low-cost failover path over the internet; BGP route weights ensure ExpressRoute is preferred and the VPN takes over on failure. Option D is wrong because a second ExpressRoute circuit is expensive, not low-cost. Option C is wrong because Bastion provides VM management access, not datacentre connectivity. Option A is wrong because point-to-site VPN connects individual clients, not the datacentre.
Exam objective: AZ-305 Domain 4: Design network solutions
Q9.A company is deploying Azure Firewall, a VPN gateway, and Bastion in its hub VNet. What must the architect reserve in the VNet design?
Explanation: Azure Firewall, VPN/ExpressRoute gateways, and Bastion each require their own dedicated subnet with a specific name — they cannot share a subnet. Option B is wrong because these services cannot share a subnet. Option C is wrong because spoke VNets do not need public IPs for hub services. Option A is wrong because separate VNets would break the hub model and are unnecessary.
Exam objective: AZ-305 Domain 4: Design network solutions