Create a Virtual Network and Server Subnet
Lab overview
With the rg-surfcity-infra resource group in place, Surf City Boats needs a private network before its first server can be deployed. In this lab you create vnet-surfcity in East US 2, replace the default address space with 10.10.0.0/16, and reshape the default subnet into snet-servers at 10.10.1.0/24. You review the Security tab, leave Azure Bastion, Azure Firewall, and DDoS Protection off for now, turn off the private-subnet setting so the server can reach the internet outbound, and verify the finished network and subnet from the portal.
Why you'd do this
A virtual network is the boundary everything else in Azure networking hangs off: subnets, network security groups, Bastion, private endpoints, and peering all start with a VNet. Creating it before the VM, rather than letting the Create VM wizard spin one up, is how you keep control of the address plan instead of inheriting a 10.0.0.0/16 default that collides with the next network you build.
The address space you'll set, 10.10.0.0/16, gives Surf City 65,536 private addresses to carve up, and the first cut is the point of this lab. You'll rename the default subnet to snet-servers and move it to 10.10.1.0/24, deliberately leaving 10.10.0.0/24 untouched. That gap is on purpose: lab 5 needs a dedicated AzureBastionSubnet of at least /26, and planning space for it now means you won't be resizing subnets later with a running VM attached.
Two settings are easy to click past. On the Security tab, the wizard offers to deploy Bastion, Firewall, and DDoS Protection along with the network; you'll leave all three disabled, because Bastion gets its own lab and the other two carry real monthly cost this project doesn't need. In the subnet editor, Enable private subnet is checked by default on new subnets and removes default outbound internet access; you'll uncheck it so the server can reach Windows Update and the Azure Files endpoint in later labs.
On Review + create, confirm the address space and the subnet range before you deploy. You can add subnets later, but shrinking an address space with resources inside it is the kind of change that forces a rebuild. Virtual networks and subnetting are core AZ-900 fundamentals, and planning address space is a named AZ-104 objective under configuring virtual networking.
Lab details
- Resource group:
rg-surfcity-infra· Region: (US) East US 2 - Virtual network:
vnet-surfcity· Address space:10.10.0.0/16 - Subnet:
snet-servers·10.10.1.0/24(256 addresses) - Security tab: Azure Bastion, Azure Firewall, and DDoS Network Protection all disabled
- Private subnet (no default outbound access): unchecked
- Reserved for later:
10.10.0.0/26for the Bastion subnet in lab 5
Learning objectives
- Create a virtual network in an existing resource group and region.
- Replace the default IPv4 address space with a planned private range.
- Rename and re-address a subnet, choosing its size with CIDR notation.
- Explain what the private-subnet setting does to default outbound access.
- Recognize the optional security services offered during VNet creation and when to skip them.
- Verify a virtual network's address space and subnets after deployment.
Exam relevance
- AZ-900 — Microsoft Azure Fundamentals — virtual networks, subnets, private IP address space, Azure networking services.
- AZ-104 — Microsoft Azure Administrator — create and configure virtual networks and subnets, plan IP addressing, default outbound access.
Where this lab fits in the project
Lab 1 created rg-surfcity-infra, the resource group this network lands in. This lab lays out the address plan the rest of the project depends on: vm-surfcity-01 is deployed into snet-servers in lab 3, the network security group in lab 4 is associated with this subnet, and lab 5 adds the AzureBastionSubnet into the 10.10.0.0/26 space you leave open here.
Get the subnet range right now and every later lab simply selects it from a dropdown.
Step-by-step instructions
- Open the Virtual networks service:
- On the Azure portal Home page, in the search box at the top, type
Virtual networksand select it under Services. - Select + Create.
- On the Azure portal Home page, in the search box at the top, type
- Configure the Basics tab:
- Confirm the Surf City Boats subscription is selected.
- In the Resource group dropdown, select
rg-surfcity-infra. - In the Virtual network name field, type
vnet-surfcity. - In the Region dropdown, select (US) East US 2, then select Next.
- Review the Security tab:
- Confirm Azure Bastion, Azure Firewall, and Azure DDoS Network Protection are all left disabled.
- Select Next.
- Configure the address space:
- Under IPv4 address space, select the existing default range and replace it with
10.10.0.0/16. - Confirm the address space now shows
10.10.0.0/16.
- Under IPv4 address space, select the existing default range and replace it with
- Configure the server subnet:
- Under Subnets, select the default subnet to open the Edit subnet pane.
- In the Name field, replace
defaultwithsnet-servers. - In the Starting address field, replace the value with
10.10.1.0. - In the Subnet size dropdown, confirm /24 (256 addresses) is selected and the range shows
10.10.1.0 - 10.10.1.255. - Under Private subnet, uncheck Enable private subnet (no default outbound access).
- Select Save and confirm
snet-serversis listed with address range10.10.1.0/24.
- Create the virtual network:
- Select Review + create and confirm Validation passed is displayed.
- Confirm the Address space shows
10.10.0.0/16and the subnet showssnet-servers 10.10.1.0/24. - Select Create.
- Verify the virtual network:
- When deployment completes, select Go to resource.
- On the Overview page, confirm the Address space shows
10.10.0.0/16. - In the left menu, under Settings, select Subnets and confirm
snet-serversis listed with address range10.10.1.0/24.
Launch the lab simulation — free with a labITpro account; no Azure subscription required.