2007년 12월 13일 목요일

Cisco 7200 Simulator - Dynamips

[Project Homepage]

Introduction

The Project was started in August 2005 to emulate a Cisco 7200 on a traditional PC.
Now, it also supports Cisco 3600 series (3620, 3640 and 3660), 3700 series (3725, 3745) and 2600 series (2610 to 2650XM, 2691).

The goals of this emulator are mainly:

    * To be used as a training platform, with software used in real world.
    * 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.

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, 3600, 3700 and 2600 platforms, including the latest 12.2S and 12.4T.

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

  • MIPS64 and PowerPC CPU processors. The instruction sets are not completely emulated now (MIPS 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/C3700/C2600 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/GT96100 PCI controllers, 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 "PA-FE-TX" based on DEC21140 chip
  • FastEthernet cards "C7200-IO-2FE" and "PA-2FE-TX" based on Intel i8254x chips
  • GigabitEthernet cards "C7200-IO-GE-E" and "PA-GE" based on Intel i8254x chips
  • Ethernet cards "PA-4E" and "PA-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 (3620,3640,3660) Network Modules (NM) are currently supported:

  • Ethernet cards: "NM-1E", "NM-4E" and "NM-1FE-TX", all based on AMD Am79c97x chips
  • Ethernet switching module: "NM-16ESW"
  • Serial card "NM-4T"

The following Cisco 2691/3725/3745 Network Modules (NM) are currently supported:

  • FastEthernet cards: "NM-1FE-TX"
  • Ethernet switching module: "NM-16ESW"
  • Serial card "NM-4T"

The following Cisco 2600 Network Modules (NM) are currently supported:

  • Ethernet cards: "NM-1E", "NM-4E" and "NM-1FE-TX"
  • Ethernet switching module: "NM-16ESW"

Lab simulation / "Hypervisor" mode

It is now possible to run the emulator as an "Hypervisor" to start and control many virtual router instances simultaneously.

Dynagen, 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.

Dynagui is a graphical front-end. It uses Dynagen to communicate with the hypervisor.


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.

Emulated hardware
The emulator currently supports the following platforms:
   - Cisco 7200 (NPE-100 to NPE-400)
   - Cisco 3600 (3620, 3640 and 3660)
   - Cisco 2691
   - Cisco 3725
   - Cisco 3745
   - Cisco 2600 (2610 to 2650XM)
   - Cisco 1700 (1710 to 1760)

By default, a Cisco 7206VXR with NPE-200 (256 Mb of DRAM) is emulated.
To emulate another platform, use the "-P" command line option
(for example, "-P 3725" or "-P 3600").

For the 7200, you can change the NPE type with the "-t" option.
It is possible to select "npe-100", "npe-150", "npe-175", "npe-200", "npe-225", "npe-300" and "npe-400". The "npe-g1" is not working.

For the 3600, a 3640 with 128 Mb is emulated by default.
You can change this with the "-t" option and by specifying "3620" or "3660".
Don't forget to set the chassis type depending on your IOS image, a c3660 image will not run on c3640 hardware and vice-versa.

Remark: PCMCIA card emulation is not supported yet with Cisco 3600.

Command Line Options details
--idle-pc <pc>
:
The "idle PC" feature allows you to run a router instance without having a 100% CPU load. This implies that you can run a larger number of instances per real machine.
To determine the "idle PC", start normally the emulator with your Cisco IOS image, and a totally IOS empty configuration (although not mandatory, this will give better results).
When the image is fully booted, wait for the "Press RETURN to get started!" message prompt, but do not press Enter key.
Wait about 5 seconds, then press "Ctrl-] + i".
Some statistics will be gathered during 10 seconds.
At the end, the emulator will display a list of possible values to pass to the "--idle-pc" option.
You may have to try some values before finding the good one.
To check if the idle PC value is good, just boot the Cisco IOS image, and check your CPU load when the console prompt is available.
If it is low, you have found a good value, keep it preciously.
Important remarks: 
* An "idle PC" value is *specific* to a Cisco IOS image.
   You cannot boot a different IOS image without proceeding as described above.
* Do not run the process while having the "autoconfiguration" prompt.

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.

$ 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)
$ 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.


Cisco 7200 Simulator FAQ

댓글 2개:

  1. I'm trying to connect 2 virtual machines with a serial using the C7200 Simulator, I don't know how to make link, they do not see each other.

    I'm doing this:

    On router 1:



    dynamips-wxp.exe image.bin -p 0:C7200-IO-FE -s 0:0:udp:10000:127.0.0.1:10001 -p 1:PA-4T+ -s 1:0:udp:10002:127.0.0.1:10003



    On router 2:



    dynamips-wxp.exe image.bin -p 0:C7200-IO-FE -s 0:0:udp:10001:127.0.0.1:10000 -p 1:PA-4T+ -s 1:0:udp:10003:127.0.0.1:10002

    답글삭제
  2. @nachetings - 2008/08/07 02:17
    I haven't yet tried such a configuration. Therefore I can't answer now to your question.

    I'm sorry that I don't have time to try that configuration.

    Maybe I can give the answer later.

    답글삭제