Networking Lab

Articles » Building a Network Automation Lab » Networking Lab

You could build a physical or a virtual networking lab, or use a third-part virtual lab like Network To Code labs.

The only requirement when building non-local lab (be it using physical gear or hosted virtual lab) is to have SSH access from your host (and VMs running within it) to the networking devices. When working with physical devices you might want to use out-of-band management network for SSH access in case you badly mess up device configurations.

Still keen on building your own virtual lab? Keep reading…

Selecting Virtual Lab Environment

You can build your virtual networking lab in a number of ways. You could decide to run the whole setup on your laptop (in which case you might be limited by the amount of RAM you can squeeze into it - many networking devices are resource hogs), buy a dedicated server to run the virtual lab on (Intel NUC seems to be an interesting option), or even run the whole thing in the cloud.

Whatever you do, you’ll need a virtualization environment, and images for network device virtual machines. Some attendees of the Building Network Automation Solutions online course decided to use ESXi and create virtual machines from ISO images, others use GNS3 or EVE-NG, Cisco VIRL is an interesting option if you’re focused on Cisco devices and don’t want to get into the hassles of obtaining semi-illegal device images…

Finding or Building Vagrant Boxes

If you decide to build a virtual networking lab on your laptop, consider Vagrant. Building a networking lab with Vagrant has never been easier - Arista, Cumulus and Juniper provide their software in Vagrant box format ready to be deployed within a Vagrant environment:

Cisco is still a bit skittish - IOS-XRv Vagrant box seems to be in private beta and you have to use a pretty convoluted process to create your own Vagrant box from IOSv image or CSR 1000v. To be fair, Juniper is no better when it comes to vMX.

Building Your Own Vagrantfile

Building a Vagrantfile describing your lab topology is the biggest hurdle you’ll face when building a networking lab with Vagrant. Vagrantfile is really Ruby source code and thus a bit hard to create/modify if you’re not at least vaguely familiar with programming languages. Here are two approaches that you might find easier to work with:

I also created several sample topologies to help you get started. They include:

Sidebar