This is an old revision of the document!
Netlab is an great opensource project for easy deployment of network labs, initiated and managed by Ivan Pepelnjak. Here's just some of my notes about installation and operation:
The below process is for bare metal server in equinix metal but is easily extrapolatable to other bare metal env.
! Be sure you create the instance with Ubuntu LTS ! Manually scp image ! ! Via 'user data' #!/bin/bash apt remove needrestart -y apt-get update -y apt install python3-pip -y python3 -m pip install netsim-tools ! ! APPLY THIS MANUALLY netlab install ubuntu ansible libvirt -y usermod -a -G libvirt $USER echo 'user = "root"' >> /etc/libvirt/qemu.conf echo 'group = "root"' >> /etc/libvirt/qemu.conf service libvirtd restart netlab libvirt package eos vEOS-lab-4.28.0F.vmdk ! Manually: follow recipe here and box is automatically added: LINK AT THE BOTTOM! git clone https://github.com/jotasantos/netsim-labs.git git clone git@github.com:jotasantos/ansible.git ! ! create topology file.. netlab up
https://softbackbone.duckdns.org/doku.php?id=virtualization:containerlab:veosinitial
https://softbackbone.duckdns.org/doku.php?id=virtualization:containerlab:csr100vinstall
LIFECYCLE NETLAB PROJECT - LIBVIRT ! First use
netlab up !! work on the lab netlab collect netlab down
! here I come back to work on the lab
vagrant up netlab initial ansible-playbook -i hosts.yml pusheos.yml !! work in the lab netlab collect git add,commit.push netlab down
TROUBLESHOOTING
virsh net-dhcp-leases --network vagrant-libvirt # this is to see the dhcp leases for given by libvirt for management cat /var/lib/libvirt/dnsmasq/virbr0.* vim /etc/libvirt/qemu/networks/vagrant-libvirt.xml
Now manage Cumulus-VX instances:
netsim multicast lab
sudo vtysh / sh run / wr sudo vi /etc/frr/daemons # enable pim sudo systemctl restart frr sudo vtysh ! paste the saved configuration (twice, for ospf) wr interface swp1 ip pim interface swp2 ip pim interface swp3 ip pim interface swp4 ip pim exit wr
NEXUS
# Download image from cisco: site nexus9300v.9.3.5.box vagrant box add nexus9300v.9.3.5.box --name cisco/nexus9300v vagrant mutate cisco/nexus9300v libvirt