PENU和dynamips的通讯
PIX要连路由器怎么办? 当然要装Dynamips啦, 怎么让PIX的网卡和router的网卡相连呢??先用ipconfig/all 看网卡参数
Ethernet adapter TAP1:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : TAP-Win32 Adapter V8
Physical Address. . . . . . . . . : 00-FF-CE-ED-2F-07
Ethernet adapter TAP0:|b)c!
©Ciscofan技术论坛 -- 最棒的网络技术论坛!
Media State . . . . . . . . . . . : Media disconnectedW
Description . . . . . . . . . . . : TAP-Win32 Adapter V8k1
Physical Address. . . . . . . . . : 00-FF-07-A5-58-988
然后先用dynamips -e 查看网卡物理地址:
D:\sm\test new version>dynamips-wxp -eni
Cisco 7200 Simulation Platform (version 0.2.6-RC5-x86
Copyright (c) 2005,2006 Christophe Fill
Build date: Dec 7 2006 11:19:24
Network device list:b
rpcap://\Device\NPF_GenericDialupAdapter : Network adapter 'Adapter for generoAK
ic dialup and VPN capture' on local host
rpcap://\Device\NPF_{CEED2F07-DA48-409D-8F4F-2A3BB9C8ED4C} : Network adapter
'TAP-Win32 Adapter V8 (Microsoft's Packet Scheduler) ' on local host
rpcap://\Device\NPF_{07A55898-2F10-4711-A671-F6906FA59E12} : Network adapter
'TAP-Win32 Adapter V8 (Microsoft's Packet Scheduler) ' on local host
rpcap://\Device\NPF_{6036E3FA-FC86-449F-96B9-E52300F30E7E} : Network adapterd$
'Intel 8255x-based Integrated Fast Ethernet (Microsoft's Packet Scheduler) ' on
local host
看到TAP0,TP的物理地址拉巴。 选一个放到dynamips的启动脚本里面就可以拉, 如下
dynamips-wxp.exe -r 256 -t npe-400 -p 0:C7200-IO-FE -p 1:PA-4E
0:0:gen_eth:"\Device\NPF_{07A55898-2F10-4711-A671-F6906FA59E12}" --idle- pc=0x60660530 --disk0=2 C7200-JK.BIN
这样pix的网卡就和router的以太网卡绑定起来啦,至于到底是TAP0连到router的F0/0口还是TAP1连到router的F0/0口
因为tap接口使用dynamipsGUI来获取参数时,两个参数无法区别哪个是tap1,进入注册表也无法区别开,所以可以先将tap0停用.来获取tap1的参数
怎么同时运行多个PEMU
至于怎么样运行多台PIX,作者给出了方法:
QUOTE:
You can run two or more emulator on one computer.
make 2 flash files - FLASH.1 and FLASH.2
run 1st instance with:
./pixemu -no-kqemu -net nic,vlan=1,macaddr=00:a0:00:00:00:01 -net tap,vlan=1,script=if1up -net nic,vlan=2,macaddr=00:a0:00:00:00:02 -net tap,vlan=2,script=if2up -serial stdio -m 128 FLASH.1
run 2nd emulator with
./pixemu -no-kqemu -net nic,vlan=1,macaddr=00:a0:00:00:00:11 -net tap,vlan=1,script=if1up -net nic,vlan=2,macaddr=00:a0:00:00:00:12 -net tap,vlan=2,script=if2up -serial stdio -m 128 FLASH.2
NOTE different mac addresses!!!
-no-kqemu is probably required, anyway, kqemu doesn't help much.
on 3rd terminal run bridge program
./bridge tap1 tap3
now you have two pixes with connected outside interfaces
now do some configuration, for example: S6
1st pix:
pixfirewall# conf t 9
pixfirewall(config)# in et 0
pixfirewall(config-if)# ip address 10.0.0.1 255.255.255.0
pixfirewall(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
pixfirewall(config-if)# no shut
on second one:
interface Ethernet0
nameif outside mo
security-level 0
ip address 10.0.0.2 255.255.255.0
now you can ping the remote pix:
pixfirewall# ping 10.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 100/108/140 ms 1#6<vu
Other option is to use your linux to route traffic between pixes. In this case you'll probably need different if?up scripts for each interface, or just manually change ip addresses of tap interfaces.
这里主要是使用两个参数, 这些脚本是用linux写的
PIX
./pixemu -net nic,vlan=1,macaddr=00:aa:00:00:02:01 -net socket,vlan=1,listen=:1234 -serial stdio -m 128 FLASH
PIX 2:
./pixemu -net nic,vlan=2,macaddr=00:aa:00:00:02:03 -net socket,vlan=2,connect=127.0.0.1:1234 -serial stdio -m 128 FLASH2
关于这里面的参数connect 以及listen大家都可以看documentation找到详细介绍eb>d
©Ciscofan技术论坛 -- 最棒的网络技术论坛!
Windows下面应该是这样:
先创建多个目录, 把PEMU相应的脚本和文件(IOS,INI)都别copy进去,然后分开运行?
参考上边的逻辑图来配置PIX之间的互连。 Windows桥接的方法很简单, 选中多个网络连接,右键点击,选择“桥接“既可
在PEMU中使用ASDM
1先格式化一下flash
Before copy file to flash
format flash:'
2然后copy asdm文件
Copy tftp://10.0.0.254/asdm-501.bin flash
3然后激活IOS的licence.
改变ini文件中的序列号
Serial Number: 0x302aab20
然后输入激活码,在ini里面改ACKey无效,运行后用命令
Activation-Key 0xd2390d2c 0x9fc4b36d 0x98442d99 0xeef7d8b1
Write
4重启后生效(reload命令无效,退出重进就可以,激活码是存在flash上的
5 配置http
username yourname pass 123 privilege 15\`O/
http server enable.
http 192.168.0.1 255.255.255.255 outside (192.168.0.1是我的主机)
domain-name xxx.com
6在PC上浏览器打开http://10.0.0.1 即可。 第一次ASDM提示你可以使用java或安装到PC上,下载使用msi文件安装的方式比较快一点
http://www.netemu.cn/bbs
http://7200emu.hacki.at
http://7200emu.hacki.at/download.php?id=246
http://www.blindhog.net/pemu-cisco-pix-emulator/]*
OpenVPN,
http://openvpn.net/download_action.php?openvpn-2.0.9-install.exeX
http://mion.faireal.net/BES/#usageE&
Scriptsq
@echo off
title PIX Simulator
@echo offr
@echo.
@echo.
@echo. **************************************************************
@echo. * *(I>H>;
@echo. * Ciscofan.com *
@echo. * By Pro *
@echo. *
@echo. **************************************************************8
@echo.-------------------------------------
@echo. Please telnet 127.0.0.1 8888
@echo.-------------------------------------
@echo off~
pemu -net nic,macaddr=00:aa:00:00:02:01 -net tap,ifname=tap0 -net nic,macaddr=00:aa:00:00:02:02 -net ghJ+*
tap,ifname=tap1 -serial [url=telnet::8888,server]
telnet::8888,server[/url]
@echo off
关于QEMU
PEMU是借助QEMU的语法的, 这个有点复杂。 比如以上脚本中参数的描述, 具体要参考maunal或参考作者kiwi: http://fabrice.bellard.free.fr/qemu/qemu-doc.html下边给出参数列表,这个就需要时间来研究啦,不是三言两语能说清楚的
附件
- 55.jpg (109.48 KB)
-
2007-8-23 21:36