/[dynamips]/upstream/dynamips-0.2.6-RC1/README
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/dynamips-0.2.6-RC1/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Sat Oct 6 16:03:58 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 14715 byte(s)
import dynamips-0.2.6-RC1

1 Help for Cisco 7200/3600 simulator (dynamips-0.2.5)
2 =====================================================
3 Authors of this document: Fabien Devaux, Christophe Fillot, MtvE
4
5 Emulated hardware
6 *****************
7
8 The emulator currently supports Cisco 7200 and Cisco 3600 series.
9 By default, a Cisco 7206VXR with NPE-200 (256 Mb of DRAM) is emulated.
10
11 To emulate a Cisco 3600, use the "-P 3600" command line option.
12
13 For the 7200, you can change the NPE type with the "-t" option.
14 It is possible to select "npe-100", "npe-150", "npe-175", "npe-200",
15 "npe-225", "npe-300" and "npe-400". The "npe-g1" is not working.
16
17 For the 3600, a 3640 with 128 Mb is emulated by default. You can change this
18 with the "-t" option and by specifying "3620" or "3660".
19 Don't forget to set the chassis type depending on your IOS image,
20 a c3660 image will not run on c3640 hardware and vice-versa.
21
22 Remark: PCMCIA card emulation is not supported yet with Cisco 3600.
23
24
25 Command Line Options overview
26 *****************************
27
28 -l <log_file> : Set logging file (default is dynamips_log.txt)
29 -j : Disable the JIT compiler, very slow
30 --exec-area <size> : Set the exec area size (default: 64 Mb)
31 --idle-pc <pc> : Set the idle PC (default: disabled)
32 --timer-itv <val> : Timer IRQ interval check (default: 1000)
33
34 -i <instance> : Set instance ID
35 -r <ram_size> : Set the virtual RAM size
36 -o <rom_size> : Set the virtual ROM size
37 -n <nvram_size> : Set the NVRAM size
38 -c <conf_reg> : Set the configuration register
39 -m <mac_addr> : Set the MAC address of the chassis
40 (default: automatically generated)
41 -C <cfg_file> : Import an IOS configuration file into NVRAM
42 -X : Do not use a file to simulate RAM (faster)
43 -R <rom_file> : Load an alternate ROM (default: embedded)
44 -k <clock_div> : Set the clock divisor (default: 4)
45
46 -T <port> : Console is on TCP <port>
47 -U <si_desc> : Console in on serial interface <si_desc>
48 (default is on the terminal)
49
50 -A <port> : AUX is on TCP <port>
51 -B <si_desc> : AUX is on serial interface <si_desc>
52 (default is no AUX port)
53
54 --disk0 <size> : Set PCMCIA ATA disk0: size
55 --disk1 <size> : Set PCMCIA ATA disk1: size
56
57 -a <cfg_file> : Virtual ATM switch configuration file
58 -f <cfg_file> : Virtual Frame-Relay switch configuration file
59 -E <cfg_file> : Virtual Ethernet switch configuration file
60 -b <cfg_file> : Virtual bridge configuration file
61 -e : Show network device list of the host machine
62
63 Options specific to the Cisco 7200 series:
64
65 -t <npe_type> : Select NPE type (default: "npe-200")
66 -M <midplane> : Select Midplane ("std" or "vxr")
67 -p <pa_desc> : Define a Port Adapter
68 -s <pa_nio> : Bind a Network IO interface to a Port Adapter
69
70 Options specific to the Cisco 3600 series ("dynamips -P 3600 --help"):
71
72 -t <chassis_type> : Select Chassis type (default: "3640")
73 -p <nm_desc> : Define a Network Module
74 -s <nm_nio> : Bind a Network IO interface to a Network Module
75
76
77 Command Line Options details
78 ****************************
79
80 -k <clock_div> :
81
82 Specify the clock divider (integer) based on the host clock.
83 Alter the value to match the CISCO clock with the real time.
84 The command "show clock" at the IOS' CLI will help you set this value.
85
86 --idle-pc <pc> :
87
88 The "idle PC" feature allows you to run a router instance without having
89 a 100% CPU load. This implies that you can run a larger number of instances
90 per real machine.
91
92 To determine the "idle PC", start normally the emulator with your Cisco IOS
93 image, and a totally IOS empty configuration (although not mandatory, this
94 will give better results). When the image is fully booted, wait for the
95 "Press RETURN to get started!" message prompt, but do not press Enter key.
96 Wait about 5 seconds, then press "Ctrl-] + i". Some statistics will be
97 gathered during 10 seconds. At the end, the emulator will display a list of
98 possible values to pass to the "--idle-pc" option. You may have to try some
99 values before finding the good one. To check if the idle PC value is good,
100 just boot the Cisco IOS image, and check your CPU load when the console
101 prompt is available. If it is low, you have found a good value, keep it
102 preciously.
103
104 Important remarks:
105 ==================
106
107 * An "idle PC" value is *specific* to a Cisco IOS image. You cannot
108 boot a different IOS image without proceeding as described above.
109
110 * Do not run the process while having the "autoconfiguration" prompt.
111
112
113 --exec_area <size> :
114
115 The exec area is a pool of host memory used to store pages translated by
116 the JIT (they contain the native code corresponding to MIPS code pages).
117
118
119
120 Cisco 7200 Port Adapter Description "<pa_desc>":
121 ------------------------------------------------
122 Format: slot:pa_driver
123
124 slot: the number of the physical slot (starts from 0)
125
126 pa_driver: the name of a Port Adapter driver in:
127 - C7200-IO-FE (FastEthernet, slot 0 only)
128 - PA-FE-TX (FastEthernet, slots 1 to 6)
129 - PA-4E (Ethernet, 4 ports)
130 - PA-8E (Ethernet, 8 ports)
131 - PA-4T+ (Serial, 4 ports)
132 - PA-8T (Serial, 8 ports)
133 - PA-A1 (ATM)
134
135
136 Cisco 3600 Network Module Description "<nm_desc>":
137 --------------------------------------------------
138 Format: slot:nm_driver
139
140 slot: the number of the physical slot (starts from 0)
141
142 nm_driver: the name of a Network Module driver in:
143 - NM-1E (Ethernet, 1 port)
144 - NM-4E (Ethernet, 4 ports)
145 - NM-1FE-TX (FastEthernet, 1 port)
146 - NM-4T (Serial, 4 ports)
147 - Leopard-2FE (Cisco 3660 FastEthernet in slot 0, automatically used)
148
149
150 NIO binding to Port Adapter "<pa_nio>" and Network Modules "<nm_nio>":
151 ----------------------------------------------------------------------
152
153 Format: slot:port:netio_type[:netio_parameters]
154
155 slot : the number of the physical slot (starts from 0)
156 port : the port in the specified slot (starts from 0)
157
158 netio_type : host interface for communication
159
160 unix:<local_sock>:<remote_sock>
161 Use unix sockets for local communication.
162 <local_sock> is created and represents the local NIC.
163 <remote_sock> is the file used by the other interface.
164 (ex. "/tmp/local:/tmp/remote")
165
166 vde:<control_sock>:<local_sock>
167 For use with UML (User-Mode-Linux) or VDE switches.
168 VDE stands for "Virtual Distributed Ethernet".
169 Please refer to : http://sourceforge.net/projects/vde/
170
171 tap:<tap_name>
172 Use a virtual ethernet device for communication.
173 <tap_name> is the name of the tap device (ex. "tap0")
174
175 gen_eth:<dev_name>
176 Use a real ethernet device for communication, using libpcap 0.9
177 or WinPcap. Works on Windows and Unix systems.
178
179 <dev_name> is the name of the Ethernet device (ex. "eth0")
180
181 The device list can be found using the "-e" option.
182
183 linux_eth:<dev_name>
184 Use a real ethernet device for communication (Linux specific).
185 <dev_name> is the name of the Ethernet device (ex. "eth0")
186
187 udp:<local_port>:<remote_host>:<remote_port>
188 Use an UDP socket for connection between remote instances.
189 <local_port> is the port we listen to.
190 <remote_host> is the host listening the port you want to connect to.
191 <remote_port> is the port you want to connect to.
192 (ex. "1000:somehost:2000" and "2000:otherhost:1000" on the other
193 side)
194
195 tcp_cli:<host>:<port>
196 Client side of a tcp connection.
197 <host> is the ip address of the server.
198 <port> is the port to connect to.
199
200 tcp_ser:<port>
201 Server side of a tcp connection.
202 <port> is the port to listen to.
203
204 null
205 Dummy netio (used for testing/debugging), no parameters needed.
206
207
208
209 VTTY binding to real serial port device "<si_desc>":
210 ----------------------------------------------------
211
212 Format: <device>{:baudrate{:databits{:parity{:stopbits{:hwflow}}}}}}
213
214 device: character device name, e.g. /dev/ttyS0
215 baudrate: baudrate
216 databits: number of databits.
217 parity: data parity: N=none, O=odd, E=even,
218 stopbits: number of stop bits
219 hwflow: hardware flow control (0=disable, 1=enable)
220
221 Note that the device field is mandatory, however other fields are optional.
222 (dynamips will default to 9600, 8, N, 1, no hardware flow control)
223
224 Note that access to the escape commands (described below) through a serial
225 port are deliberately prevented, as the escape commands interfere with
226 serial encapsulation protocols.
227
228
229 Escape commands
230 ***************
231
232 You can press ^] (Ctrl + ]) at any time, followed by one of these characters:
233
234 o : Show the VM object list
235 d : Show the device list
236 r : Dump MIPS CPU registers
237 t : Dump MIPS TLB entries
238 m : Dump the latest memory accesses
239 s : Suspend CPU emulation
240 u : Resume CPU emulation
241 q : Quit the emulator
242 b : Dump the instruction block tree
243 h : JIT hash table statistics
244 l : MTS64 cache statistics
245 c : Write IOS configuration to disk (ios_cfg.txt)
246 j : Non-JIT mode statistics
247 x : Experimentations (can crash the box!)
248 ^]: Send ^]
249
250 If you press an unrecognized key, help will be shown.
251
252 Note: on Windows, it may be the "Ctrl + $" sequence.
253
254
255 Virtual Bridge
256 **************
257
258 The virtual bridge is used to emulate a shared network between emulator
259 instances.
260
261 Any emulator instance can act as a virtual bridge.
262
263 The configuration file (specified by the "-b" option) contains a list of
264 NetIO descriptors, with the following syntax:
265
266 interface_name:netio_type[:netio_parameters]
267
268 Example:
269
270 # Connection to instance "I0"
271 I0:udp:10000:127.0.0.1:10001
272
273 # Connection to instance "I1"
274 I1:udp:10002:127.0.0.1:10003
275
276 # Connection to instance "I2"
277 I2:udp:10004:127.0.0.1:10005
278
279 The "I0" instance would be launched with the following parameters:
280
281 dynamips ios.bin -p 1:PA-FE-TX -s 1:0:udp:10001:127.0.0.1:10000
282
283
284 Virtual Ethernet switch
285 ***********************
286
287 The virtual ethernet switch is used to emulate an Ethernet network between
288 emulator instances. This switch supports access and trunk ports (802.1Q).
289 ISL will be available in a future release.
290
291 Any emulator instance can act as a virtual ethernet switch.
292
293 The configuration file (specified by the "-E" option) contains a list of
294 NetIO descriptors (representing interfaces) and a list of interface properties
295 (access/trunk port, VLAN info...)
296
297 The interface definition is similar to Port Adapters:
298
299 IF:interface_name:netio_type[:netio_parameters]
300
301 1) Configuring an Access Port
302
303 syntax: ACCESS:interface_name:vlan_id
304
305 2) Configuration a 802.1Q Trunk Port
306
307 syntax: DOT1Q:interface_name:native_vlan
308
309 The native VLAN is not tagged. On Cisco devices, by default the native VLAN
310 is VLAN 1.
311
312 Example of configuration file:
313
314 IF:E0:udp:10000:127.0.0.1:10001
315 IF:E1:udp:10002:127.0.0.1:10003
316 IF:E2:gen_eth:eth0
317
318 DOT1Q:E0:1
319 ACCESS:E1:4
320 DOT1Q:E2:1
321
322
323 Virtual ATM switch
324 ******************
325
326 The virtual ATM switch fabric is used to emulate an ATM backbone between
327 emulator instances. The use of this virtual switch is not mandatory, you
328 can directly connect emulator instances for point-to-point ATM connections.
329 Please note that only basic VP/VC switching is supported, there is no
330 support for ILMI/QSAAL/... or other specific ATM protocols.
331
332 Any emulator instance can act as a virtual ATM switch.
333
334 Example of configuration file (specified by the "-a" option):
335
336 # Virtual Interface List
337 IF:A0:udp:10001:127.0.0.1:10000
338 IF:A1:udp:10002:127.0.0.1:10003
339 IF:A2:udp:10004:127.0.0.1:10005
340
341 # VP connection between I0 and I1
342 VP:A0:10:A1:20
343 VP:A1:20:A0:10
344
345 # VP connection between I0 and I2
346 VP:A0:11:A2:30
347 VP:A2:30:A0:11
348
349 # VC connection between I1 and I2
350 VC:A1:5:2:A2:7:3
351 VC:A2:7:3:A1:5:2
352
353 In this example, we have 3 virtual interfaces, A0, A1 and A2. The syntax
354 for interface definition is similar to Port Adapters:
355
356 IF:interface_name:netio_type[:netio_parameters]
357
358 You can do VP switching or VC switching:
359
360 1) VP switching
361
362 syntax: VP:input_if:input_vpi:output_if:output_vpi
363
364 2) VC switching
365
366 syntax: VC:input_if:input_vpi:input_vci:output_if:output_vpi:output_vci
367
368
369 Testing the Virtual ATM switch with one dynamips instance
370 *********************************************************
371 (Contribution of Mtv Europe)
372
373 Virtual ATM switch configuration file ("atm.cfg"):
374
375 IF:A0:udp:10003:127.0.0.1:10001
376 IF:A1:udp:10004:127.0.0.1:10002
377 # a0/vpi=1/vci=100 connects to a1/vpi=2/vci=200
378 VC:A0:1:100:A1:2:200
379 VC:A1:2:200:A0:1:100
380
381 Invoking dynamips:
382
383 ./dynamips -p 1:PA-A1 -s 1:0:udp:10001:127.0.0.1:10003 \
384 -p 2:PA-A1 -s 2:0:udp:10002:127.0.0.1:10004 \
385 -a atm.cfg IOS.BIN
386
387 (note input ports of IOS interfaces are output ports of ATM switch
388 interfaces, and vice versa).
389
390 IOS configuration:
391
392 ip cef
393 ip vrf test
394 rd 1:1
395 route-target both 1:1
396 int a1/0
397 no shut
398 int a1/0.2 p
399 ip addr 1.1.1.1 255.255.255.0
400 pvc 1/100
401 interface a2/0
402 no shut
403 interface a2/0.2 p
404 ip vrf forwarding test
405 ip addr 1.1.1.2 255.255.255.0
406 pvc 2/200
407 !
408
409 # ping 1.1.1.2
410 !!!!!
411
412
413 Virtual Frame-Relay switch
414 **************************
415
416 The virtual Frame-Relay switch fabric is used to emulate a Frame-Relay
417 backbone between emulator instances. The use of this virtual switch is not
418 mandatory, you can directly connect emulator instances with appropriate IOS
419 configuration.
420
421 Any emulator instance can act as a virtual Frame-Relay switch.
422
423 There is only a basic implementation of the LMI protocol (ANSI Annex D), which
424 is probably not conforming but works with Cisco IOS. Fortunately, Cisco IOS
425 is able to detect automatically the LMI protocol.
426
427 Example of configuration file (specified by the "-f" option):
428
429 # Virtual Interface List
430 IF:S0:udp:10001:127.0.0.1:10000
431 IF:S1:udp:10002:127.0.0.1:10003
432
433 # DLCI switching between S0 and S1
434 VC:S0:200:S1:100
435 VC:S1:100:S0:200
436
437 In this example, we have 2 virtual interfaces, S0 and S1. The syntax
438 for interface definition is similar to Port Adapters:
439
440 IF:interface_name:netio_type[:netio_parameters]
441
442 DLCI switching syntax:
443
444 VC:input_if:input_dlci:output_if:output_dlci
445
446 In the example above, the switch is configured to switch packets
447 received on interface S0 with DLCI 200 to interface S1 with DLCI 100,
448 and vice-versa.
449
450 == EOF ==
451

  ViewVC Help
Powered by ViewVC 1.1.26