Introduction

This blog covers how to install Juniper boxes for use with Vagrant. This post assumes that you already have a working vagrant install.

Plugins

Firstly install the Juniper plugins to enable Vagrant to communicate to the boxes correctly.


vagrant plugin install vagrant-host-shell vagrant-junos

# output
Installing the 'vagrant-host-shell' plugin. This can take a few minutes...
Installed the plugin 'vagrant-host-shell (0.0.4)'!
Installing the 'vagrant-junos' plugin. This can take a few minutes...
Installed the plugin 'vagrant-junos (0.2.1)'!
            

Box Install

Next install the Juniper boxes that are hosted on vagrant cloud. There are currently four Juniper boxes available.

  • juniper/ffp-12.1X47-D15.4-packetmode SRX firewall in packet mode
  • juniper/ffp-12.1X47-D15.4 SRX firewall
  • juniper/vqfx10k-re QFX 10k Routing Engine
  • juniper/vqfx10k-pfe QFX 10k Packet Forwarding Engine

The vQFX10k has two modes; minimal with just the routing engine and full with both the routing and packet forwarding engines.

Use the vagrant box add juniper/<box-name> to add Juniper boxes.


# Example
vagrant box add juniper/vqfx10k-re

# output
==> box: Loading metadata for box 'juniper/vqfx10k-re'
    box: URL: https://vagrantcloud.com/juniper/vqfx10k-re
==> box: Adding box 'juniper/vqfx10k-re' (v0.2.0) for provider: virtualbox
    box: Downloading: https://app.vagrantup.com/juniper/boxes/vqfx10k-re/versions/0.2.0/providers/virtualbox.box
==> box: Successfully added box 'juniper/vqfx10k-re' (v0.2.0) for 'virtualbox'!
            

Once the box(s) are downloaded you can start using them in your Vagrant environments. Check which boxes are installed with the vagrant box list command.


vagrant box list

# output
CumulusCommunity/cumulus-vx          (virtualbox, 3.3.2)
centos/7                             (virtualbox, 1705.02)
juniper/ffp-12.1X47-D15.4            (virtualbox, 0.5.0)
juniper/ffp-12.1X47-D15.4-packetmode (virtualbox, 0.5.0)
juniper/vqfx10k-pfe                  (virtualbox, 0.1.0)
juniper/vqfx10k-re                   (virtualbox, 0.2.0)
            

Sample Vagrant Files

The following github repos contain sample Vagrantfiles.

vqfx10k
vsrx

Summary

If you followed along you will have Juniper Vagrant boxes installed and ready for use. Check out the sample Vagrantfiles in the links above to build out some environments with Juniper and Vagrant.

Links

https://www.vagrantup.com/
https://app.vagrantup.com/juniper/
https://github.com/Juniper/vqfx10k-vagrant
https://github.com/JNPRAutomate/vagrant-junos






















Published: 2017-07-09