lost and found ( for me ? )

use Cisco 7200 Simulator on Fedora 11 AMD 失敗...

OS: Fedora 11 32bit ( 2.6.30.5-43.fc11.i686.PAE )
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+

Cisco 7200 Simulator

http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator

7200 , 3600 をサポートしているみたい。

ではダウンロードして使ってみよう。

dynamipsとdynagen をダウンロード。

http://sourceforge.net/projects/dyna-gen/files/

インストール

dynamips が IOS のシミュレータ、dynagen がトポロジーとか設定する役割という理解でいいのかな。。。

[root@arizona dynamips-0.2.8-RC2]# make
Linking rom2c
cc: /usr/lib/libelf.a: そのようなファイルやディレクトリはありません
make: *** [rom2c] エラー 1

なんか、よくわからないいが、elf なんたらを適当にインストール。

# yum install -y elfutils-devel.i586
# yum install -y elfutils-libelf-devel.i586
# yum install -y elfutils-devel-static.i586

[root@arizona dynamips-0.2.8-RC2]# make
Linking dynamips
Linking nvram_export
[root@arizona dynamips-0.2.8-RC2]# echo $?
0

[root@arizona dynamips-0.2.8-RC2]# make install
Installing
install -d /usr/bin /usr/man/man1 /usr/man/man7 /usr/etc
install dynamips nvram_export /usr/bin
install -m644 dynamips.1 /usr/man/man1
install -m644 nvram_export.1 /usr/man/man1
install -m644 hypervisor_mode.7 /usr/man/man7

エラーになるなー。

[root@arizona cisco_works]# LANG=C /usr/bin/dynamips -P 3600 c3660-a3jk9s-mz.124-15.T10.bin
Cisco Router Simulation Platform (version 0.2.8-RC2-amd64)
Copyright (c) 2005-2007 Christophe Fillot.

IOS image file: c3660-a3jk9s-mz.124-15.T10.bin

ILT: loaded table "mips64j" from cache.
ILT: loaded table "mips64e" from cache.
ILT: loaded table "ppc32j" from cache.
ILT: loaded table "ppc32e" from cache.
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
C3600 instance 'default' (id 0):
VM Status : 0
RAM size : 128 Mb
NVRAM size : 128 Kb
Chassis : 3640
IOS image : c3660-a3jk9s-mz.124-15.T10.bin

Loading ELF file 'c3660-a3jk9s-mz.124-15.T10.bin'...
ELF entry point: 0x80008000

C3600 'default': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
ROMMON emulation microcode.

Launching IOS image at 0x80008000...
Self decompressing the image : ###############################[OK]
浮動小数点演算例外です
[root@arizona cisco_works]#

-P 3600 を外したら、うまくいった。( -P を指定していないと 7200 がデフォルト )

[root@arizona cisco_works]# /usr/bin/dynamips -H 7200
Cisco Router Simulation Platform (version 0.2.8-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.

ILT: loaded table "mips64j" from cache.
ILT: loaded table "mips64e" from cache.
ILT: loaded table "ppc32j" from cache.
ILT: loaded table "ppc32e" from cache.
Hypervisor TCP control server started (port 7200).
[root@arizona cisco_works]#

[root@arizona cisco_works]# ps aux | grep dynamips
root 6689 0.4 0.0 138396 3152 pts/2 Sl 15:04 0:00 /usr/bin/dynamips -H 7200

[root@arizona cisco_works]# lsof -i:7200
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dynamips 6689 root 4u IPv4 24818 0t0 TCP *:fodms (LISTEN)

- dynagen 登場!

[root@arizona dynagen-0.11.0]# cat simple1.net
# Simple lab

[localhost]

[[7200]]
#image = \Program Files\Dynamips\images\c7200-jk9o3s-mz.124-7a.image
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
image = /root/cisco_works/c3660-a3jk9s-mz.124-15.T10.bin
#npe = npe-400
ram = 160

[[ROUTER R1]]
s1/0 = R2 s1/0

[[router R2]]
# No need to specify an adapter here, it is taken care of
# by the interface specification under Router R1
[root@arizona dynagen-0.11.0]#

起動!
いけたみたい。。

[root@arizona dynagen-0.11.0]# ./dynagen simple1.net
Reading configuration file...

Shutdown in progress...
Shutdown completed.
*** Warning: Starting R1 with no idle-pc value
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C7200 instance 'R1' (id 0):
VM Status : 0
RAM size : 160 Mb
IOMEM size : 0 Mb
NVRAM size : 128 Kb
NPE model : npe-400
Midplane : vxr
IOS image : /root/cisco_works/c3660-a3jk9s-mz.124-15.T10.bin

Loading ELF file '/root/cisco_works/c3660-a3jk9s-mz.124-15.T10.bin'...
ELF entry point: 0x80008000

C7200 'R1': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
*** Warning: Starting R2 with no idle-pc value
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C7200 instance 'R2' (id 1):
VM Status : 0
RAM size : 160 Mb
IOMEM size : 0 Mb
NVRAM size : 128 Kb
NPE model : npe-400
Midplane : vxr
IOS image : /root/cisco_works/c3660-a3jk9s-mz.124-15.T10.bin

Loading ELF file '/root/cisco_works/c3660-a3jk9s-mz.124-15.T10.bin'...
ELF entry point: 0x80008000

C7200 'R2': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
Network successfully loaded

Dynagen management console for Dynamips and Pemuwrapper 0.11.0
Copyright (c) 2005-2007 Greg Anuzelli, contributions Pavel Skovajsa

=> list
Name Type State Server Console
R1 7200 running localhost:7200 2000
R2 7200 running localhost:7200 2001
=>

- telnet で接続

=> telnet R1

だめだなー。
ん、dynamips が落ちた。。。

[1]+ 浮動小数点演算例外です /usr/bin/dynamips -H 7200 (wd: ~/cisco_works)

VMの CentOS で試してみるかなー。なんとなく感触はつかめたような。。
try again !!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.