Cisco's Network Management System (NMS) software such as Cisco DSL Manager (CDM), Service Connection Manager (SCM) and Cisco Network Order Manager (CNOM) use SNMP and/or the IOS (Internetwork Operating System) command line interface (CLI) to communicate with and manage Cisco devices. MIMIC supports both SNMP and IOS CLI simulation to enable a realistic simulation for any management application that uses the IOS CLI.
The easiest way of implementing a new IOS simulation is to use the CLI Wizard to record a session between a management application and a device running IOS. The resulting "basic" simulation will give verbatim responses to requests that were captured in the recording. For example, the show clock would return the same response regardless of the time of day.
For more advanced simulations, with dynamic responses, you need to write Telnet rules with Tcl scripts. The MIMIC Virtual Lab implements such advanced simulations. They can be loaded into MIMIC with the Update Wizard.
A specific MIMIC licensing option, the IOS license, allows access to the protocol modules required to simulate a Cisco IOS entity. They are currently
Protocol module installation is required prior to first-time use of the IOS features. This consists in copying the dynamic library from the bin/dynamic/optional directory to the bin/dynamic directory. Please consult the Installation section of each of the Protocol Module Guides for details.
The protocol-specific modules for Telnet and/or TFTP can be enabled for an agent simulation via check boxes found on the Advanced tab of the Edit->Configure dialog.
IOS Explorer (iosdisc) is a stand-alone utility of the CLI Wizard functionality to automatically discover IOS commands supported by Cisco devices. This utility works in conjunction with IOS Recorder to create an IOS simulation. Instead of requiring a third party NMS application to issue IOS commands, iosdisc discovers the IOS commands on the device dynamically, which are recorded by the IOS Recorder.
The protocol capture needs to be launched prior to initiating the discovery process to capture maximum traffic, as documented below.
The user has the ability to either completely discover the device by specifying no commands to be included and no commands to be excluded. In the first dialog you can restrict the discovery by specifying the commands to be included and commands to be excluded. Approriately only included commands will be discovered and excluded commands will be ignored.
Once the IOS commands are discovered, this dialog allows the commands to be issued after editing them by providing required arguments. The checklist shows all the commands with a checkbox indicating the command to be issued. Commands in red indicate they were excluded from the discovery process. The argument of the command appear as a leaf in the tree. When selected it allows the user to add the arguments through the graphical interface, which becomes the issued command. All the checked commands will be issued to the device when you click on the Finish button.
IOS Explorer can be invoked with following command line options:
The IOS Recorder (iosrec) is a stand-alone utility to record Cisco IOS sessions and create basic IOS simulations.
The IOS Recorder uses tshark (version 1.10 or newer) (this used to be tethereal) to record one or more sessions between a management application (or telnet client) and an IOS device.
The tshark package needs to be installed and the config/iosrec.cfg file needs to point to the directory path of the installed tethereal / tshark program.
Here is a sample config/iosrec.cfg configuration file:
# iosrec configuration file. tethereal_path = /usr/local/bin #network_latency = 20 #login_failure_msg = % Login invalid #login_prompt = Username: #passwd_prompt = Password: #rule_template = library.rul
Although live recording of IOS transactions will be part of IOS Recorder in the future, the initial version of IOS Recorder depends on third party packet capture tools (e.g. ethereal, tethereal, snoop, tcpdump, Sniffer) for data acquisition. The captured live traffic protocol data is dumped by the packet capture tool into a binary file that needs to be fed to the IOS Recorder (with the --in command line option).
The IOS Recorder identifies connect events, requests and responses by looking at certain sequences of patterns in the captured data. (Technically, iosrec uses the TCP flags, the login prompt, password prompt, login failure message as patterns.)
Since it uses sequences of patterns to identify commands and create the rules for the IOS Simulator, it is highly recommended to start iosrec before starting a telnet session to the device, ie. one should not record in the middle of a session, eg. after you get login prompt or password prompt, or after typing half of a request.
The IOS Recorder supports the following command line options: