GNS3 beta install on Ubuntu 14.04 LTS

gns3_icon_256x256In this post I will be running through the installation of GNS3 beta on a clean install of Ubuntu 14.04 LTS.

I am using the Ubuntu Gnome 14.04 LTS distribution, however I have also tested it on a clean install of the standard Ubuntu 14.04 LTS with unity

Step 1: Set system Hostname and System ID:

As you may have seen in various posts, it can be a bit tricky to get IOU working for GNS3.

The easiest way to get around this is to use a default iourc.txt file that has been configured for a specific hostname and host id.

Firstly, all the steps in this post will be run as root so we need to change our user to root:

To set the hostname, if you didn’t set it while installing, edit the /etc/hostname to use gns3-iouvm as the hostname:

You need to restart your system for the changes made to /etc/hostname to take effect, or you can change the hostname to gns3-iouvm for the current session using the following:

You will still need to exit all your terminal sessions and open them again for this to take effect, but it is still quicker than a reboot on certain systems.

Confirm that the correct hostname is present in the /etc/hostname file:

Now that we have changed the hostname of the system we must change the host ID to match the host ID that we will use in the iourc.txt file later on in the installation.

Now create a directory on your system that you will use for all the installation steps. In my case created a GNS3 directory in the home folder of the root user:

Next create a file called sethostid.sh or something similar and copy the bash script bellow into the file:

Confirm the current host ID:

Add permission to execute the sethostid.sh script:

Now we will execute the bash script that we created to change the host ID:

Confirm that the host id has been changed:

Step 2: Install the required dependencies for GNS3 and IOU

Now that we have the hostname and host ID configured, we can start to get the system ready to install GNS3 and IOU. To get the system ready we first need to install the required dependencies.

Dependencies are programs that are required in order for the application you are installing to run correctly. These can be compliers, library files or even certain other applications.

In the case of installing GNS3 the main dependencies are:

  • build-essential
  • libelf-dev
  • uuid-dev
  • libpcap-dev
  • Python version 3.3 or above
  • pip and setuptools, we will install this from source
  • PyQt
  • pyzmq, will use pip to install
  • tornado, will use pip to install
  • python3-netifaces, I couldn’t install this using pip so used apt-get install instead
  • Dynamips version 0.2.11, we install this before we install GNS3

Dependencies to install Dynamips:

  • git
  • cmake

For installing IOU the following dependencies are required:

  • iniparser, will need to be installed from source
  • bison
  • Flex
  • Fix the missing library for 64bit systems

To install the dependencies execute the following apt-get install statement:

To install pip and setuptools get and install the source files:

Once we have pip installed we need to use it to get some prerequisite python modules for GNS3:

To fix the missing library for IOU on 64bit systems execute the following:

We can now create a symbolic link to the missing library:

To install iniparser which is a dependency for IOU we need to grab the source and compile it:

Step 3: Install Dynamips

Either download and extract a source tarball from the releases page or clone the Git repository using:

Now we need to generate the Make files required for compiling Dynamips:

To build and install Dynamips run:

Now we need to test dynamips to ensure it is working correctly:

Step 4: Install GNS3 Server

Next we need to download and install the latest GNS3 Server version, at the time of writing it is Beta 2 of V1.0:

Step 5: Install GNS3 GUI

Next we need to download and install the latest GNS3 GUI version, at the time of writing it is Beta 2 of V1.0:

Step 6: Install IOU

Next we need to download and install IOU, this will install the latest version of IOU that has support for using wireshark captures on the IOU interfaces:

The last thing we have to do is create the license file that we will use when setting up IOU on GNS3. To do this create a file called iourc.txt using vi or nana in your GNS3 folder:

Add the following to the file:

We can now exit from using the root user as we have completed the installation of GNS3 and IOU:

Step 7: Create an application launcher for GNS3

Unless you want to run GNS3 from the CLI each time you use it, it is worthwhile setting up an application launcher that you can use to launch GNS3 from the desktop, dock or Unity.

First we need to install the gnome panel and gksu so we can run GNS3 as root:

Next we will use the gnome-desktop-item-edit command to create an application launcher in the /usr/share/applications/ directory:

Once you execute the above command the Create Launcher window will pop up:

Create Launcher_003

    1. Select an Icon to use for GNS3.
    2. Select the type of launcher, In this case we will be using “Application”.
    3. Give the launcher a name, in this case GNS3.
    4. This is the command we will run when clicking on the launcher, “gksu gns3” will run GNS3 as root.

Click ok and the luncher will be created. You can now save this to your desktop, dock or run from unity.

Ubuntu 14.04 desktop [Running] - Oracle VM VirtualBox_004

Step 8: Setup GNS3

We are now ready to setup GNS3 to use Dynamips and IOU. Click close on the Bug Fixes screen that pops up when you first run GNS3:

Screenshot from 2014-09-23 22:37:44

Enter the preferences by clicking edit->preferences.

Under the general preferences select where you want your GNS3 projects to be saved, as well as the folder where your binary images (IOS images) are saved:

Preferences_008

Under the Dynamips preferences ensure that the the path to Dynamips is /usr/local/bin/dynamips:

Preferences_009

Next we need to specify the IOS images that we will be using for Dynamips. You can use your Cisco CCO login, if you have one, to download the images or you can scour the net to find the IOS images you need. I will not provide any IOS or IOU images so please don’t ask.

Under the IOS routers preferences select the image you want to save using the icon next to the IOS path line. This will open your file manager to select a image. Browse to the image you want to install and click open. After you have selected the image click save and the Image will be saved to your list of IOS images.

Preferences_010

Selection_011

Preferences_012

Next we need to set the path of our iourc.txt file we created earlier. We do this under the IOS on Unix preferences. If you do not set this path, or are using the wrong iourc.txt file you will not be able to start any IOU devices later on.

Configure the path to your iourc.txt file under the Path to IOURC section:

Preferences_014

Next we will configure the IOU images under the IOU devices preference menu, this is done much the same as we did for the IOS devices earlier:

Preferences_015

Selection_016

Preferences_017

Once you have added all your IOU devices and saved them, click apply to save all the previous settings.

That’s, GNS3 is now ready to run any combination of IOU and IOS devices to lab out those examples for your CCNA, CNNP or CCIE studies.

ICND2 CH6 HSRP.gns3 — GNS3_018

Thanks to Willdawg, CiscoStud and Fazle Arefins as I used their posts as the basis for this post:

https://github.com/GNS3/
http://forum.gns3.net/topic9030.html
http://forum.gns3.net/topic9106.html
http://fazlearefin.blogspot.co.uk/2013_03_01_archive.html

FacebookTwitterGoogle+Share

Leave a Reply