Skip to main content

Hybrid Connectivity

How to design ExpressRoute, VPN, and Azure Arc for hybrid environments.

Hybrid Architecture Overview

ExpressRoute

ExpressRoute Architecture

ExpressRoute SKUs

SKUBandwidthUse Case
Local1-10 GbpsSame metro as peering location
Standard50 Mbps - 10 GbpsSingle geo (North America, Europe, etc.)
Premium50 Mbps - 100 GbpsGlobal connectivity

ExpressRoute Gateway SKUs

SKUThroughputCircuitsUse Case
Standard1 Gbps4Small workloads
HighPerformance2 Gbps4Medium workloads
UltraPerformance10 Gbps16Large workloads
ErGw1AZ1 Gbps4Zone-redundant
ErGw2AZ2 Gbps8Zone-redundant
ErGw3AZ10 Gbps16Zone-redundant, recommended

Bicep: ExpressRoute Configuration

// ExpressRoute Circuit
resource expressRouteCircuit 'Microsoft.Network/expressRouteCircuits@2023-05-01' = {
name: 'erc-contoso-eastus-001'
location: location
sku: {
name: 'Premium_MeteredData'
tier: 'Premium'
family: 'MeteredData'
}
properties: {
serviceProviderProperties: {
serviceProviderName: 'Equinix'
peeringLocation: 'Washington DC'
bandwidthInMbps: 1000
}
}
}

// ExpressRoute Gateway
resource expressRouteGateway 'Microsoft.Network/virtualNetworkGateways@2023-05-01' = {
name: 'ergw-hub-eastus-001'
location: location
properties: {
gatewayType: 'ExpressRoute'
sku: {
name: 'ErGw3AZ'
tier: 'ErGw3AZ'
}
ipConfigurations: [
{
name: 'default'
properties: {
privateIPAllocationMethod: 'Dynamic'
subnet: {
id: '${hubVnet.id}/subnets/GatewaySubnet'
}
publicIPAddress: {
id: gatewayPip.id
}
}
}
]
}
}

// Connection
resource expressRouteConnection 'Microsoft.Network/connections@2023-05-01' = {
name: 'con-er-eastus-001'
location: location
properties: {
connectionType: 'ExpressRoute'
virtualNetworkGateway1: {
id: expressRouteGateway.id
}
peer: {
id: expressRouteCircuit.id
}
authorizationKey: authorizationKey // From circuit owner
}
}

ExpressRoute Global Reach

VPN Gateway

VPN Architecture

VPN Gateway SKUs

SKUS2S TunnelsP2SThroughput
Basic10128100 Mbps
VpnGw130250650 Mbps
VpnGw2305001 Gbps
VpnGw33010001.25 Gbps
VpnGw410050005 Gbps
VpnGw51001000010 Gbps
VpnGw1AZ30250650 Mbps (Zone)
VpnGw2AZ305001 Gbps (Zone)

Bicep: VPN Gateway with BGP

// VPN Gateway (Active-Active)
resource vpnGateway 'Microsoft.Network/virtualNetworkGateways@2023-05-01' = {
name: 'vpngw-hub-eastus-001'
location: location
properties: {
gatewayType: 'Vpn'
vpnType: 'RouteBased'
vpnGatewayGeneration: 'Generation2'
sku: {
name: 'VpnGw2AZ'
tier: 'VpnGw2AZ'
}
activeActive: true
enableBgp: true
bgpSettings: {
asn: 65515
bgpPeeringAddresses: [
{
ipconfigurationId: '${vpnGateway.id}/ipConfigurations/primary'
customBgpIpAddresses: ['169.254.21.1']
}
{
ipconfigurationId: '${vpnGateway.id}/ipConfigurations/secondary'
customBgpIpAddresses: ['169.254.22.1']
}
]
}
ipConfigurations: [
{
name: 'primary'
properties: {
privateIPAllocationMethod: 'Dynamic'
subnet: {
id: '${hubVnet.id}/subnets/GatewaySubnet'
}
publicIPAddress: {
id: vpnPip1.id
}
}
}
{
name: 'secondary'
properties: {
privateIPAllocationMethod: 'Dynamic'
subnet: {
id: '${hubVnet.id}/subnets/GatewaySubnet'
}
publicIPAddress: {
id: vpnPip2.id
}
}
}
]
}
}

// Local Network Gateway (On-Prem)
resource localNetworkGateway 'Microsoft.Network/localNetworkGateways@2023-05-01' = {
name: 'lng-onprem-001'
location: location
properties: {
gatewayIpAddress: '<on-prem-public-ip>'
bgpSettings: {
asn: 65000
bgpPeeringAddress: '<on-prem-bgp-ip>'
}
}
}

// S2S Connection
resource vpnConnection 'Microsoft.Network/connections@2023-05-01' = {
name: 'con-vpn-onprem-001'
location: location
properties: {
connectionType: 'IPsec'
virtualNetworkGateway1: {
id: vpnGateway.id
}
localNetworkGateway2: {
id: localNetworkGateway.id
}
sharedKey: sharedKey
enableBgp: true
ipsecPolicies: [
{
saLifeTimeSeconds: 3600
saDataSizeKilobytes: 102400000
ipsecEncryption: 'AES256'
ipsecIntegrity: 'SHA256'
ikeEncryption: 'AES256'
ikeIntegrity: 'SHA256'
dhGroup: 'DHGroup14'
pfsGroup: 'PFS2048'
}
]
}
}

Azure Arc

Arc Architecture

Arc-Enabled Servers

# Install Connected Machine agent (Windows)
$env:SUBSCRIPTION_ID = "<subscription-id>"
$env:RESOURCE_GROUP = "rg-arc-servers"
$env:TENANT_ID = "<tenant-id>"
$env:LOCATION = "eastus"

# Download and run the agent
Invoke-WebRequest -Uri https://aka.ms/azcmagent-windows -OutFile AzureConnectedMachineAgent.msi
msiexec /i AzureConnectedMachineAgent.msi /l*v installlog.txt /qn

# Connect to Azure
& "$env:ProgramFiles\AzureConnectedMachineAgent\azcmagent.exe" connect `
--resource-group $env:RESOURCE_GROUP `
--tenant-id $env:TENANT_ID `
--location $env:LOCATION `
--subscription-id $env:SUBSCRIPTION_ID

Arc Policy Assignment

resource arcPolicyAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
name: 'deploy-arc-extensions'
location: location
identity: {
type: 'SystemAssigned'
}
properties: {
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/845857af-0333-4c5d-bbbc-6076697da122' // Deploy Azure Monitor Agent
displayName: 'Deploy Azure Monitor Agent on Arc servers'
enforcementMode: 'Default'
parameters: {
effect: {
value: 'DeployIfNotExists'
}
}
}
}

ER + VPN Backup

Coexistence Architecture

BGP Route Configuration

On-Premises Router:
- ExpressRoute: Advertise with AS Path = 65000
- VPN: Advertise with AS Path = 65000 65000 65000 (prepend)

Azure will prefer ExpressRoute (shorter AS path)
Automatic failover to VPN when ER is down

Quick Reference Card

ComponentRecommendation
ExpressRoutePremium for global, ErGw3AZ for HA
VPNVpnGw2AZ minimum, Active-Active
BGPEnable for automatic failover
Azure ArcAll hybrid servers
ER + VPNVPN as backup for ER

Next Steps

Continue to Sovereign Clouds to learn about government and regulated environments.