Virtual networking labs built with containerlab, configured with homer.
This repo contains various virtual networking labs, defined as containerlab topology files and homer device data/template folders.
The files for each lab are saved in separate directories under 'labs' in this repo. Users can change to that directory, instantiate the virtual devices with 'clab deploy', then configure them with homer.
The following labs are currently available.
Name | Description |
---|---|
evpnlab | Basic Clos with vQFX running EVPN/VXLAN |
eqiadlab | Same as evpnlab with two vMX added to represent core routers |
esilab | Same as eqiadlab but with automation for ESI-LAG off two leaf switches |
filterlab | Simple cRPD lab without automation to test prefix-list behaviour |
codfw_migrate | Lab to test migration of row-wide vlan / hosts from virtual-chassis to EVPN clos |
Containerlab is a framework which allows us to spin up virtual network topologies with docker containers. A YAML file is used to define the various nodes to deploy, and the links between them.
To instantiate a lab we need the clab topology file, as well as a working docker subsystem on the local host. Container images referenced in the clab file should be available locally, and show up when docker images
is run.
To sucessfully run all the labs the following images are required, although for a given lab you may not need to have them all.
Docker repo name | Docker tag | Description | VM Based |
---|---|---|---|
vrnetlab/vr-vmx | latest | Juniper vMX image built with vrnetlab | ✔️ |
vrnetlab/vr-vqfx | latest | Juniper vQFX image built with vrnetlab | ✔️ |
crpd | latest | Juniper cRPD containerized routing protocol daemon | |
debian | clab | Debian Linux container to simulate servers |
Many of the images are built with vrnetlab, a tool to build container images that internally run qemu VMs of network appliances. This allows us to deploy VM-based network devices, such as Juniper vMX and vQFX, from docker/containerlab.
Helper scripts are included to ease running the labs.
Name | Description |
---|---|
add_fqdn_hosts.py | Adds entries in /etc/hosts for all lab nodes, stripping the clab prefix so we can use short names (like 'leaf1') to connect. |
add_junos_user.py | Adds a new JunOS user to all discovered vQFX/vMX nodes, with a SSH public key for authentication. Run after deploying a lab to allow homer to connect and add the remaining config. |
save_junos_configs.py | Saves JunOS configurations from discovered lab nodes. |
Individual labs may also include specific helper-scripts, for instance to configure Linux networking in containers where required.
Each of the directories under 'labs' typically contain the following:
VM-based labs are resource-heavy, given the number of VMs in total that are spun up. Depeneding on the lab up to 64GB of RAM may be needed.
To get your system set up to run the labs see Getting Started.