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 (Intel N100, 16GB RAM, 256GB SSD) is sufficient for a 4–6 node OcNOS ContainerLab topology. Recommended specs:
- Ubuntu 22.04 LTS or Debian 12 (kernel 5.15+)
- 16GB RAM minimum (each OcNOS container uses ~1.5–2GB)
- Docker Engine 24+ and ContainerLab 0.55+
- OcNOS container image (download from IP Infusion)
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: Load OcNOS container image
docker load -i ocnos-demo-vm.tar.gz
docker images | grep ocnos
# Expected: ocnos/demo image listed with version tag
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: linux
image: ocnos/demo:latest
startup-config: ./configs/r1.cfg
env:
OCNOS_HOSTNAME: R1
r2:
kind: linux
image: ocnos/demo:latest
startup-config: ./configs/r2.cfg
env:
OCNOS_HOSTNAME: R2
r3:
kind: linux
image: ocnos/demo:latest
startup-config: ./configs/r3.cfg
env:
OCNOS_HOSTNAME: R3
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
isis segment-routing 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
segment-routing mpls
fast-reroute per-prefix level-2 ti-lfa
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
sudo containerlab inspect -t ocnos-isis-sr.yaml
# Connect to R1 console
docker exec -it clab-ocnos-isis-sr-r1 /bin/bash
# Then: ssh admin@localhost (OcNOS CLI)
# Or directly via SSH (ContainerLab assigns management IPs):
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 prefix-sids
! Expected: R1 SID 101, R2 SID 102, R3 SID 103
show mpls forwarding-table
! Expected: MPLS FIB entries for R2 and R3 loopbacks
! Test end-to-end SR-MPLS forwarding:
ping 10.0.0.3 source 10.0.0.1
ping mpls ipv4 10.0.0.3/32 source 10.0.0.1
- ContainerLab Part 2: Linux, Windows, macOS Platforms
- OcNOS VM Overview
- GNS3 Guide
- Download OcNOS Demo VM
IP Infusion Engineering Team