Azure Networking

Most Azure networking questions are one of two shapes: why is this traffic blocked, or which connectivity option fits these requirements. The NSG rule table answers the first and the connectivity table answers the second.

Core objects

ObjectWhat it does
Virtual network (VNet)An isolated address space in one region
SubnetA range inside a VNet. Azure reserves five addresses per subnet
Network security groupStateful allow and deny rules on a subnet or NIC
Application security groupA named group of NICs used as an NSG rule target
Route tableUser-defined routes that override Azure's defaults
Azure FirewallManaged stateful firewall with threat intelligence
Private endpointA private IP for a PaaS service inside your VNet
Service endpointRoutes to a PaaS service over the Azure backbone
BastionBrowser-based RDP and SSH without a public IP

NSG rule evaluation

RuleDetail
Priority range100 to 4096. Lower number is evaluated first
First match winsEvaluation stops at the first matching rule
StatefulA return packet for an allowed flow is permitted automatically
Applied atSubnet and NIC. Both are evaluated, both must allow
Default: AllowVNetInBound65000. VNet to VNet traffic
Default: AllowAzureLoadBalancerInBound65001
Default: DenyAllInBound65500. The implicit deny at the end
Common mistakeA rule at 4000 never fires because a deny sits at 200

Connectivity options

RequirementOption
Connect two VNetsVNet peering. Non-transitive by default
Connect on-premises over the internetSite-to-site VPN gateway
Connect one machine to a VNetPoint-to-site VPN
Private, high bandwidth to on-premisesExpressRoute
Hub and spoke with transitPeering plus user-defined routes, or Virtual WAN
Resolve private DNS across VNetsPrivate DNS zone linked to each VNet

Load balancing

ServiceLayerScopeUse
Load Balancer4RegionalTCP and UDP inside a region
Application Gateway7RegionalHTTP routing, WAF, SSL termination
Traffic ManagerDNSGlobalDNS-based routing between regions
Front Door7GlobalGlobal HTTP with WAF and caching

Now test yourself

Memorizing a table is a start. Practice questions are what make it stick, and every answer carries the full explanation.