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

TOP

Pemu 说明中文翻译版
[ 录入者:admin | 时间:2007-10-27 15:44:27 | 作者: | 来源: | 浏览:941次 ]
for LINUX版的
Pemu 帮助文件中文版
How to use
!!!!!!!!!!!!!!!!!!!!!!!
It works only on x86 (32bit mode) CPU with linux
I don't think there is any real chance to compile on windows
!!!!!!!!!!!!!!!!!!!!!!!
I. Compile from source, use this only if you know what you are doing,
otherwise, try compiled version.
Required - gcc3.4 - qemu is not compatible with gcc 4.x, so you will need
3.x.
1. Edit Make file, and customize line:
TUNE_FLAGS=-march=pentium3 -mtune=pentium3
with whatever CPU you have (type man gcc to see possible types)
This is only for optimization! It won't help to compile on non x86 CPUs
2. type make
Ignore warnings.
If you are lucky, it may compile, if not, try using compiled version
II. So you either compiled from source or decided to use binary version, how
to use for first time:
1. prepare flash file, execute following command:
dd if=/dev/zero of=FLASH bs=1k count=16k
2. Download PIXOS image from somewhere, it is tested with 6.35, and 7.21
unzip pix635.bin
mv obj/pix ./
or for 7.21
unzip pix721.bin
mv target/f1/pix ./
edit pemu.ini, it should look like:
-----
serial=0x12345678
image=pix
key=0x00000000,0x00000000,0x00000000,0x00000000
bios1=mybios_d8000
bios2=bios.bin
bios_checksum=1
-----
Don't enter any spaces, or empty lines or something else, as it will not
work!
if you already have image installed in flash, edit the second line to:
image=NONE
Copy Serial No and key from your existing pix, and save file
Activation Key is used only for 6.x version!, for 7.x, key can be entered
with command "activation-key" while system is running
Serial No should be in HEX!!!!!
edit ifup.ini to configure how interfaces are initialized it should look
like this:
------
tap0 10.0.0.1 255.255.255.0
tap1 10.1.0.1 255.255.255.0
tap2 10.2.0.1 255.255.255.0
tap3 10.3.0.1 255.255.255.0
tap4 bridge eth0
------
FINALY, run emulator with:
./pemu -net nic,vlan=1,macaddr=00:aa:00:00:02:01 -net tap,vlan=1,script=ifup -net nic,vlan=2,macaddr=00:aa:00:00:02:02 -net tap,vlan=2,script=ifup -serial stdio -m 128 FLASH
You can use up to 5 interfaces. Make sure that MAC addresses are different
if you want to connect several pix-es.
The latest argument is FLASH image file, -m 128 means 128 MB RAM, which is
required for 7.x
for 6.x -m 32 is enough
Program is terminated with ctrl-c, there are other ways to use serial
console, read qemu manual for more info.
Good luck, and plase don't try to contact me for any kind of support, I
don't want to be contacted, and I really prefer to remain anonymous.
If You really need help, try to post your question to the forum.



转载请注明出处
www.dynamips.cn
小漏
Dyanmips&Qemu中文社区

Pemu还有很大的发展 作者看起来很随意  难说难说

在看PEMU帮助的时候 看看QEMU的帮助 在PEMU releate区


如何使用:
Pemu只能工作在x86 (32bit mode) CPU的Linux上
我不认为它可能在windows下编译

我已经编译好了 如果你自己编译的话 它需要GCC3.4 Qemu在4.X下不能编译成功
ps:可以下作者编译好的版本
1.编辑MAKE file 自给定义安装路径
TUNE_FLAGS=-march=pentium3 -mtune=pentium3
with whatever CPU you have (type man gcc to see possible types)
这是最优化的 ,我不会帮助你去编译在 x86 CPUs
2. 查看 Make
忽视警告
如果你是幸运的话 你将编译成功,否则使用我编译好的版本

II. 你可以从源代码开始编辑 也可以使用二元制的版本, 首先学习怎么使用它
1. 准备个FLash文件 然后输入执行下面的命令
dd if=/dev/zero of=FLASH bs=1k count=16k
2. 从dynamips.cn下载PIX6.35和 7.21的IOS文件
unzip pix635.bin
mv obj/pix ./
or for 7.21
unzip pix721.bin
mv target/f1/pix ./

编辑 pemu.ini, 看看下面的
-----
serial=0x12345678 PIX序列号
image=pix pixios
key=0x00000000,0x00000000,0x00000000,0x00000000  激活
bios1=mybios_d8000
bios2=bios.bin
bios_checksum=1
-----
不要输入任何的空格或者空行什么的 否则 它将不能工作
如果你已经有镜像安装在FLASH里, 编辑成下面这种格式:
image=NONE
复制序列号和激活码到你的PIX里, 6.*的IOS直接保存在PEMU.INI这个配置文件里就可以了
而7.*需在系统运行的时候输入用命令"activation-keyActivation "Key来激活
序列号应该为十六进制.


编辑 ifup.ini ,如何配置接口初始化它应该是这个样子的
------
tap0 10.0.0.1 255.255.255.0
tap1 10.1.0.1 255.255.255.0
tap2 10.2.0.1 255.255.255.0
tap3 10.3.0.1 255.255.255.0
tap4 bridge eth0
------
最后 也这样的命令运行模拟器:
./pemu -net nic,vlan=1,macaddr=00:aa:00:00:02:01 -net tap,vlan=1,script=ifup -net nic,vlan=2,macaddr=00:aa:00:00:02:02 -net tap,vlan=2,script=ifup -serial stdio -m 128 FLASH
你可以启动5个接口,但是要保证MAC ADDRESS不冲突 如果你想连接其他模拟的PIX

最后要强调的是 flash 镜像文件 -m 128 代表128 MB RAM, 7.*需要128M 而6.* 32M就足够了!

你可以按ctrl+c来终止程序,还有其他方式来使用串行控制台,请阅读QEMU手册


祝你好运,不要试图联系我 我不想被联系 ,我宁愿保持匿名的状态 如果你需要支持请访问论坛
www.netemu.cn/bbs

Final
FOR win版
PEmu_win32(0.3.1)说明中文版


只是简单的翻译
Qemu中文使用手册  http://www.netemu.cn /bbs/viewthread.php?tid=484&extra=page%3D2
Pemu for LINUX的说明翻译在这里 http://www.netemu.cn /bbs/viewthread.php?tid=580&extra=page%3D1

Pemu精华贴索引 http://www.netemu.cn /bbs/viewthread.php?tid=809&extra=page%3D1
Win下PEMU安装完全指南  http://www.netemu.cn /bbs/viewthread.php?tid=789&extra=page%3D1
以下为原文:
Differences from unix version

pemu.ini has windows line delimeters
You can use both TUN/Tap and WinPCAP interfaces

If you're switcning to 635 from 721 - prepare an empty flash,
my 635 refuses to load flash from 721.
"Emtpy flash" means just blank FLASH file created by dd if=/dev/zero of=FLASH bs=1024 count=16384. This file is shipped with release.


You can use real interfaces just like in dynamips

At the moment you can use up to 5 interfaces


Very quick howto for pcap:
1) Winpcap installation
go to http://www.winpcap.org/install/default.htm
Download and install driver
pemu -e gives interface list
Run with: pemu -net nic,macaddr=00:aa:00:00:02:01 -net pcap,ifname=\Device\NPF_{9D0F0D0D-855E-485C-8AE9-E17450AA13BB}

Quick howto for tun:
1) Tun/tap installation:
go to openvpn.net
Download installer
Install tun driver, add (via 'c:\program files\openvpn\bin\addtap.bat') nesessary number of interfaces
Rename those interfaces to tap0,tap1, etc..

Bridge tap interface with real network interface if you need to.


2) Make sure you're using correct IOS image file - by default, image is compressed. (for example, 721 compressed image is about 8mb )
You need to unzip it, and use resulting file instead of original image.

3) Download archive, extract it
run pemu with following line:
pemu -net nic,macaddr=00:aa:00:00:02:01 -net tap,ifname=tap0 -net nic,macaddr=00:aa:00:00:02:02 -net tap,ifname=tap1 -serial telnet::4444,server

ifname is name of renamed tap device or winpcap interface name
Use net tap,.. for tap and net pcap,.. for winpcap


connect with telnet client to 127.0.0.1:4444 and you should see pix loading.

If you need more memory just use -m 256 option in pemu cmd line

版本不同于UNIX版本,可在WIN_32下运行! 是作者对原作者MM123的那个版本的从新编译 并且加了些其他东西!

pemu.ini has windows line delimeters分隔符
你可以使用TUN/TAP或者WINPCAP接口!

你可以使用一个真实的接口就像DYNAMIPS一样!  关于DYNAMIPS 我在这里为中国人做个广告!www.netemu.cn

现在可以使用5个接口了!


一:winpcap的安装
下载地址: http://www.winpcap.org/install/default.htm
下载并安装驱动
PEMU -E会给出网卡的列表
Run with: pemu -net nic,macaddr=00:aa:00:00:02:01 -net pcap,ifname=\Device\NPF_{9D0F0D0D-855E-485C-8AE9-E17450AA13BB}
PS:在PEMU目录里执行 PEMU -E! 这个和DYNAMIPS和真机桥接一样 TMD真方便!
二:安装Tun/tap
下载地址:http://openvpn.net
安装这个驱动然后去 目录c:\program files\openvpn\bin\addtap.bat 点这个 然后会有安装
提示 点确认哦PS:不点确认的话 然后再网卡列表中出现提示“未知设备“
桥接TAP接口和真实接口 如果你需要的话


四:确认你使用了正确的pix ios镜像文件 默认情况下IMAGE是被压缩的  你可以解压它
例如pix721.bin 你可以改成pix721.rar然后解压
PS:解压出来文件名是pix,而PEMU.INI参数里image = pix721,所以要改动来保持对应 不能会
出现错误提示:找不到IMAGE:

五:在PEMU目录运行
pemu -net nic,macaddr=00:aa:00:00:02:01 -net tap,ifname=tap0 -net nic,macaddr=00:aa:00:00:02:02 -net tap,ifname=tap1 -serial telnet::4444,server
PS:关于这些命令请去PEMU相关区查看QEMU的手册

参数IFNAME 是一个被重命名的TAP设备或者WINPCAP接口
Use net tap,.. for tap and net pcap,.. for winpcap


connect with telnet client to 127.0.0.1:4444 and you should see pix loading.

If you need more memory just use -m 256 option in pemu cmd line

FINAL
HTTP://WWW.netemu.cn 转载请注明出处
[上一篇]confDynagen 0.9.3 17082007 with.. [下一篇]PeMU完全手册
※相关文章
 

评论

称  呼:
内  容:

相关栏目

最新文章

热门文章

推荐文章

赞助商链接