35 minutes
- Resource group: Create new rg-az104-lab12
- Name: vnet-hub
- Region: East US
- IPv4 address space: 10.50.0.0/16
- Subnets: Create the first subnet
- Subnet name: subnet-web
- Subnet address range: 10.50.1.0/24
subnet-data:- Name: subnet-data
- Address range: 10.50.2.0/24
- Add
subnet-mgmt:- Name: subnet-mgmt
- Address range: 10.50.3.0/24
- Add
All three subnets are now part of vnet-hub. Note that each /24 subnet
reserves 5 IPs (.0 network, .1 gateway, .2/.3 DNS, broadcast):
available usable IPs per subnet = 251 (or 256 - 5).
When planning subnets, always account for the 5 reserved IPs per subnet. A /24 has 256 addresses, but only ~251 are usable for VMs and resources.
vm-data01, Ubuntu 22.04 LTS, size Standard_B1s.- Virtual network: vnet-hub
- Subnet: subnet-data
- Public IP: None (we'll keep this VM private)
- NIC network security group: Basic (or create one)
10.50.2.10.The VM now has a static private IP 10.50.2.10 inside subnet-data, with no
public IP (only reachable from within the VNet or via Bastion/VPN).
Service Endpoints extend your VNet's identity to a service (e.g., Storage) over
the Azure backbone, keeping the service's public endpoint but restricting
access to specified subnets.
subnet-data > Serviceendpoints > + Add.
- Resource group: rg-az104-lab12
- Name: stoaz104lab12
- Region: East US
- Performance: Standard, Redundancy: LRS
- Review + create > Create
networking).
and IP addresses.
choose vnet-hub, subnet subnet-data > Add.
Now only resources in subnet-data (via the service endpoint) can reach this
storage account by default — public internet access is denied.
Private endpoints completely remove public network exposure for PaaS services. For maximum security, combine private endpoints with disabled public access on the storage account.
Private Endpoints give a PaaS resource (like Storage) a private IP inside
your VNet — traffic never traverses the public internet.
subnet-mgmt. (On some Portalversions, you may need to go to the subnet and ensure private endpoint
policies are not disabled — skip this step if the UI differs.)
- Resource group: rg-az104-lab12
- Name: pe-storage
- Region: East US
Microsoft.Storage/storageAccounts > Resource: select
stoaz104lab12 > Sub-resource: blob.
- Virtual network: vnet-hub
- Subnet: subnet-mgmt
- Private DNS integration: Yes (auto-creates a private DNS zone)
The storage account now has a private IP inside subnet-mgmt — VNet traffic
reaches it without ever hitting the public internet.
Given 10.50.0.0/16 (65,536 addresses), design subnets for these requirements:
subnet-web: 250 hosts → /24 (10.50.1.0/24) ✓ (already created)subnet-data: 60 hosts → /26 (10.50.2.0/26) — can subdivide the /24 furthersubnet-aks: 1,000+ hosts → /22 (10.40.4.0/22)AzureBastionSubnet: minimum /26 (for Bastion)GatewaySubnet: minimum /27 (for VPN/ExpressRoute, recommended /26)Key constraints:
GatewaySubnet, AzureBastionSubnet,AzureFirewallSubnet — these control where specific services can deploy.
vnet-hub with 3 subnets created, no overlapping address spacesvm-data01 deployed with fixed private IP 10.50.2.10 and no public IPsubnet-data via service endpointpe-storage has a private IP in subnet-mgmtrg-az104-lab12 > Delete resource group.GatewaySubnet (VPN/ExpressRoute gateways), AzureBastionSubnet, AzureFirewallSubnet.