azureblog.co.uk
← AZ-104 study plan
AZ-104 · Implement and manage virtual networking

Configure and manage virtual networks

Plan address spaces and subnets, peer virtual networks, assign public IPs, control routing with user-defined routes and troubleshoot connectivity.

  • 20 min
  • 5 concepts
  • Try it yourself
  • 5-question check

Learn

A virtual network (VNet) is your private network in Azure. It lives in one region and one subscription, has one or more address ranges, and is split into subnets. Resources in the same VNet can talk to each other by default.

Most of this skill is about connecting VNets together and controlling where traffic goes.

  1. 1

    Create and configure virtual networks and subnets

    Give each VNet a private address space such as 10.1.0.0/16, and carve subnets out of it such as 10.1.1.0/24. Plan ranges so they don't overlap with other VNets or on-premises networks, or you won't be able to connect them later.

    Azure reserves five addresses in every subnet: the network address, the first three host addresses (default gateway and DNS) and the broadcast address. A /29 is the smallest subnet you can create.

    Remember: A /24 subnet gives 256 addresses but only 251 usable.

  2. 2

    Create and configure virtual network peering

    Peering connects two VNets over Microsoft's backbone so they behave like one network. It works in the same region or across regions (global peering) and across subscriptions and tenants. Address spaces must not overlap.

    Peering is not transitive: if A peers with B and B peers with C, A can't reach C. Use a hub with a firewall or network virtual appliance and user-defined routes, or Azure Virtual Network Manager, for hub and spoke. Gateway transit lets spokes use a VPN gateway in the hub.

    Remember: Peering has to be created on both sides and isn't transitive.

  3. 3

    Configure public IP addresses

    Public IPs come in the Standard SKU, which is secure by default (closed until an NSG allows traffic), supports zones and is always static. The Basic SKU retired on 30 September 2025.

    Assignment is static (the address never changes) or dynamic. A public IP can attach to a NIC, a load balancer, a VPN gateway, a NAT gateway, Application Gateway or Azure Firewall.

    Remember: Standard public IPs block inbound traffic until an NSG allows it.

  4. 4

    Configure user-defined network routes

    Azure creates system routes automatically so subnets, peered VNets and the internet are reachable. A route table with user-defined routes (UDRs) overrides them, for example to send all traffic through a firewall.

    Next hop types are virtual appliance, virtual network gateway, virtual network, internet and none. Associate the route table with a subnet; a subnet can have one route table. The most specific prefix wins.

    Remember: Forcing traffic through a firewall: route 0.0.0.0/0 to a virtual appliance with the firewall's private IP.

  5. 5

    Troubleshoot network connectivity

    Network Watcher has the tools: IP flow verify says whether an NSG allows or denies a packet and which rule did it, Next hop shows where a packet would go, Connection troubleshoot tests a connection end to end, and Effective routes and effective security rules show what actually applies to a NIC.

    Flow logs record IP traffic for analysis with Traffic Analytics.

    Remember: Blocked? IP flow verify. Going the wrong way? Next hop.

Hub and spoke

  1. Hub VNetFirewall or appliance, VPN or ExpressRoute gateway, shared services
  2. PeeringsEach spoke peers with the hub, with gateway transit
  3. Spoke VNetsWorkloads. Spoke to spoke traffic goes through the hub with user-defined routes

Try it

Turn peerings on and off and see whether VNet A can reach VNet C.

This interactive part needs JavaScript.

In the portal

  • Add a subnetAzure portal: Virtual networks > your VNet > Settings > Subnets > Subnet
  • Add a peeringAzure portal: Virtual networks > your VNet > Settings > Peerings > Add
  • Create a route tableAzure portal: Route tables > Create
  • IP flow verifyAzure portal: Network Watcher > Network diagnostic tools > IP flow verify

Key terms

Click a card to see the definition.

Check your understanding

5 questions. Score 80% or more and these skills are marked as confident in your AZ-104 study plan.

  1. How many addresses does Azure reserve in each subnet?

  2. VNet A peers with B, and B peers with C. Can A reach C?

  3. All outbound traffic from a subnet must go through a firewall at 10.0.0.4. What do you create?

  4. Which tool tells you which NSG rule blocked a packet to a VM?

  5. What's true of a Standard SKU public IP?

Sources

Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.