0.2.5-pre24 ready

Hello all :)

First of all, thanks for all your messages and your encouragements.

The important changes of 0.2.5-pre24:

  • The JIT compiler has been rewritten, the performance improvement can hit from 40% to 60% on my benchmarks ;
  • The new JIT compiler now allows to run the emulator on systems with protections like ExecShield without disabling them ;
  • The instability on the Windows platform should be solved (any feedback is welcome);
  • Added a patch from Philipp Brenner to properly handle “Ctrl-C” key when running in hypervisor mode (BTS entry #21);
  • It is now possible to run in hypervisor mode on Windows 2000 ;
  • PA-4T+/PA-8T are now working correctly with IOS 12.0T (BTS entry #23, thanks to Vikas)

Files:

0.2.5-pre24 binary for X86 platforms

0.2.5-pre24 binary for X86_64 platforms

0.2.5-pre24 binaries for Windows XP and 2000

0.2.5-pre24 source code

51 Responses to “0.2.5-pre24 ready”

  1. Koen P Says:

    Chris, looks like a really nice version.

    Was something changed in the memory management for the Windows XP Version ? Memory usage seems to be really down a lot (I am not complaining ;-))

    Koen

  2. chris Says:

    Hi Koen,

    Yes, now the JIT doesn’t eat memory indefinitely. It uses a fixed host memory area to store translated pages, and flushes it when this area is full.

  3. Koen P Says:

    Chris, Thanks. Great work !.

  4. Vikas Says:

    Hi Chris ,

    Very Very Thanx for this release….

    Chris we are waiting for the DYNAGUI release.. do you have any idea when we will get it………….

  5. WingGundamZeroCustom.co.th Says:

    Great. Thank you very much.

    I just use this in my lab, emulator all in vmware, redhat 5 box and debian for cisco 7200 simulator 1 box and work great!!!

  6. Mems Says:

    Hi Chris,
    Fabulous piece of work! Thanks a lot.
    I’m just being curious about your numbering convention for SW releases. Could you shed some light on that?

  7. Yannick Says:

    Hi Vikas,

    I am working on the Dynagui application.
    It’s not anywhere close completion, but I will release an alpha version in the coming days for the people willing to play with it..

  8. marco Says:

    Hi chris,

    Thank! Yes, the instability problem has been solved and the memory consumption improves a lot, is it a way to further improve CPU process utilization in the future release? I think many people want to achieve this.

    Does the Intel Conroe Dual core CPU support running dynamips and dynagen? The new CPU is coming soon, I intend to buy it to do so. I worry about this new architecture CPU does not support for dynamips and dynagen.

  9. irfan Says:

    hi,
    Can some body tell how to use hypervisor mode on linux and windows
    i tried with -H in both OS but its not working

  10. marco Says:

    irfan :

    For windows, just only open the dynamips server shortcut, assume you have installed the dynagen.

    For Linux, type the command “nice dynamips -H 7200 &” to run as background service.

    For more detail document, pleaase refer to the complete tutorial http://dyna-gen.sourceforge.net/tutorial.htm

  11. Greg A Says:

    I’ve posted version 0.4.0 of Dynagen to the website (http://dyna-gen.sourceforge.net). In addition to bugfixes, the following features have been added:
    * Support for the new Dynamips Ethernet switch
    * Implicit support for distributed Dynamips servers (BTS #12)
    * Easy connection to router consoles from the CLI (BTS #12)

    The tutorial has been updated as well.

  12. marco Says:

    To Chris and Greg A:

    I test the dynamips-0.2.5-pre24 with dynagen-0.4 in the Trustix Linux distro for the ethernet_switch labs, it crashes immediately when I start the management console.

    The following errror messages occurs,but the python process keep running after the dynamips crashes.

    dynamips: symbol lookup error: dynamips: undefined symbol: pacp_sendpacket

    On the other hand,the other labs (i.e simple_lab1, frame_relay etc.) do not have this problem, but sometimes occurs the following error messages when exit the management console.

    Exiting..
    Shutdown in process..
    ***glibc detected *** free(): invalid pointer: 0×081a5588 ***
    Traceback (most recent call last):
    File “/usr/bin/dynagen”, line 586, in ?
    doreset()
    File “/usr/bin/dynagen”, line 536, in doreset
    d.reset()
    File “/usr/bin/dynamips_lib.py”, line 62, in reset
    result = send(self, ‘hypervisor reset’)
    File “/usr/bin/dynamips_lib.py”, line 1508, in send
    if data[3] == ‘-’ : break
    IndexError : string index out of range
    [1]+ Aborted nice dynamips -H 7200

  13. Greg A Says:

    Marco,
    Based on the error message it sounds like a problem with libpcap on your Linux box. The Ethernet switch lab is the only one of the samples that uses it. Comment out switchport #4 in that lab and see if the problem goes away. If it does, figure out what’s wrong with your libpcap install.

  14. marco Says:

    Greg A

    where can I upgrade the libpcap library? what RPM package should I install? could you please refer the related information of libpcap for me?

  15. steven.sun Says:

    Greg and Chris:
    Great work! Thank you!

  16. AndyB Says:

    Okay, so I *just* found this project, so forgive the newbie question. On a generic Windows XP system, how do I link a given interface to my existing active ethernet port? Is this even possible? (Documentation seems to indicate it is, but I’m uncertain what the command-line should look like…)

    Thanks in advance,
    AndyB

  17. steven.sun Says:

    Hi AndyB
    You can read the readme.txt document,I think you should find the answer in it.

  18. netn Says:

    Anyone seen this on bootup with 12.4(9)T?

    Booted with CLI on Windows XP Pro binary:
    dynamips.exe -t npe-300 -p 0:C7200-IO-FE -s 0:0:gen_eth:”\Device\NPF_{blahblah}” –disk0 256 –disk1 256 -X c7200-adventerprisek9-mz.124-9.T.bin

    % PC 0xffffffff87ff707c: Invalid instruction 0×14e67215 in delay slot.
    % PC 0xffffffff87ff72c8: Invalid instruction 0×5b20832d in delay slot.
    % PC 0xffffffff87ff7720: Invalid instruction 0×144afaf3 in delay slot.
    % PC 0xffffffff87ff776c: Invalid instruction 0×08bec33a in delay slot.

    I’ll try under *nix tomorrow to see if I can reproduce.

  19. Aly Awad Says:

    Hello Chris,

    I done some testing and tried different IOS versions to test performance

    I found that the best version that gives you the best performance is 12.1.27b

    I was able to run 6 instances with it no problem using dynamips directly
    Now I just use a .bat file to run the lab i need take a look :

    start dynamips -i 1 -X -p 1:PA-4T+ -s 1:0:udp:10001:127.0.0.1:10002 c7200-is-mz.121-27b.bin
    start dynamips -i 2 -X -p 1:PA-4T+ -s 1:0:udp:10002:127.0.0.1:10001 -s 1:1:udp:10003:127.0.0.1:10004 c7200-is-mz.121-27b.bin
    start dynamips -i 3 -X -p 1:PA-4T+ -s 1:0:udp:10004:127.0.0.1:10003 -s 1:1:udp:10005:127.0.0.1:10006 c7200-is-mz.121-27b.bin
    start dynamips -i 4 -X -p 1:PA-4T+ -s 1:0:udp:10006:127.0.0.1:10005 -s 1:1:udp:10007:127.0.0.1:10008 c7200-is-mz.121-27b.bin
    start dynamips -i 5 -X -p 1:PA-4T+ -s 1:0:udp:10008:127.0.0.1:10007 -s 1:1:udp:10009:127.0.0.1:10010 c7200-is-mz.121-27b.bin
    start dynamips -i 6 -X -p 1:PA-4T+ -s 1:0:udp:10010:127.0.0.1:10009 c7200-is-mz.121-27b.bin

  20. steven.sun Says:

    what’s mean about thie?? :â€?\Dev ice\NPF_{blahblah}â€?

  21. yong Says:

    well done!
    Can it emulate the switch? 3560 or 2950?

  22. Greg A Says:

    AndyB,
    Hi and welcome! A good place to start might be this tutorial: http://dyna-gen.sourceforge.net/tutorial.htm

  23. netn Says:

    steven.sun: the ‘blahblah’ was the unique identifier of my ethernet device under windows that I am binding to the chassis FE port of the 7206 — you can get a list of them by running ‘dynamips.exe -e’. Output should look something like this:
    dynamips.exe -e
    Cisco 7200 Simulation Platform (version 0.2.5-pre24-x86)
    Copyright (c) 2005,2006 Christophe Fillot.

    Instance ID set to 0.
    Network device list:

    \Device\NPF_GenericNdisWanAdapter: Generic NdisWan adapter
    \Device\NPF_{8A0E9C20-D09B-4A6B-99DF-121422E970F3}: TAP-Win32 Adapter V8
    \Device\NPF_{37BAB63C-6807-4D51-9A19-7D8A312C52BC}: TAP-Win32 Adapter V8
    \Device\NPF_{5658D414-7E87-4A53-B5D6-0942001230FB}: Broadcom NetXtreme Gigabit Ethernet Driver

    By selecting the DeviceID, you can bind 7206 ethernet ports to those in your system. This is covered in the readme, though examples in the wiki may be potentially out of date.

  24. AndyB Says:

    Okay, so the tutorial LOOKS useful, but doesn’t seem to include all the information a newbie like myself would need…

    The tutorial indicates there’s supposed to be a program “dynagen” that attaches to a server “dynamips”. All I see in the download is dynamips and cygwin.dll. So, is dynagen defunct or just missing? The tutorial also mentions a windows installer, but I also haven’t located this. Like I said, I have JUST the dynamips, cygwin.dll and a image file…

    The tutorial then directs us to create a text file simple1.net and then give the statement “On Windows, open the simple1.net file in explorer and Dynagen is automatically launched and the network started:”. Nope, don’t HAVE dynagen, so it sure isn’t going to start… At this point, I started to doubt the tutorial is all that relevant to the current version… (Or that I’m clearly missing the installer…)

    So, ignoring the tutorial and going on to other suggestions:

    “dynamips -e” returns
    \Device\NPF_GenericDialupAdapter: Generic dialup adapter
    \Device\NPF_{3C9F6522-25F5-4EDC-8F9F-1574429E9CB9}: Microsoft
    \Device\NPF_{D9C03645-E726-411D-80D7-A7AC6AA64AF6}: Broadcom NetXtreme Gigabit Ethernet Driver (Microsoft’s Packet Scheduler)

    so, it seems like the command-line I should enter to start this off would be:
    “dynamips -p 0:PA-FE-TX -s 0:0:gen_eth:\Device\NPF_{D9C03645-E726-411D-80D7-A7AC6AA64AF6} image.bin”

    That errors out with “the system cannot find the device specified.”

    I’ve tried to utilize ‘\\’ instead of ‘\’. I’ve tried just using the identifier within the {}. I’ve tried dropping the “\Device\”. Nothing I go gets dynamips to like my network interface…

    HELP! Thanks a ton in advance!

  25. hacki Says:

    Hi,

    I discovered the emulation software yesterday and find it simply amazing. Continue this good work.

    I have a question: how many routers did anyone install so far?

    And another one: what is the best way to configure a router that it uses least possible ressourses?

    TIA

  26. nula Says:

    @AndyB

    Greg gave you a link to tutorial and here is the link to dynagen home page where you can find download link and a other helpful stuff:

    http://dyna-gen.sourceforge.net

    Dynagen is really user friendly.Feel free to read tutorial few times.

    Kind regards.

  27. netn Says:

    AndyB: Ignore dynagen until you have dynamips operating stand-alone.

    Use quotes in accordance to the example provided:
    dynamips.exe -p 0:C7200-IO-FE -s 0:0:gen_eth:”\Device\NPF_{D9C03645-E726-411D-80D7-A7AC6AA64AF6}” image.bin

  28. Merklin Says:

    Hi Greg and Chris, great work!. I have been testing your emulator for quite a while….I have a question: Is it possible to emulate a serial link between 2 physical machines? o just a ethernet emulation?

    Kind Regards,

  29. Munir Says:

    Hai all,

    I just waiting for DynaGUI Release.

    Thanks to Chris, Greg and Yannick.
    Hopely i’ts look like boson network designer or more powerfull than that ( Like integration with MS-Visio )

    Regards,

    Munir

  30. steven.sun Says:

    Dear All:
    Who can tell me how I can setup a virtual switch??could you tell me the detail command?? and where I can find the Virtual Ethernet switch configuration file??
    Thanks.

  31. Vikas Says:

    Hi All,

    I have written a basic documentation for using dynamips with the help of dynagen.This documentation is really meant for those who are new to dynamips and want to start from the very beginning.

    It has an Interactive 3-Dimensional Model of the Cisco 7200 Router,and has step by step examples for using dynamips on your computer.It is best viewed on 1024×768 resolution

    Chris,

    I have inserted some pictures of Interfaces and am not confirm whether they are correct.Plz. Inform me if you find mistakes in it.Most of the work is just copy paste.

    I will keep upgrading the documentation.

    vikas.k.srivastava@gmail.com

    Dowload the file from http://www.uploading.com/?get=1D8H486Z

  32. Vikas Says:

    One More Link for the above file is

    http://rapidshare.de/files/25630045/DYNADOC.rar.html

  33. ccie33 Says:

    great job Vikas thanks

  34. kingsz1 Says:

    Thank you.
    Is it possible simulate other Cisco router, say 1700, 2800 etc?
    I have only 2801 IOS, can this IOS work in your simulater?

  35. steven.sun Says:

    Hi all:
    I have a simple quesion.Could the dynamips can read another Ios file?? or only can read the 7200 series Ios file?

  36. Nigel Says:

    kingsz1/steven.sun

    I’m afraid tne simulator only works with 7200 ios as it is emulating 7200 hardware. Chris was working on 3600 support but I am not sure how far that has got yet!

  37. storm Says:

    Being that it’s a 7200 emulator it only takes 7200 IOS.

    Thanks for the new release Chris.

    So far I saw a big speed jump in pre23 but pre24 is slower than pre23? This is running on Windows XP Pro and I’m judging speed by the time it takes to do a “show run”

  38. Shiro Says:

    Hi chris,

    Could you please complete the ISDN ?

    I’m waiting for your next release, thank you very much!!

  39. Aly Awad Says:

    Hi all,
    Hi Hacki,

    After playing a while with the emulator I was able to run 7 router fully converged.” At first 3 router was the max i could achieve” :-)

    Iam not sure if my config is the best we have to ask the others about their results too

    The idea is that I use an old IOS which does not require alot of resources
    I use that lates and final release of 121 speceficly I use the “c7200-p-mz.121-27b.bin” ios because it supports MPLS

    My topology is simple CE CE- PE - Core - PE - CE CE
    I also tend to use the “-X” option to avoid using a file to simulate RAM
    Iam also trying to check if using a slower NPE and smaller RAM makes it emualtion faster
    Here is the command I write

    start /BELOWNORMAL dynamips -i 2 -r 64 -t npe-100 -X -p 1:PA-4T+ -s 1:0:udp:10003:127.0.0.1:10004 -s 1:1:udp:10002:127.0.0.1:10001 -C config\PE1.txt image\c7200-p-mz.121-27b.bin

    If anyone has more experience about how to tweek it to emulate more than 10 routers on same PC please tell me !!

    Thank you all

  40. KB Says:

    Aly, what is your system HW config?

  41. Ben Says:

    I’ve tried to build dynamips-0.2.5-pre24 on a Macbook (Intel Core Duo, XCode 2.3, OS X 10.4.7); I receive the following regardless of the DYNAMIPS_ARCH? setting:

    Compiling mips64.c
    Compiling mips64_jit.c
    mips64_jit.c: In function ‘mips64_jit_init’:
    mips64_jit.c:114: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
    mips64_jit.c:114: error: (Each undeclared identifier is reported only once
    mips64_jit.c:114: error: for each function it appears in.)
    make: *** [mips64_jit.o] Error 1

    I guess this must be a Darwin problem - can’t see MAP_ANONYMOUS defined anywhere?

    Also, 0.2.4 built fine with nojit (thanks to Rocco Lucia), but not x86 - is this a CPU incompatibility (Core Duo vs. plain x86) or o/s (Darwin vs. Linux)?

    Thanks,
    Ben

  42. Zhe Says:

    To Ben,
    They’re Darwin incompatiable problems…from 0.2.3 through 0.2.5-pre23, the simulator works fine on PPC platforms with nojit, but x86, seems Apple’s gcc is different.
    MAP_ANONYMOUS in 0.2.5-pre25 is a little different between Linux and Darwin(as I know, Solaris either), just change MAP_ANONYMOUS into MAP_ANON

  43. Greg A Says:

    Great contribution Vikas! The more documentation the better.

  44. hacki Says:

    hi,

    I thought it would be useful to have discussion board about dynamips - dynagen so I created (a quick and dirty) one.

    http://7200emu.hacki.at

    feel free do come, register and discuss.

    I appreciate all input to improve the forum.

    hacki

  45. chris Says:

    hacki> Thanks a lot, this is very useful!

    Zhe> Thanks for the info about Darwin, and the MAP_ANON/MAP_ANONYMOUS. I’ll try to fix that. For the JIT problem, I’ll take a look at it.

    Aly Awad> With the new “idle pc” feature present in 0.2.5-pre26 you should be able to run 10 instances. Before, I was only able to run 3 instances on my laptop and it was very slow, now, it is ok with 6 instances.

    storm> I didn’t think someone would notice this change :) In fact, in pre24, there is a compromise between performance and memory used by the JIT. In pre23, the JIT could eat memory endlessly, this is not the case anymore. Now, by default, the JIT uses a maximum of 16 Mb on Cygwin, and 64 Mb on other systems. You can tune this by using the “–exec-area” option.

    When the JIT memory is fully used, there is a flush. The “sh run” command can put “pressure” on the JIT since it requires a lot of compiled pages.

    Shiro> no progress on the ISDN at this time, I’m lacking some info about the board. Someone has a PA-4B or a PA-8B ?

    kingsz1, steven.sun> At this time, only the 7200 platform is supported. I played a little with the 3600, it may possible to support it since the architecture seems to be relatively similar. For the 1800/2800/3800, I don’t know these platforms, and since I don’t have this kind of routers, I’m of course not allowed to download their IOS (Moreover, it is probably almost impossible to emulate a platform without having a real one to play with).

    Vikas> Thanks a lot for this doc, I’m sure it will be useful for the newcomers.

  46. Ben Says:

    Zhe: thanks mate, worked a charm. A little searching has shown that MAP_ANON is deprecated in the Linux & Solaris worlds, whereas the BSDs persist with it. The Linux mmap man page notes that MAP_ANON is an alias for MAP_ANONYMOUS - so I’ve added to utils.h:
    #ifndef MAP_ANONYMOUS
    #define MAP_ANONYMOUS MAP_ANON
    #endif

    Now, I’d love to have JIT going:
    $ make
    Extracting ROM from ELF file ‘microcode’…
    Building assembly definitions
    Compiling x86_trans.c
    /tmp/ccau7GDz.s:534:Can’t relocate expression. Absolute 0 assumed.
    /tmp/ccau7GDz.s:534:operands given don’t match any known 386 instruction
    /tmp/ccau7GDz.s:651:Can’t relocate expression. Absolute 0 assumed.
    /tmp/ccau7GDz.s:651:operands given don’t match any known 386 instruction
    make: *** [x86_trans.o] Error 1

    $ gcc –version
    i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5341)

  47. aly awad Says:

    Hello all

    I will try to use the later version soon
    About my system specs

    Winxp SP1 ( not SP2 ) not ever
    CPU 2.8 Ghz I Mega cache
    1Gega Ram

  48. vmissouril Says:

    Chris,

    I can get you a PA-4B for ISDN. I just need a shipping address.

  49. vivek Says:

    dear friend ,
    i m vivek , actually i need a software , or u can say a simulator , on which i cn configure MPLS network , as we seen Bosson for CCNP cxisco command , i neep a complete simulationm software , on whcich i can learnm MPLS networking

  50. Shanan Says:

    Guys,

    I’ve recently come across your simulator, thanks your’ve done some great work. reading some of the todo tasks, I was woundering if anyone has pointed you in the direction of PearPC & QEMU to help out with the MIPS64 emulation. also has anyone been working on the 3800 ISR router platform, someother really nice to haves would be Cisco’s 3560 switch, and PIX/ASA (x86 platform).

    thanks again.

  51. kats Says:

    Hi Chris

    I have installed dynamips and dynagen on my windows 2000 machine but i have a few problem. When i start up dynamips server in Hypervisor mode having edited it to reflect on the dynamips-w2000.exe , it comes up BUT when i run the network.ini file, nothing happens. I mean npothing shows up in the hypervisor mode eg R1,or ports etc . It looks like the network.ini file contents are not being looked at at all. Below is the network.ini file

    # Simple lab

    [localhost]

    [[7200]]
    image = \Program Files\Dynamips\images\c7200-adventerprisek9-mz.124-4.T1.bin
    # On Linux / Unix use forward slashes:
    # image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
    npe = npe-400
    ram = 160

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

    I can run the simulator in command line e.g C:\Program Files\Dynamips>dynamips-w2000.exe -i 1 -t npe-400 -idle-pc=0×607117d4
    c7200-adventerprisek9-mz.124-4.T1.bin

    But thats it, i can run it any other way as described in the Read me notes.

    Any ideas whats wrong ?