netlab 1.8.0: Control-Plane Daemons, BIRD, dnsmasq
I wanted to include open-source networking-related software into netlab topologies since (at least) the days I was writing the DHCP relaying saga. It turned out to be a bit more complex than I anticipated (more about that in another blog post), but I hope you’ll find it useful. netlab release 1.8.0 includes dnsmasq running as a DHCP server and BIRD running OSPF and BGP. ExaBGP and GoBGP are already on the wish list; if you have any other ideas, please start a GitHub discussion.
I had a hard time finding reasonable container images for BIRD; the BIRD team does not publish them, and everything else I found looked either abandoned or a hobby project. The solution turned out to be exceedingly simple: you cannot run the containers without Docker anyway, which means the docker build command is just a few keystrokes away. I added Dockerfiles needed to build those containers to the netlab source code and implemented the netlab clab build command as a thin wrapper around docker build. It takes just a few seconds (plus the time it takes to download the Ubuntu container image) to build the containers you need.
Talking about DHCP: release 1.8.0 added DHCP clients, relays, and servers. You can also use inter-VRF relays on Cisco IOS and Arista EOS and a VRF-aware DHCP server on Cisco CSR 1000v (I couldn’t find any other DHCP server supporting RFC 6607).
Release 1.8.0 includes a bunch of other nifty features:
- BGP configuration module supports 4-octet BGP AS numbers and large BGP communities.
- Validation plugins allow you to write more powerful validation tests without creating complex Jinja2 templates
- IBGP sessions to routing daemons running on Linux VMs or containers can be established with external-facing IP addresses (not just remote loopbacks).
- You can set netlab defaults from the environment variables
- Configuration template search paths and filenames are no longer hardcoded. Most can be configured in system defaults using defaults.paths dictionary.
Finally, I’ve thrown in a last-minute feature you might find somewhat useful: netlab up command can reload saved device configurations instead of starting the initial device configuration process from scratch.
Upgrading or Starting from Scratch
- For more details, read the release notes.
- To upgrade, execute
pip3 install --upgrade networklab
. - New to netlab? Start with the Getting Started document and the installation guide.
- Need help? Open a discussion or an issue in netlab GitHub repository.