Wandering's Blog » 日志 » Dynamips: Dynagen拓朴设计(.net)之以不变应万变 v4.0
Dynamips: Dynagen拓朴设计(.net)之以不变应万变 v4.0
Wandering 发表于 2008-05-05 12:12:30
.
v4.0 是在 v3.0 的基础上将设备型号从 3640 提升到 7206 (*注1),目的是为了解决 3640 上存在的一些 BUG (*注2),IOS 版本也随之发生变化。另外,对设备配置进行简化,所有的 ethernet 接口提升为 fastethernet。
升级后付出的代价是虚拟路由器耗用更多的系统资源,只是启动所有路由器+不启动任何动态路由协议的简单的二三层连接的情况下,就会比 v3.0 高出 2-4 倍的 CPU 消耗。
*注1: 本来是提升到 3745,但 3745 在 linux 下有二次启动无法装载文本配置文件的 bug
*注2: 据说 3640 在虚拟机架的组播实现过程中会出现 ping 不通的问题
#
#
#
# =====================[[[[ Super Topology v4.0 ]]]]=====================
#
#
# Router: R1, R2, R3, R4, R5, R6 (Cisco 7200, Full-mesh)
# Switch: SW1, SW2, SW3, SW4 (Cisco 3640, Full-mesh)
# Router: TermServ, BB123 (Cisco 3640)
#
#
# ( R1 )-s1/0,s1/1------|
# ( R2 )-s1/0,s1/1------|
# ( R3 )-s1/0,s1/1------+-{ Frame-Relay Cloud }
# ( R4 )-s1/0,s1/1------|
# ( R5 )-s1/0,s1/1------|
# ( R6 )-s1/0,s1/1------|
#
# ( Rx )-s1/n--------s1/n-( Ry )
# | |
# dlci: xny dlci: ynx (n=0,1)
#
# ( Rx )-f2/0--------f0/x-[ SW1 ]
# ( Rx )-f3/0--------f0/x-[ SW2 ]
#
#
# |-f0/0--------f1/0-[ SW1 ] (BB1)
# (BB123)-+-f1/0--------f1/0-[ SW2 ] (BB2)
# |-f2/0--------f1/0-[ SW3 ] (BB3)
# |-f3/0--------f1/0-[ SW4 ]
#
#
# |-f0/10------f0/12-|
# [ SW1 ]-|-f0/11------f0/13-|-[ SW2 ]
# | | | |
# f0/12 f0/13 f0/10 f0/11
# | | | |
# | | | |
# | | | |
# f0/10 f0/11 f0/12 f0/13
# | | | |
# [ SW4 ]-|-f0/12------f0/10-|-[ SW3 ]
# |-f0/13------f0/11-|
#
#
# [ SW1 ]-|-f0/14------f0/14-|-[ SW3 ]
# |-f0/15------f0/15-|
#
# [ SW2 ]-|-f0/14------f0/14-|-[ SW4 ]
# |-f0/15------f0/15-|
#
#
#
# (Wandering, 2008/05/08)
#
#
#
autostart = false
ghostios = true
sparsemem = true # This is only used for Windows which has a 2 GB per process limit
[localhost:7200]
udp = 11000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[7200]]
image = D:\Dynamips\images\c7200-adventerprisek9-mz.124-11.T.img
ram = 256
confreg = 0x2102
idlepc = 0x60790ee4
npe = npe-200
mmap = true
[[ROUTER R1]]
model = 7200
console = 2001
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 1
s1/1 = FR1 1
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R1.cfg
[[ROUTER R2]]
model = 7200
console = 2002
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 2
s1/1 = FR1 2
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R2.cfg
[[Router R3]]
model = 7200
console = 2003
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 3
s1/1 = FR1 3
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R3.cfg
[localhost:7201]
udp = 12000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[7200]]
image = D:\Dynamips\images\c7200-adventerprisek9-mz.124-11.T.img
ram = 256
confreg = 0x2102
idlepc = 0x60790ee4
npe = npe-200
mmap = true
[[Router R4]]
model = 7200
console = 2004
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 4
s1/1 = FR1 4
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R4.cfg
[[Router R5]]
model = 7200
console = 2005
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 5
s1/1 = FR1 5
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R5.cfg
[[Router R6]]
model = 7200
console = 2006
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 6
s1/1 = FR1 6
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R6.cfg
[localhost:7202]
udp = 13000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[3640]]
image = D:\Dynamips\images\c3640-jk9o3s-mz.124-10a.img
ram = 128
confreg = 0x2102
idlepc = 0x604fb1b0
mmap = true
[[Router SW1]]
model = 3640
console = 2007
slot0 = NM-16ESW
f0/1 = R1 f2/0
f0/2 = R2 f2/0
f0/3 = R3 f2/0
f0/4 = R4 f2/0
f0/5 = R5 f2/0
f0/6 = R6 f2/0
f0/10 = SW2 f0/12
f0/11 = SW2 f0/13
f0/14 = SW3 f0/14
f0/15 = SW3 f0/15
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW1.cfg
[[Router SW2]]
model = 3640
console = 2008
slot0 = NM-16ESW
f0/1 = R1 f3/0
f0/2 = R2 f3/0
f0/3 = R3 f3/0
f0/4 = R4 f3/0
f0/5 = R5 f3/0
f0/6 = R6 f3/0
f0/10 = SW3 f0/12
f0/11 = SW3 f0/13
f0/14 = SW4 f0/14
f0/15 = SW4 f0/15
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW2.cfg
[[Router SW3]]
model = 3640
console = 2009
slot0 = NM-16ESW
f0/10 = SW4 f0/12
f0/11 = SW4 f0/13
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW3.cfg
[localhost:7203]
udp = 14000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[3640]]
image = D:\Dynamips\images\c3640-jk9o3s-mz.124-10a.img
ram = 128
confreg = 0x2102
idlepc = 0x604fb1b0
mmap = true
[[Router SW4]]
model = 3640
console = 2010
slot0 = NM-16ESW
f0/10 = SW1 f0/12
f0/11 = SW1 f0/13
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW4.cfg
[[Router BB123]]
model = 3640
console = 2011
slot0 = NM-1FE-TX
slot1 = NM-1FE-TX
slot2 = NM-1FE-TX
f0/0 = SW1 f1/0
f1/0 = SW2 f1/0
f2/0 = SW3 f1/0
cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/BB123.cfg
[[Router TermServ]]
model = 3640
console = 2012
slot0 = NM-1FE-TX
f0/0 = NIO_tap:tap0
cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/TermServ.cfg
[[FRSW FR0]]
# R1
1:102 = 2:201 # From port 1, DLCI 102 to port 2, DLCI 201.
1:103 = 3:301
1:104 = 4:401
1:105 = 5:501
1:106 = 6:601
# R2
2:203 = 3:302
2:204 = 4:402
2:205 = 5:502
2:206 = 6:602
# R3
3:304 = 4:403
3:305 = 5:503
3:306 = 6:603
# R4
4:405 = 5:504
4:406 = 6:604
# R5
5:506 = 6:605
[[FRSW FR1]]
# R1
1:112 = 2:211 # From port 1, DLCI 112 to port 2, DLCI 211.
1:113 = 3:311
1:114 = 4:411
1:115 = 5:511
1:116 = 6:611
# R2
2:213 = 3:312
2:214 = 4:412
2:215 = 5:512
2:216 = 6:612
# R3
3:314 = 4:413
3:315 = 5:513
3:316 = 6:613
# R4
4:415 = 5:514
4:416 = 6:614
# R5
5:516 = 6:615
下面是启动 Dynamips 服务的批命令,上面的 .net 必须建立多个 dynamips 进程,而 dynagen 安装时自带的启动脚本只启动一个进程。把下面内容保存为名 start.cmd 的文件即可,注意 "start.cmd" 是文件名的全部,不要修改扩展名(当然 .bat 是可以使用的)。
@echo off
rem Launch a local copy of dynamips
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7200
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7201
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7202
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7203
...
v4.0 是在 v3.0 的基础上将设备型号从 3640 提升到 7206 (*注1),目的是为了解决 3640 上存在的一些 BUG (*注2),IOS 版本也随之发生变化。另外,对设备配置进行简化,所有的 ethernet 接口提升为 fastethernet。
升级后付出的代价是虚拟路由器耗用更多的系统资源,只是启动所有路由器+不启动任何动态路由协议的简单的二三层连接的情况下,就会比 v3.0 高出 2-4 倍的 CPU 消耗。
*注1: 本来是提升到 3745,但 3745 在 linux 下有二次启动无法装载文本配置文件的 bug
*注2: 据说 3640 在虚拟机架的组播实现过程中会出现 ping 不通的问题
#
#
#
# =====================[[[[ Super Topology v4.0 ]]]]=====================
#
#
# Router: R1, R2, R3, R4, R5, R6 (Cisco 7200, Full-mesh)
# Switch: SW1, SW2, SW3, SW4 (Cisco 3640, Full-mesh)
# Router: TermServ, BB123 (Cisco 3640)
#
#
# ( R1 )-s1/0,s1/1------|
# ( R2 )-s1/0,s1/1------|
# ( R3 )-s1/0,s1/1------+-{ Frame-Relay Cloud }
# ( R4 )-s1/0,s1/1------|
# ( R5 )-s1/0,s1/1------|
# ( R6 )-s1/0,s1/1------|
#
# ( Rx )-s1/n--------s1/n-( Ry )
# | |
# dlci: xny dlci: ynx (n=0,1)
#
# ( Rx )-f2/0--------f0/x-[ SW1 ]
# ( Rx )-f3/0--------f0/x-[ SW2 ]
#
#
# |-f0/0--------f1/0-[ SW1 ] (BB1)
# (BB123)-+-f1/0--------f1/0-[ SW2 ] (BB2)
# |-f2/0--------f1/0-[ SW3 ] (BB3)
# |-f3/0--------f1/0-[ SW4 ]
#
#
# |-f0/10------f0/12-|
# [ SW1 ]-|-f0/11------f0/13-|-[ SW2 ]
# | | | |
# f0/12 f0/13 f0/10 f0/11
# | | | |
# | | | |
# | | | |
# f0/10 f0/11 f0/12 f0/13
# | | | |
# [ SW4 ]-|-f0/12------f0/10-|-[ SW3 ]
# |-f0/13------f0/11-|
#
#
# [ SW1 ]-|-f0/14------f0/14-|-[ SW3 ]
# |-f0/15------f0/15-|
#
# [ SW2 ]-|-f0/14------f0/14-|-[ SW4 ]
# |-f0/15------f0/15-|
#
#
#
# (Wandering, 2008/05/08)
#
#
#
autostart = false
ghostios = true
sparsemem = true # This is only used for Windows which has a 2 GB per process limit
[localhost:7200]
udp = 11000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[7200]]
image = D:\Dynamips\images\c7200-adventerprisek9-mz.124-11.T.img
ram = 256
confreg = 0x2102
idlepc = 0x60790ee4
npe = npe-200
mmap = true
[[ROUTER R1]]
model = 7200
console = 2001
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 1
s1/1 = FR1 1
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R1.cfg
[[ROUTER R2]]
model = 7200
console = 2002
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 2
s1/1 = FR1 2
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R2.cfg
[[Router R3]]
model = 7200
console = 2003
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 3
s1/1 = FR1 3
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R3.cfg
[localhost:7201]
udp = 12000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[7200]]
image = D:\Dynamips\images\c7200-adventerprisek9-mz.124-11.T.img
ram = 256
confreg = 0x2102
idlepc = 0x60790ee4
npe = npe-200
mmap = true
[[Router R4]]
model = 7200
console = 2004
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 4
s1/1 = FR1 4
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R4.cfg
[[Router R5]]
model = 7200
console = 2005
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 5
s1/1 = FR1 5
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R5.cfg
[[Router R6]]
model = 7200
console = 2006
slot1 = PA-4T+
slot2 = PA-FE-TX
slot3 = PA-FE-TX
s1/0 = FR0 6
s1/1 = FR1 6
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/R6.cfg
[localhost:7202]
udp = 13000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[3640]]
image = D:\Dynamips\images\c3640-jk9o3s-mz.124-10a.img
ram = 128
confreg = 0x2102
idlepc = 0x604fb1b0
mmap = true
[[Router SW1]]
model = 3640
console = 2007
slot0 = NM-16ESW
f0/1 = R1 f2/0
f0/2 = R2 f2/0
f0/3 = R3 f2/0
f0/4 = R4 f2/0
f0/5 = R5 f2/0
f0/6 = R6 f2/0
f0/10 = SW2 f0/12
f0/11 = SW2 f0/13
f0/14 = SW3 f0/14
f0/15 = SW3 f0/15
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW1.cfg
[[Router SW2]]
model = 3640
console = 2008
slot0 = NM-16ESW
f0/1 = R1 f3/0
f0/2 = R2 f3/0
f0/3 = R3 f3/0
f0/4 = R4 f3/0
f0/5 = R5 f3/0
f0/6 = R6 f3/0
f0/10 = SW3 f0/12
f0/11 = SW3 f0/13
f0/14 = SW4 f0/14
f0/15 = SW4 f0/15
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW2.cfg
[[Router SW3]]
model = 3640
console = 2009
slot0 = NM-16ESW
f0/10 = SW4 f0/12
f0/11 = SW4 f0/13
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW3.cfg
[localhost:7203]
udp = 14000
workingdir = D:\Dynamips\wdy.super.topology.v4\working
[[3640]]
image = D:\Dynamips\images\c3640-jk9o3s-mz.124-10a.img
ram = 128
confreg = 0x2102
idlepc = 0x604fb1b0
mmap = true
[[Router SW4]]
model = 3640
console = 2010
slot0 = NM-16ESW
f0/10 = SW1 f0/12
f0/11 = SW1 f0/13
#cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/SW4.cfg
[[Router BB123]]
model = 3640
console = 2011
slot0 = NM-1FE-TX
slot1 = NM-1FE-TX
slot2 = NM-1FE-TX
f0/0 = SW1 f1/0
f1/0 = SW2 f1/0
f2/0 = SW3 f1/0
cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/BB123.cfg
[[Router TermServ]]
model = 3640
console = 2012
slot0 = NM-1FE-TX
f0/0 = NIO_tap:tap0
cnfg = D:\Dynamips\wdy.super.topology.v4\cfg/TermServ.cfg
[[FRSW FR0]]
# R1
1:102 = 2:201 # From port 1, DLCI 102 to port 2, DLCI 201.
1:103 = 3:301
1:104 = 4:401
1:105 = 5:501
1:106 = 6:601
# R2
2:203 = 3:302
2:204 = 4:402
2:205 = 5:502
2:206 = 6:602
# R3
3:304 = 4:403
3:305 = 5:503
3:306 = 6:603
# R4
4:405 = 5:504
4:406 = 6:604
# R5
5:506 = 6:605
[[FRSW FR1]]
# R1
1:112 = 2:211 # From port 1, DLCI 112 to port 2, DLCI 211.
1:113 = 3:311
1:114 = 4:411
1:115 = 5:511
1:116 = 6:611
# R2
2:213 = 3:312
2:214 = 4:412
2:215 = 5:512
2:216 = 6:612
# R3
3:314 = 4:413
3:315 = 5:513
3:316 = 6:613
# R4
4:415 = 5:514
4:416 = 6:614
# R5
5:516 = 6:615
下面是启动 Dynamips 服务的批命令,上面的 .net 必须建立多个 dynamips 进程,而 dynagen 安装时自带的启动脚本只启动一个进程。把下面内容保存为名 start.cmd 的文件即可,注意 "start.cmd" 是文件名的全部,不要修改扩展名(当然 .bat 是可以使用的)。
@echo off
rem Launch a local copy of dynamips
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7200
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7201
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7202
start /belownormal /min "Dynamips" "c:\program files\dynamips\dynamips.exe" -H 7203
...
收藏:
QQ书签
del.icio.us
订阅:
Google
抓虾
