用 Dy namip s 做 OSPF&Rip 协议混合的实验 今天利用 Dynamips 完成了 OSPF &Rip 协议混合的实验,开始的时候找不到合适的 Cisco 的 IOS,后来无意间把 C3620 的 IOS 放上去,没想到很好用! 马上模拟了六台 C3620 出来!在我的内存=512M 的本本上还跑挺顺畅(其实我只开 了 5 台,不过够用就行) 实验过程: 先把.net 文件呈上来: (#号后面为注释,蓝色) autostart = false [localhost] port = 7200 udp = 10000
[[router R1]] image = \Program Files\Dynamips\images\c3620-i-mz.122-37.bin model = 3620 console = 2001 ram = 32 #内存调到 32M,再小的话不知道行不行,个人认为 32M 已经很合适了 confreg = 0x2142 exec_area = 32 mmap = false slot0 = NM-1FE-TX #支持 1 个 Fastethernet 接口 slot1 = NM-4E #支持 4 个 Ethernet 接口 e1/0 = R2 f0/0 [[router R2]] image = \Program Files\Dynamips\images\c3620-i-mz.122-37.bin model = 3620 console = 2002
ram = 32 confreg = 0x2142 exec_area = 32 mmap = false slot0 = NM-1FE-TX slot1 = NM-4E e1/0 = R3 f0/0 [[router R3]] image = \Program Files\Dynamips\images\c3620-i-mz.122-37.bin model = 3620 console = 2003 ram = 32 confreg = 0x2142 exec_area = 32 mmap = false slot0 = NM-1FE-TX slot1 = NM-4E e1/0 = R4 f0/0 [[router R4]] image = \Program Files\Dynamips\images\c3620-i-mz.122-37.bin model = 3620 console = 2004 ram = 32 confreg = 0x2142 exec_area = 32 mmap = false slot0 = NM-1FE-TX slot1 = NM-4E e1/0 = R5 f0/0 [[router R5]] image = \Program Files\Dynamips\images\c3620-i-mz.122-37.bin model = 3620 console = 2005 ram = 32 confreg = 0x2142
exec_area = 32 mmap = false slot0 = NM-1FE-TX slot1 = NM-4E [[router R6]] #实验中没有用到第六个路由器 image = \Program Files\Dynamips\images\c3620-i-mz.122-37.bin model = 3620 console = 2006 ram = 32 confreg = 0x2142 exec_area = 32 mmap = false slot0 = NM-1FE-TX slot1 = NM-4E 拓扑图出场:以前没画过拓扑,随便画了个,凑合看吧!(汗一个先)
点击看大图
配置过程如下:
----R1 的配置---R1#configure terminal R1(config)#interface e1/0 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#router ospf 32 R1(config-route)#network 192.168.1.1 0.0.0.0 area 1 ----R2 的配置---R2#configure terminal R2(config)#interface f0/0 R2(config-if)#ip address 192.168.1.2 255.255.255.0 R2(config-if)#no shutdown R2(config)#interface e1/0 R2(config-if)#ip address 192.168.2.1 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#router ospf 32 R2(config-route)#network 192.168.1.2 0.0.0.0 area 1 R2(config-route)#network 192.168.2.1 0.0.0.0 area 0 ----R3 的配置---R3#configure terminal R3(config)#interface f0/0 R3(config-if)#ip address 192.168.2.2 255.255.255.0 R3(config-if)#no shutdown R3(config)#interface e1/0 R3(config-if)#ip address 192.168.3.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#router ospf 32 R3(config-route)#network 192.168.2.2 0.0.0.0 area 0 R3(config-route)#network 192.168.3.1 0.0.0.0 area 2 ----R4 的配置----这个是关键 R4#configure terminal R4(config)#interface f0/0 R4(config-if)#ip address 192.168.3.2 255.255.255.0 R4(config-if)#no shutdown
R4(config)#interface e1/0 R4(config-if)#ip address 192.168.4.1 255.255.255.0 R4(config-if)#ip address 192.168.44.1 255.255.255.0 secondary R4(config-if)#no shutdown R4(config-if)#exit R4(config)#router ospf 32 R4(config-route)#network 192.168.3.2 0.0.0.0 area 2 R4(config-route)#network 192.168.4.1 0.0.0.0 area 2 R4(config-route)#redistribute rip metric 10 R4(config-route)#router rip R4(config-route)#network 192.168.44.0 R4(config-route)#redistribute ospf 32 metric 10 ----R5 的配置---R5#configure terminal R5(config)#interface f0/0 R5(config-if)#ip address 192.168.44.2 255.255.255.0 R5(config-if)#no shutdown R5(config)#interface loopback 0 R5(config-if)#ip address 192.168.45.1 255.255.255.0 R5(config-if)#no shutdown R5(config-if)#exit R5(config)#interface loopback 1 R5(config-if)#ip address 192.168.46.1 255.255.255.0 R5(config-if)#no shutdown R5(config-if)#exit R5(config)#interface loopback 2 R5(config-if)#ip address 192.168.47.1 255.255.255.0 R5(config-if)#no shutdown R5(config-if)#router rip R5(config-route)#network 192.168.44.0 R5(config-route)#network 192.168.45.0 R5(config-route)#network 192.168.46.0 R5(config-route)#network 192.168.47.0 R5(config-route)#exit ----配置完毕---可以用查询命令查看: show ip route
show ip ospf data 等