7200emu.hacki.at Forum Index 7200emu.hacki.at
Dynamips, Dynagen and all that stuff
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
7200emu.hacki.at Forum Index

hackibr>

Step by step for beginner howto & former Wikipedia page

 
Post new topic   Reply to topic    7200emu.hacki.at Forum Index -> HOWTOs
View previous topic :: View next topic  
Author Message
jumbo



Joined: 18 Sep 2006
Posts: 859
Location: slovakia

PostPosted: Tue Feb 27, 2007 1:43 pm    Post subject: Step by step for beginner howto & former Wikipedia page Reply with quote

This is an copy of former Wiki page that was unfortunatelly removed...
Dynamips
Dynamips is a free open-source Cisco router hardware emulator, created by Christophe Fillot. Its main advantage compared to other similar products (so called cisco ios simulators) is that it runs original Cisco IOS. It accomplishes this task by emulating the hardware of the router, not the software. This way it is possible to virtualize almost 100% of the functionality of Cisco IOS (sometimes even 100% of the non-functionality of Cisco IOS Wink. Its main use is as a training platform for getting CCNA, CCNP and CCIE, or to simulate and try out new IOS features. It certainly cannot replace real cisco routers, because of its low performance. Dynamips is very easy to use (one needs to have proper experience with Cisco gear), it runs in a special hypervisor mode, allowing to create many instances of virtual routers and connect them with virtual links. The only boundaries are the capabilities of your computer. On todays typical computer, simulating 6 or 7 instances with 12.4T IOS is not a problem. It is even possible to distribute the hypervisor instances onto many computers, so actually there is no limitation in number of routers in the simulation.

Simulated routers
List of simulated routers is quite long and growing.

* originally dynamips was simulating only Cisco 7200 (NPE-100, NPE-200, NPE-400)
* then Chris added Cisco 3620, Cisco 3640, Cisco 3660, and nowadays there is a support for:
* Cisco 2691
* Cisco 2600 routers
* Cisco 3725 and Cisco 3745
* Cisco 26xxXM and Cisco 26xx
* Cisco 720x NPE-G1 and NPE-G2


Simulated port adapters/modules


Cisco 7200

* FastEthernet C7200-IO-FE(intergrated port), PA-2FE-TX (2 FastEthernet ports) and PA-FE-TX, PA-GE (1 GigabitEthernet port), C7200-I/O-2FE/E and C7200-I/O-GE+E (3 GigabitEthernet ports)
* Ethernet cards PA-4E and PA-8E
* ATM card PA-A1
* Serial cards PA-4T+ and PA-8T
* POS (Packet over Sonet) card “PA-POS-OC3”

Cisco 2691, 3620, 3640, 3660, 3725, 3745

* Ethernet cards: “NM-1E”, “NM-4E” and “NM-1FE-TX”
* Serial card “NM-4T”
* 16-port L3 switching capable NM-16ESW

Cisco 26xxXM,26xx
* Ethernet cards: “NM-1E”, “NM-4E” and “NM-1FE-TX”
* 16-port L3 switching capable NM-16ESW

Quick start guide

1. The best way to start with Dynamips is to use Dynagen, Dynamips frontend.
Download and install Dynagen
* Windows users need to install WinPCap 4.0
* Linux users need to install libpcap 0.9.4 or better

2. Download any IOS you prefer from Cisco CCO webpage, for example for Cisco 3660 the latest one c3660-jk9s-mz.124-9.T1.bin

3. Unzip the IOS, so that your routers would not be unzipping it everytime they boot
Code:
unzip -p c3660-jk9s-mz.124-9.T1.bin > image.bin


4. Create new Dynagen config file “triangle.net”. The syntax is quite self-descriptive

Code:
[localhost]
   
[[3660]]
 image = \Program Files\Dynamips\images\image.bin
 idlepc = 0x606303b4
 ram = 160
   
[[router_r1]]
 model = 3660
 slot1 = NM-16ESW
 f1/0 = R2 f1/0
 f1/1 = R3 f1/0

[[router_r2]]
 model = 3660
 slot1 = NM-16ESW
 f1/1 = R3 f1/1

[[router_r3]]
 model = 3660
 slot1 = NM-16ESW


As you can see we globally specified the IOS image,the idle-pc value, then the amount of RAM one router will use from the host computer RAM (12.4T actually requires 256 MB, but it will work well with 160 MB). After the global specification we created the first router R1 and connected it to R2 and R3 via FastEthernet 1/0 and FastEthernet 1/1 using the 16 port L3 switch module NM-16ESW. There is no need to specify the “reverse” connection, dynagen will figure this out automatically.

5. Start the local dynamips hypervisor instance
Code:
dynamips -H 7200

* Or use dynamips-start.cmd file on Windows, which does the same thing

6. Start the lab
* on Windows just double click on the triangle.net file
* on Linux start dynagen triangle.net
This will start all 3 routers and you will see the dynagen management window open. Try to type list and press ENTER

7. The virtual consoles of the virtual routers are bound to TCP ports starting from 2000
* R1 console is on localhost:2000
* R2 console is on localhost:2001
* R3 console is on localhost:2002

Try to connect to all of them using your favorite telnet application, you should be seeing how it is booting

Code:
Connected to Dynamips VM "R1" (ID 0, type c3600) - Console port

ROMMON emulation microcode.

                           Launching IOS image at 0x80008000...

                                                               Smart Init is disabled. IOMEM set to: 5 

                                                                                                        Using iomem percentage: 5

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco IOS Software, 3600 Software (C3660-JK9S-M), Version 12.4(9)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Wed 30-Aug-06 18:28 by prod_rel_team
Image text-base: 0x60009084, data-base: 0x63060000


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Cisco 3660 (R527x) processor (revision 1.0) with 155648K/8192K bytes of memory.
Processor board ID JAB0446C0L2
R527x CPU at 250MHz, Implementation 40, Rev 1.2, 512KB L2 Cache


3660 Chassis type: ENTERPRISE
18 FastEthernet interfaces
DRAM configuration is 64 bits wide with parity enabled.
125K bytes of NVRAM.
8192K bytes of processor board System flash (Read/Write)


         --- System Configuration Dialog ---

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


Press RETURN to get started!


*Mar  1 00:00:22.775: %LINEPROTO-5-UPDOWN: Line protocol on Interface VoIP-Null0, changed state to up
*Mar  1 00:00:22.779: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:00:22.787: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar  1 00:00:22.791: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to down
*Mar  1 00:00:22.795: %LINK-3-UPDOWN: Interface FastEthernet1/1, changed state to down
*Mar  1 00:00:22.803: %LINK-3-UPDOWN: Interface FastEthernet1/2, changed state to down
*Mar  1 00:00:22.807: %LINK-3-UPDOWN: Interface FastEthernet1/3, changed state to down
*Mar  1 00:00:22.811: %LINK-3-UPDOWN: Interface FastEthernet1/4, changed state to down
*Mar  1 00:00:22.815: %LINK-3-UPDOWN: Interface FastEthernet1/5, changed state to down
*Mar  1 00:00:22.819: %LINK-3-UPDOWN: Interface FastEthernet1/6, changed state to down
*Mar  1 00:00:22.823: %LINK-3-UPDOWN: Interface FastEthernet1/7, changed state to down
*Mar  1 00:00:22.8
Router>
Router>27: %LINK-3-UPDOWN: Interface FastEthernet1/8, changed state to down
*Mar  1 00:00:22.831: %LINK-3-UPDOWN: Interface FastEthernet1/9, changed state to down
*Mar  1 00:00:22.835: %LINK-3-UPDOWN: Interface FastEthernet1/10, changed state to down
*Mar  1 00:00:22.839: %LINK-3-UPDOWN: Interface FastEthernet1/11, changed state to down
*Mar  1 00:00:22.843: %LINK-3-UPDOWN: Interface FastEthernet1/12, changed state to down
*Mar  1 00:00:22.847: %LINK-3-UPDOWN: Interface FastEthernet1/13, changed state to down
*Mar  1 00:00:22.851: %LINK-3-UPDOWN: Interface FastEthernet1/14, changed state to down
*Mar  1 00:00:22.855: %LINK-3-UPDOWN: Interface FastEthernet1/15, changed state to down
*Mar  1 00:00:22.859: %LINEPROTO-5-UPDOWN: Line protocol on Interface IPv6-mpls, changed state to up
*Mar  1 00:00:23.803: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
*Mar  1 00:00:23.807: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
*Mar  1 00:00:23.811: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down
*Mar  1 00:00:23.815: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to down
*Mar  1 00:00:23.819: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/2, changed state to down
*Mar  1 00:00:23.819: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/3, changed state to down
*Mar  1 00:00:23.823: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/4, changed state to down
*Mar  1 00:00:23.827: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/5, changed state to down
*Mar  1 00:00:23.831: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/6, changed state to down
*Mar  1 00:00:23.835: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/7, changed state to down
*Mar  1 00:01:37.771: %IP-5-WEBINST_KILL: Terminating DNS process
*Mar  1 00:01:40.499: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar  1 00:01:40.503: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
*Mar  1 00:01:40.507: %LINK-3-UPDOWN: Interface FastEthernet1/15, changed state to up
*Mar  1 00:01:40.511: %LINK-3-UPDOWN: Interface FastEthernet1/14, changed state to up
*Mar  1 00:01:40.515: %LINK-3-UPDOWN: Interface FastEthernet1/13, changed state to up
*Mar  1 00:01:40.519: %LINK-3-UPDOWN: Interface FastEthernet1/12, changed state to up
*Mar  1 00:01:40.523: %LINK-3-UPDOWN: Interface FastEthernet1/11, changed state to up
*Mar  1 00:01:40.527: %LINK-3-UPDOWN: Interface FastEthernet1/10, changed state to up
*Mar  1 00:01:40.531: %LINK-3-UPDOWN: Interface FastEthernet1/9, changed state to up
*Mar  1 00:01:40.535: %LINK-3-UPDOWN: Interface FastEthernet1/8, changed state to up
*Mar  1 00:01:40.539: %LINK-3-UPDOWN: Interface FastEthernet1/7, changed state to up
*Mar  1 00:01:40.543: %LINK-3-UPDOWN: Interface FastEthernet1/6, changed state to up
*Mar  1 00:01:40.547: %LINK-3-UPDOWN: Interface FastEthernet1/5, changed state to up
*Mar  1 00:01:40.551: %LINK-3-UPDOWN: Interface FastEthernet1/4, changed state to up
*Mar  1 00:01:40.555: %LINK-3-UPDOWN: Interface FastEthernet1/3, changed state to up
*Mar  1 00:01:40.559: %LINK-3-UPDOWN: Interface FastEthernet1/2, changed state to up
*Mar  1 00:01:41.395: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
*Mar  1 00:01:41.807: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
*Mar  1 00:01:41.811: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
*Mar  1 00:01:41.815: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to up
*Mar  1 00:01:41.815: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
*Mar  1 00:01:42.919: %SYS-5-RESTART: System restarted --
Cisco IOS Software, 3600 Software (C3660-JK9S-M), Version 12.4(9)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Wed 30-Aug-06 18:28 by prod_rel_team
*Mar  1 00:01:43.091: %SNMP-5-COLDSTART: SNMP agent on host Router is undergoing a cold start
*Mar  1 00:01:43.395: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
*Mar  1 00:01:43.399: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
*Mar  1 00:01:43.399: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
Router>     


8. Play with the routers. Remember Dynamips is NOT emulating the IOS software, it is emulating the hardware and loading the original Cisco IOS into it. If Cisco IOS supports MPLS Traffic Engineering, then Dynamips supports MPLS TE. Also means if there is bug in IOS, there is also the same bug in Dynamips. etc.
R1:
Code:
Router>show cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
Router           Fas 1/1            179         R S I     3660      Fas 1/0
Router           Fas 1/0            175         R S I     3660      Fas 1/0
Router>en 
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int vlan 1
Router(config-if)#ip add 1.1.1.0 255.255.255.0
Bad mask /24 for address 1.1.1.0
Router(config-if)#ip add 1.1.1.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#
Router(config-if)#
Router(config-if)#end
*Mar  1 00:08:23.675: %SYS-5-CONFIG_I: Configured from console by console1.1.1.


R2:
Code:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int vlan 1
Router(config-if)#ip add 1.1.1.2 255.255.255.0
Router(config-if)#no shut


R3:
Code:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int vlan 1
Router(config-if)#ip add 1.1.1.3 255.255.255.0
Router(config-if)#no shut


Back on R1:
Code:
Router#ping 1.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 4/33/76 ms
Router#ping 1.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/87/172 ms
Router#ping 1.1.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 12/54/112 ms


Note that the first ping packet timeouts, because the router needs to do an ARP request first

9. When you are done with configuring, do a copy run start on routers and save your work by going back to Dynagen window and doing save /all command
Back to top
View user's profile Send private message
bruce



Joined: 02 Mar 2007
Posts: 27

PostPosted: Fri Mar 02, 2007 11:48 am    Post subject: 3640 Reply with quote

Hi,
I am using WIN-XP hence how do I extract the IOS Image File??
regards
Back to top
View user's profile Send private message
chris
Site Admin


Joined: 17 Jul 2006
Posts: 467

PostPosted: Fri Mar 02, 2007 11:56 am    Post subject: Reply with quote

Could you ask your questions in the appropriate topics ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    7200emu.hacki.at Forum Index -> HOWTOs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


 


Powered by phpBB © 2001, 2005 phpBB Group