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)
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
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.
Tags: GNS3 Tutorials, Ubuntu
Subscribe to:
Post Comments (Atom)
Share your views...
37 Respones to "How To Install GNS3 on Ubuntu 10.04 LTS"
Hey man
Nice Blog you got
i followed all the steps but im stuck on the creat luncher thing
i followed these steps on Ubuntu 9.04 could that be the problem
October 24, 2010 at 6:54 AM
What exact problem are you facing ??. Please note you can run gns3 from terminal just type /opt/GNS3/gns3
If you still face any problem please let me know :)
October 24, 2010 at 7:01 AM
the problem is when i add command in the create launcher and close it when i click on the icon nothing happens
i tried to run it from terminal im getting this
$ /opt/GNS3/gns3
Traceback (most recent call last):
File "/opt/GNS3/gns3", line 35, in
raise RuntimeError, "Need Qt v4.5.1 or higher, but got v%s" % QtCore.QT_VERSION_STR
RuntimeError: Need Qt v4.5.1 or higher, but got v4.5.0
October 24, 2010 at 7:05 AM
ok. Do one thing in Terminal type sudo apt-get update, then run sudo apt-get install dynagen python-qt4. Your python-qt4 version is older that's why you are not able to run gns3. Run the above commands, rest of the steps are the same.
October 24, 2010 at 7:06 AM
:| nop nothing it say the python-qt4 is already the latest version
sulaiman@sulaiman-WS:/opt/GNS3$ sudo apt-get install dynagen python-qt4
Reading package lists... Done
Building dependency tree
Reading state information... Done
dynagen is already the newest version.
python-qt4 is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-2.6.28-11 linux-headers-2.6.28-11-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
can i try to google for the latest version
October 24, 2010 at 12:34 PM
I have already searched google for QT 4.5.1 for 9.04 and came up with nothing. Required version of Qt is available from ubuntu 9.10 onwards. If you can get hands on at-least 9.10, it will be good. There is one solution which I found on google which shows steps to upgrade QT but for some other software. I'm not sure if it will work for you, but if you want to try here's the link http://www.mail-archive.com/lyx-users@lists.lyx.org/msg74482.html
October 24, 2010 at 3:22 PM
thanks Naresh
i really had the idea of upgrading the current version to 9.10 but do u advice me to make a clean install or upgrade will work
October 26, 2010 at 7:28 PM
It would be better if you go in for 10.04, but if you have some important software's installed on your current 9.04 upgrade would be advisable.
October 27, 2010 at 11:00 AM
Thanks Naresh for your support
I've Installed Kubuntu 10.04 and everything is running smoothly
but then click on Terminal icon on GNS3 the the terminal window appear but nothing happens
i clicked and tried many things but no luck
FYI i had the same problem when i installed GNS3 on CentOS with KDE Desktop so i think its a common problem with KDE
October 27, 2010 at 4:19 PM
Try installing telnet, by running sudo apt-get telnet. I'm not sure if it is present in Kubuntu. Also try a different Terminal that suits your Distro in GNS3/Preference/General. Try this Preferences -> General -> Terminal Command
konsole --new-tab -p tabtitle=%d -e telnet %h %p >/dev/null 2>&1 &
October 27, 2010 at 4:35 PM
Dear Naresh
It worked it seems that IOS images with .bin extensions have a problem only images with .img are working but let me test again and see
October 27, 2010 at 4:37 PM
ok. Do one thing in Terminal type sudo apt-get update, then run sudo apt-get install dynagen python-qt4. Your python-qt4 version is older that's why you are not able to run gns3. Run the above commands, rest of the steps are the same.
October 27, 2010 at 8:21 PM
Hello mate and thanks for this tutorial.
I have a question, but since I am new to linux it will be a n00b question:
Since 9.10 GNS3 is in the new Ubuntu Software Center, what difference does it make to installing from the CLI like in this tutorial, the Ubuntu Software Center, or from Synaptic.
I mean, since I did not used the CLi is there I chance I might run into a situation that I am missing some files?
Thank you in advance, and thanks again for the tutorial, and sorry if my question is a sily one.
Cheers
October 27, 2010 at 9:07 PM
Yup, I know gns3 is there in Ubuntu Software Center but its a older version(0.6.0 something). It hasn't been updated ever since. My tutorial will allow you to install latest gns3 version 0.7.2 which supports ASA firewall, juniper routers, Qemu host and many fixes for bugs which were present in previous versions. You don't have to do much here, just copy paste my commands in your terminal and you are good to go. If you face any problem while installing gns3, please let me know.
October 27, 2010 at 9:08 PM
Hi - i have latest Unbunto 10.04 LTS 32 bit version. I installed GNS3-0.7.2-src but when i test dynamips, I get 'dynamips failed to start on port 7200' error message. I have set the dynamips path in GNS correctly. I also allowed port 7200 in iptables on ubuntu. Dynamips version is dynamips-0.2.8-RC2-x86.bin. I changed the permission of this dynamips file to executable. But after all these efforts and spending a week on it, i am still getting same message. Please advise & help.
Thanks.
October 31, 2010 at 4:52 PM
Hi.I have the same error.Can you find solution ?
November 14, 2010 at 3:02 PM
problem is the default settings are not saved if I close GNS3 all the settings e,g path to Dynamips etc are gone
December 11, 2010 at 5:54 PM
I worked perfectly for me.
Thanks!!
January 12, 2011 at 8:17 AM
Hi,
Can u explain this particular step
Change qemu path to /usr/bin/qemu and qemu-img path to /usr/bin/qemu-img
a little brief under ubuntu with gns3 0.7.3 qemu image 3.4
January 14, 2011 at 11:42 AM
Hi,
This particular step tells gns3 to find qemu and qemu -img binary files under /usr/bin/qemu and /usr/bin/qemu-img respectively. These are Qemu software paths. Try running "which qemu" (without quotes) in the Terminal you'll know exactly where qemu is installed on your ubuntu. The qemu image 3.4 you're talking about seems to be microcore which should be configured under Qemu Host.
January 14, 2011 at 4:13 PM
Thank's.
February 4, 2011 at 4:07 PM
I keep getting these error messages???
ubuntu@ubuntu:/opt/GNS3/Dynamips$ sudo apt-get install dynagen python-qt4
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dynagen
ubuntu@ubuntu:/opt/GNS3/Dynamips$ https://launchpad.net/ubuntu/maverick/+package/dynagen
bash: https://launchpad.net/ubuntu/maverick/+package/dynagen: No such file or directory
I have my first version of linux running on a stick trying to get GNS3 running and am not sure what this means.
March 18, 2011 at 10:56 AM
"Hi - i have latest Unbunto 10.04 LTS 32 bit version. I installed GNS3-0.7.2-src but when i test dynamips, I get 'dynamips failed to start on port 7200' error message. I have set the dynamips path in GNS correctly. I also allowed port 7200 in iptables on ubuntu. Dynamips version is dynamips-0.2.8-RC2-x86.bin. I changed the permission of this dynamips file to executable. But after all these efforts and spending a week on it, i am still getting same message. Please advise & help.
Thanks. " Just like "Anonymous" and "Mness" I am having same issue I followed the install to a "T" and everything went as you described. However when in the "Preferences" under Dynamips Tab if I try the "Test" button I receive error - "Failed to start Dynamips" or if I drag a router into the work area, I receive the error "Can't start Dynamips on port 7200". I have searched many forums and have found only one work around, which didn't work. Please help
Regards,
dgress91
March 22, 2011 at 9:51 AM
@ "Anonymoua and Mness" Just like these guys I am having an issue with Dynamips not starting in Test or when a router is dragged into work area. I am running Ubuntu 10.04 64 bit and I have followed your "tutorial" with precision. Is it possible this is a "group or file" permission problem? Not an expert at Linux yet I know nough to stay frustrated. But when it is working it is so much better than M$. When it is not working it is as good and a lot more self satifying:-) Please help of you have a moment to spare like this tutorial it will be much appreciated.
Thanks in advance,
DG
March 23, 2011 at 7:11 AM
plesse help me config GNS3 0.7.4 in Ubuntu 10.10. thank you very much
April 21, 2011 at 10:52 AM
Hi,
After the installation when starting a image getting a error, can't start Dynamips on port 7200
What s the issue?
Rohanat
April 22, 2011 at 8:35 PM
Hi,, I am also getting the same error, couldn't get through it. Anyone having any chance to fix it. please let me know
April 23, 2011 at 2:17 PM
Thanks , Nice Instructions . have a good one
April 24, 2011 at 4:47 PM
hi there can you please make a nice guide on how to install GNS3 0.7.4 with dynamips 2.8 RC3 thanks in advance. Lots of people are not able to get their qemu hosts running including myself
April 28, 2011 at 6:23 AM
I had to set "Path to Qemuwrapper:"/opt/GNS3/qemuwrapper/qemuwrapper.py
April 29, 2011 at 8:02 PM
hi to everyone!!!! I made some errors during the installation, how can I delete everything?thanks for your attention.
June 10, 2011 at 2:44 PM
Thanks for the valuable information. I am a newbie to ubuntu but its an awesome OS.
I have no problems working with GNS3 on XP. But still I try to find out ways to do every kind of work on Ubuntu.
Only this one error below.
Can't open /opt/GNS3/IOS/image.bin
Wonder if anyone here can help. Maybe its just a stupid mistake but i have always used Windows so bear with me.
Thanks.
July 23, 2011 at 10:43 PM
need this tutorial. thank you very much
July 24, 2011 at 12:17 PM
I am new to ubuntu, following same method, but when connects cloud to any router generates
eroor: 206-unable to create linux-raw ethernet NIO, seems dynamips error as not starting by user root.
how to check whether dynamips process started by root or not? and how to start dynamips process as root user?
July 29, 2011 at 4:10 PM
Thanks for the good instructions, very easy to follow step by step
April 22, 2012 at 4:13 PM
i hv install but i got nothing while try ping from pc to router.. here is the error.
tc@box:~$ ifconfig up
ifconfig: up: error fetching interface information: Device not found
tc@box:~$
where is to find the interface..
June 6, 2012 at 1:17 PM
Thank you very much !! great help :)
January 12, 2013 at 5:31 PM
Post a Comment