邪恶八进制信息安全团队技术讨论组's Archiver

webmedia 2006-7-19 09:38

[转载]Cisco 7200 Simulator (booting from IOS)

原始连接:[url]http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator[/url]

"At this time, the emulator I have programmed is able to boot a large number of Cisco IOS releases available for the 7200 platform, including the latest 12.2S and 12.4. "

[color=orangered]IOS Download URL[/color]
[url]http://www.chinanetwork.com.cn/rs_info.asp?id=112&name=Cisco_IOS[/url]

Linux环境下测试过Debian 3.1 (在VMware的虚拟PC中),可以跑起来.

下面都是Windows(XP SP2测试正常,Win 2003 Server不能运行)环境中(需要安装WinPcap)做的测试(版本0.2.3c,最新的是0.2.4命令略有改变,功能更强)
模拟三台设备互联
R1:
dynamips -p 0:C7200-IO-FE:udp:10001:127.0.0.1:10002 image.bin

R2:
dynamips -p 0:C7200-IO-FE:udp:10002:127.0.0.1:10001 -p 1:PA-FE-TX:udp:10003:127.0.0.1:10004 image.bin

R3:
dynamips -p 0:C7200-IO-FE:udp:10004:127.0.0.1:10003 image.bin

让emulato使用你的网卡
使用下面的命令后可以用Ethereal抓到emulator在你的网卡上释放的IP包!
dynamips -p 0:C7200-IO-FE:gen_eth:"\Device\NPF_{40371D28-B992-495E-AD5C-C3ED05DCB000}" image.bin
换句话,你可以结合Zebra或Quagga(和VMware的虚拟网络)甚至真实的网络设备测试了.


"\Device\NPF_{40371D28-B992-495E-AD5C-C3ED05DCB000}" 在你的机器上这项可能不同,执行"dynamips.exe -e"确定


[color=red]下面的试验是一个PPPoE Server配制[/color]
试验环境: Linksys broad router(run rip)+Cisco 7200 Simulator+WinRadius (测试时使用WinXP中建立的一个PPPoE联接)

PPPoE-Server#sh run
Building configuration...

Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname PPPoE-Server
!
aaa new-model
aaa authentication ppp vpdn group radius //如果不使用WinRadius可以 改为 aaa authentication ppp vpdn local 其他与radius相关的也需要改变
enable password cisco
!
username test password 0 test
username cisco password 0 cisco
!
!
!
!
ip subnet-zero
ip cef
!
vpdn enable
no vpdn logging
!
vpdn-group PPPoE_1
accept-dialin
protocol pppoe
virtual-template 1
pppoe limit per-mac 1
!
lane client flush
!
!
!
!
!
!
!
interface Loopback1
ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.77 255.255.255.0
half-duplex
pppoe enable
no cdp enable
!
interface Virtual-Template1
mtu 1492
ip unnumbered Loopback1
no ip route-cache cef
ip mroute-cache
keepalive 5
peer default ip address pool PPPoE_Pool
ppp authentication chap vpdn
ppp ipcp dns 202.96.199.133
!
router rip
network 192.168.1.0
network 192.168.10.0
!
ip local pool PPPoE_Pool 192.168.10.200 192.168.10.205
ip classless
no ip http server
ip http authentication local
!
no cdp run
snmp-server engineID local 0000000902000005FF362000
snmp-server community test RW
snmp-server packetsize 2048
snmp-server chassis-id 123123
radius-server host 192.168.1.5 auth-port 1812 acct-port 1813 key 123123 //需要在WinRadius上做相应配置
radius-server retransmit 3
!
!
line con 0
transport input none
line aux 0
line vty 0 4
login local
!
end


相关问题

1.需要7200路由器的IOS镜像软件,可以去思科网站下载或用搜索引擎找.
eg:[url]http://www.files.lt/?[/url] (可以找到12.4版的,关键字 c7200 mz 124)

2.根据不同的机器平台和系统选择不同的文件:

3.为了增快启动速度,可以预先对IOS镜像软件解压缩.Windowns中可以把后缀.bin改为ZIP后解压.

4.Windows中需要安装WinPcap,模拟器可以借用PC的网卡收发IP包.可以用Ethereal抓包分析.

5.最新版本是0.2.4与以前版本的命令有区别,具体参考
[url]http://www.ipflow.utc.fr/dynamips/README-0.2.4.txt[/url]

6.UNIX/LINUX中需要libelf库,
Reahat参看(注意其讨论的版本):[url]http://www.vmiao.com/article.asp?id=671[/url]

7.技巧交流
1.为了在UNIX/LINUX中安装和使用更方便可以使用SSH登陆后安装后使用.
2.Windosw环境下我是在几台PC上安装,先让让模拟器使用网卡启动,配制好IP.使用telnet登陆到路由器上.
3.可以结合Zebra,Qugga,Olive和真实网络设备测试路由协议的兼容性.


Debian(安装在VMware中)安装使用:
wget [url]http://www.ipflow.utc.fr/dynamips/dynamips...s-0.2.4-x86.bin[/url]
unzip -p c7200-js-mz.123-9.bin > image.bin
apt-get install libelfg0
./dynamips-0.2.4-x86.bin -p 0:C7200-IO-FE -s 0:0:udp:10001:127.0.0.1:10002 image.bin
netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 127.0.0.1:10001 127.0.0.1:10002 ESTABLISHED


其它URL
[url]http://www.52network.com/forum/viewthread.php?tid=2612&extra=page%3D1[/url]
[url]http://www.52network.com/forum/viewthread.php?tid=2495&extra=page%3D1[/url]

页: [1]
© 1999-2008 EvilOctal Security Team