containerlab
repository·main·Indexed 24 days ago
https://github.com/srl-labs/containerlabImplementation for Nokia SR OS (Service Router Operating System) nodes within Containerlab, enabling the deployment of SR, IXR, and SAR router series in containerized network topologies. It supports Model-Driven and Classic CLI configuration modes, distributed SR OS components via chassis definitions, and secure gRPC with automated TLS certificate issuance. The repository includes lab examples such as 5-stage CLOS topologies, CVX nodes, and FRR OSPF ring topologies.
What's inside containerlab
- Clabernetes (also known as c9s) is a tool designed to deploy containerlab topologies into a Kubernetes cluster. It enables scaling containerlab topologies beyond a single node by leveraging the distributed nature of a k8s cluster, facilitating the creation of large-scale multi-node labs.
Overview of Containerlab
mainContainerlab is a CLI tool designed for orchestrating and managing container-based networking labs. It allows users to define versatile lab topologies using an Infrastructure-as-Code (IaaC) approach, starting containers and building virtual wiring between them to create complex network environments. It is particularly suited for testing containerized Network Operating Systems (NOSes) and can also manage traditional virtual machine-based routers viavrnetlaborboxenintegration.Core Features of Containerlab
mainContainerlab provides several key capabilities for network lab orchestration:
- IaaC approach: Define labs declaratively using
clabtopology definition files. - NOS Centric: Abstracted startup requirements for various Network Operating Systems using
kinds. - VM Support: Integration with
vrnetlaballows running virtualized nodes alongside containerized ones. - Lab Lifecycle Management: Commands to
deploy,destroy,save,inspect, andgraphlab topologies. - Scaled Lab Generation: Use the
generatecommand to quickly launch CLOS-based topologies of arbitrary scale. - Automated TLS: Automatic provisioning of TLS certificates for nodes that require them.
- Fast & Simple: Blazing fast creation of labs on any Linux system with Docker.
- IaaC approach: Define labs declaratively using
Use multiple container runtimes including Podman
mainContainerlab now supports multiple container runtimes, providing the foundation to run topologies on platforms other than Docker, such aspodman.Share lab access using GoTTY
mainFor users who prefer not to use a third-party relay server like
sshx.io, GoTTY can be used to run a web terminal locally. Unlike SSHX, GoTTY runs alongside your lab nodes, providing better data privacy, but requires the recipient to have network reachability to your host.Available GoTTY commands include:
clab tools gotty attachclab tools gotty detachclab tools gotty listclab tools gotty reattach
Use DevPod for portable Devcontainers
mainDevPod is an open-source tool that makes using devcontainers easier and more portable. It offers advantages over standard VS Code devcontainers by:
- Providing an improved UX for launching workspaces directly from the browser.
- Supporting multiple IDEs and multiple target providers (local Docker, cloud providers, or Kubernetes).
Containerlab integration with DevPod is currently being polished.
Understand containerlab networking concepts
maincontainerlab provides virtual wiring between containers and the host to enable two primary connectivity scenarios:
- Host-to-Container connectivity: Making containers available and reachable from the lab host machine.
- Container-to-Container connectivity: Interconnecting containers to create custom network topologies of your choice.
Common Use Cases for Containerlab
mainContainerlab is optimized for the following scenarios:
- Labs and Demos: Rapidly provisioning networking labs for feature validation, interoperability testing, and demonstrations using code-based definitions.
- Testing and CI: Integrating with CI systems like GitLab CI or GitHub Actions to spin up test beds using a single command, thanks to its single-binary packaging.
- Telemetry Validation: Coupling modern telemetry stacks with containerized network functions to validate telemetry use cases.
Use cases for the single SR Linux lab
mainThe single SR Linux node lab is designed for lightweight exercises, including:
- Getting familiar with SR Linux architecture.
- Exploring the SR Linux extensible CLI.
- Navigating the SR Linux YANG tree.
- Interacting with gNMI and JSON-RPC programmable interfaces (e.g., using the
gnmicgNMI client). - Writing, debugging, and managing custom applications built for the SR Linux NDK.
Containerlab v0.67 Release Notes
mainKey changes in version 0.67:
- Node Sharing: Support for sharing lab access via
sshx. - Automation: Added Nornir Simple Inventory generation.
- OpenWrt: Added support for
openwrtkind. - SR Linux: Added new types
ixr18eandixrh432d. - Cleanup: The
deleteprocess no longer requires the lab directory to be present. - Dependencies:
- Quick-setup script now installs Docker version 27.5.1.
- Minimum required Go version is now 1.23.
- Node Sharing: Support for sharing lab access via
MACVLAN interfaces now use promiscuous mode by default
mainIn release 0.65, MACVLAN interfaces are created in promiscuous mode by default. This change addresses previous issues where certain traffic flows might not have passed through the interface correctly.Improved SR OS (`vr-sros`) boot procedure
mainWith the integration ofhellt/vrnetlabv0.3.1, the SR OS boot sequence is hardened.vr-srosnodes will now wait until the dataplane interfaces appear in the container namespace before proceeding, preventing issues with attaching container interfaces.