It is currently Wed Aug 21, 2019 1:11 am


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: [PATCH10] for Dynagen - Bug fixes and new features.
PostPosted: Sat Nov 24, 2012 1:56 am 
Offline

Joined: Sun Nov 04, 2012 8:11 pm
Posts: 19
Location: Buenos Aires, Argentina
Hi!. In this post, I have included all of my previous patchs and some others in one file. Again, this is for Dynagen v0.13.1.20111031 included in GNS3 v0.8.3.1.

=== Bug fixes:

  • The 'stop' command not stop any PIX device. When Popen is called with a string (qemu_cmd), Popen start a shell and the shell call the command (for example: pemu). Popen return the pid of the shell, not the pid of pemu. With this, the stop command not work because kill the shell process and the pemu process still running. Solution: call Popen with a list.

  • The 'start' command not start any Qemu device. Solution: modify the name of the flash and swap file when invokes qemu, removing the quotes in the filenames.

  • The 'start' command not start non IOS routers (virtualbox and qemu devices). This happens because the 'start' command try to read the idlepc value from all devices and virtualbox and qemu does not have them. Solution: even without idlepc, start the device.

  • The 'telnet' or 'console' command not start the telnet terminal to the console port. This happens because the 'telnet' option in dynagen.ini is not read. Solution: put the variable telnetstring inside of the Dynagen class.

  • The 'aux' command not start the telnet terminal to the auxiliar port. Solution: idem the telnet command.

  • The 'delay' option in dynagen.ini is not processed (for start multiple devices at the same time). Solution: put the variable startdelay inside of the Dynagen class.

  • With two dynamips hypervisors, one in a MS Windows box and the other in a Linux box, the hypervisor can't create the ghostios file because the pathname are different in both boxes (C:\TEMP vs /tmp). Solution: delete the specials chars inside the formatted_ghost_file() function.

  • When a router interface are connected to a bridged LAN, the 'show device' command causes a dynagen crash. Solution: add the Bridge instance comparison into the info() method of the NIO_udp class.

  • When the network file contains more than two spaces between the device and the interface in the connection, dynagen crash. For example: 'e0/1 =<SPACE><SPACE><SPACE> LAN <SPACE><SPACE><SPACE><SPACE> 4'. This happens because the params are splitted with split(' '). Solution: use split() instead of split(" ").

  • When enter a command with two or more params and more than two spaces between them, the command interpret as a parameter one or more empty strings. For example: 'start<SPACE><SPACE><SPACE> A <SPACE><SPACE><SPACE><SPACE> B <SPACE><SPACE><SPACE><SPACE>'. This happens because the params are splitted with split(' '). Solution: use split() instead of split(" ").

  • When exit from Dynagen in console mode, the qemuwrapper.py launch an exception: [Errno 32] Broken pipe. Solution: catch the socket.error exception to close the connection. Also, redefine the finish() method to an empty function. I'm not sure if it is correct, but work for me and apparently does not have secondary effects.


=== Cosmetic changes:

  • The progress bar of the delay in console mode when start multiple devices are modified. Also, is hidden in GNS3 because the text in the editbox can't be flushed frecuently and the text appears at the end of the last command.

  • Some minor changes in the copyright text to fit all text in a 80x25 terminal.

  • Fix the header of the 'list' command (the first line with the name of the columns).


=== New features:

  • With the new command 'show clock' you can see the actual local time and date inside dynagen.

  • New option in dynagen.ini file: baseconfig. As in GNS3, this option push an initial configuration to the routers when they not have yet a configuration entry in the .net file. Usage: baseconfig = /path/to/file/baseconfig.txt

  • In the 'ver' command, dynagen now shows the uptime of the dynagen console or GNS3.

  • In the command 'show device' you now can see the device running, suspended or stopped time. Also, the command 'show device' now accept the '/all' parameter or multiple devices to view. This uptime can be viewed also in GNS3 in the popup properties of the device.

  • In the 'list' command, you can filter the output through a regular expression. This is helpful when there are many devices in the lab and you don't need to show all of them (only running, only stopped, only in one hypervisor, and so on). The regular expression are case insensitive.

  • New option in dynagen.ini file: multistart. You can specify the default behavior when start multiple devices at the same time in a multiserver environment. When multistart is on, dynagen start one device in every hypervisor or wrapper at the same time, executes the delay, start other group of devices, and so on. The groups of device in every start are based on the IP address of the hypervisor or wrapper, not in the type of wrapper, port or device. With this, you don't need to wait the delay in every device, speeding up the startup process of the lab. When multistart is off, dynagen makes the pause before start every device (old style). This can be override in the 'start' command with the '/multi' and '/nomulti' option. Usage: multistart = on|off

  • In the start command, you can override the 'delay' and 'multistart' value of dynagen.ini with '/delay N', '/multi' and '/nomulti'. In '/delay', N specifies the time in seconds, it can be 0 (no wait).


=== How to install this patch:

  • Download the original Dynagen included in GNS3 v0.8.3.1 sources: http://www.gns3.net/download/

  • Uncompress the zip|tgz|bz2 file.

  • cd GNS3-0.8.3.1-src

  • Copy qemuwrapper and vboxwrapper files to the dynagen folder:

    cp qemuwrapper/qemuwrapper.py src/GNS3/Dynagen/
    cp vboxwrapper/tcp_pipe_proxy.py src/GNS3/Dynagen/
    cp vboxwrapper/vboxcontroller_4_1.py src/GNS3/Dynagen/
    cp vboxwrapper/vboxwrapper.py src/GNS3/Dynagen/

  • cd src/GNS3/Dynagen/

  • Apply the patch:

    patch < /path/to/A1-dynagen-patch10.patch

  • Download pemu and copy pemu and pemu.ini to src/GNS3/Dynagen/

  • Download dynamips and copy it to src/GNS3/Dynagen/

  • Optional: download dynamips source, patch and compile it to fix a bug with 2691, 3725 and 3745 routers. See: http://forum.gns3.net/topic5555.html

  • Now, you have all necessary files to run dynagen in console mode in src/GNS3/Dynagen/.

  • GNS3 uses the patched files in src/GNS3/Dynagen/ for some operations, for example, to show the popup banner with the info of the device. You not need to perform any other changes to make it work.

  • If you want to test this patch without change anything in your system, uncompress the source code, patch and test into the /tmp folder.


=== Finally:

  • All tested in Ubuntu 10.10 with Python 2.6.6 and Ubuntu 12.04 with Python 2.7.3

  • Enjoy!.

  • Some screen caps:

Image

Image

Image

Image




Attachments:
A1-dynagen-patch10.patch [56.6 KiB]
Downloaded 194 times
Top
 Profile  
 
 Post subject: Re: [PATCH10] for Dynagen - Bug fixes and new features.
PostPosted: Sat Nov 24, 2012 7:15 pm 
Offline

Joined: Tue Dec 28, 2010 5:10 am
Posts: 90
Location: INDIA
hi miguelo

can ur patches be applied for windows version and one more problem is with IOS 3745 it router donot boot with the saved configuration can u fix the bug for windows versoin gns#3 .?


regards
akspleae


Top
 Profile  
 
 Post subject: Re: [PATCH10] for Dynagen - Bug fixes and new features.
PostPosted: Tue Nov 27, 2012 10:57 pm 
Offline

Joined: Tue Dec 28, 2010 5:10 am
Posts: 90
Location: INDIA
hi

can u find the reson for this IOS crash !!!!
mine PC have win7 x64,16 gb ram intel i7
ios c3745-adventerprisek9_ivs-mz.124-25d


Regards

aksplease


Attachments:
ios crash.xls.xlsx [287.54 KiB]
Downloaded 171 times
Top
 Profile  
 
 Post subject: Re: [PATCH10] for Dynagen - Bug fixes and new features.
PostPosted: Wed Nov 28, 2012 1:58 am 
Offline

Joined: Sun Nov 04, 2012 8:11 pm
Posts: 19
Location: Buenos Aires, Argentina
aksplease, I guess you can apply the patch for windows, but I don't know how to compile and make GNS3 to an executable (.exe). I don't have this IOS, I have c3745-adventerprisek9_ivs-mz.124-15.t8.image. I tried this IOS and boot fine.

To try to determine where is the problem, I suggest you run from the DOS command line. Execute dynamips from the command prompt:

Code:
dynamips -P 3745 -r 256 c3745-adventerprisek9_ivs-mz.124-15.t8.image

If not boot, maybe the IOS is corrupt.

Finally, remember to decompress the IOS with winrar. Some virtual routers don't boot with the original (not decompressed) bin IOS.

Code:
#- Test 3745 -
autostart = False
[localhost:7200]
    udp = 12000
    [[3745]]
        image = /opt/ios/c3745-adventerprisek9_ivs-mz.124-15.t8.image
        ram = 256
        nvram = 64
        idlepc = 0x61532f60
        ghostios = True
    [[ROUTER A]]
        model = 3745
        console = 2000
        aux = 2100
        f0/0 = B f0/0
    [[ROUTER B]]
        model = 3745
        console = 2001
        aux = 2101
        f0/0 = A f0/0

Code:
Router#show version
Cisco IOS Software, 3700 Software (C3745-ADVENTERPRISEK9_IVS-M), Version 12.4(15)T8, RELEASE SOFTWARE (fc3)
Cisco 3745 (R7000) processor (revision 2.0) with 249856K/12288K bytes of memory.


Top
 Profile  
 
 Post subject: Re: [PATCH10] for Dynagen - Bug fixes and new features.
PostPosted: Wed Nov 28, 2012 8:29 pm 
Offline

Joined: Tue Dec 28, 2010 5:10 am
Posts: 90
Location: INDIA
hi miguelo
Thanks for your replay

i increase RAM and run the ios its working fine any way the main problem is

3745 series IOS donot boot with saved runing configuration like when i save running configuration with #wr comand but when i restart router the router donot boot with the saved configuration

so its bug with the IOS also accepted by jermy and his team but can you try to fix the bug in gns3


Top
 Profile  
 
 Post subject: Re: [PATCH10] for Dynagen - Bug fixes and new features.
PostPosted: Wed Nov 28, 2012 9:34 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi,

Quote:
3745 series IOS donot boot with saved runing configuration like when i save running configuration with #wr comand but when i restart router the router donot boot with the saved configuration

so its bug with the IOS also accepted by jermy and his team but can you try to fix the bug in gns3


The bug is actually in Dynamips. I tried to fix it without success.

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: [PATCH10] for Dynagen - Bug fixes and new features.
PostPosted: Thu Nov 29, 2012 11:56 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi Miguelo,

I applied everything else. You can download the dev version of GNS3 there -> http://code.gns3.net/gns3-devel/

Please let me know if something isn't right.

Thanks a lot for your contribution.

Regards,



_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO