Software Installation and Lab Setup

It’s easiest to use the VXLAN/EVPN labs with netlab. While you can use most of them (with reduced functionality) with any other virtual or physical lab environment, we’ll assume you decided to use netlab; if you want to set up your lab in some other way, read the Manual Setup section of the BGP Labs documentation.

Warning

EVPN labs work best with netlab release 25.10 or later (some lab exercises require a more recent netlab release). If you’re using an earlier release, please upgrade with pip3 install --upgrade networklab.

Select the Network Devices You Will Work With

While I usually recommend FRRouting as the simplest-to-deploy network device, FRRouting does not include data-plane VLAN, VXLAN, or anycast gateway configuration. Configuring underlying Linux devices is too complex for an entry-level VXLAN/EVPN exercise; you’ll be better off using one of the other platforms for which we implemented VXLAN and EVPN functionality.

You can run Arista EOS in all netlab-supported virtualization environments (libvirt virtual machines or Docker containers), and if you want to start practicing VXLAN and EVPN with minimum hassle, consider using Arista EOS for all lab devices. While most network devices require an x86 CPU, you can run Arista cEOS or Nokia SR Linux containers on MacBooks with Apple silicon.

Tip

If you plan to run the labs in free GitHub Codespaces, you MUST use container-based network devices like Arista cEOS or Nokia SR Linux. Furthermore, the device cannot rely on the Linux VXLAN kernel module (FRRouting and VyOS do).

Select the Additional Devices in Your Lab

Some labs use additional switches – preconfigured devices with which your switches exchange EVPN routes. You won’t configure those devices, but you might have to log into them and execute show commands.

The default setup uses Arista EOS for additional switches; we also generated all the show printouts with Arista EOS. Alternatively, you can use any other device for which we implemented basic VXLAN and EVPN functionality. Additional limitations (should they exist) are listed under the Device Requirements section of individual lab exercises.

Select the Virtualization Environment

Now that you know which network device to use, check which virtualization environment you can use. Running VXLAN/EVPN labs in a free GitHub Codespace is an excellent starting point, but if you decide to build your own infrastructure, containerlab is easier to set up than libvirt.

If you want to run the labs on your laptop (including Macs with Apple silicon), create a Ubuntu VM to run netlab. You could also run them in a VM in a private or public cloud or invest in a tiny brick of densely packed silicon (example).

Now for a few gotchas:

  • Your hardware and virtualization software (for example, VirtualBox or VMware Fusion) must support nested virtualization if you want to run virtual machines on that Ubuntu VM.
  • You don’t need nested virtualization to run Docker containers unless you’re using containers that run virtual machines within a container (the vrnetlab approach).

Software Installation

Based on the choices you made, you’ll find the installation instructions in one of these documents:

Once you have completed the software installation, you have to deal with the stupidities of downloading and installing network device images (libvirt, containers) unless you decided to use Nokia SR Linux or Vyos.

I would love to simplify the process, but the networking vendors refuse to play along. Even worse, their licenses prohibit me from downloading the images and creating a packaged VM with preinstalled network devices for you1. Fortunately, you only have to go through this colossal waste of time once.

Setting Up the Labs

We finally got to the fun part – setting up the labs. If you’re not using GitHub Codespaces:

  • Select a directory where you want to have the VXLAN/EVPN labs
  • Clone the evpn GitHub repository with git clone https://github.com/bgplab/evpn.git. GitHub UI gives you other options in the green Code button, including Download ZIP

After you get a local copy of the repository:

  • Change the directory to the top directory of the cloned repository2.
  • Verify the current project defaults with the netlab defaults --project command:
$ netlab defaults --project
device = eos (project)
groups.external.device = eos (project)
provider = clab (project)
  • If needed, change the project defaults to match your environment with the netlab defaults --project _setting_=_value_ command or edit the defaults.yml file with a text editor like vi or nano. For example, use these commands to change your devices to Cisco Nexus OS running as virtual machines3:
$ netlab defaults --project device=nxos
The default setting device is already set in project defaults
Do you want to change that setting in project defaults [y/n]: y
device set to nxos in /home/user/evpn/defaults.yml

$ netlab defaults --project provider=libvirt
The default setting provider is already set in netlab,project defaults
Do you want to change that setting in project defaults [y/n]: y
provider set to libvirt in /home/user/evpn/defaults.yml
  • In a terminal window, change the current directory to one of the lab directories (for example, basic/1-single), and execute netlab up.
  • Wait for the lab to start and use netlab connect to connect to individual lab devices
  • Have fun.
  • When you’re done, collect the device configurations with netlab collect (if you want to save them) and shut down the lab with netlab down
  • Change the current directory to another lab directory and repeat.
  • Once you run out of lab exercises, create a new one and contribute it with a pull request ;)

  1. I’m not going to pay a lawyer to read their boilerplate stuff, and I’m definitely not going to rely on my amateur understanding of US copyright law. 

  2. evpn if you used the simple version of the git clone command 

  3. Assuming you built the Nexus OS Vagrant box first