Home > Old Post dari Unilanet, World Of ICT > Manual Dynamips, dynagen Cisco Emulator on FreeBSD HOW To

Manual Dynamips, dynagen Cisco Emulator on FreeBSD HOW To


Pengen Ngoprek cisco tapi gak punya Duit Lebih untuk beli Mesinnya, Jangan sedih dulu karena sekarang udah ada emulator canggih, yang bisa mesdimulasikan kita layakanya punya mesin cisco  beneran.

Langsung saja yah, kita maenan sama dynamips dan dynagen

#cd /usr/ports/emulators/dynamips

#make install clean

#cd /usr/ports/emulators/dynagen

#make install clean

Download Cisco IOS image di sini

http://www.blog.persianadmins.com/?p=9

Ato yang ada di blog gw ini

http://unilanet.unila.ac.id/~gigih/data/IOScisco/ Selanjutnya anda harus memodifikasi sedikit file dynagen.ini, kira2 menjadi seperti berikut

blog# more /usr/local/etc/dynagen.ini
# —————————————————————————–
# idledb option
# Specify the file that stores the idle-pc database
# Defaults to the user’s home directory
# Usage:
# idledb = /usr/local/etc/dynagenidledb.ini

# —————————————————————————–
# udp option
# Changes the base UDP NIO port for all labs. Default is 10000
# Usage:
# udp = 11000

# —————————————————————————–
# telnet option
# Specify the command to execute when using the telnet command from the CLI
# The following substitutions are performed:
# %h = host
# %p = port
# %d = device name

# Uncomment below for Windows
#telnet = start telnet %h %p
# Or better yet for Terra Term SSH users:
#telnet = C:\progra~1\TTERMPRO\ttssh.exe %h %p /W=%d /T=1
# For PuTTY users:
#telnet = start C:\progra~1\PuTTY\putty.exe -telnet %h %p
# For SecureCRT
#telnet = start C:\progra~1\SecureCRT\SecureCRT.EXE /script c:\progra~1\dynamips\securecrt.vbs /arg %d /T /telnet %h %p  & sleep 1

# Pastikan bagian xterm dibuang jika anda tidak menjalankan Xwin
#telnet = xterm -T %d -e telnet %h %p > /dev/null 2>&1 &
telnet = telnet %h %p

# Uncomment below for OS X with Terminal
#telnet = /usr/bin/osascript -e ‘tell application “Terminal” to do script with command “telnet %h %p ; exit”‘ -e ‘tell application “Terminal” to tell window 1  to set custom title to “%d”‘

# Uncomment below for OS X with iTerm with named tabs
#telnet = /usr/bin/osascript -e ‘tell app “iTerm”‘ -e ‘activate’ -e ‘set myterm to the first terminal’ -e ‘tell myterm’ -e ‘set mysession to (make new session at the end of sessions)’ -e ‘tell mysession’ -e ‘exec command “telnet %h %p”‘ -e ‘set name to “%d”‘ -e ‘end tell’ -e ‘end tell’ -e ‘end tell’
blog#

Jalankan hypervisor mode, dengan mengetikkan perintah berikut

blog# dynamips -H 7200
Cisco Router Simulation Platform (version 0.2.7-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Mar 23 2008 18:18:33

Hypervisor TCP control server started (port 7200).

 

Sekarang tinggal buat file konfigurasi cisco mengacu pada contoh yang sudah diberikan di direktori /usr/local/share/examples/dynagen/sample_labs

blog# pwd
/usr/local/share/examples/dynagen/sample_labs
blog# ll
total 20
-r–r–r–  1 root  wheel  10047 Mar 23 18:19 all_config_options.txt
drwxr-xr-x  2 root  wheel    512 Mar 23 18:19 ethernet_switch
drwxr-xr-x  2 root  wheel    512 Mar 23 18:19 frame_relay
drwxr-xr-x  2 root  wheel    512 Mar 23 18:19 multiserver
drwxr-xr-x  2 root  wheel    512 Mar 25 13:16 simple1
drwxr-xr-x  2 root  wheel    512 Mar 25 13:14 simple2
blog#

 

Saya ambil contoh kita akan mensimulasikan simple1, kurang lebih file konfignya sbb

blog# cd simple1
blog# more 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 = /usr/local/etc/C7200-Is-Mz_20122-15_20T5.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
blog#

Yang paling penting dan harus diingat adalah, letak file Image IOS cisco harus benar.

JIka sudah benar tinggal jalankan dynagen

blog# dynamips
blog# dynagen simple1.net

Reading configuration file…

Warning: Starting R1 with no idle-pc value
Warning: Starting R2 with no idle-pc value

Network successfully started

Dynagen management console for Dynamips

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

 

Pada saat bersamaan hypervisor akan menampilkan log SBB

Loading ELF file ‘/usr/local/etc/C7200-Is-Mz_20122-15_20T5.bin’…
ELF entry point: 0x80008000

C7200 ‘R1’: starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
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  : /usr/local/etc/C7200-Is-Mz_20122-15_20T5.bin

=> ?

Documented commands (type help <topic>):
========================================
capture  exit    help    import  push    resume  shell  stop     ver
clear    export  hist    list    py      save    show   suspend
console  filter  idlepc  no      reload  send    start  telnet

=>

Silahkan anda coba telnet ke R2 untuk mencoba remote ke cisco, dengan mengetikkan perintah telnet atau ? untuk menampilkan Help

 

=> telnet R2
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
Connected to Dynamips VM “R2” (ID 1, type c7200) – Console port

############################ [OK]

% Please answer ‘yes’ or ‘no’.
Would you like to enter the initial configuration dialog? [yes/no]:

Pilih yes jika ingin dipandu sistem atau no untuk set up manual,

Saya mending pilih No, karena biasa setup manual

Terakhir cek apakah betul IOS cisco adalah versi 7200,

Router#show version
Cisco Internetwork Operating System Software
IOS ™ 7200 Software (C7200-IS-M), Version 12.2(15)T5,  RELEASE SOFTWARE (fc1)
TAC Support: http://www.cisco.com/tac
Copyright (c) 1986-2003 by cisco Systems, Inc.
Compiled Wed 11-Jun-03 19:39 by eaarmas
Image text-base: 0x60008954, data-base: 0x61BF0000

ROM: ROMMON Emulation Microcode
BOOTLDR: 7200 Software (C7200-IS-M), Version 12.2(15)T5,  RELEASE SOFTWARE (fc1)

Router uptime is 3 minutes
System returned to ROM by unknown reload cause – suspect boot_data[BOOT_COUNT] 0x0, BOOT_COUNT 0, BOOTDATA 19
System image file is “tftp://255.255.255.255/unknown”

cisco 7206VXR (NPE400) processor (revision A) with 147456K/16384K bytes of memory.
Processor board ID 4294967295
R7000 CPU at 150Mhz, Implementation 39, Rev 2.1, 256KB L2, 512KB L3 Cache
6 slot VXR midplane, Version 2.1

Last reset from power-on
Bridging software.
X.25 software, Version 3.0.0.
1 FastEthernet/IEEE 802.3 interface(s)
8 Serial network interface(s)
125K bytes of non-volatile configuration memory.

65536K bytes of ATA PCMCIA card at slot 0 (Sector size 512 bytes).
8192K bytes of Flash internal SIMM (Sector size 256K).
Configuration register is 0x2102

Router#

Selamat anda telah berhasil memiliki CISCO yang jalan di environtment FreeBSD

Jangan kagak seandainya proses dynaips ini memakan resource CPU yang mayan gede,

 

last pid: 90498;  load averages:  2.27,  2.07,  1.75                                                                                up 12+21:15:08  13:37:47
83 processes:  3 running, 80 sleeping
CPU states: 50.0% user,  0.0% nice,  0.0% system,  0.0% interrupt, 50.0% idle
Mem: 267M Active, 650M Inact, 208M Wired, 196K Cache, 112M Buf, 873M Free
Swap: 4062M Total, 4062M Free

PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
90351 root       19  96    0   500M   196M ucond  0  42:22 195.21% dynamips
87833 www         1   4    0 41188K 29760K kqread 0   0:39  2.10% httpd
90374 www         1   4    0 26852K 19020K accept 2   0:06  1.90% httpd
81840 www         1   4    0 25828K 18388K accept 0   2:24  1.27% httpd
572 root        1  96    0  8852K  5428K select 0  62:58  0.88% snmpd
87835 www         1   4    0 26852K 19224K accept 3   1:05  0.59% httpd
664 mysql      18   4    0 89368K 48980K sbwait 0  22:30  0.00% mysqld
88872 www         1   4    0 26852K 18988K accept 0   0:28  0.00% httpd
88852 www         1   4    0 26852K 19072K accept 2   0:27  0.00% httpd
89093 www         1   4    0 26852K 19000K accept 2   0:24  0.00% httpd
666 root        1  96    0 23780K 15260K select 0   0:17  0.00% httpd
89898 www         1   4    0 25828K 18156K accept 0   0:16  0.00% httpd
90001 www         1   4    0 26852K 19176K accept 2   0:14  0.00% httpd
16405 root        1   4    0  3256K  1520K kqread 0   0:07  0.00% master
682 root        1   8    0  3184K  1248K nanslp 0   0:04  0.00% cron
511 root        1  96    0  3156K  1200K select 3   0:04  0.00% syslogd
90377 www         1   4    0 26852K 19164K accept 0   0:04  0.00% httpd
16455 postfix     1   4    0  3256K  1576K kqread 2   0:01  0.00% qmgr
706 root        1  96    0  3212K  1352K select 3   0:01  0.00% inetd
82754 root        1  96    0  5392K  2736K select 2   0:00  0.00% telnetd
90461 root        1   8    0  9804K  6964K wait   2   0:00  0.00% python
82760 root        1  20    0  5476K  2608K pause  0   0:00  0.00% csh
90431 root        1  20    0  5476K  2704K pause  2   0:00  0.00% csh

 

GImana OK Kan, daripada HArus Beli barang kayak Beginian kan Mahal,  Yah untunglah gw udah nyicipin Ngoprek BOX ini, It’s Real Coolllllll

 

OK Selamat Mencoba yah……..

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: