netlab 1.9.6: Static Routes to Default Gateways
Last week, I had to push out netlab release 1.9.6 to address a particularly nasty Python dependency hell to make netlab work (again) on Ubuntu 24.04 (more details). The release also brought these goodies (and a bunch of bug fixes):
- Add default gateway (including anycast- and VRRP gateway )as a valid next-hop for static routes
- Rewrite the default gateway processing and add IPv6 default gateways on links without anycast or VRRP gateways
- Set libvirt MTU to 9500 on bridge-based networks to avoid the “transparent fragmentation” on Linux bridges.
- Use device- or node variables to specify the Juniper vMX license file.
About That Python Dependency
Python documentation encourages virtual environments when installing packages1. That’s all fine and dandy if you’re running a gazillion different software packages on your laptop, but largely irrelevant if you’re using a Linux server (or VM) as an appliance – the recommended netlab deployment model.
Furthermore, some Linux distros love to include a random selection of Python packages as system packages. For example, Ubuntu 24.04 comes with preinstalled rich package. That’s OK as long as every other package is happy with the vendor-selected version of the preinstalled packages, but that may change at any time when someone pushes a new version of their code (and its dependencies) to PyPi2.
The rich package was “forever” included in Ubuntu 24.04. We knew that, but every package we used was happy with the preinstalled rich package, so the netlab installation scripts did not upgrade it.
A few days ago, one of the Python packages used (probably) by Ansible started requiring a newer version of the rich package. The upgrade process triggered by that new dependency failed because the original rich package was not installed with PyPi, and the netlab Ansible installation script crashed. New netlab users could not install it on Ubuntu 24.04.
Workaround: The netlab Ansible installation script in release 1.9.6 installs the latest version of the rich package (and a bunch of others) with the --ignore-installed
flag.
Upgrading or Starting from Scratch?
- 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.
-
Sometimes Linux distros go as far as almost removing the ability to install packages into default user- or system Python directories. ↩︎
-
Yeah, I know we should be pinning the versions of every package used in netlab and all tools used by netlab (like Ansible). In other news, we usually find something better to do with our time. ↩︎