### Example VXLAN Network Setup Source: https://github.com/ipspace/netlab/blob/dev/docs/module/vxlan.md This example demonstrates setting up a two-switch network with two VLANs (red and blue) transported over a VXLAN backbone. It includes group definitions for hosts and switches, node declarations, and link configurations. ```default vlans: red: mode: bridge blue: mode: bridge ``` ```default groups: hosts: members: [ h1, h2, h3, h4 ] device: linux switches: members: [ s1,s2 ] device: eos module: [ vlan,vxlan,ospf ] ``` ```default nodes: [ h1, h2, h3, h4, s1, s2 ] ``` ```default links: - h1: s1: vlan.access: red - h2: s2: vlan.access: red - h3: s1: vlan.access: blue - h4: s2: vlan.access: blue - s1: s2: ``` -------------------------------- ### Install Custom Linux Software Source: https://github.com/ipspace/netlab/blob/dev/docs/example/linux.md After a lab is started, log into a Linux host and use package managers like apt-get to install custom software. This example installs rsyslog. ```bash # apt-get update # apt-get install rsyslog ``` -------------------------------- ### Create and Test a Simple OSPF Lab Topology Source: https://github.com/ipspace/netlab/blob/dev/docs/install/linux.md This example demonstrates how to define a simple OSPF lab topology using YAML, start it with netlab, connect to the devices, and then tear it down. ```yaml --- defaults: device: frr module: [ ospf ] nodes: [ s1, s2, s3 ] links: [ s1-s2, s2-s3, s1-s2-s3 ] ``` ```bash netlab up ``` ```bash netlab connect ``` ```bash netlab down ``` -------------------------------- ### Start Lab with Netlab Source: https://github.com/ipspace/netlab/blob/dev/tests/integration/initial/README.md Use this command to start a lab topology. Specify the provider, device, and topology file. ```bash netlab up -p -d ``` -------------------------------- ### Create and Start Lab without Configuration Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/virtualbox.md Create configuration files and start the lab environment without configuring network devices. This command is useful for testing the lab setup before applying configurations. ```bash netlab up --no-config ``` -------------------------------- ### List available netlab installation scripts Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/install.md Run 'netlab install' without arguments to display a table of available installation scripts and a brief description of what each script installs. This helps in choosing the correct script for your needs. ```text $ netlab install ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Script ┃ Installs ┃ ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ ubuntu │ Mandatory and nice-to have Debian/Ubuntu packages │ │ libvirt │ QEMU, KVM, libvirt, and Vagrant │ │ containerlab │ Docker and containerlab │ │ ansible │ Ansible and prerequisite Python libraries │ │ grpc │ GRPC libraries and Nokia GRPC Ansible collection │ │ graph │ GraphViz and D2 software │ └──────────────┴───────────────────────────────────────────────────┘ ``` -------------------------------- ### Configure Libvirt Batch VM Startup Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/libvirt.md Set batch size and interval for starting VMs in parallel to avoid resource strain. The batch_size is set artificially low in this example to ensure multiple batches are generated. ```default provider: libvirt defaults.device: cumulus defaults.providers.libvirt.batch_size: 2 defaults.providers.libvirt.batch_interval: 10 nodes: [ a,b,c,x,z ] module: [ ospf ] links: [ a-x, a-z, b-x, b-z, c-x, c-z ] ``` -------------------------------- ### Multi-Module Topology Configuration Example Source: https://context7.com/ipspace/netlab/llms.txt Example of a topology.yml file demonstrating the use of multiple configuration modules (OSPF, BGP, VLAN, VRF) and their associated parameters. ```yaml --- defaults.device: eos provider: clab module: [ ospf, bgp, vlan, vrf ] bgp.as: 65000 vlans: customer_a: mode: irb vni: 10100 customer_b: mode: irb vni: 10200 vrfs: red: ospf.area: 10 blue: ospf.area: 20 nodes: pe1: bgp.rr: true # BGP route reflector pe2: ce1: device: iosv module: [ ospf ] # CE only runs OSPF, no BGP links: - pe1-pe2: ospf.cost: 10 vlan.trunk: # VLAN trunk link customer_a: customer_b: - pe1-ce1: vrf: red ospf.area: 10 # Available modules (from: netlab show modules): # bgp, bfd, dhcp, eigrp, evpn, gateway, isis, lag, mpls, ospf, # ripv2, routing, sr, srv6, stp, vlan, vrf, vxlan ``` -------------------------------- ### Start SuzieQ CLI with Netlab Source: https://github.com/ipspace/netlab/blob/dev/docs/extool/suzieq.md Use the netlab connect suzieq command to start the interactive SuzieQ CLI. Alternatively, execute a single command with netlab connect suzieq *command*. ```bash netlab connect suzieq ``` ```bash netlab connect suzieq *command* ``` -------------------------------- ### Install and Start rsyslogd on Linux Source: https://github.com/ipspace/netlab/blob/dev/docs/example/linux.md This script updates package lists, installs the rsyslog package, and then starts the rsyslogd service. Use this in a netlab device configuration template. ```default #!/bin/bash apt-get update apt-get install rsyslog -y rsyslogd ``` -------------------------------- ### Start Lab with Third-Party Switch Source: https://github.com/ipspace/netlab/blob/dev/tests/integration/vxlan/README.md This command allows starting a lab topology while specifying a third-party switch (e.g., Cumulus Linux) for cross-platform interoperability testing. ```bash netlab up -p -d -s nodes.s1.device=cumulus ``` -------------------------------- ### Install Additional Software with netlab Source: https://github.com/ipspace/netlab/blob/dev/docs/install/ubuntu.md Uses the netlab install command to install necessary software components like ansible, libvirt, and containerlab. ```bash netlab install ubuntu ansible libvirt containerlab ``` -------------------------------- ### Install Python3 and pip3 on Ubuntu Source: https://github.com/ipspace/netlab/blob/dev/docs/install/ubuntu.md Installs Python3 and pip3 using apt-get. This is a prerequisite for installing netlab. ```bash sudo apt-get update && sudo apt-get install -y python3-pip ``` -------------------------------- ### Start and Manage Virtual Labs with netlab up Source: https://context7.com/ipspace/netlab/llms.txt Use `netlab up` to start and provision virtual labs. It handles topology transformation, configuration generation, and deployment. Options control defaults, device types, providers, and dry-runs. ```bash netlab up [-h] [--defaults [DEFAULTS ...]] [-d DEVICE] [-p PROVIDER] [--plugin PLUGIN] [-s SETTINGS] [--no-config] [-r RELOAD] [--no-tools] [--dry-run] [--fast-config] [--snapshot [SNAPSHOT]] [topology] ``` -------------------------------- ### Install netlab and Components in Virtual Environment Source: https://github.com/ipspace/netlab/blob/dev/docs/install/ubuntu.md Installs the networklab package and other required software components using netlab install within an activated virtual environment. ```bash pip3 install networklab netlab install ubuntu containerlab libvirt ansible ``` -------------------------------- ### Display netlab install help message Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/install.md Use this command to view all available options and arguments for the netlab install command. It outlines the purpose of each script and option. ```text netlab install -h ``` -------------------------------- ### Start Virtual Devices with Netlab Source: https://github.com/ipspace/netlab/blob/dev/docs/example/github.md Initiates the virtual networking infrastructure and starts the lab devices. This command typically uses Containerlab for deployment. ```default ┌──────────────────────────────────────────────────────────────────────────────────┐ │ STARTING clab nodes │ └──────────────────────────────────────────────────────────────────────────────────┘ provider clab: executing sudo -E containerlab deploy -t clab.yml INFO[0000] Containerlab v0.54.2 started INFO[0000] Parsing & checking topology file: clab.yml INFO[0000] Creating docker network: Name="netlab_mgmt", IPv4Subnet="192.168.121.0/24", IPv6Subnet="", MTU=1500 INFO[0000] Creating lab directory: /home/pipi/net101/tools/X/clab-X INFO[0000] Creating container: "r2" INFO[0000] Creating container: "r1" INFO[0000] Created link: r1:eth1 <--> X_1:r1_eth1 INFO[0000] Created link: r1:eth2 <--> r2:eth2 INFO[0000] Created link: r2:eth1 <--> X_2:r2_eth1 INFO[0000] Adding containerlab host entries to /etc/hosts file INFO[0000] Adding ssh config for containerlab nodes +---+-----------+--------------+------------------------------+-------+---------+--------------------+--------------+ | # | Name | Container ID | Image | Kind | State | IPv4 Address | IPv6 Address | +---+-----------+--------------+------------------------------+-------+---------+--------------------+--------------+ | 1 | clab-X-r1 | b9835b4ef5d2 | quay.io/frrouting/frr:10.0.1 | linux | running | 192.168.121.101/24 | N/A | | 2 | clab-X-r2 | 25962c45a991 | quay.io/frrouting/frr:10.0.1 | linux | running | 192.168.121.102/24 | N/A | +---+-----------+--------------+------------------------------+-------+---------+--------------------+--------------+ ``` -------------------------------- ### Multi-Provider Topology Example (Libvirt Primary, CLAB Secondary) Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/multi-provider.md This example demonstrates a topology where libvirt is the primary provider and clab is used for specific containerized hosts (h1, h2). Ensure you use `netlab up` and `netlab down` to manage labs with mixed providers. ```yaml provider: libvirt nodes: h1: device: linux provider: clab r1: device: iosv module: [ ospf ] r2: device: iosv module: [ ospf ] h2: device: linux provider: clab links: - h1-r1 - r1-r2 - r2-h2 ``` -------------------------------- ### Install vagrant-libvirt Plugin Source: https://github.com/ipspace/netlab/blob/dev/docs/install/linux.md Install the vagrant-libvirt plugin to enable Vagrant to manage virtual machines using libvirt. ```bash vagrant plugin install libvirt --plugin-version=0.12.2 ``` -------------------------------- ### Device Settings Example for Mikrotik RouterOS Source: https://github.com/ipspace/netlab/blob/dev/docs/dev/device-box.md This example demonstrates the structure of a device parameter file, specifying interface naming, management interface, interface index offset, virtualization image, and Ansible group variables for Mikrotik RouterOS. ```yaml interface_name: ether%d mgmt_if: ether1 ifindex_offset: 2 libvirt: image: mikrotik/chr group_vars: ansible_network_os: routeros ansible_connection: network_cli ansible_user: admin ansible_ssh_pass: admin ``` -------------------------------- ### Zone-Based Firewall Configuration Example Source: https://github.com/ipspace/netlab/blob/dev/docs/plugins/firewall.zonebased.md This example demonstrates how to configure the zone-based firewall plugin in a lab topology. It includes defining default rules and assigning zones to firewall interfaces. ```yaml plugin: [ firewall.zonebased ] nodes: fw: firewall.zonebased: default_rules: - from_zone: trusted to_zone: trusted action: permit - from_zone: trusted to_zone: untrusted action: permit h1: h2: links: - fw: firewall.zone: trusted h1: - fw: firewall.zone: untrusted h2: ``` -------------------------------- ### Execute Provider-Specific Hook After Device Start Source: https://github.com/ipspace/netlab/blob/dev/docs/dev/cli-hooks.md Use the 'post_start_clab' hook to run 'netlab initial --ready' after Containerlab has started the network device containers, ensuring they are ready. ```default defaults.netlab.up.post_start_clab: netlab initial --ready ``` -------------------------------- ### Per-Node Module Specification Example Source: https://github.com/ipspace/netlab/blob/dev/docs/modules.md This example shows how to define global modules for the topology and override or specify modules for individual nodes. Host nodes do not inherit global modules and require explicit definition. ```default module: [ ospf ] nodes: - name: c_nxos device: nxos module: [ ospf, bgp ] - name: c_csr device: csr - name: j_vsrx device: vsrx module: [] - name: h1 device: linux ``` -------------------------------- ### netlab Lab Topology File Example Source: https://context7.com/ipspace/netlab/llms.txt A complete YAML example defining a network lab topology. It includes default device settings, provider configuration, enabled modules (OSPF, BGP), custom addressing pools, node definitions with specific configurations, link definitions, and inline validation tests. ```yaml # topology.yml — complete example with mixed devices, OSPF+BGP, custom addressing --- defaults.device: eos # default device type for all nodes provider: clab # use containerlab (alternatively: libvirt) module: [ ospf, bgp ] # enable OSPF and BGP topology-wide bgp.as: 65000 # global BGP AS; nodes can override # Custom IP address pools addressing: loopback: ipv4: 10.0.0.0/24 p2p: ipv4: 10.1.0.0/16 lan: ipv4: 172.16.0.0/16 nodes: r1: # inherits defaults.device = eos bgp.as: 65001 # different AS for r1 r2: device: frr # override device type per node bgp.rr: true # r2 is a BGP route reflector r3: device: iosv module: [ ospf ] # only OSPF on r3, no BGP h1: device: linux # Linux host, no routing modules links: - r1-r2 # point-to-point string shorthand - r2-r3 - r1: r3: ospf.cost: 100 # per-link OSPF cost - [ r2, r3, h1 ] # multi-access LAN link # Inline validation tests validate: ospf_neighbors: description: Check OSPF adjacency between r1 and r2 nodes: [ r1 ] show: eos: "ip ospf neighbor | json" valid: eos: | any(n['interfaceAddress'] for n in result['vrfs']['default']['instList']['1']['ospfNeighborEntries'].values()) fail: "OSPF neighbor not established" pass: "OSPF adjacency is up" ``` -------------------------------- ### Complete Topology File Example Source: https://github.com/ipspace/netlab/blob/dev/docs/topology-overview.md A complete sample topology file combining default device, nodes, and links with specified bandwidth. ```default --- defaults.device: eos nodes: [ e1, c1, c2, e2 ] links: - e1-c1 - e1-c2 - c1: e2: bandwidth: 1000 - c2: e2: bandwidth: 1000 ``` -------------------------------- ### FRR Version Installation Message Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/frr.md This is an example of the end-of-installation message you will see during the box-building process, indicating the installed FRR version. ```text [ 21.094634] cloud-init[500]: Installation complete [ 21.095042] cloud-init[500]: ================================= [ 21.100452] cloud-init[500]: FRR version installed: 10.5.1 [ 21.100844] cloud-init[500]: ================================= ``` -------------------------------- ### FRR RIPv2 Configuration Example Source: https://github.com/ipspace/netlab/blob/dev/docs/module/ripv2.md This is an example of the resulting RIPv2 FRR configuration for a router (R1) in a lab setup. It enables RIP and specifies the network interfaces to be included. ```default router rip network lo network swp1 version 2 ``` -------------------------------- ### Display Initial Configuration Module Support Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/show.md Use this command to view which devices support various initial configuration features provided by the 'initial' pseudo-module. ```text $ netlab show modules -m initial Devices and features supported by initial module +--------------+------------+-----------------+----------+ | device | system_mtu | ipv4.unnumbered | ipv6.lla | +==============+============+=================+==========+ | arubacx | | | | +--------------+------------+-----------------+----------+ | asav | | | | +--------------+------------+-----------------+----------+ | csr | | x | x | +--------------+------------+-----------------+----------+ | cumulus | | x | x | +--------------+------------+-----------------+----------+ | cumulus_nvue | | x | x | +--------------+------------+-----------------+----------+ | dellos10 | | x | x | +--------------+------------+-----------------+----------+ | eos | x | x | x | +--------------+------------+-----------------+----------+ | fortios | | | | +--------------+------------+-----------------+----------+ | frr | | x | x | ``` -------------------------------- ### Display Dell OS10 Initial Configuration Recipe Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/dellos10.md This command displays the build recipe for the initial device configuration of Dell OS10. You will need to copy-paste this configuration during the box-building process. ```bash netlab libvirt config dellos10 ``` -------------------------------- ### Display Configuration Modules Overview Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/show.md Use this command to get a general overview of all available configuration modules and the devices that support each module. ```text $ netlab show modules netlab Configuration modules and supported devices =========================================================================== bfd: srlinux, sros, iosv, csr, nxos, eos, vyos, arubacx bgp: cumulus, cumulus_nvue, eos, frr, csr, iosv, nxos, asav, vsrx, vyos, routeros, srlinux, sros, dellos10, routeros7, vmx, iosxr, arubacx, vptx eigrp: csr, iosv, nxos evpn: sros, srlinux, frr, eos, vyos, dellos10, cumulus, nxos, arubacx, vptx gateway: eos, cumulus, iosv, csr, nxos, sros, srlinux, vyos, dellos10, arubacx osis: eos, frr, csr, iosv, nxos, asav, vsrx, srlinux, sros, vyos, vmx, iosxr, vptx mpls: eos, iosv, csr, routeros, vyos, routeros7, sros, vmx, vsrx, frr, vptx, arubacx ospf: arcos, cumulus, cumulus_nvue, eos, fortios, frr, csr, iosv, nxos, vsrx, vyos, routeros, srlinux, sros, dellos10, routeros7, vmx, iosxr, arubacx, vptx sr: csr, eos, srlinux, sros, vsrx, vmx, vptx srv6: sros vlan: eos, iosv, csr, vyos, dellos10, srlinux, routeros, nxos, frr, cumulus, sros, routeros7, vmx, vsrx, arubacx, vptx vrf: eos, iosv, csr, routeros, dellos10, vyos, cumulus_nvue, nxos, srlinux, frr, cumulus, sros, routeros7, vmx, vsrx, arubacx, vptx vxlan: eos, nxos, vyos, csr, dellos10, srlinux, frr, cumulus, sros, arubacx, vptx ``` -------------------------------- ### Install netlab Python Package Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/virtualbox.md Install the netlab Python package using pip3. Ensure Python3 is already installed. ```bash pip3 install networklab ``` -------------------------------- ### Basic Topology Example Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/create.md A simple topology file defining default device, provider, modules, nodes, and links. ```yaml defaults: device: cumulus provider: clab module: [ ospf ] nodes: [ s1, s2, s3 ] links: [ s1-s2, s2-s3 ] ``` -------------------------------- ### Netlab Libvirt Package Command Help Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/libvirt.md Shows the command-line options and arguments for packaging a virtual machine into a libvirt Vagrant box. This includes specifying the network device and the virtual disk. ```text usage: netlab libvirt package [-h] [-v] [-q] {arubacx,asav,csr,dellos10,eos,iosv,iosxr,nxos,routeros7,vptx,vsrx} disk Package a virtual machine into a libvirt Vagrant box positional arguments: {arubacx,asav,csr,dellos10,eos,iosv,iosxr,nxos,routeros7,vptx,vsrx} Network device you want to create disk Virtual machine disk (vmdk or qcow2) options: -h, --help show this help message and exit -v, --verbose Verbose logging (add multiple flags for increased verbosity) -q, --quiet Report only major errors ``` -------------------------------- ### netlab up Command Usage Source: https://context7.com/ipspace/netlab/llms.txt Demonstrates various ways to use the `netlab up` command to create and start a network lab. Options include specifying topology files, overriding device types and providers, setting topology parameters, performing dry-runs, and reloading configurations. ```bash # Start lab from topology.yml with default settings netlab up # Override device type and provider via CLI netlab up -d frr -p clab topology.yml # Override individual topology parameters netlab up -s ospf.area=10 -s bgp.as=65100 # Start without configuring devices (useful for debugging) netlab up --no-config # Start and reload previously collected device configs netlab up --reload-config config/ # Dry-run: print all commands without executing them netlab up --dry-run # Restart after a server reboot using the saved snapshot netlab up --snapshot # Use faster Ansible strategy (parallel configuration) netlab up --fast-config ``` -------------------------------- ### Install Dell OS10 Ansible Collection Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/dellos10.md Install the necessary Ansible modules for managing Dell OS10 devices. This command uses ansible-galaxy to download and install the collection. ```bash ansible-galaxy collection install dellemc.os10 ``` -------------------------------- ### Start Job Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/api.md Starts a new job on the netlab API server. ```APIDOC ## POST /jobs ### Description Starts a new job. The request body should contain details about the job to be executed. ### Method POST ### Endpoint /jobs ### Request Body - **action** (string) - Required - The action to perform (e.g., up, create, down, collect, status). - **workdir** (string) - Optional - The working directory for the job. - **workspaceRoot** (string) - Optional - The root directory for the workspace. - **topologyPath** (string) - Optional - Path to the topology file. - **topologyUrl** (string) - Optional - URL of the topology file. ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/ipspace/netlab/blob/dev/AGENTS.md Install project dependencies from requirements files and in development mode. ```bash pip3 install -r requirements.txt pip3 install -r requirements-dev.txt pip3 install -e . ``` -------------------------------- ### Install netlab and Dependencies on Ubuntu Source: https://context7.com/ipspace/netlab/llms.txt Installs the netlab Python package and necessary Ubuntu dependencies, including Ansible, libvirt, and containerlab. It also includes steps for verifying the installation and setting up a Python virtual environment. ```bash # Install Python package sudo python3 -m pip install networklab # Install Ubuntu dependencies, Ansible, libvirt (KVM), and containerlab netlab install ubuntu ansible libvirt containerlab # Log out and back in, then verify installation netlab test clab # test containerlab environment netlab test libvirt # test KVM/libvirt environment # Or install into a Python virtual environment (recommended) sudo apt-get install -y python3-pip python3-venv python3 -m venv --system-site-packages ~/mylab source ~/mylab/bin/activate pip3 install networklab netlab install ubuntu containerlab libvirt ansible ``` -------------------------------- ### Test VirtualBox Installation Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/virtualbox.md Test the netlab installation with the virtualbox provider using the netlab test command. ```bash netlab test virtualbox ``` -------------------------------- ### BGP Community Filter Configuration Example Source: https://github.com/ipspace/netlab/blob/dev/docs/dev/config/routing-community.txt Example of BGP community filters defined in the routing.community structure. ```yaml routing.community: customers: type: standard value: - action: permit list: - 65000:100 - 65000:200 - action: deny regexp: ".*" peers: type: standard value: - action: permit path: "65001:.*" ``` -------------------------------- ### Deploy Device Configurations with netlab initial Source: https://context7.com/ipspace/netlab/llms.txt Use `netlab initial` to deploy device configurations to a running lab. It can deploy initial, module, or custom configurations, or a combination. Options allow limiting deployment to specific nodes, outputting to a directory, waiting for readiness, and fast parallel deployment. ```bash # Deploy full initial + module + custom configs netlab initial ``` ```bash # Deploy only initial device configuration (interfaces, IP addresses) netlab initial --initial ``` ```bash # Deploy only module configurations (e.g., OSPF, BGP) netlab initial --module ``` ```bash # Deploy only specific modules netlab initial --module ospf,bgp ``` ```bash # Deploy only custom configuration templates netlab initial --custom ``` ```bash # Limit deployment to specific nodes (supports glob, regex, group names) netlab initial --limit r1,r2 netlab initial --limit eos # all nodes of type eos ``` ```bash # Write config to directory instead of deploying netlab initial --output config/ ``` ```bash # Wait for devices to become ready without configuring netlab initial --ready ``` ```bash # Fast parallel deployment netlab initial --fast ``` -------------------------------- ### Install Development Python Packages Source: https://github.com/ipspace/netlab/blob/dev/docs/install/clone.md If you plan to contribute to the project, install additional Python packages specified in 'requirements-dev.txt'. ```bash python3 -m pip install -r requirements-dev.txt ``` -------------------------------- ### Netlab Create Output Example Source: https://github.com/ipspace/netlab/blob/dev/docs/example/github.md This output shows the files created and mapped by the 'netlab create' command, including containerlab configuration, device configuration files, and Ansible inventory files. It indicates the successful mapping of device daemons and hosts files. ```text ┌──────────────────────────────────────────────────────────────────────────────────┐ │ CREATING configuration files │ └──────────────────────────────────────────────────────────────────────────────────┘ [CREATED] provider configuration file: clab.yml [MAPPED] clab_files/r1/daemons to r1:/etc/frr/daemons (from templates/provider/clab/frr/daemons.j2) [MAPPED] clab_files/r1/hosts to r1:/etc/hosts (from templates/provider/clab/frr/hosts.j2) [MAPPED] clab_files/r2/daemons to r2:/etc/frr/daemons (from templates/provider/clab/frr/daemons.j2) [MAPPED] clab_files/r2/hosts to r2:/etc/hosts (from templates/provider/clab/frr/hosts.j2) [CREATED] transformed topology dump in YAML format in netlab.snapshot.yml [GROUPS] group_vars for all [GROUPS] group_vars for modules [GROUPS] group_vars for frr [HOSTS] host_vars for r1 [HOSTS] host_vars for r2 [CREATED] minimized Ansible inventory hosts.yml [CREATED] Ansible configuration file: ansible.cfg ``` -------------------------------- ### Start Lab with Multilab Plugin via CLI Source: https://github.com/ipspace/netlab/blob/dev/docs/plugins/multilab.md Use the `-s` argument with `netlab up` to set `defaults.multilab.id` and the `--plugin multilab` CLI argument to enable the multilab plugin for dynamic labs. ```default # Start the lab with the multilab plugin # netlab up --plugin multilab -s defaults.multilab.id=12 topology.yml ``` -------------------------------- ### Install eos-downloader Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/ceos.md Install the eos-downloader Python package using pip. This tool can be used to download Arista EOS containers. ```bash pip install eos-downloader ``` -------------------------------- ### netlab initial Command Usage Source: https://github.com/ipspace/netlab/blob/dev/docs/netlab/initial.md This is the main command-line interface for deploying initial device configurations. Use it to specify various deployment options and control the configuration process. ```text usage: netlab initial [-h] [--log] [-v] [-q] [-i] [-n] [-m [MODULE]] [-l LIMIT] [-c] [--ready] [--fast] [-o [OUTPUT]] [--clean] [--dry-run] [--instance INSTANCE] Initial device configurations options: -h, --help show this help message and exit --log Enable basic logging -v, --verbose Verbose logging (add multiple flags for increased verbosity) -q, --quiet Report only major errors -i, --initial Deploy just the initial configuration -n, --normalize Deploy just the normalize configuration -m, --module [MODULE] Deploy module-specific configuration (optionally including a list of modules separated by commas) -l, --limit LIMIT Limit the operation to a subset of nodes -c, --custom Deploy custom configuration templates (specified in "config" group or node attribute) --ready Wait for devices to become ready --fast Use "free" strategy in Ansible playbook for faster configuration deployment -o, --output [OUTPUT] Create a directory with initial configurations instead of deploying them (default output directory: config) --clean Clean up the output directory before creating the initial configuration --dry-run Print actions that would be executed without executing them --instance INSTANCE Specify the lab instance to configure All other arguments are passed directly to ansible-playbook ``` -------------------------------- ### Install Ansible Galaxy Collection for Aruba AOS-CX Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/arubacx.md Install the necessary Ansible modules for Aruba AOS-CX using the ansible-galaxy command. ```bash ansible-galaxy collection install arubanetworks.aoscx ``` -------------------------------- ### Install netlab Python Package Source: https://github.com/ipspace/netlab/blob/dev/docs/install/ubuntu.md Installs the networklab Python package using pip3. This can be done system-wide or within a virtual environment. ```bash sudo python3 -m pip install networklab ``` -------------------------------- ### Install Prerequisite Python Packages Source: https://github.com/ipspace/netlab/blob/dev/docs/install/clone.md Install the required Python packages for netlab development from the 'requirements.txt' file within the netlab directory. ```bash python3 -m pip install -r requirements.txt ``` -------------------------------- ### Show Defaults with Source Information Source: https://context7.com/ipspace/netlab/llms.txt Display default settings along with information about their source file (package, system, user, project). This helps in understanding configuration precedence. ```bash netlab defaults --source device ``` -------------------------------- ### Disable Libvirt Installation Checks Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/libvirt.md Turn off libvirt installation checks by setting the defaults.providers.libvirt.probe parameter to an empty list in the user defaults file. ```default providers.libvirt.probe: [] ``` -------------------------------- ### Arista EOS Initial Setup Commands Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/eos.txt These commands are executed sequentially to prepare the Arista EOS device. They involve logging in, disabling zero-touch, and saving the configuration. ```bash zerotouch disable ``` ```bash wr mem ``` ```bash bash sudo poweroff ``` -------------------------------- ### IS-IS BFD Configuration Example Source: https://github.com/ipspace/netlab/blob/dev/docs/dev/config/bfd.md Example of enabling IPv4 and IPv6 BFD for IS-IS in a topology configuration. Ensure BFD module is added. ```yaml addressing: # Enable IPv6 on links p2p: ipv6: 2001:db8:1::/48 isis: area: 49.0002 bfd: ipv4: True ipv6: True module: [ isis, bfd ] provider: clab nodes: - name: sros_r1 device: sros - name: srlinux_r2 device: srlinux ``` -------------------------------- ### Set Libvirt Batch VM Startup via Environment Variables Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/libvirt.md Use environment variables to configure batch size and interval for starting VMs without modifying lab topology or netlab defaults. ```default $ export NETLAB_PROVIDERS_LIBVIRT_BATCH__SIZE=2 $ export NETLAB_PROVIDERS_LIBVIRT_BATCH__INTERVAL=10 ``` -------------------------------- ### Create and Activate Python Virtual Environment Source: https://github.com/ipspace/netlab/blob/dev/docs/install/ubuntu.md Creates a Python virtual environment in the home directory with system site packages enabled and then activates it. ```bash cd ~ python3 -m venv --system-site-packages mylab source mylab/bin/activate ``` -------------------------------- ### List nftables IP6 Filter Table Source: https://github.com/ipspace/netlab/blob/dev/docs/labs/clab.md Troubleshoot nftables setup by listing the rules in the IP6 filter table. ```bash sudo nft list table ip6 filter ```