Why Containerlab?
So far, all of my labs have been built with Cisco Modeling Labs. As much as I love working with Cisco IOS, the time has come to expand NickDoesLabs. Cisco Modeling Labs is a paid product, and Cisco’s Packet Tracer terms require written approval for uses such as creating videos or courseware outside Networking Academy.
For these reasons, I’m giving Containerlab a try. It’s free and open source, and I’ll be using the open-source FRRouting suite for my first lab. Other router images may have their own license terms.
Let’s get started.
The Environment
My homelab is simple. I have a Dell PowerEdge R710, which currently lives in my bedroom. That server runs Proxmox, which I use to virtualize the rest of my environment. Currently it has been running my Cisco Modeling Labs host. I’ve shut that down for now. I’ll be creating a new Ubuntu Server VM on Proxmox to host Containerlab.
Containerlab runs in a Linux environment. On Windows, you can use Windows Subsystem for Linux (WSL). I’ll cover WSL setup in a separate tutorial.
Video Walkthrough
Creating the VM
Here are the Proxmox settings I used for the Ubuntu Server VM on my Dell PowerEdge R710.
| CPU | Host |
| Sockets | 2 |
| Cores per socket | 6 |
| vCPUs | 12 |
| Disk size | 150 GiB |
| Memory | 32,000 MiB |
| NUMA | On |
| Nested Virtualization | On |
| QEMU Guest Agent | On |
| Ballooning | Off |
Here is the confirmation screen from Proxmox:

Next, we need to configure Ubuntu.
Configuring the Ubuntu VM
With the Ubuntu Server ISO attached to the VM’s virtual CD/DVD drive, start the VM and open its console in Proxmox.

Here you will configure the language, keyboard settings, and networking options for the Ubuntu installer.
After the network and package mirror screens, the installer prompts you to configure the virtual disk.

Since this is a virtual disk anyway, I will let the VM use the entire disk and set it up as an LVM volume group. I’m not enabling disk encryption here since it would require entering the passphrase every time the VM boots.
Next, the installer will ask you to confirm the storage configuration. I’m going to accept the default settings here:

After this the installer asks you to create your profile:

Next, you’ll be prompted to install OpenSSH server which you should do if you want to ssh into the VM. The installer also offered to install optional snaps which I declined.
The installer takes a few minutes now to download and install everything. Once it completes you will be prompted to reboot the VM. After rebooting you will see a message requesting that you remove the installation media and press Enter:

To do this on Proxmox we will navigate to the VM’s hardware section, then double-click on the CD/DVD Drive. This opens the edit dialog box where you can click “Do not use any media” and press “OK”.


Then return to the console and press Enter. Ubuntu Server will finish booting and bring you to a login prompt where you will need to enter the username and password you configured earlier.
Once logged in, you may see pending updates.

To install the pending updates, run sudo apt update && sudo apt upgrade -y. Reboot the VM if Ubuntu reports that a restart is required.
Next I’ll use Putty and connect via SSH to the VM’s IP address on TCP port 22.

At this point we are ready to install Containerlab.
Installing Containerlab
To install Containerlab we will run the command:
curl -sL https://containerlab.dev/setup | sudo -E bash -s "all"
This command pulls an installation script from containerlab’s website and executes it. It is the easiest method for installing Containerlab, but alternative options are available on containerlab.dev.
Once the script completes, in order to run docker commands without sudo in this shell, run:
newgrp docker
Run docker ps to check that Docker is running and your shell can access it. With Containerlab installed, the environment is ready for our first network lab.
Conclusion
Perfect! Installing Containerlab was easier than I expected. I was expecting to run into more roadblocks and glitches, but everything is working fine. I’m super excited to get more familiar with Containerlab and build some awesome labs in it.
Ready to build your first network? Continue to Build Your First Lab in Containerlab with FRRouting, where we’ll deploy three routers, configure OSPF, and verify connectivity.