Virtual networks, subnets, peering and Azure DNS
How a virtual network is addressed and divided into subnets, the five addresses Azure keeps in every one of them, what peering gives you and what it deliberately withholds, and what Azure DNS does and does not sell you.
Lesson 6 of 11 in objective architecture-and-services. Azure architecture and services, part of Microsoft Certified: Azure Fundamentals (AZ-900).
A virtual network is your private address space in Azure
A virtual network is a slice of private address space that you define and Azure routes inside. It belongs to one region and one subscription, resources placed in it get private IP addresses out of its ranges, and by default everything inside it can reach everything else. The address space is the one decision here that is genuinely hard to undo, because two networks with overlapping ranges can never be peered — so the ranges an organisation will use are worth agreeing before anybody deploys anything.
Subnets segment it, and Azure keeps five addresses in each
A subnet is a subdivision of the network's address space. Its range must fall inside that space and must not overlap another subnet in the same network, because two claimants for one address leave routing with no correct answer. Subnets exist so that segments can be treated differently: a network security group attached here and not there, a route table sending this segment somewhere specific, tiers placed apart so that reaching one does not mean reaching the next.
The arithmetic trap is worth memorising because questions do the sum for you and offer the wrong total. Azure reserves five addresses in every subnet — the first four and the last — so a /29 with eight addresses yields three you can use, not eight. Size subnets with that in mind, and remember that a subnet belongs to exactly one virtual network: joining networks together is what peering and gateways are for.
Peering: Azure to Azure, without a gateway
Peering connects two virtual networks directly across the Microsoft backbone. Resources address each other by private IP as though they shared one network, no gateway is deployed at either end, and it works between subscriptions and across regions — the cross-region case is called global peering, and it costs you distance in latency but never puts the traffic on the public internet. The single shortest way to hold the whole subject: Azure to Azure is peering, Azure to anywhere else is a gateway.
Two things peering withholds, and both are asked directly. It is not transitive, so if A is peered with B and B with C, A still cannot reach C — which is the standard surprise in hub-and-spoke designs, where spoke-to-spoke traffic needs a gateway or a network virtual appliance in the hub plus routing that sends it there. And it does not touch your security rules: each subnet keeps its own network security group, so peering provides the path while whether traffic is allowed along it stays an explicit decision at each end.
Azure DNS hosts zones; it does not sell names
Azure DNS answers name lookups for zones you host in it. A public zone answers the internet, and you connect it to a name you already own by delegation: you change the name server records at your registrar to point at Azure, while the registration itself stays exactly where it is. A private zone answers lookups inside the virtual networks you link it to, which is how resources reach each other by name without anything being published externally.
What Azure DNS does not do is register the name. Buying a domain is a separate transaction with a registrar or a domain product, and an option that describes Azure claiming a name — or worse, deleting the registration so Azure can take it — is describing something that would release the name to whoever wanted it. The reason to move a zone into Azure is that records become resources like any other, with role-based access control, activity logs and deployment templates covering them.
Worth carrying in
- Virtual network
- Your private address space in one region and one subscription.
- Address space
- The ranges the network owns. Overlapping ranges can never be peered.
- Subnet
- A subdivision of that space. Five addresses per subnet are reserved by Azure.
- Network security group
- Allow and deny rules on addresses, ports and protocols. Attached per subnet or per interface.
- Virtual network peering
- A private, gateway-free path between two virtual networks.
- Global peering
- Peering across regions. Still the Microsoft backbone, still no gateway.
- Azure DNS public zone
- Answers the internet for a domain you delegated with name server records.
- Azure DNS private zone
- Answers name lookups inside the virtual networks linked to it.
What the exam does with this
- Two Azure networks means peering. One end not in Azure means a gateway. That single sentence answers most networking scenarios on this paper.
- Peering is not transitive. Spokes peered to a hub cannot reach each other until something in the hub routes between them, and the exam asks it as a surprise.
- Overlapping address spaces cannot be peered, however different the subnets are. The option that says otherwise is the most tempting one in the list.
- Five reserved addresses per subnet: a
/29gives three usable, not eight. Questions that size a subnet are usually testing exactly this. - Azure DNS hosts the zone; the registrar still holds the name. Delegation is a name server record change, never a deletion.
- Objective
- architecture-and-services. Azure architecture and services
- Share of the exam
- 38.46% (the whole objective)
- Questions in this lesson
- 4
- Signed for by a person
- 0
Partly checked. None of the 4 questions here has been read against the cited source by a person. 4 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.
Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.
Questions in this lesson
- Two virtual networks in the same region, owned by two different subscriptions, must exchange traffic privately at low latency. The team does not want to deploy or pay for gateways and does not want the traffic on the public internet. What do you configure? machine-checked
- You are dividing a virtual network with the address space 10.10.0.0/16 into subnets for a web tier, an application tier and a database tier. Which statement about that is correct? machine-checked
- Your company owns a domain name through an external registrar and wants Azure to answer public DNS queries for it, managed with the same tooling and role assignments as the rest of the estate. What does Azure DNS do here, and what does it not do? machine-checked
- Which TWO of these statements about virtual network peering are true? machine-checked
Drill this lesson
A lesson is one sitting: the trainer draws a short run from these questions alone and spaces the ones you get wrong.
Practise Virtual networks, subnets, peering and Azure DNS
The rest of objective architecture-and-services
- Regions, region pairs, availability zones and datacentres
- Resources, resource groups, subscriptions and management groups
- Virtual machines, containers and functions compared
- Virtual machine options, and what a virtual machine needs
- Hosting an application: web apps, containers and virtual machines
- Virtual networks, subnets, peering and Azure DNS — you are here
- Reaching Azure privately: VPN Gateway, ExpressRoute and endpoints
- Storage accounts, storage services, tiers and redundancy
- Moving files and migrating workloads into Azure
- Microsoft Entra ID, authentication and role-based access control
- Zero Trust, defence in depth and Defender for Cloud