01 Explore Azure Virtual Networks
01 Explore Azure Virtual Networks
Azure Virtual Networks (VNets) are the fundamental building block of your private
network in Azure. VNets enable you to build complex virtual networks that are similar
to an on-premises network, with additional benefits of Azure infrastructure such as
scale, availability, and isolation.
Each VNet you create has its own CIDR block and can be linked to other VNets and
on-premises networks as long as the CIDR blocks don't overlap. You also have
control of DNS server settings for VNets, and segmentation of the VNet into subnets.
You can create multiple virtual networks per region per subscription. You can create
multiple subnets within each virtual network.
Virtual Networks
When creating a VNet, it's recommended that you use the address ranges
enumerated in RFC 1918, which have been set aside by the IETF for private, non-
routable address spaces:
224.0.0.0/4 (Multicast)
255.255.255.255/32 (Broadcast)
127.0.0.0/8 (Loopback)
169.254.0.0/16 (Link-local)
168.63.129.16/32 (Internal DNS)
Azure assigns resources in a virtual network a private IP address from the address
space that you provision. For example, if you deploy a VM in a VNet with subnet
address space 192.168.1.0/24, the VM will be assigned a private IP like 192.168.1.4.
Azure reserves the first four and last IP address for a total of 5 IP addresses within
each subnet. These are x.x.x.0-x.x.x.3 and the last address of the subnet.
For example, the IP address range of 192.168.1.0/24 has the following reserved
addresses:
When planning to implement virtual networks, you need to consider the following:
Ensure non-overlapping address spaces. Make sure your VNet address space
(CIDR block) doesn't overlap with your organization's other network ranges.
Is any security isolation required?
Do you need to mitigate any IP addressing limitations?
Will there be connections between Azure VNets and on-premises networks?
Is there any isolation required for administrative purposes?
Are you using any Azure services that create their own VNets?
Subnets
A subnet is a range of IP address in the VNet. You can segment VNets into different
size subnets, creating as many subnets as you require for organization and security
within the subscription limit. You can then deploy Azure resources in a specific
subnet. Just like in a traditional network, subnets allow you to segment your VNet
address space into segments that are appropriate for the organization's internal
network. This also improves address allocation efficiency. The smallest supported
IPv4 subnet is /29, and the largest is /2 (using CIDR subnet definitions). IPv6 subnets
must be exactly /64 in size. When planning to implement subnets, you need to
consider the following:
Each subnet must have a unique address range, specified in Classless Inter-
Domain Routing (CIDR) format.
Certain Azure services require their own subnet.
Subnets can be used for traffic management. For example, you can create
subnets to route traffic through a network virtual appliance.
You can limit access to Azure resources to specific subnets with a virtual
network service endpoint. You can create multiple subnets, and enable a service
endpoint for some subnets, but not others.
As part of your Azure network design, it's important to plan your naming convention
for your resources. An effective naming convention composes resource names from
important information about each resource. A well-chosen name helps you quickly
identify the resource's type, its associated workload, its deployment environment,
and the Azure region hosting it. For example, a public IP resource for a production
SharePoint workload residing in the West US region might be pip-sharepoint-prod-
westus-001
All Azure resource types have a scope that defines the level that resource names
must be unique. A resource must have a unique name within its scope. There are four
levels you can specify a scope: management group, subscription, resource group,
and resource. Scopes are hierarchical, with each level of hierarchy making the scope
more specific.
For example, a virtual network has a resource group scope, which means that there
can be only one network named vnet-prod-westus-001 in each resource group.
Other resource groups could have their own virtual network named vnet-prod-
westus-001. Subnets are scoped to virtual networks, so each subnet within a virtual
network must have a distinct name.
All Azure resources are created in an Azure region and subscription. A resource can
only be created in a virtual network that exists in the same region and subscription as
the resource. You can, however, connect virtual networks that exist in different
subscriptions and regions. Azure regions are important to consider as you design
your Azure network in relation to your infrastructure, data, applications, and end
users.
You can deploy as many virtual networks as you need within each subscription, up to
the subscription limit. Some larger organizations with global deployments have
multiple virtual networks that are connected between regions, for example.
You should consider availability zones when designing your Azure network, and plan
for services that support availability zones.
Azure services that support Availability Zones fall into three categories:
Zonal services: Resources can be pinned to a specific zone. For example, virtual
machines, managed disks, or standard IP addresses can be pinned to a specific
zone, which allows for increased resilience by having one or more instances of
resources spread across zones.
Zone-redundant services: Resources are replicated or distributed across zones
automatically. Azure replicates the data across three zones so that a zone
failure doesn't impact its availability.
Non-regional services: Services are always available from Azure geographies
and are resilient to zone-wide outages as well as region-wide outages.