It is currently Thu Mar 23, 2017 12:10 pm


All times are UTC




Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Tue Apr 08, 2014 7:30 pm 
Offline

Joined: Sun Sep 16, 2012 9:55 pm
Posts: 541
Location: England
If you run Debian 'Wheezy' you'll find that python3 is too old for the GNS3 1.0 Alpha, which leaves with a few choices...
  1. Run Debian Jessie (Testing)
  2. Try and pick the bits you need from testing (could lead to an unstable system)
  3. Run a VM of Debian Testing
  4. Setup a chroot

If like myself, your restricted by older hardware, running a VM introduces a lot of extra overhead... whereas running a chroot doesn't!

The steps below will allow to create a chroot and run gns3 from within it. All the commands shown below should be used in a terminal window.

INSTRUCTIONS
Install debootstrap and schroot
Code:
sudo apt-get install debootstrap schroot

First decide where you want to store the chroot (you'll need about 850Mb of space for the chroot, not including IOS/IOU Images)
Code:
mkdir -p /srv/chroot/jessie

Create Debian Jessie (Testing) chroot
Code:
debootstrap --components=main,contrib,non-free --include=sudo,locales,unzip jessie /srv/chroot/jessie/ http://ftp.uk.debian.org/debian

Note: The mirror at the end of the command can be any mirror as found here: https://www.debian.org/mirror/list

Depending on the speed of your internet connection and proximity to the mirror, it may take a while to download and setup the base system. Once it has finished we can move on...

Add chroot definition to schroot.conf
Code:
sudo nano /etc/schroot/schroot.conf

Add the following to the end of the file:
Code:
[jessie]
type=directory
description=Debian Jessie(testing)
directory=/srv/chroots/jessie
users=daniel
root-groups=root
aliases=testing

Replace the user on the users line with your username

Now lets get inside the chroot, where the real fun can begin!
Code:
schroot -p -c jessie

*** WE ARE NOW IN THE CHROOT! ***
Fix the locale errors
Code:
sudo dpkg-reconfigure locales

Select the locales you wish to generate for you chroot from the list displayed.
For example for English (GB) choose "en_GB.UTF-8 UTF-8" from the list (highlight and press space)

Now <TAB> and <ENTER> on OK

Select the default locale, press <ENTER>. The system will now generate the locale and store the settings

Install packages required for GNS3 v1
Code:
sudo apt-get install dynamips
sudo apt-get install python3-setuptools python3-zmq python3-tornado python3-netifaces python3-pyqt4

Install a terminal emulator (gnome-terminal doesn't seem to work currently)
Code:
sudo apt-get install xterm

OR
Code:
sudo apt-get install roxterm

Install telnet (required to console to routers)
Code:
sudo apt-get install telnet

Install i386 libssl1.0.0 for IOU
Code:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libssl1.0.0:i386
sudo ln -s /usr/lib/i386-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.4


OPTIONAL: Install uml-utilities (to get tunctl needed for tap interfaces)
Code:
sudo apt-get install uml-utilities


Install GNS3 Server
Code:
wget https://github.com/GNS3/gns3-server/archive/master.zip
unzip gns3-server.zip
cd gns3-server-master
sudo python3 setup.py install


Install GNS3 GUI
Code:
wget https://github.com/GNS3/gns3-gui/archive/master.zip
unzip gns3-gui.zip
cd gns3-gui-master
sudo python3 setup.py install


Now you can run GNS3!
Code:
gns3


If when you start GNS3 an error is diplayed on the console about GTK+
Install qtconfig and pick a GUI style other than GTK+ (Cleanlooks works well)
Code:
sudo apt-get install qt4-qtconfig
qtconfig



_________________
Daniel
Forum Moderator & Debian Package Maintainer for GNS3, Dynamips & VPCS.
Standalone DEB Packages are available from http://gns3.serverb.co.uk - To be updated!


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Sun Apr 13, 2014 11:25 pm 
Offline

Joined: Mon Apr 07, 2014 8:38 pm
Posts: 17
I followed the whole post and get the following error when I run the final 'gns3' command


(jessie)[email protected]:~$ gns3
GNS3 GUI version 1.0a2.dev3
Copyright (c) 2007-2014 GNS3 Technologies Inc.
gns3: cannot connect to X server

Any ideas how to fix it?

Thanks
Rick


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Mon Apr 14, 2014 12:45 pm 
Offline

Joined: Tue Apr 01, 2014 2:11 pm
Posts: 43
Location: Ohio, US
sledge121 wrote:
I followed the whole post and get the following error when I run the final 'gns3' command


(jessie)[email protected]:~$ gns3
GNS3 GUI version 1.0a2.dev3
Copyright (c) 2007-2014 GNS3 Technologies Inc.
gns3: cannot connect to X server

Any ideas how to fix it?

Thanks
Rick

If I recall, you were installing this on a cloud server and wanted to connect the GUI on your desktop to the server in the cloud, right? If that's the case, then you don't need to install or run the gns3-gui (the command "gns3" starts the gui, which requires an X display server). Just start the server with "gns3server" and then configure the GNS3 GUI on your desktop to connect to the server. As long as you have everything configure properly, it should work.

_________________
Joe Amen - Enterprise IT Consultant
CompTIA A+, Net+
CCNA in progress


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Mon Apr 14, 2014 5:49 pm 
Offline

Joined: Mon Apr 07, 2014 8:38 pm
Posts: 17
Good call, I'm following things to the letter so go down some dead ends (I'm 70% Windows and 30% Linux, when I start gns3server I see the bellow output, am I correct in saying I just need to bung my IOU IOS files in a certain directory, point my client to the server and bob's my uncle?

Thanks
Rick

(jessie)[email protected]:~$ gns3server
GNS3 server version 1.0a2.dev3
Copyright (c) 2007-2014 GNS3 Technologies Inc.
Running with Python 3.3.5 and has PID 3406
[W 140414 17:45:36 config:82] no configuration file could be found or read
[W 140414 17:45:36 __init__:72] iouyap binary couldn't be found!
[I 140414 17:45:36 base:122] dynamips module running with PID 3408
[I 140414 17:45:36 base:75] ZeroMQ client (dynamips) connecting to 127.0.0.1:45305
[I 140414 17:45:36 server:206] ZeroMQ server listening to 127.0.0.1:45305
[I 140414 17:45:36 base:122] iou module running with PID 3409
[I 140414 17:45:36 base:75] ZeroMQ client (iou) connecting to 127.0.0.1:45305
Starting server on 0.0.0.0:8000 (Tornado 3.1.1)


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Mon Apr 14, 2014 6:04 pm 
Offline

Joined: Tue Apr 01, 2014 2:11 pm
Posts: 43
Location: Ohio, US
Looks like you're missing iouyap, which I believe is necessary for IOU. That seems to have been omitted in this guide, but you can find the instructions in one of the the other guides.

The first thing I would do before trying to get your GUI to talk to the server is make sure IOU works on it's own, without GNS3. Upload an IOU file to your server, upload or generate your iourc license file, and then try executing the IOU file and see if it works. Do something like
Code:
./nameOfYourIOUFile.bin 10


If it works, then I think your next step is getting gns3server to listen on the server's external IP instead of the loopback address (my understanding is that it listens on the loopback, 127.0.0.1 by default). I'm not sure how to do that.
Then you'll point your GUI at the server and fill in the necessary paths.

_________________
Joe Amen - Enterprise IT Consultant
CompTIA A+, Net+
CCNA in progress


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Mon Apr 14, 2014 9:07 pm 
Offline

Joined: Mon Apr 07, 2014 8:38 pm
Posts: 17
I'm almost giving up, I've spent so many hours on this my head hurts.

(jessie)[email protected]:/home/rickc/Documents/GNS3/projects# ./i86bi-linux-l2-ipbasek9-15.1a.bin 10
***************************************************************
IOS On Unix - Cisco Systems confidential, internal use only
netio error: unable to open NETMAP: No such file or directory


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Mon Apr 14, 2014 10:10 pm 
Offline

Joined: Tue Apr 01, 2014 2:11 pm
Posts: 43
Location: Ohio, US
sledge121 wrote:
I'm almost giving up, I've spent so many hours on this my head hurts.

(jessie)[email protected]:/home/rickc/Documents/GNS3/projects# ./i86bi-linux-l2-ipbasek9-15.1a.bin 10
***************************************************************
IOS On Unix - Cisco Systems confidential, internal use only
netio error: unable to open NETMAP: No such file or directory

I read in another thread to try creating an empty NETMAP file with
Code:
touch NETMAP

_________________
Joe Amen - Enterprise IT Consultant
CompTIA A+, Net+
CCNA in progress


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Mon Apr 14, 2014 11:06 pm 
Offline

Joined: Mon Apr 07, 2014 8:38 pm
Posts: 17
josephraa wrote:
sledge121 wrote:
I'm almost giving up, I've spent so many hours on this my head hurts.

(jessie)[email protected]:/home/rickc/Documents/GNS3/projects# ./i86bi-linux-l2-ipbasek9-15.1a.bin 10
***************************************************************
IOS On Unix - Cisco Systems confidential, internal use only
netio error: unable to open NETMAP: No such file or directory

I read in another thread to try creating an empty NETMAP file with
Code:
touch NETMAP




For me you are the man of the hour, the IOU IOS loaded, so, here is where I am.

- a default install of Debian 7.4 wheezy
- a jessie chroot
- gns3server and iouyap
- a changed hostid using a bash script from here http://fazlearefin.blogspot.ro/2013/03/ ... hosts.html The reason I changed my hostid to 00000000 was I couldn't get the python licence script working, it just kept printing "*******************************" which was not much use.

Now I just need to figure out how to get gns3server to listen on the server's external IP instead of the loopback address, my goal is to get this running on a Google cloud server which I can spin up whenever/wherever I want and take the load off my lappy, might even get openvpn working on it so I can lock the firewall down.
I was giving up but josephraa gave me the will to continue, wish somebody would just do all the work for me so I can just press play on the Google VM.

bed now.


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Tue Apr 15, 2014 1:38 am 
Offline

Joined: Tue Apr 01, 2014 2:11 pm
Posts: 43
Location: Ohio, US
sledge121 wrote:
For me you are the man of the hour, the IOU IOS loaded, so, here is where I am.

- a default install of Debian 7.4 wheezy
- a jessie chroot
- gns3server and iouyap
- a changed hostid using a bash script from here http://fazlearefin.blogspot.ro/2013/03/ ... hosts.html The reason I changed my hostid to 00000000 was I couldn't get the python licence script working, it just kept printing "*******************************" which was not much use.

Now I just need to figure out how to get gns3server to listen on the server's external IP instead of the loopback address, my goal is to get this running on a Google cloud server which I can spin up whenever/wherever I want and take the load off my lappy, might even get openvpn working on it so I can lock the firewall down.
I was giving up but josephraa gave me the will to continue, wish somebody would just do all the work for me so I can just press play on the Google VM.

bed now.

Glad I could help. I did some poking around and found a config file for gns3server where I think you can set the listening address. Excerpt below from the script that loads the config file, which shows the list of locations that it might be found; mine was in the second location.

Code:
# On UNIX-like platforms, the configuration file location can be one of the following:
            # 1: $HOME/.config/GNS3/server.conf
            # 2: $HOME/.config/GNS3.conf
            # 3: /etc/xdg/GNS3/server.conf
            # 4: /etc/xdg/GNS3.conf
            # 5: server.conf in the current working directory


Excerpt from the relevant section of the config file:
Code:
[Servers]
local_server_host=127.0.0.1
local_server_port=8000
local_server_path=/usr/local/bin/gns3server
remote\size=0


I hope that helps. I'd test it, but I don't really have time to get another VM setup right now and don't want to mess with my working installation :/

_________________
Joe Amen - Enterprise IT Consultant
CompTIA A+, Net+
CCNA in progress


Top
 Profile  
 
 Post subject: Re: Alternative method for running GNS3 1.0 on Debian/Ubuntu
PostPosted: Tue Apr 15, 2014 9:39 am 
Offline

Joined: Sun Sep 16, 2012 9:55 pm
Posts: 541
Location: England
sledge121 wrote:
- a changed hostid using a bash script from here http://fazlearefin.blogspot.ro/2013/03/ ... hosts.html The reason I changed my hostid to 00000000 was I couldn't get the python licence script working, it just kept printing "*******************************" which was not much use.

To use the pyhton license script without changing your hostname/hostid you need python2.7, which won't be installed by default in the chroot... but the main Debian install will probably have it installed already, which means you can generate the license file there as the hostname/hostid will be the same both inside and outside of the chroot



_________________
Daniel
Forum Moderator & Debian Package Maintainer for GNS3, Dynamips & VPCS.
Standalone DEB Packages are available from http://gns3.serverb.co.uk - To be updated!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO