Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old May 12th, 2008   #1
hariprs
A Carafe of Ubuntu
 
hariprs's Avatar
 
Join Date: Apr 2008
Location: /home/Chennai/India
Beans: 93
Ubuntu 8.10 Intrepid Ibex
Send a message via AIM to hariprs Send a message via Yahoo to hariprs Send a message via Skype™ to hariprs
HOWTO: Run cisco router emulator in ubuntu 8.04

Tested with Ubuntu Hardy

Dynamips:
Dynamips is a Cisco router emulator written by Christophe Fillot. It emulates 1700, 2600, 3600, 3700, and 7200 hardware platforms, and runs standard IOS images. ( This discription is taken from http://dynagen.org/tutorial.htm#_Toc193247991 )

Dynagen:
Dynagen is a front-end for use with the Dynamips Cisco router emulator. It uses an INI-like configuration file to provision Dynamips emulator networks. It takes care of specifying the right port adapters, generating and matching up those pesky NIO descriptors, specifying bridges, frame-relay, ATM switches, etc. It also provides a management CLI for listing devices, suspending and reloading instances, determining and managing idle-pc values, performing packet captures, etc. ( This discription is taken from http://dynagen.org/ )

This tutorial helps you to run cisco IOS images using Dynamips-Dynagen emulators in ubuntu. Will be much useful to those whose are preparing for cisco certifications.

This tutorial doesnot explains extended network configuration of Dynamips. This guide simply provides you on howto install Dynamips-Dynagen in ubuntu and run a cisco router IOS image in ubuntu.

Following softwares/libs are required to run Dynamips-Dynagen

1) libpcap v0.9.x
2) python v2.5.x

Use synaptic package manager to install the above softwares

1) Go to Start>System>Administration>synaptic package manager
2) Search libpcap & python
3) Mark the above mentioned versions and press apply to install.

Install Dynamips & Dynagen:

1) Create a new directory for dynamips

Code:
sudo mkdir /opt/dynamips
2) Change to dynamips directory

Code:
cd /opt/dynamips
3) Download latest dynagen software using wget

Code:
sudo wget http://downloads.sourceforge.net/dyna-gen/dynagen-0.11.0.tar.gz?modtime=1208688475&big_mirror=0
4) Extract the tarball

Code:
sudo tar -xvzf dynagen-0.11.0.tar.gz
5) Change to /opt/dynamips/dynagen-x.x.x directory

Code:
cd /opt/dynamips/dynagen-0.11.0
6) Look at the README.txt file to see which version of Dynamips is required for this version of Dynagen

Code:
less README.txt
At the time of this tutorial, at least dynamips version 0.2.8-RC1 is required.

7) Change to /opt/dynamips directory

Code:
cd /opt/dynamips
8 ) Download Dynamips from Dynamips blog

Code:
sudo wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin
Since my arch is AMD64bit i downloaded 64bit version, You can visit http://www.ipflow.utc.fr/blog/ to download latest and for different arch versions.

9) Use chmod to change permission

Code:
sudo chmod 755 dynamips-0.2.8-RC2-amd64.bin
10) Navigate to /usr/bin to create symbolic links for dynagen & dynamips

Code:
cd /usr/bin
Code:
sudo ln -s /opt/dynamips/dynamips-0.2.8-RC2-amd64.bin dynamips
Code:
sudo ln -s /opt/dynamips/dynagen-0.11.0/dynagen dynagen
11) Updatedb

Code:
sudo updatedb
12) Create a directory for cisco routers images

Code:
sudo mkdir /opt/dynamips/images
Run the simulator:

1) Download the cisco router IOS images from www.cisco.com
Note: You must have cisco login to download the IOS image. Normally cisco customer & CCIE will have a login.

2) Put the downloaded cisco IOS image in /opt/dynamips/images folder.

Code:
sudo mv c7200-jk9o3s-mz.123.12e.bin /opt/dynamips/images
3) Update the configuration file with correct image path and RAM size required. The dynagen comes with some sample configuration file. I used it for this tutorial.

Code:
sudo vi /opt/dynamips/dynagen-0.11.0/sample_labs/simple1/simple1.net

# Simple lab



[localhost]



    [[7200]]

    # image = \Program Files\Dynamips\images\c7200-jk9o3s-mz.124-7a.image <<--Comment out this windows path 

    # On Linux / Unix use forward slashes:

    image = /opt/dynamips/images/c7200-jk9o3s-mz.124-7a.bin <<-- Uncomment and update this line with correct path

    npe = npe-400

    ram = 160 <<-- Update this value with required RAM size

        

    [[ROUTER R1]]

    s1/0 = R2 s1/0

    

    [[router R2]]

    # No need to specify an adapter here, it is taken care of

    # by the interface specification under Router R1
Finally save and exit. You can also specify more configuration details in this file if you know more about dynagen config parameters.

4) Start the dynamips process

Code:
sudo dynamips -H 7200 &
5) Use the dynagen command to process the .net configuration file and start the virtual network.

Code:
sudo dynagen simple1.net
You will placed inside the dynagen console

6) Use list command to list the network equipments and port details for console access.

Code:
=>list
Name    Type     State     Server           Console
R1      7200     Running   localhost:7200   2001
R2      7200     Running   localhost:7200   2002
7) Finally telnet to the router console

Code:
=> telnet R1
Note: You can also use utilities like putty to telnet to router console.

To learn more about Dynamips/Dynagen visit the below links

Code:
http://dynagen.org/tutorial.htm#_Toc193247991
http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator
http://www.ipflow.utc.fr/blog/
__________________
((¯`·._ Harikumar_.·´¯))
hariprs is offline   Reply With Quote
Old May 13th, 2008   #2
MrFSL
Dipped in Ubuntu
 
MrFSL's Avatar
 
Join Date: Mar 2006
Location: Alaska
Beans: 598
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

If you are serious about cisco emulation I STRONGLY suggest GNS3.

Works great in linux. I have used this in conjunction with vmware to make a complete virtual network testbed.


http://www.gns3.net/
MrFSL is offline   Reply With Quote
Old May 15th, 2008   #3
hariprs
A Carafe of Ubuntu
 
hariprs's Avatar
 
Join Date: Apr 2008
Location: /home/Chennai/India
Beans: 93
Ubuntu 8.10 Intrepid Ibex
Send a message via AIM to hariprs Send a message via Yahoo to hariprs Send a message via Skype™ to hariprs
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

Quote:
Originally Posted by MrFSL View Post
If you are serious about cisco emulation I STRONGLY suggest GNS3.

Works great in linux. I have used this in conjunction with vmware to make a complete virtual network testbed.


http://www.gns3.net/
Thanks a lot, I was looking for a GUI for dynamips-Dynagen. It works for me in Hardy.
__________________
((¯`·._ Harikumar_.·´¯))
hariprs is offline   Reply With Quote
Old May 17th, 2008   #4
mizu12
First Cup of Ubuntu
 
Join Date: May 2008
Beans: 5
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

Quote:
Originally Posted by MrFSL View Post
If you are serious about cisco emulation I STRONGLY suggest GNS3.

Works great in linux. I have used this in conjunction with vmware to make a complete virtual network testbed.


http://www.gns3.net/
I installed it through Synaptic on Hardy (followed the instructions on their site), it's easy to do and it works as it has to. I tried it under windows it's painfully slow compared to Linux.

GNS3 is a great frontend to dynamips, you dont have to bother about the config files, you do all the nasty things with the GUI.
mizu12 is offline   Reply With Quote
Old May 17th, 2008   #5
m83
Just Give Me the Beans!
 
m83's Avatar
 
Join Date: May 2006
Location: Romania
Beans: 68
Ubuntu 8.10 Intrepid Ibex
Send a message via Yahoo to m83
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

I find that using CISCO's PacketTracer with WINE is fulfilling all my needs for network simulation with CISCO equipment.

Setting up a Dynamips-Dynagen environment looks like a lot of trouble that is not worth the effort.

Last edited by m83; May 17th, 2008 at 07:31 PM..
m83 is offline   Reply With Quote
Old May 20th, 2008   #6
nickert0n
First Cup of Ubuntu
 
Join Date: Apr 2008
Location: Edmonton
Beans: 2
Ubuntu 8.04 Hardy Heron
Send a message via MSN to nickert0n
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

Thank you for this!
nickert0n is offline   Reply With Quote
Old May 27th, 2008   #7
cormic
5 Cups of Ubuntu
 
Join Date: Mar 2006
Beans: 18
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

Just got a great little lab running in about an hour using GNS3 and the frame relay tutorial located at http://www.blindhog.net/gns3-how-to-...ame-relay-lab/

This is really nice piece of software. The CPU is running at 100% but that is to be expected.

Thanks for the pointers all
cormic is offline   Reply With Quote
Old June 28th, 2008   #8
geezerone
Quad Shot of Ubuntu
 
geezerone's Avatar
 
Join Date: May 2006
Location: United Kingdom
My beans are hidden!
Ubuntu 8.04 Hardy Heron
Send a message via Skype™ to geezerone
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

I have tried this but get the "locked R1 error"
__________________
UKBroadband! Login Screen Setup & XDMCP - locked out of computer? -NZB GUI - "ls -a"
WICD -|-

geezerone is offline   Reply With Quote
Old June 29th, 2008   #9
hariprs
A Carafe of Ubuntu
 
hariprs's Avatar
 
Join Date: Apr 2008
Location: /home/Chennai/India
Beans: 93
Ubuntu 8.10 Intrepid Ibex
Send a message via AIM to hariprs Send a message via Yahoo to hariprs Send a message via Skype™ to hariprs
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

Quote:
Originally Posted by geezerone View Post
I have tried this but get the "locked R1 error"
Probably you didn't configured the correct path to the image. check your configuration.
__________________
((¯`·._ Harikumar_.·´¯))
hariprs is offline   Reply With Quote
Old June 30th, 2008   #10
geezerone
Quad Shot of Ubuntu
 
geezerone's Avatar
 
Join Date: May 2006
Location: United Kingdom
My beans are hidden!
Ubuntu 8.04 Hardy Heron
Send a message via Skype™ to geezerone
Re: HOWTO: Run cisco router emulator in ubuntu 8.04

Hi

Sorted it out. It was due to file permissions being that of root. Changed with
Code:
chown <userid> <file/directory>
to 'my user' and worked. Needed to remove the configuration files for the lab which had root as owner too. Once restarted the lab had files with my user permissions.

Hope this helps someone.

Regarding Synaptic - why aren't the files created in /opt/ like your and other (blindhog) tutorials?
__________________
UKBroadband! Login Screen Setup & XDMCP - locked out of computer? -NZB GUI - "ls -a"
WICD -|-

geezerone is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:21 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry