|
楼主 |
发表于 2006-11-11 05:54:07
|
显示全部楼层
2年没有接触这些东西了。。呵呵。。
Cisco 7200 Simulator
From IPFlow Netflow Collector
Table of contents [showhide]
1 Introduction
2 Current status
3 Lab simulation / "Hypervisor" mode
4 Contributors are welcome !
5 Download
6 How to use it ?
7 Questions & Answers
[edit]Introduction
I started in August 2005 a project to emulate a Cisco 7200 on a traditionnal PC. Now, it also supports Cisco 3600 series (3620, 3640 and 3660).
The goals of this emulator are mainly:
To be used as a training platform, with software used in real world. It would allow people to become more familiar with Cisco devices, Cisco being the world leader in networking technologies ;
Test and experiment the numerous and powerful features of Cisco IOS ;
Check quickly configurations to be deployed later on real routers.
Of course, this emulator cannot replace a real router: you should be able to get a performance of about 1 kpps (depending on your host machine), to be compared to the 100 kpps delivered by a NPE-100 (the oldest NPE model). So, it is simply a complementary tool to real labs for administrators of Cisco networks or people wanting to pass their CCNA/CCNP/CCIE exams.
[edit]Current status
At this time, the emulator I have programmed is able to boot a large number of Cisco IOS releases available for the 7200 and 3600 platforms, including the latest 12.2S and 12.4T.
The following devices are emulated in the current release (0.2.5):
MIPS64 CPU processor. The instruction set is not completely emulated now (FPU support is lacking, TLB support is not finished and other minor things), but it is sufficient for IOS ;
DRAM and Packet SRAM memory ;
Non-Volatile Memory (NVRAM) ;
Signetics SCN 2681 DUART (C7200 Console and AUX ports) ;
National Semiconductors NS16552 DUART (C3600 Console and AUX ports) ;
Dallas DS1620 Temperature Sensors and Voltage Sensors, allowing the C7200 Environmental Monitor to work properly ;
NMC93C46 Serial EEPROM ;
Bootflash of 8 Mb (Intel 28F016SA) ;
Galileo GT64010/GT64120 PCI controller, DEC 21x50 PCI bridges and so ;
PCMCIA ATA disk emulation (C7200 only at this time).
The following Cisco 7200 Port Adapters (PA) are currently supported:
FastEthernet cards "C7200-IO-FE" and "A-FE-TX" based on DEC21140 chip
Ethernet cards "A-4E" and "A-8E" based on AMD Am79c97x chips
ATM card "PA-A1" based on Texas Instruments Tneta1570 chip
Serial cards "PA-4T+" and "PA-8T"
POS (Packet over Sonet) card "PA-POS-OC3" (experimental, only works with recent IOS images)
The following Cisco 3600 Network Modules (NM) are currently supported:
Ethernet cards: "NM-1E", "NM-4E" and "NM-1FE-TX", all based on AMD Am79c97x chips
Serial card "NM-4T"
You can also get development info and beta versions on my technical blog (http://www.ipflow.utc.fr/blog).
To run at a decent speed, the emulator uses a JIT (Just In Time) compiler, which is working on x86 CPU (like Pentium) and x86_64 CPU (AMD64/Intel EM64T). It is also possible to run the emulator without the JIT support on non-x86 machines, but it is slower.
You can find some information about the C7200 hardware on the Cisco Web site (http://www.cisco.com/en/US/produ ... 6a00800942e0.shtml)
[edit]Lab simulation / "Hypervisor" mode
With the introduction of the 0.2.5 release, it is now possible to run the emulator as an "hypervisor" to start and control many virtual router instances simultaneously.
Dynagen (http://dyna-gen.sourceforge.net/), by Greg Anuzelli, is a front-end (written in Python) that makes lab simulation with the hypervisor very easy: 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, etc. You can also distribute virtual instances across different servers to set up complex labs. To begin with Dynagen, you can consult this very complete tutorial (http://dyna-gen.sourceforge.net/tutorial.htm).
Dynagui (http://dynagui.sourceforge.net/) is a graphical front-end written by Yannick Le Teigner. It uses Dynagen to communicate with the hypervisor.
[edit]Contributors are welcome !
For people interested to contribute there is a TODO List.
There are many things to do: PowerPC emulation, a more efficient JIT, network device emulation, new platforms...
[edit]Download
The current release is 0.2.5, published Sep 14, 2006 (you can consult the README file (http://www.ipflow.utc.fr/dynamips/README-0.2.5.txt)).
You have to download only one binary file corresponding to your architecture:
Executable for Linux/x86 (http://www.ipflow.utc.fr/dynamips/dynamips-0.2.5-x86.bin)
Executable for Linux/x86_64 (AMD64 and EM64T) (http://www.ipflow.utc.fr/dynamips/dynamips-0.2.5-amd64.bin)
Executable for Windows (with Cygwin DLL) (http://www.ipflow.utc.fr/dynamips/dynamips-0.2.5-cygwin.zip)
If you are using the Windows version, you have to download and install the WinPcap library (http://www.winpcap.org/). The minimum required version is 0.4beta1. Thanks to WinPCAP, it is possible to access the Ethernet card of host machine to send/receive packets on the LAN.
You can also download the source code, published under the GNU General Public Licence (GPL):
The source code of release v0.2.5 (http://www.ipflow.utc.fr/dynamips/dynamips-0.2.5.tar.gz)
Remark: the sources include 3 files which are not written by me: amd64-codegen.h and x86-codegen.h from the Mono project (http://www.mono-project.com), and base64.c from Fetchmail, all under GPL licence. Of course these files keep their licences and their copyrights.
[edit]How to use it ?
Very important remark: by default, an instance will take 100% of the host CPU. To avoid this, please read the "idle-pc" section in the README file (http://www.ipflow.utc.fr/dynamips/README-0.2.5.txt).
To boot quickly, the preferred method is to decompress the IOS image with the "unzip" utility. It avoids to run the self-decompressing process in the emulator.
chris@portchris2:~/dynamips-0.2.5$ unzip -p c7200-advipservicesk9-mz.124-9.T.bin > image.bin
warning [c7200-advipservicesk9-mz.124-9.T.bin]: 27904 extra bytes at beginning or within zipfile
(attempting to process anyway)
chris@portchris2:~/dynamips-0.2.5$ file image.bin
image.bin: ELF 32-bit MSB executable, cisco 7200, version 1 (SYSV), statically linked, stripped
You can ignore the warning, unzip has just skipped the self-decompressing code at the beginning of the image.
Now, you can boot the image (in this example, no network connections are defined):
chris@portchris2:~/dynamips-0.2.5$ ./dynamips image.bin -t npe-400 -p 1A-A1 -p 2A-8T -p 3A-4E -p 4:PA-POS-OC3 -p 6:PA-FE-TX
Cisco 7200 Simulation Platform (version 0.2.5-x86)
Copyright (c) 2005,2006 Christophe Fillot.
IOS image file: image.bin
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C7200 instance 'default' (id 0):
VM Status : 0
RAM size : 256 Mb
IOMEM size : 0 Mb
NVRAM size : 128 Kb
NPE model : npe-400
Midplane : vxr
IOS image : image.bin
Loading ELF file 'image.bin'...
ELF entry point: 0x80008000
C7200 'default': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
ROMMON emulation microcode.
Launching IOS image at 0x80008000...
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, 7200 Software (C7200-ADVIPSERVICESK9-M), Version 12.4(9)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 16-Jun-06 17:27 by prod_rel_team
Image text-base: 0x60009084, data-base: 0x6308C000
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 7206VXR (NPE400) processor (revision A) with 245760K/16384K bytes of memory.
Processor board ID 4294967295
R7000 CPU at 150MHz, Implementation 39, Rev 2.1, 256KB L2, 512KB L3 Cache
6 slot VXR midplane, Version 2.1
Last reset from power-on
PCI bus mb0_mb1 (Slots 0, 1, 3 and 5) has a capacity of 600 bandwidth points.
Current configuration on bus mb0_mb1 has a total of 540 bandwidth points.
This configuration is within the PCI bus capacity and is supported.
PCI bus mb2 (Slots 2, 4, 6) has a capacity of 600 bandwidth points.
Current configuration on bus mb2 has a total of 500 bandwidth points
This configuration is within the PCI bus capacity and is supported.
Please refer to the following document "Cisco 7200 Series Port Adaptor
Hardware Configuration Guidelines" on Cisco.com <http://www.cisco.com>
for c7200 bandwidth points oversubscription and usage guidelines.
4 Ethernet interfaces
2 FastEthernet interfaces
8 Serial interfaces
1 ATM interface
1 Packet over SONET interface
125K bytes of NVRAM.
Installed image archive
65536K bytes of ATA PCMCIA card at slot 0 (Sector size 512 bytes).
8192K bytes of Flash internal SIMM (Sector size 256K).
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:
推荐大家模拟那个3600的,速度能好一些,去下cisco的Enterprise的IOS,这样会支持几乎所有的命令 |
|