PoiNtEr->: How To Use Dynagen & Dynamips For Multiple CISCO Router Simulation On Ubuntu 12.04

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Sunday, July 1, 2012

How To Use Dynagen & Dynamips For Multiple CISCO Router Simulation On Ubuntu 12.04


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.


Dynagen is a text-based front end for Dynamips, which uses the “Hypervisor” mode for communication with Dynamips. Dynagen simplifies building and working with virtual networks:
  • Uses a simple, easy to understand configuration file for specifying virtual router hardware configurations
  • Simple syntax for interconnecting routers, bridges, frame-relay and ATM, and Ethernet switches. No need to deal with NetIOs
  • Can work in a client / server mode, with Dynagen running on your workstation communicating with Dynamips running on a back-end server. Dynagen can also control multiple Dynamips servers simultaneously for distributing large virtual networks across several machines. Or you can run Dynamips and Dyngen on the same system
  • Provides a management CLI for listing devices, starting, stopping, reloading, suspending, resuming, and connecting to the consoles of virtual routers.
 If you want to simulate a Cisco router, you can use dynamips but if you want to create a network topology you have to use both of dynagen and dynamips.
I'm using Ubuntu 12.04 to show an example now. First, we have to install dynagen (and dynamips) on Ubuntu 12.04.
sudo apt-get install dynagen

Now dynamips is a dependence of dynagen so it will automatically get installed with dynagen,if not then install it from synaptic manager
Three Routers Connected 
.
Let's start to work with sample network topology;

1: Start dynamips :

$dynamips -H 7200 &
Output:
vishal@Eva:~$ dynamips -H 7200 &
[1] 8936
vishal@Eva:~$ Cisco Router Simulation Platform (version 0.2.8-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Jan 18 2011 19:22:29

ILT: loaded table "mips64j" from cache.
ILT: loaded table "mips64e" from cache.
ILT: loaded table "ppc32j" from cache.
ILT: loaded table "ppc32e" from cache.
Hypervisor TCP control server started (port 7200).

2:Create a dynagen configuration file(lab.net):
######################################################################
# [START INSTANCE1]

[eva.local:7200]
  udp=10002
  workingdir = /home/vishal/Desktop/cisco-labs/lab1/working

[[3725]]
  image = /home/vishal/cisco-ios/c3725-adventerprisek9-mz.124-15.T13.bin
  # npe=npe-150
  ram = 256
#  idlepc = ?? We will talk about it later.
  ghostios = true
  sparsemem = true
  idlemax = 100
  disk0=256
  

 [[Router R1]]
  model = 3725
  console = 2001
  autostart = false
#  F0/0 =
  S0/0 = R2 S0/0

 [[Router R2]]
  model = 3725
  console = 2002
  autostart = false
#  F0/0 =
  S0/0 = R1 S0/0
  S0/1 = R3 S0/0

 [[Router R3]]
  model = 3725
  console = 2003
  autostart = false
  S0/0 = R2 S0/1
# F0/0 =

# [FINISH INSTANCE1] 
################################################################################

$dynagen lab.net
 Sample Output:
vishal@Eva:~/Desktop/cisco-labs/lab1$ sudo dynagen lab.net
Reading configuration file...

Network successfully loaded

Dynagen management console for Dynamips and Pemuwrapper 0.11.0
Copyright (c) 2005-2007 Greg Anuzelli, contributions Pavel Skovajsa

=> list
Name       Type       State      Server                 Console   
R1         3725       stopped    eva.localhost:7200 2001      
R2         3725       stopped    eva.localhost:7200 2002      
R3         3725       stopped    eva.localhost:7200 2003      
=> ?

Documented commands (type help <topic>):
========================================
capture  confreg  cpuinfo  export  hist    list  py      save   show   suspend
clear    console  end      filter  idlepc  no    reload  send   start  telnet 
conf     copy     exit     help    import  push  resume  shell  stop   ver    

=> start R1
Warning: Starting R1 with no idle-pc value
100-VM 'R1' started
=> start R2
Warning: Starting R2 with no idle-pc value
100-VM 'R2' started
=> start R3
Warning: Starting R3 with no idle-pc value
100-VM 'R3' started
=> 


well you can remove the warning which routers are giving on start up i.e no idle-pc value by just adding 
idlepc = 0x60428c4c
in lab.net file in each router configuration

3:Log into Router:
Now guys either you can do telnet from other terminal to log into any of the three routers
ex: telnet eva.localhost 2001
2001 is port no. for R1 similarly 2002 is port no. for R2.
here eva.localhost is my local domain name.
Or you can also give command in dynagen shell:
=>console R1
and finally you will get a console like:
Router>

So that all for this post .Soon i'll will back with more info on how to configure the routers.
if you have any query or suggestion feel free to comment below.












No comments:

Post a Comment