ContainerLab has become the preferred tool for network engineers who want reproducible, code-managed lab topologies. Unlike GNS3 or EVE-NG, which require GUI interaction to build topologies, ContainerLab defines your entire network in a YAML file that can be version-controlled, shared via Git, and deployed with a single command. This makes it ideal for OcNOS pre-deployment validation, training labs, and CI/CD-style network testing workflows.
Part 1 covers Linux setup. Part 2 covers platform analysis across Linux, Windows (WSL2), and macOS (Colima).
Prerequisites and Hardware
A budget Linux mini-PC with hardware nested-virtualization support is enough for a 4 to 6 node OcNOS ContainerLab topology. A Beelink mini-PC (AMD Ryzen 7 PRO 5850U, 32GB RAM, 1TB SSD, roughly $329) works well. Recommended specs:
- Ubuntu 22.04 LTS or Debian 12 (kernel 5.15+)
- Nested virtualization enabled in the CPU and OS (OcNOS runs as a VM inside the container)
- 32GB RAM recommended for multiple nodes (each OcNOS node runs a full VM, so plan several GB per node)
- Docker Engine 24+, ContainerLab 0.55+, and vrnetlab
- An OcNOS .qcow2 image (from IP Infusion) that vrnetlab converts into a container image
Installation
# Ubuntu 22.04 -- Install Docker and ContainerLab
#
# Step 1: Install Docker Engine
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker
# Step 2: Install ContainerLab
bash -c "$(curl -sL https://get.containerlab.dev)"
# Verify installations:
docker --version
containerlab version
# Step 3: Build the OcNOS container image with vrnetlab
# ContainerLab does not load a prebuilt OcNOS tarball. OcNOS ships as a
# .qcow2 virtual disk, and vrnetlab wraps that disk into a Docker container.
git clone https://github.com/hellt/vrnetlab.git
cd vrnetlab/ocnos
# Copy the OcNOS .qcow2 into this directory, then build the image.
make
# The build produces an image named vrnetlab/ipinfusion_ocnos:
docker images | grep ipinfusion_ocnos
# Expected: vrnetlab/ipinfusion_ocnos with a version tag, e.g. 6.6.0-248
Topology-as-Code: 3-Node IS-IS SR Lab
# ocnos-isis-sr.yaml -- ContainerLab topology definition
# Deploy with: sudo containerlab deploy -t ocnos-isis-sr.yaml
name: ocnos-isis-sr
topology:
nodes:
r1:
kind: ipinfusion_ocnos
image: vrnetlab/ipinfusion_ocnos:6.6.0-248
startup-config: ./configs/r1.cfg
r2:
kind: ipinfusion_ocnos
image: vrnetlab/ipinfusion_ocnos:6.6.0-248
startup-config: ./configs/r2.cfg
r3:
kind: ipinfusion_ocnos
image: vrnetlab/ipinfusion_ocnos:6.6.0-248
startup-config: ./configs/r3.cfg
links:
- endpoints: ["r1:eth1", "r2:eth1"]
- endpoints: ["r2:eth2", "r3:eth1"]
! configs/r1.cfg -- OcNOS startup config for R1
!
hostname R1
!
interface lo
ip address 10.0.0.1/32
ip router isis CORE
prefix-sid index 1
!
interface eth-0-1
no shutdown
ip address 192.168.12.1/30
ip router isis CORE
isis network point-to-point
isis metric 10
!
router isis CORE
net 49.0001.0000.0000.0001.00
is-type level-2-only
metric-style wide
segment-routing mpls
fast-reroute ti-lfa level-2 proto ipv4
address-family ipv4 unicast
segment-routing mpls
exit-address-family
Deploying and Accessing the Lab
# Deploy the topology
sudo containerlab deploy -t ocnos-isis-sr.yaml
# List running nodes (Kind/Image column shows ipinfusion_ocnos)
sudo containerlab inspect -t ocnos-isis-sr.yaml
# ContainerLab assigns management IPs on the 172.20.20.0/24 subnet.
# Log in with the default OcNOS credentials: admin / admin@123
ssh admin@172.20.20.2 # R1
ssh admin@172.20.20.3 # R2
ssh admin@172.20.20.4 # R3
# Destroy the lab when done
sudo containerlab destroy -t ocnos-isis-sr.yaml
Verifying the Lab
! From R1 -- verify IS-IS SR is working
!
show isis neighbor
! Expected: R2 in UP state
show isis segment-routing state
! Expected: a prefix-SID entry for each loopback
show mpls forwarding-table
! Expected: MPLS FIB entries for R2 and R3 loopbacks
! Test end-to-end reachability:
ping 10.0.0.3
- ContainerLab Part 2: Linux, Windows, macOS Platforms
- OcNOS VM Overview
- GNS3 Guide
- Download OcNOS Demo VM
IP Infusion Engineering Team