You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document synthesizes our complete plan for building a secure, end-to-end encrypted, multi-tenant overlay network using VyOS, WireGuard, VXLAN, OSPF, L3VPN, and other technologies. The architecture implements a Unix philosophy-aligned approach with modular components that can be composed together while maintaining separation of concerns.
Architecture Overview
graph TB
subgraph Physical["Physical Infrastructure"]
direction TB
DC1["Datacenter 1<br>5.254.54.0/26"]
DC2["Datacenter 2<br>5.254.43.160/27"]
CloudExt["Cloud Extensions<br>Dynamic"]
end
subgraph Hypervisor["Hypervisor Layer"]
direction TB
ArchLinux["Arch Linux OS"]
OVS["Open vSwitch<br>Hardware Offload"]
SRIOV["SR-IOV<br>Virtual Functions"]
SystemdVMSpawn["systemd-vmspawn"]
end
subgraph Router["Virtual Router Layer"]
direction TB
VyOSVMs["VyOS VMs"]
WireGuard["WireGuard Mesh<br>172.27.0.0/20"]
VXLAN["VXLAN Tunnels"]
OSPF["OSPF Areas"]
BGP["BGP EVPN"]
L3VPN["L3VPN (VRF)"]
end
subgraph Tenant["Tenant Layer"]
direction TB
TenantVMs["Tenant VMs"]
ManagedServices["Managed Services"]
K8S["Kubernetes Clusters"]
Backups["Backup Systems"]
end
Physical --> Hypervisor
Hypervisor --> Router
Router --> Tenant
Loading
Network Addressing Schema
graph LR
subgraph PublicSpace["Public Address Space"]
DC1Public["DC1: 5.254.54.0/26"]
DC2Public["DC2: 5.254.43.160/27"]
DC2Additional["DC2 Additional: 5.254.43.208/29"]
end
subgraph ManagementSpace["Management Networks"]
ControlPlane["Control Plane: 172.27.0.0/20"]
BackboneNetwork["Backbone: 172.16.0.0/20"]
end
subgraph TenantSpace["Tenant Address Space"]
CGNATBase["Base: 100.64.0.0/10"]
WireGuardOverlay["WireGuard: 100.64.0.0/16"]
TenantNetworks["Tenant Networks: 100.65.0.0/16"]
TenantServices["Services: 100.80.0.0/16"]
MigrationSpace["Migration: 100.96.0.0/16"]
end
#!/bin/bash# Configure Intel X710 NIC with SR-IOVforiin {0..3};doecho 7 > /sys/class/net/enp${i}s0/device/sriov_numvfs
ip link set enp${i}s0 up
done# Configure Mellanox CX4 NIC with SR-IOVforiin {4..7};doecho 7 > /sys/class/net/enp${i}s0/device/sriov_numvfs
ip link set enp${i}s0 up
done# Configure LACP Bond for Intel NICs
cat > /etc/systemd/network/10-bond0.netdev <<EOF[NetDev]Name=bond0Kind=bond[Bond]Mode=802.3adLACPTransmitRate=fastMIIMonitorSec=1sUpDelaySec=2sDownDelaySec=2sEOF# Configure LACP Bond for Mellanox NICs
cat > /etc/systemd/network/20-bond1.netdev <<EOF[NetDev]Name=bond1Kind=bond[Bond]Mode=802.3adLACPTransmitRate=fastMIIMonitorSec=1sUpDelaySec=2sDownDelaySec=2sEOF# Configure OVS with hardware offload
cat > /etc/openvswitch/ovs-setup.sh << 'EOF'#!/bin/bashovs-vsctl --may-exist add-br br0ovs-vsctl set Open_vSwitch . other_config:hw-offload=trueovs-vsctl add-port br0 bond0ovs-vsctl add-port br0 bond1EOF
chmod +x /etc/openvswitch/ovs-setup.sh
3. VyOS VM Deployment Using mkosi and systemd-vmspawn
Create a base VyOS image using mkosi:
#!/bin/bash# Create mkosi configuration
cat > mkosi.default <<EOF[Distribution]Distribution=vyosRelease=current[Output]Format=diskOutput=vyos-base.imgSize=2G[Partitions]RootSize=2GEOF# Build the image
mkosi
# Create systemd-vmspawn service template
cat > /etc/systemd/system/vyos@.service <<EOF[Unit]Description=VyOS VM %iAfter=network.target[Service]Type=notifyExecStart=/usr/bin/systemd-vmspawn -i /var/lib/machines/vyos-base.img --network-veth -n vyos-%iExecStop=/usr/bin/machinectl poweroff vyos-%iKillMode=mixedRestart=on-failureTimeoutStartSec=180[Install]WantedBy=multi-user.targetEOF
4. WireGuard Control Plane Configuration
The secure management and control plane runs over WireGuard:
Develop GitOps workflows for network configuration
Implement configuration validation
Create automated testing framework
Extend Cloud Provider Integration
Add AWS VPC integration
Add Azure VNET integration
Add GCP VPC integration
Enhance Security Features
Implement key rotation automation
Deploy IDS/IPS capabilities
Implement traffic analysis
Improve Tenant Self-Service
Develop tenant portal
Implement API for tenant management
Create documentation system
Conclusion
This architecture provides a robust, secure, and scalable network overlay that:
Follows Unix philosophy principles of modular, composable components
Implements end-to-end encryption with WireGuard
Enables secure multi-tenancy through VRF isolation
Supports dynamic scaling to cloud providers
Leverages automation for deployment and management
By combining the strengths of VyOS, WireGuard, EVPN, and L3VPN technologies, this design creates a network infrastructure that balances security, performance, and operational simplicity.
Comprehensive E2E Encrypted Multi-Tenant Network Architecture
This document synthesizes our complete plan for building a secure, end-to-end encrypted, multi-tenant overlay network using VyOS, WireGuard, VXLAN, OSPF, L3VPN, and other technologies. The architecture implements a Unix philosophy-aligned approach with modular components that can be composed together while maintaining separation of concerns.
Architecture Overview
graph TB subgraph Physical["Physical Infrastructure"] direction TB DC1["Datacenter 1<br>5.254.54.0/26"] DC2["Datacenter 2<br>5.254.43.160/27"] CloudExt["Cloud Extensions<br>Dynamic"] end subgraph Hypervisor["Hypervisor Layer"] direction TB ArchLinux["Arch Linux OS"] OVS["Open vSwitch<br>Hardware Offload"] SRIOV["SR-IOV<br>Virtual Functions"] SystemdVMSpawn["systemd-vmspawn"] end subgraph Router["Virtual Router Layer"] direction TB VyOSVMs["VyOS VMs"] WireGuard["WireGuard Mesh<br>172.27.0.0/20"] VXLAN["VXLAN Tunnels"] OSPF["OSPF Areas"] BGP["BGP EVPN"] L3VPN["L3VPN (VRF)"] end subgraph Tenant["Tenant Layer"] direction TB TenantVMs["Tenant VMs"] ManagedServices["Managed Services"] K8S["Kubernetes Clusters"] Backups["Backup Systems"] end Physical --> Hypervisor Hypervisor --> Router Router --> TenantNetwork Addressing Schema
graph LR subgraph PublicSpace["Public Address Space"] DC1Public["DC1: 5.254.54.0/26"] DC2Public["DC2: 5.254.43.160/27"] DC2Additional["DC2 Additional: 5.254.43.208/29"] end subgraph ManagementSpace["Management Networks"] ControlPlane["Control Plane: 172.27.0.0/20"] BackboneNetwork["Backbone: 172.16.0.0/20"] end subgraph TenantSpace["Tenant Address Space"] CGNATBase["Base: 100.64.0.0/10"] WireGuardOverlay["WireGuard: 100.64.0.0/16"] TenantNetworks["Tenant Networks: 100.65.0.0/16"] TenantServices["Services: 100.80.0.0/16"] MigrationSpace["Migration: 100.96.0.0/16"] endImplementation Plan
1. Physical Infrastructure Setup
The physical infrastructure consists of:
Datacenter 1:
Datacenter 2:
2. Hypervisor Layer Configuration
Each bare metal server runs:
NIC Configuration:
3. VyOS VM Deployment Using mkosi and systemd-vmspawn
Create a base VyOS image using mkosi:
4. WireGuard Control Plane Configuration
The secure management and control plane runs over WireGuard:
5. BGP EVPN and L3VPN Configuration
The backbone network runs BGP EVPN for control plane and VXLAN for data plane:
6. VXLAN Tunnel Configuration
VXLAN provides the data plane for multi-tenant isolation:
7. High Availability Configuration with VRRP
Implement HA gateways using VRRP:
8. Tenant Provisioning Automation
Automate tenant onboarding and provisioning with cloud-init:
Deployment Workflow
The deployment of this network architecture follows these stages:
Infrastructure Initialization
Control Plane Deployment
Tenant Network Provisioning
Service Integration
API Integration
VyOS provides a rich API for automation:
Real-time Monitoring
The network includes comprehensive monitoring using VyOS's built-in capabilities:
Key Resources and References
VyOS L3VPN Documentation
WireGuard Configuration
VRF and Routing
Automation and API
Next Steps and Enhancements
Implement CI/CD Pipeline
Extend Cloud Provider Integration
Enhance Security Features
Improve Tenant Self-Service
Conclusion
This architecture provides a robust, secure, and scalable network overlay that:
By combining the strengths of VyOS, WireGuard, EVPN, and L3VPN technologies, this design creates a network infrastructure that balances security, performance, and operational simplicity.