GNS3 and IOU remote server install on Centos 6.5

I recently got a new laptop at work. It has one major downside, it only has 4GB of RAM which is soldered straight into the motherboard and therefore can not be upgraded. Also 500MB of the RAM is reserved for the GPU, so I only have about 3.5GB of useabe RAM. This is fine for running my day to day applications for work, but does not leave much wiggle room for running GNS3.

Luckily I work for a hosting company and we have quite a few servers lying around doing nothing. I managed to get hold of a decommisioned server with 2 quad core processors and 48GB of RAM, perfect to run a remote GNS3 server on. We mainly use Centos and since it is not an OS I am familiar with (I mainly use Ubuntu) I decided to give it a go and try something new. In this post I will run through the steps I went through to get GNS3 sevrer running on Centos as well as setting up the GNS3 GUI to connect to the remote server.

Install the dependencies for GNS3

The main dependencies for GNS3 are:

Python version 3.3 or above

pip & setuptools

pyzmq

tornado

netifaces (optional)

The dependancies for IOU are:

iniparser, will need to be installed from source

Fix the missing library for 64bit systems

Install Python 3.3

Centos 6 ships with Python 2.6 by default. We cant simply install python 3.3 and replace python2.6 as certain applications (such as yum) will break if we change the default version of python. To work around this limitation we need to install python 3.3 in a non-standard (such as /usr/local) so that python 2.6 and python 3.3 can live side-by-side.

First we need to install the build dependecies for installing python 3.3, these include development tools and extra libraries that are used by python:

You should probably compile Python as a shared library. All modern Linux distros ship with Python compiled as a shared library, many third party apps wont work if with out it. If compile pythong as a shared library, you need to tell it where to find the library. Edit the file /etc/ld.so.conf to include /usr/local/lib:

After you have added the line, you need to run /sbin/ldconfig to make the dynamic linker aware of the change:

1

/sbin/ldconfig-v

Sample output of /etc/ld.so:

1

2

include ld.so.conf.d/*.conf

/usr/local/lib

We can now download, compile and install python 3.3. It is important that you use altinstall when you install python 3.3 or you will end up with two versions of python in the file system both called “python”.

1

2

3

4

5

wget http://python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz

tar xf Python-3.3.5.tar.xz

cdPython-3.3.5

./configure--prefix=/usr/local--enable-shared

make&&makealtinstall

After you have run the commands above, python 3.3 will be available in /usr/local/bin while the default version of python will be available in /usr/bin:

1

2

3

4

5

[root@routingloop Python-3.3.5]# /usr/local/bin/python3.3

python3.3python3.3mpython3.3m-config

[root@routingloop Python-3.3.5]# /usr/bin/python

python python2 python2.6

[root@routingloop Python-3.3.5]#

Install pip and setuptools

The pip command is a tool for installing and managing Python packages it builds on top of Setuptools and provides a few extra functions that are useful when you manage your packages. Setuptools is the official package manager used for installing packages from the Python Package Index. Each Python interpreter on your system needs its own install of Setuptools.

First download the setup script for setup tools:

1

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

Next install setuptools for python 3.3:

1

python3.3ez_setup.py

Now we can use setuptools to install pip:

1

easy_install-3.3pip

Install pyzmq, tornado and netifaces using pip

Now that pip is installed we can install pyzmq, tornado and netifaces using the following command:

1

pip3 install pyzmq&&pip3 install tornado&&pip3 install netifaces

Install Dynamips

To install Dynamips we first need to install the following dependencies:

elfutils-libelf-devel.x86_64 : Development support for libelf

libuuid-devel.x86_64 : Universally unique ID library

uuid-devel.x86_64 : Development support for Universally Unique Identifier library

libpcap-devel.x86_64 : Libraries and header files for the libpcap library

Upload IOS and IOU images to the Server

Browse to the IOU upload page on the remote server:

http://X.X.X.X:8000/upload

Click on browse and select the IOU or IOS image you want to upload. Click apply and the image will be uploaded to the server. Make a note of the path of the uploaded files as you will use this later when setting up the client.

Configure GNS3 GUI to connect to the remote GNS3 server

Download the Client

For Windows or Mac download the all-in-one installation files from the new GNS3 website:http://new.gns3.net/

Make sure that you install the same version of the client as is installed on the server or you will get errors when trying to run the GUI.

Create GNS3 Directory

Create a GNS3 directory on your PC where you will store your GNS3 projects. For Linux do the following as the super user:

1

2

3

4

sudo su

mkdir/home/<your_username>/GNS3

chmod-R755/home/<your_username>/GNS3

cd/home/<your_username>/GNS3

Client Setup

Now that the client is installed on your local machine it needs to be configured to connect to the GNS3 server rather than to the local server on your machine.

General Preferences

1, Select General from the list on the right hand side of the preferences menu.
2. Set the path to your projects directory that you created earlier.
3. Set the path to the images directory on the remote server, this is /root/images.
4. Make sure the temporary directory is set to be /tmp.
5. Click apply.

GNS Server Preferences

1. Select GNS3 Server from the list on the right hand side of the preferences menu.
2. Select the remote servers tab.
3. Type in the IP of the Server.
4. Make sure that the port is set to TCP 8000
5. Click Add.
6. Click apply.

Once you click Apply you will get the local server error, click ok as this is normal.

Dynamips Preferences

General Dynamips settings

Now we need to configure Dynamips so that it will be run from the remote server and not our local machine.

1. Select Dynamips from the menu on the left hand side.
2. Select the General Settings tab.
3. Configure the path to Dynamips to be /usr/local/bin/dynamips, This is the path on the remote Sevrer.
4. Make sure the console port range is TCP 2001 to 2500.
5. make sure the Auxilary console port range is TCP 2501 to 3000.

Dynamips Server Settings

IOS Routers Settings

1. Select the IOS Routers menu from the left hand side.
2. Copy the server image path from the table above and paste it into the IOS path.
3. Select the relevant platform from the drop down menu.
4. If applicable, select the chassis from the drop down menu.
5. Set the RAM, to the value specified in the table above, for the image.
6. Click save.
7. Repeat for each image you want to use.

IOS on UNIX Settings

General Settings

Create an iourc.txt file on you local machine that has the same information as the iourc.txt file you created on the server.

Yeah, it is explanatory,
one of the package, openssl i686, is not available in the repository, and need to be replace with the latest version.
and one more thing , can you put the printing version of your posts so we can have access to them anywhere.
Thanks

can someone tell me what changes need to be added and how to work around them so I can do this? I hate running linux and follow a tutorial only to get to a part that fails and I have no idea how to keep going.. Thanks

Thanks for helpful manual!
Topology will work while the client is running, am I right?
If there any way to get the GNS3-server to work as daemon so I can run it on remote side once and connect by client only for topology changes while it work in background?

I seem to be having an issue with running iou, this is the error I get:
[Errno 2] No such file or directory: ‘/root/GNS3/images/i86bi_linux_l2-ipbasek9-ms.may8-2013-team_track’: 32-bit binary support is probably not installed

because I came across the same error, and this is an excellent tutorial:
to fix this, do:
yum install openssl-devel.i686
and relink the lib:
ln -s /usr/lib/libcrypto.so.10 /usr/lib/libcrypto.so.4
worked for me using CenOS 6.6

This document might be able to help some others with some questions I’ve seen here. The document got me running IOU in a “Cloud” mode. I set up a CentOS 7.X gns3server on a Virtual Machine, that is where I have the gns3server running all the time. And then I use my Windows computer to access all of my topologies wherever I am just by using the GNS3 client.

Hi Jonathan, good guide, but it isnt working for me, I followed your instructions one by one and when i get to open the IP:8000/upload nothing really happens, the server isnt even listening on port 8000.
Thanks

first download the gns3-gui fromhttps://github.com/GNS3/gns3-gui/releases
-make sure to match to the version of the gns3-server you already installed.
– Then
$ tar -xvf gns3-gui-x-x-x
$ cd gns3-gui-x-x-x
$ python3.3 setyup.py install