Importing vQFX to GNS3

Post Written by
Stefan Belić
Last modified on July 2nd, 2020 at 10:03 am

Introduction

This blog post is intended as a foundation, that will help you getting started creating bigger and more complex topologies in GNS3, using Juniper vQFX switch(es). We will put together a simple topology with two vQFX switches, configure interfaces and test connectivity between them. Details about environment and software used: - Host machine running Ubuntu 16.04 (other versions of Ubuntu will do, as well as most Linux distros. For Windows hosts I recommend GNS3 server, details are at the bottom of the post). - GNS3 1.5.3 (this is latest stable version to this date). - vQFX Routing Engine (RE) Virtual machine disk file (.vmdk) available through Juniper Customer Care (you may ask for a free trial following the link from the bottom of the post). We'll not need Packet forwarding engine (PFE) virtual machine disk for this exercise.

Importing vQFX to GNS3

Full vQFX is composed of RE (Routing engine) and PFE (packet forwarding engine), two separate VMs connected via em1 port. These two create a realistic virtual environment similar to the real QFX. Without PFE all routing will be performed by host OS, in our case routing will be done by Kernel. RE only, also known as light vQFX will be sufficient for what are we doing today. Lets first create Routing Engine VM using QEMU Start GNS3, and from Devices toolbar select Switches (1), and then New appliance template (2). 

 We will be adding Qemu virtual machine this time. Select that option and hit Ok. 

 Let's name it vQFX-RE. 

 It's recommended to use 1024 MB, but the machine will work with 512 MB of RAM. If you intend to use full vQFX (RE+PFE), 512MB will be insufficient. 

 Next, choose New Image, then browse and find vqfx10k-re-15.1X53-D60.vmdk (previously obtained from Juniper). Hit finish. 

 In the General settings tab set Category to be Switch(es), and you may now compare end result with our machine. Unless you import .svg file as a Symbol for this device, it will have a default one. You can download Visio stencils from Juniper, and export as .sgv. 

 In the Network tab, set adapter count to 8, and you may change naming to Eth if you desire. You may select more adapters if needed, this is not needed in our case. An important thing to mention is that Eth0 is used for OOB management, Eth1 to communicate with PFE (that we will not be adding at the moment) and finally, Eth2 is used as a management port. So you'll end up with 5 interfaces you can use (em3-em7). 

 Now that you have configured the template device, let's make a dead-simple topology with 2 vQFX-RE, connect them and assign IPs and we'll test connectivity. From the devices toolbar, under the Switches section, we'll select our vQFX-RE and drag two of them to our Workspace. 

 And we'll add a link between them (1), connect them on ports Eth3 (as said before we cannot use ports Eth0 - Eth2) after they are connected we'll click again on Add a link button to stop adding links. And we can click on Show/Hide link labels (2). 

 Let's start up both machines (1) and enter console (2). 

 From console log in to first vQFX using username: root and password: Juniper, then enter command line interface using 'cli' command. Then enter configuration mode, and configure hostname to vqfx1 and IP 10.0.0.1/24 on interface em3 (corresponding to the interface Eth3), following steps below.

---
login: root
Password:
--- JUNOS 15.1X53-D60.4 built 2016-08-26 23:07:01 UTC
root@vqfx-re:RE:0% cli
{master:0}
root@vqfx-re> configure 
Entering configuration mode
{master:0}[edit]
root@vqfx-re# set system host-name vqfx1 
{master:0}[edit]
root@vqfx-re# set interfaces em3 unit 0 family inet address 10.0.0.1/24
{master:0}[edit]
root@vqfx-re# commit 
configuration check succeeds
commit complete
{master:0}[edit]
root@vqfx1#
---

We'll do the similar on second device.

---
login: root
Password:
--- JUNOS 15.1X53-D60.4 built 2016-08-26 23:07:01 UTC
root@vqfx-re:RE:0% 
root@vqfx-re:RE:0% cli
{master:0}
root@vqfx-re> configure 
Entering configuration mode
root@vqfx-re# set system host-name vqfx2 
{master:0}[edit]
root@vqfx-re# set interfaces em3 unit 0 family inet address 10.0.0.2/24
{master:0}[edit]
root@vqfx-re# commit 
configuration check succeeds
commit complete
{master:0}[edit]
root@vqfx2# 
---

Let's test connectivitiy from vqfx1 to vqfx2. Exit configuration mode and ping the neighbor.

---
root@vqfx1# exit 
Exiting configuration mode
{master:0}
root@vqfx1> ping 10.0.0.2 count 4  
PING 10.0.0.2 (10.0.0.2): 56 data bytes
64 bytes from 10.0.0.2: icmp_seq=0 ttl=64 time=0.961 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.924 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=1.405 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=1.953 ms
--- 10.0.0.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.924/1.311/1.953/0.416 ms
{master:0}
root@vqfx1> 
---

We now confirmed connectivity between devices, and that concludes todays excessive. You can go ahead and create your own topology and testing it.

Breakdown

As seen today we imported light vQFX (only RE) to GNS3, using virtual disk provided by Juniper, and made a demonstration with simple topology with 2 light vQFX. You may also import PFE, assigning it 2 interfaces and 1.5 - 2 GB of memory (note that RE will need to have 1GB of memory for this to work). Then connecting it to RE via interface em1 (Eth1) on both devices, you'll end up with full vQFX and routing will be done by PFE as it would on a real device. To connect multiple full vQFX instances you will make connections between REs, on same interfaces as we did in topology shown here. Full vQFX instances are a lot more demanding in terms of needed resources from host machine, hence you'll need stronger hardware to support it, and in return you'll make more realistic topologies, that are closer to a real world scenarios.

Additional reading:

Juniper QFX series details - http://www.juniper.net/us/en/products-services/switching/qfx-series/ Getting started with GNS3 - https://www.gns3.com/software Juniper vQFX trial - https://www.juniper.net/us/en/dm/free-vqfx-trial/

Contact Us

Fill out the enquiry form and we'll get back to you as soon as possible.