Example labs
Thirty-two ready-to-run labs, from a single VM to a BGP data center fabric. Each folder has a lab.yaml, a README.md with a topology diagram and exercises, and the cloud-init files for its nodes.
bash
cd examples/14-ospf-triangle && vz up # run one in place
vz init --example 14 # or copy it into an empty folderEvery lab README says which images to pull first (vz image pull disk debian-13 for most).
Conventions
| Login | lab / lab on the console and over SSH, with passwordless sudo |
| Addresses | Lab NN uses 10.(100+NN).0.0/24 for its NAT switch: the Mac is .1, nodes start at .11 |
| MAC addresses | 52:54:00:NN:<node>:<nic>, with DHCP reservations so addresses never change |
mgmt NIC | Out-of-band access and package downloads; exercise traffic uses the other NICs |
| Parallel labs | Subnets and MACs never overlap, so any labs can run at the same time, memory permitting |
Getting started
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 01 Single VM | One Debian VM on a NAT switch. The smallest lab: start here to learn the vz workflow. | 1 | |
| 02 Two VMs on one switch | Two Debian VMs on one NAT switch with fixed addresses, so they can reach each other and the internet. | 2 | |
| 03 Host-only network | Two VMs that only the Mac can reach: no NAT, so no internet. Good for anything that must stay offline. | 2 | |
| 04 Static addressing | A NAT switch with its DHCP server turned off. Every VM gets a static address, gateway and DNS from cloud-init. | 2 | |
| 05 Port forwarding | A web server in a VM, published on the Mac's localhost:8080, with SSH on localhost:2222. | 1 |
Storage
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 06 Shared folders | Mac folders inside a VM with VirtioFS: one read-only website served by nginx, one read-write drop box. | 1 | |
| 07 Extra disks | A VM with a bigger root disk, a virtio data disk and an NVMe disk, formatted and mounted by cloud-init. | 1 | |
| 08 USB media | A USB stick you plug and unplug while the VM runs, like a real removable disk. | 1 |
Desktop and installers
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 09 Linux desktop | A Debian Xfce desktop in a window, with sound and a shared clipboard. | 1 | |
| 10 Install Debian from the ISO | Boot the Debian netinst ISO and install onto an empty disk, the way you would on real hardware. | 1 |
Distributions and images
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 11 Five distributions | Debian, Ubuntu, Fedora, AlmaLinux and Rocky Linux side by side on one switch. | 5 | |
| 31 Hello OS | A tiny OS written in Rust that prints hi on the console, booted from a disk you build yourself. | 1 | Rust |
| 32 macOS | A macOS VM on the apple platform, installed from Apple's restore image, with SSH set up on its first boot. Experimental. | 1 |
Links and routing
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 12 Point-to-point link | Two VMs joined by a cable: no switch, no Mac in the path, every frame passes unchanged. | 2 | |
| 13 Static routing | Two networks joined by two routers with hand-written routes. Follow a packet hop by hop. | 4 | |
| 14 OSPF triangle | Three FRR routers in a ring learn each other's loopbacks with OSPF and route around a broken cable. | 3 | |
| 15 BGP between two networks | Two autonomous systems exchange their networks over eBGP, like two companies or an ISP and a customer. | 4 | |
| 16 OSPF failover | Two sites with a direct link and a backup path through a third router. Cut the cable and count the lost pings. | 5 | |
| 17 Jumbo frames | Two links side by side, one with a 9000-byte MTU, to see what MTU means for packets and throughput. | 2 | |
| 20 IPv6 dual stack | IPv4 and IPv6 on the same switch with SLAAC, plus an IPv6-only link with static addresses. | 2 |
Switching
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 18 VLANs and a trunk | Router on a stick: a Linux bridge with access ports for VLANs 10 and 20, and one tagged trunk to the router. | 4 | |
| 19 Link bonding | Two cables bonded into one interface. Unplug the active one and the bond keeps going. | 2 |
Network services
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 21 NAT gateway | A Linux gateway gives a private LAN DHCP, DNS and NAT to the internet, like a home router. | 3 | |
| 24 Firewall with a DMZ | A three-zone firewall: the outside reaches only the web server in the DMZ, and only the web server reaches the database. | 4 | |
| 25 DNS server | An authoritative and recursive BIND server for the zone lab.test, used by two clients. | 3 | Terraform |
| 26 Load balancer | HAProxy spreads requests over two nginx servers and stops sending to one that goes down. | 3 | Ansible |
| 27 WireGuard site to site | Two sites joined by an encrypted WireGuard tunnel across a shared network, routing each other's LANs. | 4 |
Feature tours
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 22 Node feature tour | Four nodes, each with a different set of node features switched on, plus the host-dependent ones ready to switch on. | 4 | |
| 23 Switch feature tour | Seven switches, each showing one switch feature, explored from two probe VMs and a peer. | 3 |
Automation
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 28 Ansible control node | A control node with Ansible, an inventory and a playbook, managing three nodes over SSH keys. | 4 | Ansible |
Clusters
| Lab | What it shows | Nodes | Tools |
|---|---|---|---|
| 29 Kubernetes with k3s | A three-node k3s cluster: one server and two agents, with kubectl working from the Mac. | 3 | kubectl, Terraform |
| 30 Leaf-spine fabric with BGP | A data center fabric: two spines, two leaves and two servers, with BGP unnumbered and equal-cost paths. | 6 | Ansible |
Finding a feature
Labs 22 and 23 turn every node and switch key on or off and say how to see the difference.