1---2name: azure-networking3description: Use when designing Azure VNet architecture, configuring NSGs, selecting load balancers, planning hybrid connectivity (VPN/ExpressRoute), implementing Private Link, or studying for Azure Network Engineer Associate (AZ-700) or AZ-305.4---56# Azure Networking78## When to Use9- Designing VNet architecture, subnet segmentation, and address planning for Azure deployments10- Choosing between NSG and Azure Firewall for network security11- Selecting the right load balancer (Azure LB, Application Gateway, Front Door, Traffic Manager)12- Planning hybrid connectivity (VPN Gateway vs ExpressRoute)13- Implementing Private Link/Private Endpoint for PaaS service isolation14- Preparing for Azure Network Engineer Associate (AZ-700) or AZ-305 exam1516## Core Jobs1718### 1. VNet Design and Subnet Segmentation19- VNet = isolated network in Azure; defined by CIDR block (e.g., 10.0.0.0/16)20- Plan address space to avoid overlap with on-premises networks and peered VNets21- **Subnet segmentation** (common pattern):22 | Subnet | Purpose | Example |23 |--------|---------|---------|24 | `AppSubnet` | Application tier (web/API servers, VMs, App Service Env) | 10.0.1.0/24 |25 | `DataSubnet` | Database tier (SQL MI, Redis, Cosmos Private Endpoint) | 10.0.2.0/24 |26 | `MgmtSubnet` | Bastion, Jump server, monitoring | 10.0.3.0/24 |27 | `GatewaySubnet` | VPN Gateway / ExpressRoute Gateway (reserved name) | 10.0.255.0/27 |28- **Reserved subnet names**: `GatewaySubnet` for gateway; `AzureBastionSubnet` for Bastion; `AzureFirewallSubnet` for Firewall2930### 2. NSG vs Azure Firewall31| Feature | NSG | Azure Firewall |32|---------|-----|---------------|33| Layer | L4 (TCP/UDP) | L4 + L7 (FQDN, HTTP/S, TLS inspection) |34| Scope | Subnet or NIC level | Centralized (hub VNet) |35| FQDN filtering | No | Yes (application rules) |36| Threat intelligence | No | Yes (IDPS) |37| Cost | Free | Hourly + data processing charge |38| Best for | Subnet/NIC traffic control | Centralized outbound filtering, east-west |3940- NSG rules: priority 100–4096 (lower = higher priority); `Allow`/`Deny` on `Inbound`/`Outbound`41- **ASG (Application Security Group)**: group VMs by role (e.g., `WebServers`, `DBServers`); use in NSG rules instead of IP addresses4243### 3. Load Balancer Selection44| Service | Layer | Scope | SSL Termination | WAF | Best For |45|---------|-------|-------|-----------------|-----|---------|46| **Azure Load Balancer** | L4 | Regional | No | No | TCP/UDP, internal or public regional LB |47| **Application Gateway** | L7 | Regional | Yes | Yes | HTTP/HTTPS, URL routing, SSL offload |48| **Azure Front Door** | L7 | Global | Yes | Yes | Global HTTP/HTTPS, CDN, multi-region routing |49| **Traffic Manager** | DNS | Global | No (DNS only) | No | DNS-based global routing (any protocol) |5051- **Application Gateway**: `Basic`, `Standard v2`, `WAF v2` tiers; path-based routing (`/api/*` → backend pool 1)52- **Front Door**: anycast global entry; routes to nearest healthy backend; CDN + WAF at edge53- **Traffic Manager**: DNS-based; routing methods: Priority, Weighted, Performance (latency), Geographic54- Decision: **regional HTTP** → Application Gateway; **global HTTP** → Front Door; **non-HTTP global** → Traffic Manager5556### 4. Private Connectivity Options57| Option | Description | Transitive |58|--------|-------------|-----------|59| **VNet Peering** | Low-latency VNet-to-VNet; same or cross-region | No |60| **VPN Gateway** | IPsec site-to-site or point-to-site over internet | No (per VNet) |61| **ExpressRoute** | Private dedicated circuit via telco; no internet path | Via Global Reach |62| **Private Endpoint** | Private IP in VNet for Azure PaaS (Storage, SQL, Key Vault) | Yes (via Peering) |63| **Service Endpoint** | Network-level restriction to Azure PaaS; no private IP | No |64| **Virtual WAN** | Managed hub-and-spoke; transitive routing built-in | Yes |6566- **Private Endpoint** = private IP in VNet; DNS resolves PaaS service to private IP; traffic stays in VNet67- **Service Endpoint** = restricts access to PaaS from specific VNet subnets; no private IP; still uses public endpoint routing68- Prefer Private Endpoint over Service Endpoint for stronger isolation6970### 5. Hybrid Connectivity: VPN vs ExpressRoute71| Feature | VPN Gateway | ExpressRoute |72|---------|-------------|--------------|73| Path | Encrypted over public internet | Private, dedicated circuit via telco partner |74| Max bandwidth | Up to 10 Gbps (VpnGw5AZ) | 50 Mbps – 100 Gbps |75| Latency | Variable (internet-dependent) | Predictable, low latency |76| SLA | 99.95% (Active-Active) | 99.95% (Standard), 99.99% with redundancy |77| Cost | Lower | Higher (circuit + gateway) |78| Best for | < 1 Gbps, cost-sensitive, backup path | > 1 Gbps, latency-sensitive, compliance |7980- **HA VPN**: two tunnels (Active-Active); 99.95% SLA81- **ExpressRoute Global Reach**: connect two on-premises sites via ExpressRoute circuits (no internet)82- **ExpressRoute + VPN**: VPN as failover for ExpressRoute8384### 6. Azure Bastion85- **Azure Bastion**: browser-based SSH/RDP to VMs without public IP or VPN86- Deployed in `AzureBastionSubnet` (/26 or larger); connects to VMs in same or peered VNet87- Eliminates need for jump boxes or public IPs on VMs88- SKUs: `Basic` (standard RDP/SSH), `Standard` (native client, file transfer, tunneling)8990## Key Concepts91- **NSG** — stateful L4 firewall; subnet or NIC; return traffic allowed automatically92- **ASG** — logical grouping of VMs for NSG rules; replaces IP-based rules with role-based93- **Private Endpoint** — private IP in VNet for PaaS; DNS override required; traffic never leaves VNet94- **VNet Peering** — no transitive routing; A↔B peered, B↔C peered → A cannot reach C without hub95- **ExpressRoute** — no internet path; provider circuit; SLA-backed; bandwidth up to 100 Gbps96- **Virtual WAN** — Microsoft-managed hub; transitive routing between spokes; replaces custom hub-spoke NVA97- **Azure Bastion** — browser-based SSH/RDP; no public IP needed on VMs; deployed in dedicated subnet9899## Checklist100- [ ] VNet address space planned with no overlap against on-premises and peered VNets?101- [ ] NSG applied to subnets (not individual NICs) for consistent subnet-level control?102- [ ] Azure Firewall in hub VNet for centralized outbound filtering and east-west inspection?103- [ ] Private Endpoints configured for PaaS services (Storage, SQL, Key Vault, ACR)?104- [ ] ExpressRoute chosen when bandwidth > 1 Gbps or latency/compliance requirements exist?105- [ ] Azure Bastion deployed to eliminate public IPs on management VMs?106- [ ] VNet Peering transitive routing limitation addressed (use Virtual WAN or hub-spoke with Firewall)?107108## Output Format109- 🔴 **Critical** — NSG rule allowing 0.0.0.0/0 inbound on port 22 (SSH) or 3389 (RDP) on production VMs110- 🔴 **Critical** — no Private Endpoint for PaaS services storing sensitive data (public endpoint exposed)111- 🟡 **Warning** — VNet Peering relied on for transitive routing (not supported; add hub with Azure Firewall or Virtual WAN)112- 🟡 **Warning** — Service Endpoint used instead of Private Endpoint (weaker isolation; traffic uses public routing)113- 🟢 **Suggestion** — deploy Azure Bastion for secure VM management without public IPs114115## Exam Tips116- **NSG = stateful L4** — return traffic automatically allowed; applied to subnet OR NIC (both layers independently evaluated)117- **Application Gateway WAF = protect web apps from OWASP Top 10** — L7 only (HTTP/HTTPS); not for TCP/UDP118- **Front Door vs Traffic Manager** — Front Door = proxy-based anycast (sees and can modify traffic); Traffic Manager = DNS redirect (no traffic inspection, any protocol)119- **ExpressRoute = private, no internet** — up to 100 Gbps; SLA-backed; compliant for regulated industries120- **VNet Peering = no transitive routing** — use Azure Virtual WAN or hub-spoke with Azure Firewall for transitive connectivity121- **Private Endpoint = private IP in VNet for PaaS** — DNS override required (`privatelink.*` zones); traffic stays in VNet; stronger than Service Endpoint