How To Install GNS3 on Ubuntu 10.04 LTS

So here is how to install GNS3 on Ubuntu.

These steps works for Ubuntu 9.10, 10.04lts and 10.10.


Lets Begin

For Ubuntu 32-bit (Scroll Down for 64-bit instructions)

1. First we will install Dynagen and Python-Qt4

sudo apt-get update
sudo apt-get install dynagen python-qt4

IMP: While installing Dynagen and python-qt4 on 10.10, if you get Unable to locate package dynagen/python-qt. Manually download these packages from here https://launchpad.net/ubuntu/maverick/+package/dynagen
https://launchpad.net/ubuntu/maverick/+package/python-qt4

2. Download GNS3 and extract in /opt

cd /opt
sudo wget http://space.dl.sourceforge.net/project/gns-3/GNS3/0.7.3/GNS3-0.7.3-src.tar.bz2

sudo tar -xjvf GNS3-0.7.3-src.tar.bz2
sudo rm GNS3-0.7.3-src.tar.bz2
sudo mv GNS3-0.7.3-src /opt/GNS3

If you get timeout while downloading GNS3 source file, Please manually download GNS3-0.7.3-src.tar.bz2 from here http://sourceforge.net/projects/gns-3/files/

3. Create the following directories in Ubuntu:
These directories will be used by GNS3 – such as projects – where your working projects will be stored, cache, temp, IOS images, etc.

cd /opt/GNS3
sudo mkdir Dynamips
sudo mkdir IOS
sudo mkdir Project
sudo mkdir Cache
sudo mkdir tmp
sudo chmod o+rw -R ./Project
sudo chmod o+rw -R ./tmp
sudo chmod o+rw -R ./IOS

4. Download binary of dynamips and make it executable

cd Dynamips
sudo wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin
sudo chmod +x ./dynamips-0.2.8-RC2-x86.bin

4.1 Qemu installation

sudo apt-get install qemu

You can create a desktop shortcut on Ubuntu by right-clicking on the desktop and select “Create Launcher..”, Name it GNS3 and in the command section type in

python "/opt/GNS3/gns3"

Double click to open GNS3 and we will edit the default settings. If you don’t want to use desktop icons you can create a launcher from your programs menu by right clicking on the Main Menu, selecting Edit Menu. Select New Item on the right and you will be presented with the same window where you type in the above. From there you can move the launcher into any menu section of your choice.

5. Go to edit | preferences and in the ‘Terminal command:’ section type in:

gnome-terminal -t %d -e 'telnet %h %p' > /dev/null 2>&1 &

6. Under ‘Paths’ change the ‘Project directory:’ to

/opt/GNS3/Project

and the ‘IOS/PIX directory:’ to

/opt/GNS3/IOS

7. Click on Dynamips tab on the left

For the ‘Executable path:’ type in

/opt/GNS3/Dynamips/dynamips-0.2.8-RC2-x86.bin

8. Change the ‘Working directory:’ to

/opt/GNS3/tmp

Click on the Capture tab on the left

9. For the ‘Working directory for capture files:’ change it to

/opt/GNS3/Project

10. For Qemu

Change qemu path to /usr/bin/qemu and qemu-img path to /usr/bin/qemu-img

For Ubuntu 64-bit

sudo apt-get install dynagen python-qt4
this one won’t work in 64 bit …

Instead follow this steps

Open up Terminal

sudo apt-get update
sudo apt-get install python
sudo apt-get install qt4-dev-tools
sudo apt-get install pyqt4-dev-tools
exit

Rest of the steps are same as 32-bit, Only in Step 4
Download http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin
move it to /opt/GNS3/Dynamips

Then make dynamips-0.2.8-RC2-amd64.bin executable.

sudo chmod +x ./dynamips-0.2.8-RC2-amd64.bin


After you have done all that you will be able to Open and Save your GNS3 projects properly and have an efficient setup for GNS3. In order to use the devices in GNS3 you must obtain our own IOS images from Cisco or get it from here.  

Want to add loopback interface in ubuntu, please read here.