Beginner · Foundations · 3 of 15

Carve subnets from an address space

Your tasks
  • Add subnet-api to vnet-app on 10.1.3.0/26

The API team needs a subnet inside vnet-app. Create subnet-api on 10.1.3.0/26 and work out how many VMs it can actually hold.

You'll learn
Subnets and the five reserved addresses
  1. Check the size of a /26 first.

    cidr 10.1.3.0/26
  2. Create the subnet inside vnet-app.

    az network vnet subnet create -g rg-lab --vnet-name vnet-app --name subnet-api --address-prefixes 10.1.3.0/26
    What's this?

    Adds a subnet: a range carved out of the virtual network's address space.

    • -g the resource group the resources live in
    • --vnet-name the virtual network
    • --name the name of the thing to look at or change
    • --vnet-name vnet-app the VNet the subnet belongs to
    • --name subnet-api the subnet's name
    • --address-prefixes 10.1.3.0/26 the subnet's range, inside the VNet's space
  3. Answer below. Remember which addresses Azure keeps.

Sources on Microsoft Learn (2)
0/1 changes
Network map
?
  • Resource group, the outer dashed frame
  • Virtual network, with its address space top right
  • Subnet, with range and usable IPs (5 reserved)
  • Network security group. A small shield on a VM's NIC means the NIC has one too
  • Route table on the subnet
  • NICVM Appliance Private endpoint
  • Peering Connected Initiated or access off
  • Goal working Goal broken, X marks where it stops
  • Private DNS zone, dotted lines go to linked VNets
  • Orange pulse: what your last command changed. Drag to pan, Ctrl and scroll to zoom.
Resource grouprg-labvnet-app: tap to inspectVirtual networkvnet-app10.1.0.0/16subnet-web: tap to inspectsubnet-web10.1.1.0/24 · 251 usable
Goals 0/3
Cloud Shell · bashVMsrg-lab · eastus2
cloudshell:~$