You're reading the development documentation. Release version of the same page is here.

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, and console connectivity scripts.

Creating the Lab

  • netlab up creates configuration files from lab topology, starts the virtual lab, and deploys initial device configurations

  • netlab down destroys the virtual lab

  • netlab create creates virtualization provider and network automation configuration files (usually Vagrantfile, hosts.yml and ansible.cfg)

  • 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 status display the state of lab instances running on the current server

  • netlab initial uses an internal Ansible playbook to deploy initial device configurations to lab devices

  • netlab config creates custom configuration snippets from Jinja2 templates and uses an internal Ansible playbook to deploy them to lab devices

  • netlab connect relies on Ansible inventory created with netlab create to find IP address, username, and password of specified lab device, and uses SSH or docker exec to connect to the lab device.

  • netlab collect uses Ansible device facts (or equivalent functionality implemented with Ansible modules) to collect device configurations and store them into specified directory.

Utility Commands

Individual netlab Commands