Customize netlab
netlab is designed to be highly extensible and customizable. Starting with the system settings, you can:
Overwrite system defaults, either with user default files or in the lab topology.
Change the default device images to run a specific software version in your lab.
Change system addressing pools or define your own.
If you want to use netlab to deploy additional device configuration you can:
Use netlab config to add custom configuration to an already-provisioned lab.
List your own configuration templates in node- or group config attribute to configure functionality not yet supported by netlab during netlab up or netlab initial process.
Define your own global-, node-, link- or interface attributes to parametrize your configurations.
You can also augment the netlab data model transformation or add new functionality with plugins.
If you want to change the provisioning- or device configuration templates, you can:
Create your own device configuration templates: copy a system device configuration template into templates/module/device.j2 file[1] and modify it. You can have custom device configuration templates in the current directory or in the
~/.netlab
directory.Create your own device provisioning template: copy a system template into provider/device-domain.j2 file and modify it.
Finally, you might want to use external tools or devices not yet supported by netlab:
Adding external tools is relatively easy.
If you want to add unsupported devices to a lab but are willing to configure them manually, just define them as unknown devices.
Adding new functionality to an existing device or adding a new device to netlab takes more effort. When adding a new device, it’s easier to define a new device and keep it unprovisioned than going for a full-blown implementation.
Regardless of how far you’re willing to go, we’d appreciate if you decided to contribute your changes, but it’s perfectly fine to keep them private. The best part: you don’t have to modify the netlab package to get the job done; you could use user defaults to define new stuff, and user-defined configuration templates (see above) to configure it.