Skip to content

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 folder

Every lab README says which images to pull first (vz image pull disk debian-13 for most).

Conventions ​

Loginlab / lab on the console and over SSH, with passwordless sudo
AddressesLab NN uses 10.(100+NN).0.0/24 for its NAT switch: the Mac is .1, nodes start at .11
MAC addresses52:54:00:NN:<node>:<nic>, with DHCP reservations so addresses never change
mgmt NICOut-of-band access and package downloads; exercise traffic uses the other NICs
Parallel labsSubnets and MACs never overlap, so any labs can run at the same time, memory permitting

Getting started ​

LabWhat it showsNodesTools
01 Single VMOne Debian VM on a NAT switch. The smallest lab: start here to learn the vz workflow.1
02 Two VMs on one switchTwo Debian VMs on one NAT switch with fixed addresses, so they can reach each other and the internet.2
03 Host-only networkTwo VMs that only the Mac can reach: no NAT, so no internet. Good for anything that must stay offline.2
04 Static addressingA NAT switch with its DHCP server turned off. Every VM gets a static address, gateway and DNS from cloud-init.2
05 Port forwardingA web server in a VM, published on the Mac's localhost:8080, with SSH on localhost:2222.1

Storage ​

LabWhat it showsNodesTools
06 Shared foldersMac folders inside a VM with VirtioFS: one read-only website served by nginx, one read-write drop box.1
07 Extra disksA VM with a bigger root disk, a virtio data disk and an NVMe disk, formatted and mounted by cloud-init.1
08 USB mediaA USB stick you plug and unplug while the VM runs, like a real removable disk.1

Desktop and installers ​

LabWhat it showsNodesTools
09 Linux desktopA Debian Xfce desktop in a window, with sound and a shared clipboard.1
10 Install Debian from the ISOBoot the Debian netinst ISO and install onto an empty disk, the way you would on real hardware.1

Distributions and images ​

LabWhat it showsNodesTools
11 Five distributionsDebian, Ubuntu, Fedora, AlmaLinux and Rocky Linux side by side on one switch.5
31 Hello OSA tiny OS written in Rust that prints hi on the console, booted from a disk you build yourself.1Rust
32 macOSA macOS VM on the apple platform, installed from Apple's restore image, with SSH set up on its first boot. Experimental.1
LabWhat it showsNodesTools
12 Point-to-point linkTwo VMs joined by a cable: no switch, no Mac in the path, every frame passes unchanged.2
13 Static routingTwo networks joined by two routers with hand-written routes. Follow a packet hop by hop.4
14 OSPF triangleThree FRR routers in a ring learn each other's loopbacks with OSPF and route around a broken cable.3
15 BGP between two networksTwo autonomous systems exchange their networks over eBGP, like two companies or an ISP and a customer.4
16 OSPF failoverTwo sites with a direct link and a backup path through a third router. Cut the cable and count the lost pings.5
17 Jumbo framesTwo links side by side, one with a 9000-byte MTU, to see what MTU means for packets and throughput.2
20 IPv6 dual stackIPv4 and IPv6 on the same switch with SLAAC, plus an IPv6-only link with static addresses.2

Switching ​

LabWhat it showsNodesTools
18 VLANs and a trunkRouter on a stick: a Linux bridge with access ports for VLANs 10 and 20, and one tagged trunk to the router.4
19 Link bondingTwo cables bonded into one interface. Unplug the active one and the bond keeps going.2

Network services ​

LabWhat it showsNodesTools
21 NAT gatewayA Linux gateway gives a private LAN DHCP, DNS and NAT to the internet, like a home router.3
24 Firewall with a DMZA three-zone firewall: the outside reaches only the web server in the DMZ, and only the web server reaches the database.4
25 DNS serverAn authoritative and recursive BIND server for the zone lab.test, used by two clients.3Terraform
26 Load balancerHAProxy spreads requests over two nginx servers and stops sending to one that goes down.3Ansible
27 WireGuard site to siteTwo sites joined by an encrypted WireGuard tunnel across a shared network, routing each other's LANs.4

Feature tours ​

LabWhat it showsNodesTools
22 Node feature tourFour nodes, each with a different set of node features switched on, plus the host-dependent ones ready to switch on.4
23 Switch feature tourSeven switches, each showing one switch feature, explored from two probe VMs and a peer.3

Automation ​

LabWhat it showsNodesTools
28 Ansible control nodeA control node with Ansible, an inventory and a playbook, managing three nodes over SSH keys.4Ansible

Clusters ​

LabWhat it showsNodesTools
29 Kubernetes with k3sA three-node k3s cluster: one server and two agents, with kubectl working from the Mac.3kubectl, Terraform
30 Leaf-spine fabric with BGPA data center fabric: two spines, two leaves and two servers, with BGP unnumbered and equal-cost paths.6Ansible

Finding a feature ​

Labs 22 and 23 turn every node and switch key on or off and say how to see the difference.