netlab: Testing Network Protocol Implementations
Donnie Savage decided to use netlab to test OpenEIGRP-Cisco IOS interoperability (TL&DR: it works and the source code is in Donnie’s EIGRP repository).
He asked me for a few hints before setting up his test server. This is what I sent him; you might find it useful if you ever decide to use netlab to test a new network device/protocol implementation.
Infrastructure:
- Use containers (provider:
clab). They often start way faster than virtual machines, and we’re moving away from Vagrant anyway. - IOL is the best image for IOS/XE (actually, it’s IOLL2 because it starts faster, but I wouldn’t count on it having all features).
- If you want to test against Nexus OS, download the latest version (free, requires registration) and use vrnetlab to turn it into a container
Directory structure:
- You could have one lab topology per directory, in which case use
topology.ymlas the topology file name - It’s also perfectly possible to have numerous topology files in the same directory. In that case, you have to supply the topology file name to the netlab create or netlab up commands.
- It’s easier to have project-wide defaults with a single directory (in which case the defaults file name is
topology-defaults.yml), but it’s also possible to have project-wide defaults with a more complex directory structure (see BGP labs for an example).
Defaults:
- I would change all FRR settings (image name, modules…) in the directory/project/user defaults.
- You could use wildcard groups defined in defaults to set device type and other attributes. For example, you could say “everything starting with C is device
iol, and everything starting with N is devicenxos, while the default device type isfrr.
Using existing netlab functionality:
- netlab has minimal EIGRP support. You’ll probably find it useless, but of course feel free to enhance it and submit a PR.
- I would rely on netlab to deal with the rest of device configuration, for example, addressing, OSPF, BGP, and static route configuration.
Configuring EIGRP:
- The easiest way to start would be custom configuration templates, which can be Jinja2 templates, so you can make them reusable across labs, plus potentially avoid dealing with stuff like interface name details.
- After you get the initial quirks out of the way, I could help you set up a more generic system, or add OpenEIGRP support to netlab (a PR is always appreciated).