加入收藏 设为首页 联系站长
首页 | 虚拟动态 | Cisco模拟 | Juniper仿真 | 虚拟机 | 网络仿真 | 软件路由 | 技术专题 | 相关软件 | 交流论坛
>首页 -> Cisco模拟 -> Pemu

TOP

confDynagen 0.9.3 17082007 with PEMU support
[ 录入者:admin | 时间:2007-10-27 15:43:53 | 作者: | 来源: | 浏览:463次 ]
Hi all,
Let me introduce confDynagen - configuration mode add-on for Dynagen. Ihope Greg will once merge it into Dynagen. This is an experimentalrelease of the add-on, it probably contains many bugs, which I did notcatch so please report anything you find.

Download python sources: http://www.lkbaba.sk/tmp/dynagen.zip
windows exe: http://www.lkbaba.sk/tmp/dynagen_win.zip

Info:

Dynagen configuration mode allows you to dynamically change your lab,by editing the .net config “on the fly” - interactively. You canadd/change/remove all lab/router options that are available in the .netfiles without restarting your lab. You can also add/change hypervisorswithout restarting your lab.
Here is a little example:
Dynagen management console for Dynamips
#--- we ran dynagen without any command lineoption to start from scratch. There is, of course, possibility to rundynagen as with .net file as an argument

=> conf localhost
Hypervisor on localhost:7200 created
#--- this command added the hypervisorrunning on localhost:7200 to the lab. No need to specify 7200 here asit is the default port. In case you would need another port typesomething like “localhost:7201”

=>(config-localhost:7200)help
Documented commands (type help <topic>):
========================================
2691  3640  3725  7200  help  no  router   
3620  3660  3745  exit  hist  py  workingdir
#--- everybody who works with Cisco routersknows what this means – we jumped into config mode – in this case a“hypervisor config mode”. Here is a list of commands available

=>(config-localhost:7200)7200
#--- first we need to set the defaultoptions for our future routers. This is configured under section 7200(same as in the .net file). Minimum setting is the IOS image path.

=>(config-localhost:7200-7200)help
Documented commands (type help <topic>):
=======================================
cnfg     disk0  exit      help  idlemax  idlesleep  midplane  npe    py   slot
confreg  disk1  ghostios  hist  idlepc   image      no        nvram  ram
#--- or we can set any other option, or unset it with “no” command similarly as in Cisco CLI

=>(config-localhost:7200-7200)image = C:\IOS\C7200-jk9s-mz.124-12.bin
C7200-jk9s-mz.124-12.bin found in user idlepc database
Setting idlepc value to 0x60654b68
#--- setting your image, also tries to find out the idlepc value in the idlepc database

=>(config-localhost:7200-7200)npe
npe = <npe type>
set NPE type. Choose "npe-100", "npe-150", "npe-175", "npe-200", "npe-225", "npe-300" or "npe-400"
=>(config-localhost:7200-7200)npe = npe-400
=>(config-localhost:7200-7200)exit
Exiting...
=>(config-localhost:7200)router R1
Router R1 created
#--- “router <router_name> [model<model>]” command creates a new router with specified model andname. All options set under “model default config” get applied onto therouter. The default model is 7200, so we could use command “router R1”instead of “router R1 model 7200” (which will work too). Also this willtake you directly into “router config mode”.


=>(config-localhost:7200-router R1)exit
Exiting...
=>(config-localhost:7200)router R2
Router R2 created
=>(config-localhost:7200-router R2)help
Documented commands (type help <topic>):
========================================
a     confreg  e     f         help     idlepc     midplane  nvram  py   se
at    disk0    et    fa        hist     idlesleep  no        p      ram  slot
cnfg  disk1    exit  ghostios  idlemax  image      npe       po     s
#--- under “router R2 router config mode” wecan set specific options like (midplane, nvram size, disk0 size etc.)for this specific router. The “a”, “f”, “e” commands are for creatingconnections between routers.

=>(config-localhost:7200-router R2)f0/0 = R1 f0/0
#--- Here is an example of connectioncreation. The syntax is the same as in .net files. Syntax fordisconnecting this connection would be the Cisco CLI form: “no f0/0 =R1 f0/0”. Every other option can be removed by using the “no” versionof the command.

=>(config-localhost:7200-router R2)exit
Exiting...
=>(config-localhost:7200)exit
Exiting...
=> show run
autostart = False
[localhost:7200]
    [[7200]]
        npe = npe-400
        image = C:\IOS\C7200-jk9s-mz.124-12.bin
        idlepc = 0x60654b68
    [[ROUTER R1]]
        model = 7200
        F0/0 = R2 F0/0
    [[ROUTER R2]]
        model = 7200
        F0/0 = R1 F0/0
#--- show run command displays the running configuration of current lab in the .net file format

=> start /all
100-C7200 'R1' started
100-C7200 'R2' started
#--- we start our routers

=> conf localhost
#--- after the routers are started we canstill go to config mode and add/change/remove stuff. The changes arereflected on the routers either immediately, or after router reload –depends on the type of option changed.

=>(config-localhost:7200)router R1
#--- if router R1 already exists (this isthe case now) this is the way we can get into the “router config mode”to add/change/remove any router variable

=>(config-localhost:7200-router R1)f1/0 = R2 f2/0
#--- here we added a new connection “on thefly”. As you can see in the “show run” output above there is no adaptercard in slot 1 in our 7206. This command will virtually insert the card(PA-FE-TX in this example) into slot1 and create the connection betweenboth routers. This could be seen on the router as an OIR (onlineinsertion removal) event:

%OIR-6-INSCARD: Card inserted in slot 1, interfaces administratively shut down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down
%ENTITY_ALARM-6-INFO: ASSERT INFO Fa1/0 Physical Port Administrative State Down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down
#---As you might know, only high-end routerslike 720x support hot-insertion and removal of port adapters, so thisis not supported on 36x0 or other low-end routers. However you canstill create/delete connections between two 3660 routers, provided youhave the network module ALREADY inserted since the router started.

=>(config-localhost:7200-router R1)exit
Exiting...
=>(config-localhost:7200)exit
Exiting...
=> show run
autostart = False
[localhost:7200]
    [[7200]]
        npe = npe-400
        image = C:\IOS\C7200-jk9s-mz.124-12.bin
        idlepc = 0x60654b68
    [[ROUTER R1]]
        model = 7200
        F0/0 = R2 F0/0
        slot1 = PA-FE-TX
        F1/0 = R2 F2/0
    [[ROUTER R2]]
        model = 7200
        F0/0 = R1 F0/0
        slot2 = PA-FE-TX
        F2/0 = R1 F1/0
#--- show run output reflects the change

=> copy run start
#---after finishing your work you can saveit back into .net file. This will also save the NVRAM config into fromthe routers into the .net file under “configuration” option, similarlyas you would do with “save /all” command
Hi all,
let me introduce confDynagen - an add-on to Dynagen with PEMU support. Works for linux only! For more information about the features confDynagen has on dynamips platform consult
Here I will describe the PEMU support. It is based on UDP tunnel support recently introduces by mmm123.
It is fairly easy to connect DYNAMIPS to PEMU using confDynagen. Just write a .net file (similarly as in dynagen) like this:
Code:

#debug = 1
autostart = false
[localhost:7200]
        [[7200]]
        image = /home/jumbo/IOS/C7200-jk9s-mz.124-12.bin
        npe = npe-400
        sparsemem = True

        [[router R1]]
        e1/0 = FW1 e0

[pemu FW1]


Basically what I did was that I connected router Eth1/0 to PEMU e0 port. To run this lab you just type dynagen lab.net (same as in dynagen)

After you run the lab (as usuall using dynagen) you can start/stop PEMU instances the usual dynagen way - with start/stop command.

To run this you need to:
1. unzip the file attached
2. create FLASH file, as detailed in PEMU README
3. rewrite pemu.ini file as detailed in PEMU README, specifing the image name. For this you'd need proper PIX image from Cisco.
4. run dynamips hypervisor with usual dynamips -H 7200

After a while of playing I was able to create another full-redundancy lab with this:
Code:

#debug = 1
autostart = false
[localhost:7200]
        [[7200]]
        image = /home/jumbo/IOS/C7200-jk9s-mz.124-12.bin
        npe = npe-400
        sparsemem = True

        [[router R1]]
        e1/0 = FW1 e0
        e1/1 = R2 e1/1

        [[router R2]]
        e1/0 = FW2 e0

        [[router R3]]
        e1/0 = FW1 e1
        e1/1 = R4 e1/1

        [[router R4]]
        e1/0 = FW2 e1

[pemu FW1]

[pemu FW2]
e3 = FW1 e3


With this info you should be able to create any lab you like. Feel free to post any comments and ideas. Also this is quite new release, so post any bugs you find. <!-- td.attachrow { font: normal 11px Verdana, Arial, Helvetica, sans-serif; color : #000000; border-color : #000000; } td.attachheader { font: normal 11px Verdana, Arial, Helvetica, sans-serif; color : #000000; border-color : #000000; background-color: #D1D7DC; } table.attachtable { font: normal 12px Verdana, Arial, Helvetica, sans-serif; color : #000000; border-color : #000000; border-collapse : collapse; } -->

附件

confDynagen.zip (447.16 KB)

2007-7-18 07:49, 下载次数: 33

[上一篇]命令行配置IP和禁用/启用网卡工具 [下一篇]Pemu 说明中文翻译版
※相关文章
 

评论

称  呼:
内  容:

相关栏目

最新文章

热门文章

推荐文章

赞助商链接