containerlab

repository·main·Indexed 24 days ago

https://github.com/srl-labs/containerlab

Implementation 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.

Tokens
159.2K
Snippets
491
Records
1.2K
Agent score
83%

What's inside containerlab

  1. Overview of Containerlab

    main
    Containerlab 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 via vrnetlab or boxen integration.
  2. Core Features of Containerlab

    main

    Containerlab provides several key capabilities for network lab orchestration:

    • IaaC approach: Define labs declaratively using clab topology definition files.
    • NOS Centric: Abstracted startup requirements for various Network Operating Systems using kinds.
    • VM Support: Integration with vrnetlab allows running virtualized nodes alongside containerized ones.
    • Lab Lifecycle Management: Commands to deploy, destroy, save, inspect, and graph lab topologies.
    • Scaled Lab Generation: Use the generate command 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.
  3. Share lab access using GoTTY

    main

    For 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 attach
    • clab tools gotty detach
    • clab tools gotty list
    • clab tools gotty reattach
  4. Use DevPod for portable Devcontainers

    main

    DevPod 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.

  5. Understand containerlab networking concepts

    main

    containerlab provides virtual wiring between containers and the host to enable two primary connectivity scenarios:

    1. Host-to-Container connectivity: Making containers available and reachable from the lab host machine.
    2. Container-to-Container connectivity: Interconnecting containers to create custom network topologies of your choice.
  6. Common Use Cases for Containerlab

    main

    Containerlab 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.
  7. Use cases for the single SR Linux lab

    main

    The 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 gnmic gNMI client).
    • Writing, debugging, and managing custom applications built for the SR Linux NDK.
  8. Containerlab v0.67 Release Notes

    main

    Key changes in version 0.67:

    • Node Sharing: Support for sharing lab access via sshx.
    • Automation: Added Nornir Simple Inventory generation.
    • OpenWrt: Added support for openwrt kind.
    • SR Linux: Added new types ixr18e and ixrh432d.
    • Cleanup: The delete process 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.
  9. Improved SR OS (`vr-sros`) boot procedure

    main
    With the integration of hellt/vrnetlab v0.3.1, the SR OS boot sequence is hardened. vr-sros nodes will now wait until the dataplane interfaces appear in the container namespace before proceeding, preventing issues with attaching container interfaces.