
In the world of network engineering, building test labs has always been a necessary evil. We’ve all been there – spending hours configuring devices, setting up IP addresses, and troubleshooting basic connectivity before we can even start testing what we actually want to test. What if I told you there’s a tool that eliminates 80% of this setup time while making your labs reproducible and version-controlled?
Netlab is an infrastructure-as-code tool specifically designed for network labs. Think of it as “Terraform for network labs” – you describe what you want in a simple YAML file, and netlab handles all the heavy lifting of device configuration, IP addressing, and connectivity setup.
Created and maintained by Ivan Pepelnjak, a renowned networking expert and in my opinion also a pioneer of network abstraction. Netlab represents years of experience in what network engineers actually need when building labs. Unlike traditional lab tools that focus on GUI-based topology design, netlab takes a developer-friendly approach that aligns perfectly with modern DevOps practices. We all know that GUI is great, but it doesn’t scale.
The network topology below was built entirely with Netlab, here’s the full story.

Traditional network lab creation follows a standard pattern:
Netlab transforms this into:
netlab upThe difference is transformative – what used to take hours now takes minutes and more importantly, with YAML definition, we have our programmatic source of truth for the lab in future. Imagine it as a next-level abstraction. Do you need to run OSPF in a multiarea environment? Add the OSPF module to your YAML file and define rules. Do you need to create an MPLS VPNv4 lab to emulate customers connected to provider’s cloud? Just add the declarative abstracted config to your YAML and the MPLS core with sites is built in minutes with Junos, IOS or Arista!
Instead of clicking through GUIs or writing lengthy configuration scripts, netlab uses a declarative approach. You describe your desired network topology in YAML:
# Simple topology of 2 connected routers
provider: clab
defaults.device: eos
defaults.devices.eos.clab.image: ceos:4.29.9.1M
nodes:
- r1
- r2
- r3
links:
# P2P link
- r1-r2
- r2-r3
- r3-r1This simple file creates a three-router triangle topology with all IP addresses automatically assigned and basic connectivity configured. In my example, I am using ContainerLab to emulate the images, but there’re are more options.
One of netlab’s killer features is vendor abstraction. The same topology file can deployed on all vendors that have the model supported. And if there’s something missing? It’s not a blocker at all, the netlab project is open-source and ready for additional input.
Netlab includes built-in modules for common protocols and features:
Each module understands vendor differences and generates appropriate configurations automatically.
Before implementing a new network design in production, Netlab lets you:
Real-world example: A network architect can test a new BGP route reflector design across Cisco and Arista devices, ensuring compatibility before the procurement phase. Netlab automatically handles the base BGP configuration, neighbor relationships, and route reflector hierarchy. However, for production-ready deployments, additional configuration beyond Netlab’s automated setup is often required – such as BGP authentication (MD5 passwords, TCP-AO), advanced route policies, or complex MPLS integration with route reflectors.
For network professionals developing their skills, Netlab provides:
Example scenario: A CCNP candidate can create OSPF, BGP, and MPLS labs that exactly match their study materials, saving hours of setup time for each study session.a
Network automation engineers use netlab to:
Practical application: Before rolling out a new automation script, spin up a 20-device topology matching your production network, test thoroughly, then tear it down – all in under 30 minutes.
When production issues arise, netlab helps by:
Real scenario: A complex MPLS VPN issue can be recreated in the lab using the exact same topology and configuration approach, allowing safe troubleshooting without production impact.
It’s impossible to discuss Netlab without acknowledging Ivan Pepelnjak’s contribution to the networking community. Through his work at ipSpace.net and the creation of Netlab, Ivan has democratized access to advanced network lab automation.
His philosophy of “infrastructure as code for networking” has influenced countless engineers to adopt modern automation practices. Netlab embodies this philosophy perfectly – making complex network labs as easy to manage as application code.
Ready to transform your lab experience? Here’s what you need:
System Requirements:
Knowledge Prerequisites:
Netlab represents a paradigm shift in how we approach network labs. By treating lab infrastructure as code, it brings software development best practices to network engineering. The result? More time learning and testing, less time on repetitive setup tasks.
In this series, we’ll take you from Netlab novice to power user:
Ready to revolutionize your lab workflow? Stay tuned for Part 2, where we’ll explore Netlab’s architecture and see how it compares to other popular lab tools.
Have you tried netlab in your environment? What’s your biggest challenge with network lab automation? Share your thoughts in the comments below or reach out to us at Netodata to discuss how we can help optimize your network automation journey.