Skip to content

Automated Azure Mesh Networking solution using modular Bicep. Demonstrates multi-region connectivity, VNet peering, and cross-architecture (ARM64/x64) compute deployment.

Notifications You must be signed in to change notification settings

g-devito/azure-bicep-mesh-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Multi-Region Mesh Network Lab

This repository contains the Infrastructure as Code (Bicep) for a multi-region network topology in Azure. I built this to simulate a Full Mesh connectivity scenario where every VNet has direct line-of-sight to every other VNet, regardless of the region.

The lab also creates a mix of compute architectures (x64 and ARM64) to validate connectivity across different hardware types.

Network Architecture

Architecture Specs

The deployment spans two regions and three Virtual Networks:

  • Region 1 (Switzerland North):
    • VNet0 (10.50.0.0/22)
    • VNet1 (10.51.0.0/22)
  • Region 2 (Germany West Central):
    • VNet2 (10.52.0.0/22)

Connectivity

  • Global VNet Peering: Connects the Swiss VNets to the German VNet.
  • Local VNet Peering: Connects the two Swiss VNets.
  • Topology: Full Mesh (All-to-All).

Compute (Mixed Architecture)

I'm using specific VM SKUs to test different hardware profiles:

  • VM0 & VM1: Standard_B2ats_v2 (x64)
  • VM2: Standard_B2pts_v2 (ARM64) — running Ubuntu 22.04 ARM64.

Code Structure

I've structured the Bicep code to separate the resources from the configuration.

  • main.bicep: The orchestrator that calls the modules.
  • modules/:
    • network.bicep: Handles VNet and Subnet creation.
    • peering.bicep: Reusable module for linking VNets.
    • compute.bicep: Deploys the VM, NIC, and NSG.
  • parameters/lab.bicepparam: This contains all the specific CIDR blocks, VM sizes, and region definitions.

How to Deploy

You will need the Azure CLI and Bicep installed.

  1. Clone the repo:

    git clone [https://github.com/your-username/azure-mesh-lab.git](https://github.com/your-username/azure-mesh-lab.git)
    cd azure-mesh-lab
  2. Review the config: Check parameters/lab.bicepparam to see the IP ranges. Note: The NSG is currently hardcoded to allow SSH from a specific IP. You might want to update the sourceAddressPrefix in compute.bicep or the parameter file.

  3. Deploy:

        #!/bin/bash
    
        RG_NAME="###"
        LOCATION="###"
    
        az group create --name $RG_NAME --location $LOCATION
    
        az deployment group create \
        --resource-group $RG_NAME \
        --template-file ./main.bicep \
        --parameters ./parameters/lab.bicepparam

Verification

Once deployed, you can verify the Global Peering is working by SSHing into VM0 (Switzerland) and pinging the private IP of VM2 (Germany).

# From VM0
ping 10.52.0.4

About

Automated Azure Mesh Networking solution using modular Bicep. Demonstrates multi-region connectivity, VNet peering, and cross-architecture (ARM64/x64) compute deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages