青蛙不是癞蛤蟆

Cisco 7200 Simulator

able of contents [hide]

Introduction

I started recently (August 2005) a project to emulate a Cisco 7200 on a traditionnal PC. This kind of emulator would be useful 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 features of Cisco IOS ;
  • Check quickly configurations to be deployed later on real routers.


Of course, this emulator cannot replace a real router, it is simply a complementary tool to real labs for administrators of Cisco networks or people wanting to pass their CCNA/CCNP/CCIE exams.


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 platform, including the latest 12.2S and 12.4.

The following devices are emulated in the current release (0.2.4):

  • 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 (Console and AUX ports);
  • Dallas DS1620 Temperature Sensors and Voltage Sensors, allowing the Environmental Monitor to work properly ;
  • NMC93C46 Serial EEPROM ;
  • Bootflash of 8 Mb (Intel 28F016SA) ;
  • I/O and Midplane FPGA specific to the C7200 platform ;
  • Basic Galileo GT64010/GT64120 PCI controller, DEC 21x50 PCI bridges and so.
  • Ethernet cards "C7200-IO-FE" and "PA-FE-TX" based on DEC21140 chip ;
  • ATM card "PA-A1" based on Texas Instruments Tneta1570 chip ;
  • Serial cards "PA-4T+" and "PA-8T"


New features in 0.2.4:

  • Serial interface support to allow use of PPP/HDLC/Frame-Relay encapsulations
  • Virtual Frame-Relay switch with basic LMI support (ANSI Annex D)


You can also get some tips/development info... 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/products/hw/routers/ps341/products_tech_note09186a00800942e0.shtml)


Contributors are welcome ! :)

For people interested to contribute there is a TODO List.


Download

The current release is 0.2.4, published Feb 14, 2006 (you can consult the README file (http://www.ipflow.utc.fr/dynamips/README-0.2.4.txt)).

You have to download only one binary file corresponding to your architecture:


If you are using the Windows version, you have to download and install the WinPcap library (http://www.winpcap.org/). It is now 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):


Remark: the sources include 3 files which are not written by me: pcireg.h from NetBSD (http://www.netbsd.org) (under BSD licence), amd64-codegen.h and x86-codegen.h from the Mono project (http://www.mono-project.com), under GPL licence. Of course these files keep their licences and their copyrights.


How to use it ?

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:~/mipsemu$ unzip -p c7200-g6ik8s-mz.124-2.T1.bin > image.bin
warning [c7200-g6ik8s-mz.124-2.T1.bin]:  27872 extra bytes at beginning or within zipfile
  (attempting to process anyway)
chris@portchris2:~/mipsemu$ 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:

chris@portchris2:~/dynamips-0.2.4$ ./dynamips image.bin -t npe-400 -p 0:C7200-IO-FE -s 0:0:udp:10000:127.0.0.1:10001 -p 1:PA-A1 -s 1:0:udp:10002:127.0.0.1:10003 -p 2:PA-8T -s 2:1:udp:10004:127.0.0.1:10005
Cisco 7200 Simulation Platform (version 0.2.4-x86)
Copyright (c) 2005,2006 Christophe Fillot.

IOS image file: image.bin

C7200: Warning, no MAC address set.

CPU0 Device list:
   ram            : 0x000000000000 (0x10000000)
   rom            : 0x00001fc00000 (0x00400000)
   remote_ctrl    : 0x000011000000 (0x00001000)
   bootflash      : 0x00001a000000 (0x00800000)
   nvram          : 0x00001e000000 (0x00020000)
   zero           : 0x00001f000000 (0x00c00000)
   mp_fpga        : 0x00001e800000 (0x00001000)
   io_fpga        : 0x00001e840000 (0x00001000)
   pci_io         : 0x000100000000 (0x00200000)
   gt64120        : 0x000014000000 (0x00001000)
   PA-8T(2)       : 0x00004d000000 (0x00004000)
   PA-8T(2)       : 0x00004d020000 (0x00004000)
   PA-A1(1)       : 0x000048800000 (0x00800000)
   C7200-IO-FE(0) : 0x000048000000 (0x00800000)

PCI Bus "MB0/MB1" Device list:
   clpd6729       : ID 1013:1100, Bus  2, Dev. 16, Func.  0
   C7200-IO-FE(0) : ID 1011:0009, Bus  1, Dev.  0, Func.  0, IRQ: 2
   PA-A1(1)       : ID 10b5:906e, Bus  5, Dev.  1, Func.  0, IRQ: 2
   PA-A1(1)       : ID 104c:a001, Bus  5, Dev.  0, Func.  0, IRQ: 2
   dec21150       : ID 1011:0023, Bus  0, Dev.  9, Func.  0
   dec21150       : ID 1011:0023, Bus  0, Dev.  8, Func.  0
   dec21150       : ID 1011:0023, Bus  0, Dev.  7, Func.  0
   dec21050       : ID 1011:0001, Bus  0, Dev.  1, Func.  0
   gt64120        : ID 11ab:4620, Bus  0, Dev.  0, Func.  0, IRQ: 4

PCI Bus "MB2" Device list:
   PA-8T(2)       : ID 1137:0001, Bus 11, Dev.  1, Func.  0, IRQ: 2
   PA-8T(2)       : ID 1137:0001, Bus 11, Dev.  0, Func.  0, IRQ: 2
   dec21150       : ID 1011:0023, Bus  0, Dev.  9, Func.  0
   dec21150       : ID 1011:0023, Bus  0, Dev.  8, Func.  0
   dec21150       : ID 1011:0023, Bus  0, Dev.  7, Func.  0

Loading ELF file '../C7200-P-.BIN'...
   * Adding section at virtual address 0x80008000
ELF entry point: 0x80008000

Starting simulation (CPU0 PC=0xffffffffbfc00000), JIT is enabled.
Cisco 7200 (Predator) 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-P-M), Version 12.2(25)S7, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Fri 28-Oct-05 09:12 by pwade
Image text-base: 0x60008DE0, data-base: 0x6183A000

Cisco 7206VXR (NPE400) processor (revision A) with 229376K/32768K bytes of memory.
Processor board ID 4294967295
R4600 CPU at 100Mhz, Implementation 32, Rev 1.2
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 500 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 0 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 CCO <www.cisco.com>,
for c7200 bandwidth points oversubscription/usage guidelines.


1 FastEthernet interface
8 Serial interfaces
1 ATM interface
125K bytes of NVRAM.

8192K bytes of Flash internal SIMM (Sector size 256K).


Press RETURN to get started!

posted on 2006-08-11 13:04 学习资料库 阅读(722) 评论(0)  编辑 收藏 引用 网摘 所属分类: MPLS/VPN


只有注册用户登录后才能发表评论。
网站导航: