Gns3 0.7.1-2 on Ubuntu 10.04 LTS [the easy way]

Posted: May 16, 2010 in Computers, Software, Network & Security
Tags: , , , , , , , ,

Lets look at how we can install Gns3 (the latest version) on Ubuntu 10.04 LTS. This is the quick and easiest way as per my knowledge, as simple as it gets. Lets take a closer look and install it on Ubuntu.

By default, Lucid or any other iteration wont let you download unstable software packages. This is done by restricting the software library in its Repositories. In order to install the Latest GNS3 (non free) (unstable) binary you need to add a repository in the Software Sources (/etc/apt/sources) .Sid

Here’s how:

Click System >> Administration >> Software Sources >> Select Other Software (tab) >> Add.

Paste the Following after  clicking add:

deb http://ftp.de.debian.org/debian sid main non-free

After adding the source you get to see Sid (unstable) releases. See to it that it is checked and click close.

This will Update your Software Library to unstable releases.

(NOTE: You can also choose other sources like squeeze. They are more stable then Sid, I wanted the latest version hence used Sid.)

For Squeeze add the following code:

deb http://ftp.de.debian.org/debian squeeze main non-free

( From URL: http://packages.debian.org/squeeze/all/gns3/download)

Go To Applications >> Ubuntu Software Center and search for GNS3. Notice that it lists  the Latest Version.

Installing GNS3:

We will not install It from Ubuntu Software Center directly, instead we will do it from the terminal. The Reason being that Ubuntu does not grant permissions to Software Center to install Unstable releases. In terminal you can install by simply selecting Y.

Open Terminal Prompt (CTRL+ALT+T)

Enter the code: sudo apt-get install gns3

It will ask you to download extra packages. Select Y for both after which the installer starts downloading all the required Packages. This could take a while. Once Installed You will see GNS3 application in Application >> Education.

Compiling Qemu for Ubuntu:

Refer the Below links for Tutorial on compiling. You lazy folks ;-) download from here. Un-tar it on Desktop. There will be a folder named qemu on desktop.

http://www.brainbump.net/2010/02/gns3-how-to-emulate-asa-in-ubuntu-9-10-linux/

http://blog.gns3.net/2009/10/olive-juniper/2/

Configuring GNS3:

Change Path Of Qemuwrapper to /usr/share/doc/gns3/qemuwrapper.py. Similarly link qemu and qemu-img which we un-tared on desktop. Test Qemu and Dynamips. Both should work properly. If not their working path may be incorrect.

EDIT: There is a Bug in GNS3 Package. To fix this download the GNS3 SOURCE FILE. Extract it and copy the Qemuwrapper folder to desktop.

[EDIT] Hence the new Path for the Qemuwrapper will be /home/<username>/Desktop/qemuwrapper/qemuwrapper.py instead of the one mentioned above. Once the test is complete you will be able to Run Gns3 with Olive as well as Cisco routers. [EDIT]

Few Catches…:

Bugs as everyone knows are major causes for headaches. Be warned that there are few bugs in this version. Get the full list from below web page.

http://packages.qa.debian.org/g/gns3.html

I have yet to test GNS3 completely. Will try to test it in spare time.

Refer my previous posts on GNS3 Installing JUNOS.

http://sushantwagle.wordpress.com/2010/01/11/gns3-07rc1-supports-juniper-part2/

http://sushantwagle.wordpress.com/2009/12/30/gns3-0-7rc1-supports-junos-lets-try-it-out-part-1/

Advertisement
Comments
  1. chandrashakher says:

    I am getting this error
    ===========================
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg Could not connect to us.archive.ubuntu.com:80 (91.189.88.30). – connect (111: Connection refused) [IP: 91.189.88.30 80]

    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/i18n/Translation-en_US.bz2 Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/restricted/i18n/Translation-en_US.bz2 Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/universe/i18n/Translation-en_US.bz2 Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/multiverse/i18n/Translation-en_US.bz2 Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

    • sushantwagle says:

      W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg Could not connect to us.archive.ubuntu.com:80 (91.189.88.30). – connect (111: Connection refused) [IP: 91.189.88.30 80]

      This seems to be network problem. May be your IP is blocked.
      Check Ubuntu forums. Here is one example for similar problem.

      http://ubuntu-ky.ubuntuforums.org/showthread.php?p=9293667

  2. chandrashakher says:

    another error
    =====
    E:Type ”partner” is not known on line 39 in source list /etc/apt/sources.list, E:The list of sources could not be read.

    • sushantwagle says:

      I hope you have not messed up with other sources.
      Try deleting the source you added and add it again, you may not have entered in correct location.

  3. Neestmymn says:

    Just want to say what a great blog you got here!
    I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!

    Thumbs up, and keep it going!

    Cheers
    Christian, iwspo.net

  4. tafo says:

    I receive the following error when installing gns3:
    Error in file “/usr/share/applications/kde4/kfontview.desktop”: “fonts/package” is an invalid MIME type (“fonts” is an unregistered media type)

    • sushantwagle says:

      Have you installed any KDE componants. the issue doesn’t seem related to GNS3.

      https://bugs.launchpad.net/kdebase/+bug/570832

  5. Miguel Figueroa says:

    I got the following error message after adding that source for sid:

    W: GPG error: http://ftp.de.debian.org sid Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B

    Where do I get the key or how do I add it to Ubuntu?

    Thanks,
    Miguel

    • sushantwagle says:

      Install it from terminal instead of software center. As mentioned above in installing GNS3 Software Center does not have the permission.

  6. prasad2612 says:

    Hi ,

    i want to have hands on on junos, so trying to install JUNOS,, please help me out how to configure JUNOS, what are the pre installation steps i have to follow, please help me out

  7. mico says:

    Hi,
    I am configuring GNS3 on Ubuntu 10.04 LTS and I need to download jinstall-8.5R1.14-domestic-signed.tgz in FreeBSD via FTP in /var/tmp and need help as below.

    1) How to download OpenVPN in Ubuntu, how to set up TAP interface and how to set up ip 10.0.2.254 and mask 255.255.255.0 and Default GW (internet) of TAP in Ubuntu 10.04?

    2) How to download FileZilla Server in Ubuntu 10.04, do we have any Firewall in Ubuntu that can be disabled as similar to WindowsXP firewall?

    3)Can SCP be used in Ubuntu , can we use FileZilla or any other Software to configure SCP in Ubuntu? how to enable SSH in Ubuntu for SCP?

    Thanks in advance for your help.

    • sushantwagle says:

      hi,
      I am currently away from my hometown and have limited internet access. I will reply to you in few days as soon as i get back.

  8. mico says:

    Hi,
    I was able to run successfully one Juniper Router instance in GNS3 in Windows XP.
    In Ubuntu however Once the jinstall package installed and stopping FreeBSD by using the halt command init 0, quit qemu, and booting up FreeBSD one more time to finish the installation with the command …

    qemu -m 256 -hda olive-base.img -boot c -localtime ,

    I get the following Error output

    mico@ubuntu:~$ cd Desktop
    mico@ubuntu:~/Desktop$ cd qemu
    mico@ubuntu:~/Desktop/qemu$ qemu -m 256 -hda olive-base.img -boot c -localtime -nographic
    /boot/installer text=0x45ac5c data=0x39e48+0x3c13c syms=[0x4+0x55f30+0x4+0x636a6]
    |
    Hit [Enter] to boot immediately, or space bar for command prompt.
    Booting [/boot/installer]…
    ACPI autoload failed – no such file or directory
    kernel trap 12 with interrupts disabled

    Fatal trap 30: reserved (unknown) fault while in kernel mode
    instruction pointer = 0×20:0xc06b3ef4
    stack pointer = 0×28:0xc1021c98
    frame pointer = 0×28:0xc1021cb8
    code segment = base 0×0, limit 0xfffff, type 0x1b
    = DPL 0, pres 1, def32 1, gran 1
    processor eflags = interrupt enabled, IOPL = 0
    current process = 0 ()
    trap number = 30
    dog: ERROR – reset of uninitialized watchdog
    panic: reserved (unknown) fault
    (null)(c089caa0) at 0
    (null)(c0836fe5,0,fffff,8e4cc89b,c089a8c0) at 0
    (null)(c1021c58,0) at 0
    (null)(8,28,28,0,c089a8c0) at 0
    (null)(8,28,28,f0000,c08ced40) at 0
    (null)(2) at 0
    (null)(0,c1021d3c,c051e8ef,c0835147,0) at 0
    (null)(c1021d84,c06ac030,101ec00,101e000,1026000) at 0
    (null)(101ec00,101e000,1026000,0,c044df8d) at 0
    (null)(1026000) at 0
    (null)() at 0
    dog: ERROR – reset of uninitialized watchdog
    dog: ERROR – reset of uninitialized watchdog
    Uptime: 1s

    Please check the output for any thing which can be done in this regards to rectify the issue.

    Thanks in advance.

    • sushantwagle says:

      ACPI autoload failed – no such file or directory

      Looks like ACPI was unable to load during the installation as it is unable to find the /boot/installer directory.
      Are you sure the files were copied properly. Try the installation again with olive-base.img which you have backed up.

  9. mico says:

    Hi,

    I was successfull in running JUNOS on Ubuntu with the following command.

    qemu -m 256 -hda olive-base.img -boot c -localtime -nographic

    After the installation I logged in with root user and then I shutdown JUNOS.

    I am having problem in GNS3 Ubuntu , when I try to put my first Juniper Router after confirming all the test for qemu , qemu-img ,qemuwrapper.py and Dynamips as ok, I am getting the following Error

    Qemu Manager : Can’t connect to Qemu on port 10525
    Dynamips error : Could not connect to qemuwrapper at ubuntu: 10525

    How ever I remember that I did one wrong configuration in FreeBSD installation I selected Yes(by mistake) for the following STEP

    “Would you like to install the FreeBSD ports collection?”. (Should be no as per your post)

    I also corrected the STEP by selecting no, but it has no effect.

    Please check if any thing which can be done in this regards to rectify the issue.

    Thanks in advance.

    • sushantwagle says:

      Alright, This seems to be some kind of config problem with GNS3.
      Is the application path for “qemuwrapper.py”, “qemu” & “dynamips” correct.
      Try reinstalling gns3 and set the path correctly.

  10. mico says:

    Hi,

    Thanks for your reply, I have one question that my Laptop has Windows XP with Pointsec encrypted HardDrive, So I cannot install Ubuntu from WindowsXP(I have used seperate Laptop for GNS3 test purpose on Ubuntu ).

    Can I run Ubuntu inside my PointSec Windows Xp as a virtualOS and then install GNS3 and olive inside virtual Ubuntu?
    will it be slow performance due to virtual Ubuntu OS inside WindowsXP OS.

    Thanks

  11. Deepali Ketkar says:

    Hi Sushant

    I want to run Junos on GNS3.I have installed GNS3 ,Quemu ,Dynamips and compiled it successfully. BSD boots properly without errors however when I issue a command dhclient em0 it is not getting IP address. I would appreciate if you could if you could help me to fix this problem.

    1) Is Openvpn required for Ubuntu Linux ? If yes how to configure it.
    2) How BSD gets ip address when we issue the command dhclient em0? Which is DHCP server?
    3) Why em0 interface doesn’t appear on BSD command prompt when I use ifconfig -a command or netstat -r command?

    Thanking you in advance.

    Regards
    Deepali

    • sushantwagle says:

      Hi Deepali,

      When you are running BSD via QEMU check if the syntax is correct.

      qemu -m 256 -hda olive-base.img -boot c -localtime \ -net nic -net tap,ifname=TAP -net nic,macaddr=00:aa:00:60:01:01,model=e1000 -net user

      ifconfig -a must list em0 in its interfaces.

      1.> we are using open VPN to transfer files from the Host PC to BSD (virtual PC).
      Open VPN acts as a bridge between the two os sharing TAP LAN adaptor for the transfer of files.
      You can find more documentation for it here

      https://help.ubuntu.com/community/OpenVPN

      2.> BSD check if there is a DHCP server. IF not it assigns an address by itself in the 10.0.0.0/8 range.

      3.> check if you have entered the syntax correctly. if it still doesnt work download the Qemu from here and check again.

      http://www.4shared.com/file/naR0T7h3/qemutar.html

      • Deepali Ketkar says:

        Hi Sushant,
        When I execute this command ,

        qemu -m 256 -hda olive.img -boot c -localtime \ -net nic -net tap,ifname=TAP -net nic,macaddr=00:aa:00:60:01:01,model=e1000 -net user

        I get the following error :(

        can’t add TAP to bridge eth0: Operation not supported
        /etc/qemu-ifup: could not launch network script
        qemu: Could not initialize device ‘tap’

        Please guide me to fix this problem.

        I have already installed OpenVPN on my Ubuntu Linux.

        Regards
        Deepali

      • sushantwagle says:

        Hi,

        Do an ifconfig -a in ubuntu.

        Check what is the name of your TAP adaptor.
        replace ifname=TAP with ifname=”TAP interface name” and run the command.
        Hope that helps. If not let me know i will try to replicate it..

  12. Deepali Ketkar says:

    Hi Sushant

    I am still not able to troubleshoot the problem. Let me explain to you.

    When I execute this command

    qemu -m 256 -hda olive-base.img -cdrom -boot c -localtime -net nic,macaddr=00:aa:00:00:01:01,model=e1000 -net tap,ifname=tap0

    I get the following ouput

    open /dev/kvm: No such file or directory
    Could not initialize KVM, will disable KVM support
    can’t add tap0 to bridge eth0: Operation not supported
    /etc/qemu-ifup: could not launch network script
    qemu: Could not initialize device ‘tap’

    Let me brief you what I did

    1) I added tap interface with command
    #openvpn –mktun –dev tap0

    2)Then I added ip address to it
    ifconfig tap0 10.0.2.254/24 up

    3) I was able to ping 10.0.2.254 from Ubuntu

    4) BSD was up using using command
    qemu -m 256 -hda olive-base.img -boot c -localtime -net nic,macaddr=00:aa:00:00:01:01,model=e1000 -net user

    5)With the command dhclient em0 I got 10.0.2.2 Ip address to getway .I am able to ping to 10.0.2.2 and also able to do FTP successfully to copy the jinstall.

    My problem is

    When I execute this command
    qemu -m 256 -hda olive-base.img -cdrom -boot c -localtime -net nic,macaddr=00:aa:00:00:01:01,model=e1000 -net tap,ifname=tap0

    The IP address of TAP vanishes. There is no communication between 10.0.2.2 and 10.0.2.254 :(

    I tried this bridging commands but it did not help.

    brctl addbr br0
    brctl addif br0 eth0
    brctl addif br0 tap0

    Please guide me to fix this problem. I am not able to communicated to TAP interface. Its almost a week now I am troubleshooting the problem

    Regards
    Deepali

    • Prasad says:

      Hi Deepali,

      I am facing same problem.. do u have any contact info of Sushant .. i am more desparate to talk to to him..

      If you have any contact info of sushant please mail to me prasad2612 at gmail.com. He is not giving any reply .. i am thinking he is not checking blog..

      Please let me know..

  13. Prasad says:

    Hi Sushant,

    I am trying to make JUNOS up on my UBUNTU 9.X PC for that i have followed below steps but i am not successfull.

    1) i installed python-qt4
    2) i downloaded GNS3.7-RC1.tar.bz2
    3) qemu 0.12.x
    4)4.11 min instaX.iso file
    5) i installed qemu from console prompt using apt-get install qemu
    do i have to install kvm / kqemu is it mandatory

    after that i started compiling freebad.. i successfuly compiled olive-base.img

    when i try to boot from olive image file using following command getting the below error messages

    qemu -m 256 -hda olive-base.img -cdrom -boot c -localtime -net nic,macaddr=00:aa:00:00:01:01,model=e1000 -net tap,ifname=tap0

    I get the following ouput

    open /dev/kvm: No such file or directory
    Could not initialize KVM, will disable KVM support

    How to solve this .. and one more doubt is that when i gone through your blog u mentioned compiled qemu for linux, when i downloaded that file that is having qemu, qemu-img and few other files should i have to place this files in the qemu folder replacing older files, i found qemu file some other linux configuration folder like (/usr/x, /etc/*) .

    Please help to resolve this issue

    Regards
    Prasad

  14. Prasad says:

    Hi sushant,

    waiting for reply…

    can respond to my previous post

  15. Abdul says:

    thanks ,…a lot , nice site and so rich in content that i can’t believe how i find my way here…and you solve the problem at a glance …Ubuntu is really for humans ….thanks and keep up the nice work