4.8 KiB
4.8 KiB
OpenWrt Integration - Change Log
What's New
OpenWrt Gateway Support
This version adds complete support for OpenWrt routers as lab network gateways, making them fully interoperable with Linux VMs and MikroTik routers.
New Ansible Roles
- openwrt-common - System preparation and package installation
- openwrt-wireguard - UCI-based WireGuard configuration
- openwrt-vxlan - VXLAN interface setup with FDB management
- openwrt-bridge - Bridge configuration via UCI
- openwrt-dhcp - dnsmasq DHCP server configuration
- openwrt-firewall - Automatic firewall zone creation and isolation
- openwrt-monitoring - Lightweight shell-based Prometheus exporter
Key Features
- UCI Configuration: All settings managed via OpenWrt's UCI system
- Auto Package Installation: Automatic installation of required packages:
- wireguard-tools
- kmod-wireguard
- kmod-vxlan
- ip-full
- tcpdump
- Firewall Isolation: Each lab network gets isolated firewall zone
- Metrics Export: Lightweight shell script exporter on port 9586
- Full Mesh Support: OpenWrt gateways mesh with Linux and MikroTik
- DHCP Modes: Support for both simple (split range) and failover simulation
Architecture Support
- x86_64: PC Engines APU, Protectli Vault, generic x86
- ARM: GL.iNet, Turris Omnia, Raspberry Pi
- MIPS: Various TP-Link, Ubiquiti models (device-dependent)
Updated Files
Terraform:
terraform/outputs.tf- Added openwrt_gateways inventory groupterraform/terraform.tfvars.example- Added OpenWrt gateway examples
Ansible:
ansible/playbooks/site.yml- Added OpenWrt configuration blockansible/inventory/hosts.yml- Added openwrt_gateways groupansible/inventory/group_vars/openwrt_gateways.yml- OpenWrt-specific vars
Documentation:
docs/openwrt-setup.md- Complete OpenWrt setup guidedocs/gateway-comparison.md- Comparison of all three gateway typesREADME.md- Updated with OpenWrt references
Compatibility
- OpenWrt Version: 23.05 or later (stable releases)
- Minimum Hardware: 128MB RAM, 128MB flash (256MB+ recommended)
- Tested Platforms: x86_64, ARM (Cortex-A series)
- Interoperability: Fully compatible with Linux and MikroTik gateways
Usage Example
# terraform/terraform.tfvars
lab_networks = {
lab100 = {
vni = 100
subnet = "10.100.0.0/24"
wireguard_net = "172.16.100.0/24"
dhcp_mode = "simple"
road_warrior = false
gateways = [
{
hostname = "lab100-linux1"
type = "linux"
mgmt_ip = "192.168.1.11"
api_port = 22
lab_if = "eth1"
dhcp_role = "primary"
},
{
hostname = "lab100-openwrt1"
type = "openwrt" # ← OpenWrt gateway
mgmt_ip = "192.168.1.14"
api_port = 22
lab_if = "eth1" # Adjust to your OpenWrt interface
dhcp_role = "secondary"
}
]
}
}
Deploy:
./deploy.sh
Testing Checklist
After deploying an OpenWrt gateway:
- WireGuard tunnel established:
wg show - VXLAN interface up:
ip -d link show vxlan100 - Bridge operational:
bridge link show - DHCP serving:
cat /tmp/dhcp.leases - Firewall zone created:
uci show firewall | grep lab100 - Metrics exported:
curl http://<openwrt-ip>:9586/metrics/ - Can ping peer WireGuard IPs
- Lab devices getting DHCP addresses
Known Limitations
- DHCP Failover: OpenWrt uses simulated failover (split ranges), not true ISC DHCP failover protocol
- Resource Constraints: Performance varies significantly based on hardware
- Package Availability: Some older/exotic architectures may lack VXLAN support
- Web UI: No LuCI integration (CLI/Ansible only)
Migration Notes
If upgrading from a version without OpenWrt support:
- Update Terraform:
terraform init -upgrade - Run Terraform plan to see new inventory structure
- No changes needed for existing Linux/MikroTik gateways
- Add OpenWrt gateways incrementally
Performance Expectations
| Hardware Class | WireGuard Throughput | Concurrent Devices |
|---|---|---|
| x86_64 (modern) | 500 Mbps - 2 Gbps | 50-100+ |
| ARM (Cortex-A) | 100-300 Mbps | 20-50 |
| MIPS (consumer) | 50-150 Mbps | 10-20 |
Support
See:
docs/openwrt-setup.mdfor detailed setup instructionsdocs/gateway-comparison.mdfor choosing gateway typesdocs/operations.mdfor troubleshooting
Breaking Changes
None - fully backward compatible with existing deployments.
Next Features (Future)
- LuCI web UI integration (optional)
- Support for OpenWrt snapshot builds
- WiFi AP mode integration for wireless lab devices
- Advanced QoS policies for lab networks