Deploying and Using vJunos in a Bare Metal EVE-NG server¶
Shalini Mukherjee - 05/11/2023
vJunos-switch and vJunosEvolved deployed on EVE-NG and integrated with Juniper Apstra to build a complete Data Center fabric. Article co-written with Aninda Chatterjee and Shalini Mukherjee, TME in Juniper Networks Cloud-Ready Data Center team.
Introduction¶
In this article, we will look at how vJunos-switch and vJunosEvolved is deployed on a bare metal install of EVE-NG. This deployment will then be used to integrate with Juniper Apstra and build a complete Data Center fabric.
We'll start with instructions on how to deploy EVE-NG as a bare metal install on an Ubuntu server and run through the EVE-NG installation itself as an example of how this can be done. Once EVE-NG is setup, we'll show how vJunos-switch and vJunosEvolved can be added to EVE-NG as a deployable node and the EVE-NG template that is needed for this to work.
Finally, we'll wrap this up by onboarding vJunos-switch and vJunosEvolved devices in Juniper Apstra and building a simple Data Center fabric to show that these devices work seamlessly with Apstra as well.
Note that another post on vJunos installation on KVM has been published too.
What is EVE-NG and vJunos-switch/vJunosEvolved?¶
EVE-NG is a popular network emulation software that offers multivendor support. It allows a user to build network topologies on a blank canvas, providing means to test and simulate various network technologies and features across different network operating systems and products.
EVE-NG has various deployment options:
- as a VM on top of a hypervisor like ESXi
- over a bare metal server
- cloud deployment options (like GCP)
vJunos-switch and vJunosEvolved are two new virtual software offerings from Juniper Networks. vJunos-switch emulates the software functionality of Junos OS while vJunosEvolved emulates the software functionality of Junos EVO.
Since vJunos-switch is only supported on a bare metal install of EVE-NG, that is the deployment option we'll be going through in this blog post.
Installing EVE-NG on a Bare Metal Ubuntu Server¶
EVE-NG comes in two flavors: a community (free) edition, and a professional (paid) edition. We'll take a look at how to do a bare metal EVE-NG community edition install in this post, since that is more complicated. The .iso file for the community edition can be downloaded from the EVE-NG website - https://www.eve-ng.net/index.php/download/
Once this file is downloaded, mount the .iso file on your local machine. For example, on a MAC, you can simply double click the file to mount it. This should create a new drive, whose contents can be accessed now:
Here, should see a folder titled 'server'. This has a shell script that installs EVE-NG as a bare metal install. The script is as follows:
On your Ubuntu 20.04 server, simply run through these steps one by one. Once you reboot (the final step of the script), and the server comes back online, you should be able to SSH into the device with the default credentials of root/eve.
Once you've logged in, the actual EVE-NG installation is kicked off -- this includes providing a hostname, IP address and gateway, primary and secondary DNS servers, NTP servers and so on. When this finishes, EVE-NG should be up and running, and accessible via both the CLI and UI (default credentials for UI login is admin/eve).
To deploy the professional version of EVE-NG, similar steps can be followed. Alternatively, the .iso file can be mounted directly as a virtual drive and you can boot from it to start both the Ubuntu and the EVE-NG installation together.
Deploying vJunos-switch and vJunosEvolved in EVE-NG¶
EVE-NG uses templates to boot various operating systems it supports -- these templates are pre-built and come packaged within the installation of EVE-NG. They contain instructions on how to boot the devices, including how many interfaces to assign to the device, the kind of CPU/memory the device needs and so on.
The templates are stored in the path '/opt/unetlab/html/templates/intel/' and are written in YAML format, as seen below:
Since vJunos-switch and vJunosEvolved are entirely new offerings, there is no pre-built template for this. The template must be created manually. The following templates can be used for vJunos-switch and vJunosEvolved:
vJunosEvolved:
vJunos-switch:
The next step is to create a new directory for this device and copy the image to this directory. We'll create a directory with the prefix 'vJunosEVO' and 'vJunos-switch' followed by a suffix which specifies the version of the software image. The prefix naming convention is important -- it must match the name of the template that exists for the device. EVE-NG uses this name to determine which template must be used to boot the device (hence, the need for them to match).
The images (and their directories) are stored under '/opt/unetlab/addons/qemu/'.
and
Once the image is copied into the folder, it must be renamed to 'virtioa.qcow2' as per EVE-NGs naming convention. Finally, EVE-NG requires you to fix some permissions to use the image - they have a pre-built script for this which can be invoked using '/opt/unetlab/wrappers/unl_wrapper -a fixpermissions' as seen below:
and
On the EVE-NG UI, you should see 'vJunosEvolved' and 'vJunos-switch' as a device available to use and deploy:
vJunosEvolved:

vJunos-switch:

These devices can now be deployed and interconnected. To interconnect two devices, simply click on the orange icon seen when you hover over a node, as seen below:

Once clicked, you can drag it to the destination node and let the connector go, which then gives you a pop-up to choose which interface is being connected on each side, like below:

To demonstrate the use of vJunos-switch and vJunosEvolved, we've built the following topology on EVE-NG, respectively:
For vJunosEvolved:

The topology is a typical 3-stage Clos fabric, with two spines and three leafs. Two leafs (leaf1 and leaf2) are ESI peers and connect down to the same host, h1. The end goal is to manage these devices via Juniper Apstra and use Apstra to deploy all the necessary configuration to build a fabric and provide reachability between hosts h1 and h2, which are in the same subnet.
vJunos-switch:

This topology also is with two spines and 3 leafs. Two leafs (leaf2 and leaf3) are ESI peers and connect down to the same host, h2.
Deploying Juniper Apstra in EVE-NG¶
As seen in the topology above, we also have Juniper Apstra deployed within EVE-NG itself. For the sake of completeness, we'll also document how this is done.
The Juniper Apstra KVM image can be downloaded from the Juniper software downloads page - https://support.juniper.net/support/downloads/
The image is zipped with an extension of gz. Once unzipped, move the file to a folder created with the EVE-NG naming convention for Apstra -- the directory must start with the prefix 'aos' and you can include the Apstra version as a suffix for easy identification of the image version. For example, we have created a folder named 'aos-4.1.2-269' and the image is under that. The image is finally renamed to 'hda.qcow2':
The following template can be used for Apstra:
The Apstra server can now be started, and some basic bootstrapping is needed -- the Apstra service needs to be started, along with setting a password for the CLI and UI. Apstra allows you to pull an IP address via DHCP or set one up manually as well.
Deploying a vJunosEvolved and vJunos-switch based fabric in Juniper Apstra¶
Now that we have all our pieces in EVE-NG, we can start to build the fabric. Nodes can be started from the EVE-NG UI by right-clicking on them and simply choosing 'Start'. Once the spines and the leafs are assigned IP addresses via DHCP, we can onboard them into Apstra.
Since the current version of Apstra has not been updated with the vJunos-switch or vJunosEvolved versions, we need to make some adjustments. We will create a new 'Device Profile' for vJunosEvolved by simply cloning the Juniper PTX10001-36MR device profile and for vJunos-switch, we'll clone the Juniper vEX device profile.
For vJunosEvolved:

For vJunos-switch:

The important change in these device profiles is to extend selector to include version '23' like below:
For vJunos-switch:

For vJunosEvolved:

The next step is to create a 'Logical Device' and 'Interface Map' in Apstra for these devices. The Logical Device simply creates the port grouping as below:
For vJunos-switch:

For vJunosEvolved:

The Interface Map creates the appropriate transformation (naming convention for interfaces, speed, port breakouts and so on) and glues together a logical device and a device profile:
For vJunos-switch:

For vJunosEvolved:

Once all of this is configured, we can start building our racks and templates. The template is finally fed into a blueprint, an example of which we've deployed below:
For vJunos-switch:

This blueprint includes host h1 which is single attached to leaf1 and host h2 which is dual homed to leaf2 and leaf3.
For vJunosEvolved:

This blueprint includes host h1 which is dual-homed to leaf1 and leaf2 and host h2 which is attached to leaf3, configuration for which is fully automated and deployed by Apstra (ESI LAG on the leafs).
For vJunosEvolved, we need a specific knob for tunnel termination ('set forwarding-options tunnel-termination') for EVPN VXLAN from release 23.1 onwards. In Apstra, this is created via a configlet and imported into to the leafs.
The configlet can be created as follows:

To import the configlet into the blueprint and apply it to the leafs, the following is done:

At the end of this, we have our inet (IPv4) as well as the BGP EVPN peering up between the leafs and spines. For the sake of brevity, outputs are shown from the vJunosEvolved deployment only:
LACP is up between leaf2/leaf3 and host h2:
The hosts can ping each other as well:
Shutting down vJunos-switch in EVE-NG¶
EVE-NG offers multiple ways to shut down a node -- this includes a graceful shutdown, a poweroff (not graceful) and a hibernate option. These options can be seen below when right-clicking on a node and clicking on 'Stop' (EVE-NG Professional shown below):

It is important to shut down the device gracefully (using the 'Shutdown' option). A power off (which is not graceful) has the potential of corruption the disk, rendering the device unusable. In EVE-NG community edition, issue a 'request system poweroff' prior to shutting down the node via the UI, since these options are not available in the UI itself in this edition.
Summary¶
Through this post, we were able to demonstrate a working deployment of Juniper's new virtual offering, vJunos-switch and vJunosEvolved, in EVE-NG and integrate it with Juniper Apstra to deploy a Data Center fabric.
Useful links¶
- vJunos-switch: https://support.juniper.net/support/downloads/?p=vjunos
- vJunosEvolved: https://support.juniper.net/support/downloads/?p=vjunos-evolved
- EVE-NG home page: https://www.eve-ng.net/
- Juniper Apstra documentation - https://www.juniper.net/documentation/product/us/en/apstra/
- vJunos Installation on KVM: https://juniper.github.io/techposts/vjunos-deployment-on-kvm/article
Acknowledgments¶
We would like to thank TME Manager Ridha Hamidi, Product Manager Yogesh Kumar, and the entire Juniper engineering staff, led by Art Stine and Kaveh Moezzi, behind this product for their guidance and help. Thanks to Christian Scholz for additional feedback provided after the publication.