From: Arden Packeer (contactme@ardenpackeer.com)
Date: Fri Jul 18 2008 - 21:41:11 ART
When you install Dynagen, Dynagen it creates a command script called
Network device list.cmd. This script displays your network cards with
device names that dynamips can refer to.
When you run it, it produces something like this:
http://ardenpackeer.com/wp-content/uploads/2007/12/dynamips-networkcards.gif
In our .net file for dynamips we will bridge a virtual interface to
the physical interface using the names that the script outputs. For
example:
test1.net:
ghostios = true
sparsemem = true
model = 3640
[localhost]
[[3640]]
image = \Program Files\Dynamips\images\c3640-jk9o3s-mz.124-12.bin
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
ram = 96
[[ROUTER R3]]
f0/0 = NIO_gen_eth:\Device\NPF_{064084F0-A2EA-45FA-A362-ADDBC779026C}
This sets up R3's f0/0 bridged to our physical network card. Now all
we need to do is add an ip address to R3's f0/0 in the same subnet as
our physical network card and we should have connectivity between the
two.
Once that is done, set up an tftp server on your physical machine (I
use tftpd http://tftpd32.jounin.net/).
We can then do something like:
R3#copy tftp flash:
Address or name of remote host []? 192.168.1.1
Source filename []? picture.gif
Destination filename [picture.gif]?
Accessing tftp://192.168.1.1/picture.gif...
Erase flash: before copying? [confirm]n
Loading picture.gif from 192.168.1.1 (via FastEthernet0/0): !
[OK - 90 bytes]
Verifying checksum... OK (0xA319)
90 bytes copied in 0.216 secs (417 bytes/sec)
Tada! File now on dynamips virtual router! :)
I used this method to set up a web server on a dynamips router to test
NBAR protocol matching. I wrote up some tutorials on it here:
http://ardenpackeer.com/ios-features-management/how-to-set-up-a-cisco-router-as-a-webserver/
http://ardenpackeer.com/qos-voip/tutorial-how-to-use-cisco-mqc-nbar-to-filter-websites-like-youtube/
--- Arden Packeer Cisco Certified Internetwork Expert (CCIE #20716 R&S) Cisco Systems Instructor (CCSI #31090)contactme@ardenpackeer.com http://ardenpackeer.com
On Sat, Jul 19, 2008 at 1:22 AM, Jack Tsai <jacknew2005@gmail.com> wrote: > Dear Group, > > I would like to save tcl scripts to the flash: of a router inside Dynamips. > Please show me how to do it. > > Thanks, > Jack > > > _______________________________________________________________________ > Subscription information may be found at: > http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Mon Aug 04 2008 - 06:11:55 ART