April 23, 2018 in Systems6 minutes
When I got started in networking, my education (like so many network engineers) was all about Cisco. All my networking courses in college, as well as my early networking jobs all used Cisco curricula and equipment, and valued Cisco certifications like the CCNA/CCNP/CCIE above all.
It wasn’t until I had already been in the industry for about three years or so before I even got my hands on a Juniper device, and by that time, my IOS habits had taken root in my muscles, which made the new set/delete style of Junos configurations even more strange. While my Junos experience never came close to exceeding my IOS/NXOS experience, I grew to appreciate some of the subtle advantages that Juniper bakes into its software. However, getting this experience meant I had to work that much harder to get my hands on lab gear to make it more a part of my day-to-day experience.
These days, it’s way easier to get started with Junos. You don’t have to wait for someone to get you some lab gear - you can set up a virtual lab right on your laptop. While there are a few places you can do this, one of the best and most up-to-date is the vQFX Vagrant repository. This repo contains multiple directories for running a virtualized version of Juniper’s QFX switch ranging from the simple single-node deployment, to a full IP fabric. This means we can do a whole lot of Junos learning, right on our laptop, for free.
To get started, you will need some software installed on your machine. To keep things simple, we’ll keep it limited to the bare essentials; the very shortest path to being able to play with Junos:
Once you’ve installed these three pieces of software once, you can then take advantage of the myriad of repositories on the web that contain Vagrant configurations for running virtual network devices - this isn’t limited just to the vQFX environment we’ll use today.
As mentioned before, the vQFX Vagrant repository contains a number of directories with configurations for running various vQFX topologies.
You may also notice there are Ansible playbooks in these directories. These are very useful for building complex configurations using virtual images for deeper learning. However, to keep this post as simple as possible, we’re skipping that part for now. This guide is intended to get you started with a single, vanilla Junos instance as quickly as possible.
Now that Git is installed, we can use it to “clone” the Github repository (downloading it to our local machine) that contains the configurations for running our lab. Load up your favorite terminal application (I use iTerm2 for macOS but you can use whatever works for you) and run the following commands to clone the repo and navigate to the directory that contains a Vagrant environment for a single vQFX instance:
There’s a file in this directory called Vagrantfile
. This contains instructions to Vagrant for downloading and configuring a virtual machine. What this means for us is we don’t need to click through GUIs to make sure our VM is configured correctly. Just run vagrant up --no-provision
and Vagrant will take care of everything for us.
The
--no-provision
flag instructs Vagrant to skip the Ansible provisioning process so we can just get straight to playing with Junos. We’ll follow up this blog post with another one that focuses on the various configurations made possible via Ansible in this repo. You can safely ignore the “Machine not provisioned” message you’ll see after this command; this just means the Ansible process was skipped, and we have a vanilla Junos environment.
No need to go to a website to download an OVA, or register for anything. One command, and Vagrant downloads the image for you, creates a virtual machine, configures it, and boots it up. You’ll end up seeing something like the below output:
Now that we have a vQFX instance running, we can run vagrant ssh
to SSH to the virtual machine and get a handle on the Junos CLI.
Now that you have a working Junos environment to play with, you might want some additional resources to help you explore what’s possible, and to help translate your existing experiences into Junos-land. Here are a a few super helpful (and free!) mini-books you can use. Only a free J-Net login is required, and you can download the PDF:
I hope this was a helpful and simple guide to getting a working Junos environment to play with within a few minutes. It doesn’t make sense in today’s world to wait for lab gear to even get a basic experience with new software, and I hope this helps you kick start your learning. Happy labbing!