• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

Roger Perkin

Network Automation Architect

  • Network Automation
    • Network Automation Courses
    • What is NetDevOps?
    • Workflow Orchestration
    • Ansible Automation Platform
    • Ansible Workshop
    • What is Network Automation?
    • Network Automation Tools
    • ContainerLab
    • Ansible Training
      • What is Ansible?
      • Ansible Tutorial for Beginners
      • Ansible Network Automation
      • Ansible Inventory Example
    • Python Network Automation
      • Nornir
      • Python Network Automation Course
      • Python for Network Engineers
      • Python VENV / Virtual Environment Tutorial
      • Python Tutorial for Beginners
      • pyATS
    • Network Source of Truth
      • NetBox
      • Infrahub
    • NetDevops
    • DevOps Tutorial
      • Git Training
      • Terraform Training
      • Linux Training
      • Kubernetes Training
      • Devops Training Course
      • Azure Devops Training
    • Terraform
    • GIT
      • Git Commands
      • What is GitHub?
    • Docker Training
    • Confluence
    • Microsoft Azure
  • Cisco
    • ISE
    • SD WAN Training
    • Password Recovery
    • Software-Upgrade-Guides
    • BGP
    • Data Center
    • WIRELESS
  • CCIE
  • Blog
  • About
    • My Red Special Guitar
  • Contact

ContainerLab

Home

ContainerLab

What is ContainerLab?

ContainerLab is a Linux-based container orchestration system. ContainerLab is an open source network validation testing platform that allows you to easily spin up network labs and manage end to end lab using Docker as a base platform and containerised network hardware images. ContainerLab provides a CLI for orchestrating and managing container-based networking labs.

Your lab topology is defined in a YAML file and labs can easily be shared with other engineers.

Is ContainerLab Free?

ContainerLab is free to use, it is free to use for as many devices as you want, the only requirement to running ContainerLab is a Linux based operating system and Docker installed.

ContainerLab Install

Installing ContainerLab is a very simple process. To install ContainerLab you just need to enter one command on a Linux based machine and it will install everything for you.

curl -sL https://containerlab.dev/setup | sudo -E bash -s "all"

ContainerLab inspect

using the command containerlab inspect will show you the running nodes on your server

ContainerLab destroy

to remove the nodes you can destroy your entire lab with the command
containerlab destroy –cleanup

if you want to maintain the configs you can just use the command containerlab destroy

ContainerLab Commands

To deploy a lab – clab deploy <filename of your lab>

If you only have one lab file you can just type clab deploy in the folder

For more information you can refer to the ContainerLab Documentation here:
https://containerlab.dev/install

How to connect to your devices in ContainerLab

Once your devices are running you can ssh directly from your server to the devices.

If you want to connect from a remote device you will need to add an extra few lines in your lab file as below

 mgmt:
  network: fixedips
  ipv4-subnet: 172.16.21.0/24

Once your lab spins up as long as you can route to this IP range you can connect to it from a remote device.

ContainerLab VSCode Plugin

ContainerLab Images

ContainerLab vs EVE NG

Container Lab

ContainerLab Cisco

ContainerLab Juniper

Juniper Lab Topology with vJunos Router

Juniper now has available a vJunos image which will run a VMX router, also available is a vSRX image

How to setup vJunos Router in Containerlab

ContainerLab Nokia

Nokia Lab Topology with SR Linux Router

Ubuntu Server setup

Can you run ContainerLab in Codespaces?

ContatinerLab Training

ContainerLab FAQ

What is ContainerLab?

ContainerLab is a tool for provisioning networking labs built with containers, it is very lightweight and your network topologies are defined in a YAML file. This be version controlled and labs can be shared easily with other network engineers.

ContainerLab is a Linux based container orchestration system.

ContainerLab is a cli tool designed to deploy networking lab topologies.

ContainerLab is a tool for provisioning network labs built with containers.

ContainerLab topology definition is created in a yaml file which can be version controlled and easily shared with other engineers.

Can you use Nornir with Containerlab?

You can use Nornir to push configurations and interact with your network devices. I have a dedicated ContainerLab server and it’s just like connecting to real equipment, so you can use Nornir, Ansible, Python or just SSH directly to the devices.

Can you run ContainerLab on your laptop?

Yes, you can run ContainerLab on your laptop. ContainerLab is designed to be lightweight and easy to use on personal computers, including laptops. Here are some key points about running ContainerLab on a laptop:

Where can I find ContainerLab on Twitter / X?

https://twitter.com/go_containerlab?lang=en

Account is run by Roman Dodin the creator of ContainerLab
https://x.com/ntdvps

Does ContainerLab have a GUI?

ContainerLab does not have a GUI, it’s a CLI driven tool, whilst it does have a graph feature where you can viusalise your built topologies unlike tools like EVE-NG and GNS3 you have to build your topology using code and not drag and drop.

System Requirements

It can run on Linux laptops natively, or on Windows/macOS laptops using Windows Subsystem for Linux (WSL) or a Linux virtual machine

ContainerLab Install on Ubuntu Bare Metal Server

For my ContainerLab server I use a Dell T3610 E5-1650 V2 with 64Gb of Ram, I am planning to upgrade this to 128Gb in the near future, I do a bare metal install of Ubuntu Server 24.04 and then install ContainerLab. This is the most efficient way to install ContainerLab and not using any nested virtualisation.

ContainerLab requires a Linux environment with Docker installed.

ContainerLab Alternatives

Before ContainerLab there have been many other Network Emulation Platforms most have been very resource hungry and required a large amount of CPU and RAM to run some devices.

EVE-NG

  • Widely used for network virtualization
  • Supports a variety of virtual network devices, including VMs
  • Good for running VM-based devices like JunOS, Cumulus, Arista, and VyOS

GNS3

  • Popular platform for network simulation
  • Supports both VM and container-based network devices
  • Offers a graphical user interface for topology design

Container-Based Alternatives

vrnetlab

  • Open-source project for running virtual routers using Docker
  • Containerlab actually uses a fork of vrnetlab for VM-based containers

net-sim tools

  • Created by Ivan Pepelnjak of ipspace.net
  • Uses infrastructure-as-code principles for network topology creation
  • Can be used in conjunction with Containerlab

Cloud-Based Solutions

Cisco Modeling Labs (CML)

  • Cisco’s network simulation platform
  • Offers a wide range of Cisco virtual network devices

Juniper vLabs

  • Juniper’s virtual lab environment
  • Good for testing Juniper-specific configurations

Comparison with Containerlab

While these alternatives exist, Containerlab has some unique advantages:

  1. Container-native approach: Optimized for running container-based network operating systems
  2. Declarative YAML configuration: Allows for easy topology definition and version control
  3. Integration with modern DevOps tools: Works well with Docker and other containerization technologies
  4. Support for both containers and VMs: Can run container-native images and VM-based devices packaged as containers
  5. Open-source and community-driven: Regularly updated and improved by the community

It’s important to note that the choice between these tools often depends on specific needs:

  • For VM-heavy setups, EVE-NG or GNS3 might be more suitable
  • For container-based labs, especially with newer network operating systems, Containerlab excels
  • For specific vendor testing, vendor-provided solutions like CML or vLabs might be preferred

Many network engineers use a combination of these tools depending on the specific requirements of their projects or learning goals.

ContainerLab

ContainerLab is an open source network validation testing platform that allows you to easily spin up network labs and manage end to end lab

ContainerLab: Revolutionizing Network Testing and SimulationContainerLab is an innovative open-source tool that has transformed the landscape of network testing and simulation. Developed by Nokia Networks, this powerful application allows network engineers, sysadmins, and researchers to create complex virtual networking topologies using containers and virtual machines (VMs)

Core Features and Functionality

At its heart, ContainerLab leverages Docker containers to emulate various network devices, including routers, switches, and firewalls from major vendors like Cisco, Juniper, Palo Alto, and Fortinet1. This containerized approach offers significant advantages over traditional VM-based simulators:

  1. Resource Efficiency: Containers consume fewer system resources compared to full VMs, allowing users to run larger topologies on modest hardware, from laptops to bare metal servers.
  2. Rapid Deployment: Labs can be spun up in seconds, enabling quick iterations and testing cycles.
  3. Vendor Diversity: ContainerLab supports a wide range of networking vendors, allowing for realistic multi-vendor environments.
  4. Integration with DevOps Tools: Being container-based, it integrates seamlessly with modern DevOps practices and tools like Git, Ansible, and CI/CD pipelines.

Building Network Topologies

ContainerLab uses a simple YAML-based topology definition file to describe the desired network layout1. This file specifies:

  • Nodes: Individual network devices or endpoints
  • Links: Connections between nodes
  • Node Types: Vendor-specific images or generic Linux containers
  • Management Interfaces: For accessing and configuring devices

A basic topology file might look like this:

textname: demo-lab
topology:
  nodes:
    router1:
      kind: nokia_sros
      image: nokia/sros:latest
    switch1:
      kind: arista_ceos
      image: arista/ceos:latest
  links:
    - endpoints: ["router1:eth1", "switch1:eth1"]

This declarative approach allows for version control of lab setups and easy sharing among team members.

Supported Network Operating Systems

ContainerLab boasts an impressive roster of supported network operating systems, including:

  • Nokia SR OS and SR Linux
  • Cisco IOS-XR, NX-OS, and IOS-XE
  • Juniper Junos
  • Arista EOS
  • Cumulus Linux
  • SONiC
  • OpenSwitch (OPX)

This diversity enables the creation of realistic, heterogeneous network environments that closely mirror production setups

Management and Access

Once a lab is deployed, ContainerLab provides several methods for managing and interacting with the virtual devices:

  1. CLI Access: SSH or console access to individual nodes
  2. Web Interfaces: For devices that support web-based management
  3. API Access: Many containerized NOSes expose APIs for programmatic interaction
  4. Packet Capture: Wireshark integration for traffic analysis

ContainerLab automatically assigns management IP addresses to nodes, simplifying access and configuration1.

Advanced Features

ContainerLab goes beyond basic topology creation with several advanced features:

  1. Topology Visualization: Generate network diagrams automatically from topology files
  2. Configuration Management: Apply startup configs and save running configs
  3. Lab Scaling: Create large-scale topologies with hundreds of nodes
  4. Custom Images: Use your own container images for specialized devices or applications
  5. Integration with External Tools: Seamless interaction with Ansible, Nornir, and other automation frameworks

Use Cases and Applications

ContainerLab finds application in various networking scenarios:

  1. Network Design Validation: Test new architectures before deployment
  2. Protocol Testing: Experiment with routing protocols like BGP in controlled environments
  3. Network Automation: Develop and test automation scripts against virtual topologies
  4. Education and Training: Create hands-on labs for networking courses
  5. CI/CD for Network Infrastructure: Integrate network testing into DevOps pipelines

Community and Ecosystem

As an open-source project, ContainerLab benefits from a vibrant community. Users can find support and resources through:

  • GitHub repository for issues and pull requests
  • Reddit communities for discussion and troubleshooting
  • LinkedIn groups for professional networking
  • YouTube channels with tutorials and demos

The project maintains comprehensive documentation, including a getting started guide, topology examples, and API references

Challenges and Considerations

While ContainerLab offers numerous advantages, users should be aware of potential limitations:

  1. Performance: While efficient, container-based NOSes may not fully replicate hardware performance
  2. Licensing: Some vendor images require valid licenses for full functionality
  3. Feature Parity: Containerized versions may lack certain hardware-specific features
  4. Learning Curve: Users need familiarity with containerization concepts and YAML syntax

Future Directions

The ContainerLab project continues to evolve, with ongoing development in areas such as:

  1. Cloud Integration: Improved support for cloud-based deployments
  2. AI/ML Integration: Incorporating network analytics and machine learning capabilities
  3. Expanded Vendor Support: Adding more network operating systems and appliances
  4. Enhanced Visualization: More sophisticated network topology rendering and analysis tools

Conclusion

ContainerLab represents a significant leap forward in network simulation and testing. By leveraging containerization technology, it provides a flexible, efficient, and powerful platform for creating virtual network labs. Whether you’re a network engineer validating a new design, a student learning about complex protocols, or a DevOps team integrating network testing into your CI/CD pipeline, ContainerLab offers a versatile solution for your virtual networking needs.As the networking landscape continues to evolve, tools like ContainerLab will play an increasingly crucial role in enabling rapid innovation, thorough testing, and seamless integration of network infrastructure with modern IT practices.

100 Facts about ContainerLab

ContainerLab revolutionizes network simulation by providing an innovative containerized approach to creating virtual network topologies.

ContainerLab enables network engineers to quickly deploy complex multi-vendor network environments with minimal hardware requirements.

ContainerLab supports a wide range of network operating systems, from Cisco and Juniper to Nokia and Arista.

ContainerLab uses YAML-based configuration files to define intricate network topologies with ease and precision.

ContainerLab integrates seamlessly with DevOps tools like Ansible, Git, and CI/CD pipelines.

ContainerLab reduces the cost of network testing by eliminating the need for physical hardware.

ContainerLab allows network professionals to experiment with different network configurations without risking production environments.

ContainerLab provides a flexible platform for network automation and continuous integration testing.

ContainerLab supports both Linux and cloud-based deployments, offering versatility for various infrastructure setups.

ContainerLab enables rapid prototyping of network designs through its container-based architecture.

ContainerLab simplifies the process of creating complex network simulations for educational and training purposes.

ContainerLab offers comprehensive support for BGP, OSPF, and other critical networking protocols.

ContainerLab helps network engineers validate configuration changes before implementing them in production.

ContainerLab reduces the learning curve for network simulation by providing an intuitive, user-friendly interface.

ContainerLab supports multiple virtualization technologies, including Docker and QEMU.

ContainerLab enables network architects to model intricate network topologies with minimal resource overhead.

ContainerLab provides robust management interfaces for accessing and configuring virtual network devices.

ContainerLab facilitates network testing across diverse vendor ecosystems.

ContainerLab allows for easy scaling of network simulations from small labs to large enterprise topologies.

ContainerLab integrates packet capture and analysis tools for comprehensive network testing.

ContainerLab supports automatic IP address management for virtual network nodes.

ContainerLab enables network professionals to create reproducible and version-controlled lab environments.

ContainerLab provides a platform for continuous learning and skill development in network engineering.

ContainerLab supports configuration management through startup and running configuration capabilities.

ContainerLab helps organizations reduce network deployment risks through comprehensive simulation.

ContainerLab enables rapid validation of network design changes without expensive hardware investments.

ContainerLab supports advanced networking features like VLAN, routing, and port forwarding.

ContainerLab provides a sandbox environment for testing network security configurations.

ContainerLab allows network teams to collaborate more effectively through shareable topology definitions.

ContainerLab supports network emulation across different architectural models.

ContainerLab enables quick troubleshooting of complex network scenarios.

ContainerLab provides a cost-effective alternative to traditional network simulation platforms.

ContainerLab supports multi-vendor network testing in a single, unified environment.

ContainerLab enables network engineers to validate infrastructure-as-code approaches.

ContainerLab provides comprehensive documentation for easy adoption and learning.

ContainerLab supports advanced networking protocols and emerging technologies.

ContainerLab enables realistic network simulations with minimal computational overhead.

ContainerLab helps organizations improve network reliability through comprehensive testing.

ContainerLab supports dynamic topology modifications during runtime.

ContainerLab provides an open-source solution for network simulation and testing.

ContainerLab enables network professionals to experiment with cutting-edge networking technologies.

ContainerLab supports automated network configuration and deployment.

ContainerLab helps educational institutions create hands-on networking labs.

ContainerLab provides a flexible platform for network research and development.

ContainerLab enables quick provisioning of complex network environments.

ContainerLab supports comprehensive network visualization and diagramming.

ContainerLab helps network teams reduce time-to-market for new infrastructure designs.

ContainerLab provides robust integration with popular network automation tools.

ContainerLab enables network engineers to create highly customizable simulation environments.

ContainerLab supports advanced network monitoring and analytics capabilities.

ContainerLab helps organizations improve network design and configuration processes.

ContainerLab provides a scalable solution for network testing and validation.

ContainerLab enables rapid prototyping of network architectures.

ContainerLab supports comprehensive network security testing scenarios.

ContainerLab helps network professionals develop and validate automation scripts.

ContainerLab provides an intuitive interface for network topology creation.

ContainerLab enables organizations to reduce network deployment costs.

ContainerLab supports advanced routing and switching simulation capabilities.

ContainerLab helps network teams improve collaboration and knowledge sharing.

ContainerLab provides a platform for continuous network infrastructure improvement.

ContainerLab enables quick validation of network configuration changes.

ContainerLab supports comprehensive network performance testing.

ContainerLab helps organizations develop more resilient network architectures.

ContainerLab provides a flexible environment for network experimentation.

ContainerLab enables network engineers to simulate complex enterprise networks.

ContainerLab supports advanced network segmentation and isolation techniques.

ContainerLab helps network professionals develop skills in modern networking technologies.

ContainerLab provides a robust platform for network design validation.

ContainerLab enables organizations to reduce network implementation risks.

ContainerLab supports comprehensive network configuration management.

ContainerLab helps network teams improve operational efficiency.

ContainerLab provides an open and extensible network simulation framework.

ContainerLab enables rapid deployment of network testing environments.

ContainerLab supports advanced network automation strategies.

ContainerLab helps organizations develop more agile network infrastructure.

ContainerLab provides comprehensive support for various network operating systems.

ContainerLab enables network engineers to create highly realistic network simulations.

ContainerLab supports advanced network troubleshooting techniques.

ContainerLab helps network professionals validate complex network designs.

ContainerLab provides a scalable solution for network education and training.

ContainerLab enables organizations to improve network reliability and performance.

ContainerLab supports comprehensive network security validation.

ContainerLab helps network teams reduce operational complexity.

ContainerLab provides an innovative approach to network simulation.

ContainerLab enables quick and efficient network design iterations.

ContainerLab supports advanced network configuration testing.

ContainerLab helps organizations develop more flexible network infrastructures.

ContainerLab provides a comprehensive platform for network innovation.

ContainerLab enables network professionals to explore emerging networking technologies.

ContainerLab supports advanced network monitoring and troubleshooting.

ContainerLab helps network teams improve their technical skills.

ContainerLab provides a robust solution for network design validation.

ContainerLab enables organizations to reduce network testing time and costs.

ContainerLab supports comprehensive network performance analysis.

ContainerLab helps network professionals develop more efficient workflows.

ContainerLab provides an open-source alternative to expensive network simulation platforms.

ContainerLab enables quick and accurate network design prototyping.

ContainerLab supports advanced network configuration management strategies.

ContainerLab helps organizations improve their network infrastructure resilience.

ContainerLab provides a powerful, flexible, and innovative approach to network simulation and testing.

25 ContainerLab Tips

When starting with ContainerLab, always ensure your Docker installation is up-to-date to avoid compatibility issues and take advantage of the latest features.

Familiarise yourself with YAML syntax before creating complex topologies, as ContainerLab relies heavily on YAML for configuration files.

Utilise ContainerLab’s built-in topology visualisation feature to quickly verify your network design before deploying the lab environment.

Take advantage of ContainerLab’s support for environment variables in topology files to create more flexible and reusable lab configurations.

Table of Contents

  • ContainerLab
  • What is ContainerLab?
  • Is ContainerLab Free?
  • ContainerLab Install
    • ContainerLab Commands
      • ContainerLab VSCode Plugin
        • ContainerLab Images
      • ContainerLab vs EVE NG
      • Container Lab
      • ContainerLab Juniper
        • System Requirements
        • ContainerLab Install on Ubuntu Bare Metal Server
        • ContainerLab Alternatives
        • EVE-NG
        • GNS3
        • Container-Based Alternatives
        • vrnetlab
        • net-sim tools
        • Cloud-Based Solutions
        • Cisco Modeling Labs (CML)
        • Juniper vLabs
        • Comparison with Containerlab
          • ContainerLab
        • Core Features and Functionality
        • Building Network Topologies
        • Supported Network Operating Systems
        • Management and Access
        • Advanced Features
        • Use Cases and Applications
        • Community and Ecosystem
        • Challenges and Considerations
        • Future Directions
        • Conclusion
        • 100 Facts about ContainerLab
        • 25 ContainerLab Tips

        Sidebar

        Hi I'm Roger Perkin,
        Based in the UK working as a Network Automation Architect, CCIE #50038
        About Roger | Twitter | Linkedin

        python course for network engineers

        Topics

        Network Automation
        Ansible
        Python for Network Automation
        CCIE
        Cisco ISE
        F5 Certification
        BGP
        OSPF
        Network Automation Conferences
        auvik promo banner
        Pluralsight Trial

        Git for Network Engineers

        Ansible vs Nornir

        Start learning today with my Network Automation Courses

        Master Ansible, Python, Git, Nornir, Jenkins and more..


        Buy me a coffeeBuy me a coffee

        ansible network automation course

        Have you seen my YouTube Channel?

        YouTube Subscribe

        Let’s get started

        Take a look at my premium courses on Ansible, Nornir & Git or buy them all with the Network Automation Bundle!

        Network Automation Courses

        Navigation

        Python VENV Tutorial
        Python for Network Engineers

        Network Automation
        Network Automation Courses
        Network Discovery Tools
        Network Automation Conferences
        Ansible Training
        What is Ansible?
        Devops Tutorial
        Network Source of Truth
        DevOps Glossary
        Network Monitoring Software

        Contact

        Contact

        Get in touch with me here

        [email protected]

        • Twitter
        • LinkedIn
        • YouTube
        Buy me a coffeeBuy me a coffee

        Copyright © 2025 · Roger Perkin · All Rights Reserved · Privacy Policy – Terms