MCPcopy
hub / github.com/srl-labs/containerlab

github.com/srl-labs/containerlab @v0.77.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.77.0 ↗
2,897 symbols 9,436 edges 357 files 1,338 documented · 46%
README

github release Github all releases Doc DeepWiki Bluesky Discord


With the growing number of containerized Network Operating Systems grows the demand to easily run them in the user-defined, versatile lab topologies.

Unfortunately, container orchestration tools like docker-compose are not a good fit for that purpose, as they do not allow a user to easily create connections between the containers which define a topology.

Containerlab provides a CLI for orchestrating and managing container-based networking labs. It starts the containers, builds a virtual wiring between them to create lab topologies of users choice and manages labs lifecycle.

pic

Containerlab focuses on the containerized Network Operating Systems which are typically used to test network features and designs, such as:

In addition to native containerized NOSes, containerlab can launch traditional virtual machine based routers using vrnetlab or boxen integration:

And, of course, containerlab is perfectly capable of wiring up arbitrary linux containers which can host your network applications, virtual functions or simply be a test client. With all that, containerlab provides a single IaaC interface to manage labs which can span contain all the needed variants of nodes:

This short clip briefly demonstrates containerlab features and explains its purpose:

vid

Features

  • IaaC approach
    Declarative way of defining the labs by means of the topology definition clab files.
  • Network Operating Systems centric
    Focus on containerized Network Operating Systems. The sophisticated startup requirements of various NOS containers are abstracted with kinds which allows the user to focus on the use cases, rather than infrastructure hurdles.
  • VM based nodes friendly
    With the vrnetlab integration it is possible to get the best of two worlds - running virtualized and containerized nodes alike with the same IaaC approach and workflows.
  • Multi-vendor and open
    Although being kick-started by Nokia engineers, containerlab doesn't take sides and supports NOSes from other vendors and opensource projects.
  • Lab orchestration
    Starting the containers and interconnecting them alone is already good, but containerlab packages even more features like managing lab lifecycle: deploy, destroy, save, inspect, graph operations.
  • Scaled labs generator
    With generate capabilities of containerlab it possible to define/launch CLOS-based topologies of arbitrary scale. Just say how many tiers you need and how big each tier is, the rest will be done in a split second.
  • Simplicity and convenience
    Starting from frictionless installation and upgrade capabilities and ranging to the behind-the-scenes link wiring machinery, containerlab does its best for you to enjoy the tool.
  • Fast
    Blazing fast way to create container based labs on any Linux system with Docker.
  • Automated TLS certificates provisioning
    The nodes which require TLS certs will get them automatically on boot.
  • Documentation is a first-class citizen
    We do not let our users guess by making a complete, concise and clean documentation.
  • Lab catalog
    The "most-wanted" lab topologies are documented and included with containerlab installation. Based on this cherry-picked selection you can start crafting the labs answering your needs.

Use cases

  • Labs and demos
    Containerlab was meant to be a tool for provisioning networking labs built with containers. It is free, open and ubiquitous. No software apart from Docker is required!
    As with any lab environment it allows the users to validate features, topologies, perform interop testing, datapath testing, etc.
    It is also a perfect companion for your next demo. Deploy the lab fast, with all its configuration stored as a code -> destroy when done.
  • Testing and CI
    Because of the containerlab's single-binary packaging and code-based lab definition files, it was never that easy to spin up a test bed for CI. Gitlab CI, Github Actions and virtually any CI system will be able to spin up containerlab topologies in a single simple command.
  • Telemetry validation
    Coupling modern telemetry stacks with containerlab labs make a perfect fit for Telemetry use cases validation. Spin up a lab with containerized network functions with a telemetry on the side, and run comprehensive telemetry use cases.

Containerlab documentation is provided at https://containerlab.dev.

Extension points exported contracts — how you extend this code

RawLink (Interface)
RawLink is an interface that all raw link types must implement. Raw link types define the links as they are defined in t [7 …
links/link.go
DeployableEndpoint (Interface)
DeployableEndpoint is implemented by endpoint kinds that participate in initial lab deployment. [26 implementers]
links/endpoint.go
NodeOverwrites (Interface)
NodeOverwrites is an interface that every node implements. It is used to enable DefaultNode to get access to the particu [3 …
nodes/default_node.go
DownloadFilesInterface (Interface)
DownloadFilesInterface describes topology paths needed to materialize embedded/downloaded files. [2 implementers]
utils/file.go
Node (Interface)
Node is an interface that defines the behavior of a node. [2 implementers]
nodes/node.go
ContainerRuntime (Interface)
(no doc) [4 implementers]
runtime/runtime.go
ClabFirewall (Interface)
ClabFirewall is the interface that all firewall clients must implement. [2 implementers]
runtime/docker/firewall/definitions/definitions.go
CertStorage (Interface)
CertStorage is an interface that wraps methods to load and store certificates. [1 implementers]
cert/cert.go

Core symbols most depended-on inside this repo

Errorf
called by 996
nodes/k8s_kind/logger.go
Join
called by 296
utils/template.go
Config
called by 190
runtime/runtime.go
GetIfaceName
called by 160
links/endpoint.go
Register
called by 119
nodes/node_registry.go
Error
called by 107
nodes/k8s_kind/logger.go
Infof
called by 88
nodes/k8s_kind/logger.go
String
called by 77
links/endpoint.go

Shape

Method 1,480
Function 1,023
Struct 331
TypeAlias 31
Interface 22
FuncType 10

Languages

Go98%
TypeScript2%
Python1%

Modules by API surface

mocks/mocknodes/node.go86 symbols
nodes/default_node.go80 symbols
mocks/mockruntime/runtime.go76 symbols
nodes/sros/sros.go72 symbols
core/graph_templates/nextui/static/js/next.js66 symbols
types/topology.go61 symbols
runtime/runtime.go56 symbols
nodes/node.go56 symbols
runtime/docker/docker.go54 symbols
links/endpoint.go50 symbols
links/link.go49 symbols
utils/file.go43 symbols

Dependencies from manifests, versioned

al.essio.dev/pkg/shellescapev1.5.1 · 1×
charm.land/lipgloss/v2v2.0.0-beta.3.0.2025 · 1×
dario.cat/mergov1.0.2 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/Masterminds/semver/v3v3.5.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/ProtonMail/go-cryptov1.3.0 · 1×
github.com/VividCortex/ewmav1.2.0 · 1×
github.com/acarl005/stripansiv0.0.0-2018011610285 · 1×
github.com/awalterschulze/gographvizv2.0.3+incompatible · 1×
github.com/aymanbagabas/go-osc52/v2v2.0.1 · 1×

For agents

$ claude mcp add containerlab \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact