q968 发表于 2018-5-9 09:12:10

ubuntu 安装Dynamips

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>
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>  

  


Code:  

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

  
# Simple lab
  

  

  

  

  

  

  

  
`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>  

  

  

  
`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.
页: [1]
查看完整版本: ubuntu 安装Dynamips