netlab Command Reference¶
The netlab command is the netlab CLI interface. It includes data model transformations, lab creation and deletion, device configurations with Ansible playbooks, reporting, and device console connectivity scripts.
Creating the Lab¶
netlab up creates configuration files from lab topology, starts the virtual lab, and deploys initial device configurations.
netlab create, usually executed as part of netlab up process, creates virtualization provider and network automation configuration files (usually
ansible.cfg). It can also be used to create other output formats (graphs, reports, or YAML/JSON printouts).
netlab restart stops and restarts the lab, including lab topology reconfiguration and recreation of configuration files if you changed the lab topology definition.
Configuring and Controlling the Lab¶
netlab connect uses the transformed lab topology data to find the IP address, username, and password of the specified lab device or external tool, and uses SSH or docker exec to connect to the lab device/tool.
netlab collect uses Ansible device facts (or equivalent functionality implemented with Ansible modules) to collect device configurations and store them in the specified directory.
netlab validate executes tests defined in the lab topology on the lab devices
netlab down destroys the virtual lab.
Reports and Graphs¶
netlab status displays the state of lab instances running on the current server
netlab report creates a report (example: node/link addressing) from the transformed lab topology data.
netlab graph creates a graph description of physical or BGP topology in Graphviz or D2 format
netlab inspect helps you inspect data structures in transformed lab topology
netlab show displays system- or user default settings
Device Configuration Commands¶
netlab initial uses an internal Ansible playbook to deploy initial device configurations to lab devices. It’s usually executed as part of netlab up command.
netlab config creates custom configuration snippets from Jinja2 templates and uses an internal Ansible playbook to deploy them to lab devices. It’s usually executed as part of netlab up command.
netlab clab contains containerlab-related utilities