How to configure Junos Olive on GNS3 using Qemu

This is a quick guide to get you started learning Junos OS using GNS3.

To get the best performance out of GNS3 I recommend connecting to a remote GNS3 server. You’ll be able to add many more devices and it will be a much more smoother experience simulating devices.

I have found when running devices locally they can be extremely laggy when having a number of devices running simultaneously.

I am running this lab on a click and deploy GNS3-Server on Piggybank Cloud.

Click https://piggybank.cloud to find out more

Step1. Upload your Junos image to your remote server.

You will need a copy of the following ISO:

Olive12.1R1.9

Click the edit TAB and then select preferences.

Under the Qemu heading select Qemu VM’s

GNS3_Junos_1.PNG

Click New and Name your Virtual Machine

GNS3_Junos_2.PNG

Allocate memory – 256 MB

GNS3_Junos_3.PNG

Select telnet as console type

GNS3_Junos_4.PNG

Once you click next at this point you will see image upload to your gns3 remote server.

Step2. Connect your VM’s for testing. 

GNS3_Junos_11.PNG

Create a new GNS3 project and drag your newly created Junos VM’s onto the project space.

GNS3_Junos_9.PNG

Connect the two devices to using     add a link located on the left of the project space side. Connect e0 to e0

Step 3. Start the devices 

Press play and this will start the VM’s

GNS3_Junos_8.PNG

Step 4. Log into the devices 

Enter root as the login and then enter .

GNS3_Junos_10.PNG

You will need to enter the word cli in order to get into what Junos term the Operational Mode (as per below).

This mode displays the current status of the device. In operational
mode, you enter commands to monitor and troubleshoot the Junos OS, devices, and
network connectivity.


login: root

--- JUNOS 12.1R1.9 built 2012-03-24 12:52:33 UTC
root@% cli
root> show interfaces terse
Interface Admin Link Proto Local Remote

Lines omitted for brevity .....

em0 up up>

To get your bearing of what interfaces are connected It is a good idea to run the

show interfaces terse command – this summarises all the connected interfaces of the device.

Other commands which give you more detail are:

show interface extensive
show interface detail
show interface brief

Step 5. Configure a point to point link between the two devices. 

You will need to configure an IP address on both devices. This will need to be in the same the subnet otherwise they will not be able to ping each other. In this example I have used a /30 address.

GNS3_Junos_11.PNG

Network 10.0.0.0 Subnet mask 255.255.255.252

Network = 10.0.0.0

Junos 1 = 10.0.0.1

Junos 2 = 10.0.0.2

Broadcast Address = 10.0.0.3

In order to accomplish any configuration you will need to enter into configuration mode by typing “configure”.

root>configure
Entering configuration mode
[edit]
root#

You will need to set a root password otherwise you will not be able make any configuration changes.

root# set system root-authentication plain-text-password
New password:
Retype new password:
[edit]
root#

The next command is the command to assign Junos 1 it’s IP address on em0

set interfaces em0 unit 0 family inet address 10.0.0.1/30

Junos OS gives you the tools to sanity check and compare the changes that you are about to make. You will need to commit the changes before they take effect.

root# show | compare
[edit system]
+ root-authentication {
+ encrypted-password "$1$4zg4ftLn$TvniHGlsc7MAIGPoPuvnl."; ## SECRET-DATA
+ }
[edit]
+ interfaces {
+ em0 {
+ unit 0 {
+ family inet {
+ address 10.0.0.1/30;
+ }
+ }
+ }
+ }

[edit]
root#

root# commit check
configuration check succeeds

[edit]
root# commit
commit complete

root# quit
Exiting configuration mode

Do the exact same on the other device (Junos 2) using 10.0.0.2/30 address

root# set interfaces em0 unit 0 family inet address 10.0.0.2/30

If you make a mistake you can delete the configuration by adding delete instead of set.

[edit]
root# delete interfaces em0 unit 0 family inet address 10.0.0.2

root# show | compare
[edit interfaces em0 unit 0 family inet]
+ address 10.0.0.2/30;
- address 10.0.0.2/32;

[edit]
root# commit
commit complete

[edit]
root# quit
Exiting configuration mode

Step 6. Ping across the point to point link.

root>ping 10.0.0.2
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=6.775 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.592 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.419 ms
^C
--- 10.0.0.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.419/2.595/6.775/2.956 ms

Hopefully this guide will help you on your way to leaning Junos- Thank you for reading!