Banner
HomeTOCPrevNextGlossSearchHelp

PDF

Table of Contents

Managing Cisco Device Configurations

Managing Cisco Device Configurations

Managing Cisco Device Configurations

This chapter describes the CiscoWorks configuration management features that enable you to dynamically access the configuration parameters of the local and remote Cisco Systems devices in your network and analyze or alter them as necessary.

This chapter describes the configuration management window and provides information on the following topics:

The CiscoWorks Configuration Management feature can be used with Cisco Systems devices only. Cisco Systems device software must be any release of 8.2 or later.


Note: Before using the configuration management features, make sure that Trivial File Transfer Protocol (TFTP) has been set up for your system. TFTP is used to accomplish the transfer of configuration files between devices. TFTP is defined in RFC 783.For instructions on setting up TFTP, refer to the CiscoWorks Getting Started Guide.


Overview of the Configuration Management Process

Figure 5-1 illustrates the configuration management data flow concept. You create the configuration file with a text editor. This data is then converted to a configuration file, or series of commands used to configure a device. When a configuration file is loaded onto a device, a copy of the file is retained in the database.

The file sent to the device is also optionally retained in a separate boot file, and available if needed by the remote device for booting after failure or any other restart requirement. Configurations can be retrieved from devices, edited and returned to those devices, retained for future use, or used for analysis and troubleshooting. Configuration files are always archived in the CiscoWorks database.

TFTP is used to accomplish the transfer of configuration files between devices. If TFTP was not configured on your system, make sure you do so by following the instructions in the CiscoWorks Getting Started Guide.

nm095.gif

Figure 5-1 : Configuration Management Concept


Accessing Configuration Management

To access Configuration Management, select Config Mgmt from the Tools menu in the SunNet Manager (SNM) Console window.

nm988.gif

CiscoWorks might require you to identify yourself and enter your password, as described in the chapter, "Using Security Manager Tools." If you encounter an Invalid Password error, either the password has been changed or you made an error in entering the password. If the password was changed, check with the system administrator.

The configuration management window is illustrated in Figure 5-2.


Note: Only Cisco devices that are included in the Sybase database will display in the Device Name window. If a new Cisco device is added to the Sybase database, it will display in the Device Name window only if you quit the Configuration Management window and access it again.


The Configuration Management Window

The following sections describe the scroll windows, options, and command buttons in the Configuration Management window. Figure 5-2 shows a Configuration Management window where a device is highlighted to display the different configuration versions identified with it.

The letter L beside a version in the Configuration Versions in Database indicates that this version is loaded on the device. An asterisk (*) beside a version indicates that this version of the configuration file was created but was never loaded to the device.

Table 5-1 describes the primary components of the Configuration Management window. Table 5-2 lists each command button and the tasks you can accomplish by using these command buttons.

nm166.gif

Figure 5-2 : Configuration Management Window

Table 5-1 : Configuration Management Window Components

Component Subcomponent Description
File Print

Version
Prints a snapshot of the selected configuration file.
Displays the CiscoWorks version information.
Quit Exits the current window.
Options File to Database Enables you to copy a configuration file from your system's directory to the database. Once a configuration file exists in the database, it can be loaded to the device.
Refresh Device List Updates the list of devices in the Configuration Management window to reflect the current list of Cisco devices in the database.
Security Change User
Privilege
Changes user ID to another user.
Views current user ID privileges.
Help Provides a manual page on the current window.
Device Name Find Enables you to quickly find a device listed in the CiscoWorks database. Devices with tables in the CiscoWorks database are listed in the Device Name scroll window. The configuration files are displayed only if you had created and associated configuration files with that device. The configuration file that is loaded on the device will have the letter L in the entry. New configuration files that were created but never loaded on the device are indicated by an asterisk (*).
Configuration
Versions in
Database
Find Enables you to quickly find a specific version of a configuration file. To display the list of configuration files associated with a device, click on a device name in the Device Name scroll window within the Configuration Management window. If you did not create and store a configuration file for a device, or if no device name has been highlighted, the Configuration Versions in Database scroll window will be blank.

Table 5-2 : Configuration Management Command Buttons

Command Buttons Task Description
Database To Device Load a configuration file from the database to a device. Refer to "Loading a Configuration File."
Device To Database Load a device's configuration file to the database. Refer to "Loading a Device's Configuration File to the Database."
Delete from DB Delete a device's configuration file from the database. Refer to "Deleting Configuration Files."
Browse Config View the contents of a configuration file from a device or from the database. You can search forward or backward for text strings. You cannot make any changes when you are browsing a configuration file. Refer to "Loading a Device's Configuration File to the Database."
Edit Config Edit a configuration file used by a device or from the database. Refer to "Creating a New Configuration File."
Browse Comments View the contents of a comments file either from a device or from the database. You cannot make any changes when you are browsing a comments file. You can search forward and backward for text strings. Refer to "Browsing Configuration Comments Files."
Edit Comments Edit or add information about the configuration file that is unique, critical to its operation, and so on. Each configuration version file has a comments file. Refer to "Editing Configuration Comments Files."
Compare Configs Compare a device's loaded configuration file with a configuration file in the database or with another device's configuration file. You can list the differences between files to troubleshoot configuration problems on a device. Refer to "Comparing Configuration Files."


Selecting a Text Editor

You can define a text editor to be used to create or edit configuration files.The default text editor for creating configuration files within Cisco Works is textedit. Skip this section if you have already specified a text editor or if you plan to use textedit.

You can define the editor at the command line or in the $HOME/.Xdefaults file. Changes you enter at the command line only remain in effect until you exit the Configuration Management application. Changes you set in the .Xdefaults file remain in effect until you change them again. Options entered at the command line override those set in the .Xdefaults file.


Note: Ensure that the editor or program you want to use, as well as Xterm, is in your PATH. Refer to the CiscoWorks Getting Started Guide for information on adding the PATH information to your .cshrc file.

To customize the look of your editor window, use the following format at the command line, making sure that you enclose the appropriate command string within quotation marks:

nmconfman -EditorFormat "command string %s"

The command string specifies the editor, command, or file to be executed. The Configuration Management application replaces %s with the name of the actual configuration file being opened.

With OPEN LOOK, you can add the textedit option to avoid the extra Xterm window. For example, at the command line, enter:

hostname% nmconfman -EditorFormat "/usr/local/bin/textedit %s"

In a more complex example, the following command line entry would produce an emacs window 80 lines long by 40 characters wide:

hostname% nmconfman -EditorFormat "/usr/bin/X11/xterm -geometry 

80x40 -e emacs -nw %s"


Editing the .Xdefaults File Entry to Specify the Text Editor

The .Xdefaults file on your system contains information that is specific to OPEN LOOK environment. To define the look of your text editor window, add the following command to the .Xdefaults file, substituting the appropriate options:

nmconfman EditorFormat: command string %s

The command string is the editor, command, or file to be executed. With EditorFormat, you can create a file or command to represent your own customized editor.

If other editor parameters are defined in the .Xdefaults file, the EditorFormat parameter will override these parameters.

To specify the emacs editor in /usr/local/bin, add the following line to the .Xdefaults file:

nmconfman.EditorFormat: /usr/local/bin/emacs %s

This string tells the Configuration Management application to replace the %s symbol with the name of the actual configuration file being opened. The file will be opened using the emacs text editor.

If %s is not entered into the string, the Configuration Management application will append the actual configuration filename to the end of the string.

fig_2.gif Caution: You must update your environment after changing the .Xdefaults file. To add the changes to the file, enter the following command:

hostname% xrdb -merge $HOME/.Xdefaults

To write over the existing information in the .Xdefaults file, enter the following command:

hostname% xrdb -load $HOME/.Xdefaults

If you receive the following error message, check your PATH to see that Xterm is included. Refer to the CiscoWorks Getting Started Guide for instructions on specifying a path for Xterm.

nm251.gif


Understanding Configuration File Requirements

The Router Products Getting Started Guide explains the different ways to create a configuration file for a Cisco device at the time of setting it up. You can create configuration files by using a UNIX text editor such as textedit, vi, or emacs.

Knowledge of configuration file and device requirements will assist you in creating configuration files that can be saved to the CiscoWorks database and downloaded to a device For information on device requirements, refer to the documentation for the appropriate Cisco device.


Configuration File Requirements

Before you create or load configuration files, note that configuration files have certain restrictions regarding syntax and file size. In addition, make sure that the device version number is correct and that an appropriate community string is assigned to the device. See "Requirements for Loading a Configuration File to a Device."


Syntax

The syntax you use to create a device configuration file is unique to the individual device. The configuration management software does not provide syntax checking. You should be fully knowledgeable of applicable device requirements.

When you enter configuration data, be certain the sequence, syntax, and other parameters are in accordance with the requirements for the particular device. In most instances, you enter commands as though you were entering them from the appropriate device console.


Maximum File Size

The maximum size of a single device configuration file or a comments file is 128 KB. The number of configurations that can be stored in the database depends on how much of available disk memory CiscoWorks allocates to database functions.

For each version of a configuration file, you can store information up to 108 KB for the configuration file comments file. A configuration comments file is useful to store information such as the history of usage of a configuration on a device or the reasons why a specific change was made to the configuration of a device.


Creating a New Configuration File

A remote device configuration file is a text file created by any standard text editor. The default editor for the CiscoWorks Configuration Management application is textedit, unless you customized the .Xdefaults file and specified a different text editor.

Using a text editor such as textedit, create and save a new device configuration file. This file is saved in a directory on your system.

Once you have created a configuration file, you can transfer the file to the database by selecting a device and using the File to Database command in the Configuration Management window. To load this configuration file to the device, you use the Database to Device command in the Configuration Management window.


Sample Configuration File

The following lines provide an example of a configuration file for a Cisco Systems router:

device_name SandBox
enable password shovel
line vty 0 4
password hammer
snmp-server community public RO
!
ip routing
decnet routing 34.16
decnet node routing-iv
xns routing
novell routing
appletalk routing
clns routing
clns router igrp area_1 net 49.0034.0000.0C00.0D75.00
vines routing
bridge 1 protocol dec
!
interface Ethernet0
ip address 131.108.4.65 255.255.255.0

decnet cost 10
xns network 2102
novell network 2102
appletalk address 602.90
appletalk zone twilight
clns router igrp area_1
vines metric
bridge-group 1

interface Serial0
ip address 131.108.101.63 255.255.255.0
decnet cost 10
xns network 2102
novell network 2102
appletalk address 602.90
appletalk zone twilight
clns router igrp area_1
vines metric
bridge-group 1
!
end


Editing Configuration Files

This section describes three methods used to edit a device configuration file:

  • Editing an existing configuration file on your system. If you store configuration files on your system, you can access, edit, and save the configuration file by using a text editor.

  • Editing a configuration file loaded on a device.

  • Editing a configuration file that exists in the database.

    fig_1.gif

Caution: When editing configuration files, do not delete lines. Instead, change parameters. For example, if you want a protocol enabled, do not delete the line containing the parameter. Instead, modify the parameter to show that the protocol is enabled.


Editing a Configuration File on Your System

If you already have configuration files in a directory on your system, you can use text editor to access a specific configuration file, edit it, and save it.

Use the File to Database command in the Configuration Management window to transfer the new device configuration file to the CiscoWorks Sybase database. When this configuration file is added to the database, it can be loaded to a device you specify by using the Database to Device command.


Editing a Configuration File Loaded on a Device

Follow these steps to edit a configuration file that is currently loaded on a device.

Step 1: From the SNM Tools menu, select Config Mgmt.

Step 1: Select the appropriate device from the Device Names scroll window in the Configuration Management window.

Step 2: Click on the Edit Config button to open your text editor.

A copy of the current device configuration will be displayed in the text editor window. A window similar to the one in Figure 5-3 appears.


nm250.gif

Figure 5-3 : Editing a Configuration File Loaded on a Device

Step 3: Edit the file and save it by using the editor's save command. If you are using the default text editor textedit, select Save from the File menu.

When you exit the editor, the edited configuration file is assigned the next sequential version number, added to the database, and displayed in the Configuration Versions in Database scroll browser. If you do not save the configuration file before you exit the editor, the file will be discarded and not saved.


Editing a Configuration File That Exists in the Database

Follow these steps to edit a configuration file that currently exists in the CiscoWorks Sybase database.

Step 1: Select a device in the Device Names scroll window.

Step 2: Select a version of the configuration file in the Configuration Versions in Database scroll window.

Step 3: Click on the Edit Config button.

Your text editor opens and reads the selected configuration script from the database and assigns a temporary filename to the file.

A window similar to Figure 5-3 appears.

Step 4: Edit the configuration file and save the file using the editor's save command. If you are using the default text editor textedit, select Save from the File and close the window.

If you do not save the configuration file before you exit the editor, it will be discarded. When you exit the editor, the edited configuration file is assigned the next sequential version number, added to the database, and displayed in the Configuration Versions in Database scroll browser.


Copying a File to the Database

After you create or edit an existing configuration file and save it, use the File To Database command in the Configuration Management window to copy and store it in the database. Configuration files in the database can be downloaded to a specific device.


Note: Adding the edited file to your database does not destroy the original file. The file remains under its original name in the directory on your system, and a copy of the file is added to the database.

Follow these steps to copy a file from a directory on your system to the database.

Step 1: Select a device by clicking on its name in the Device Names scroll window.

If you do not select a device before selecting the File to Database command, the following message will appear:


nm145.gif

Click on OK, select the device, and try again.

Step 2: After you select a device, click on the File to Database command.

The File Selection scroll window displays the files and directories within the current directory. See Figure 5-4.


nm094.gif

Figure 5-4 : File Selection Window

Step 3: If the configuration file exists in the current directory, click on the appropriate filename with the left mouse button and click on the OK button. You can also enter the filename on the blank line beside the File field and click on the OK button.If the configuration file is located in a different directory, specify the complete path and filename in the Path field. Then click OK.

The Configuration Management application will read the file, assign it a new version number and copy it to the database.

Files added to the database are assigned the next sequential version number and appear at the top of the list of existing versions in the Configuration Versions in Database scroll window.


Loading a Configuration File

You can load a configuration file from the database to a device or from a device to the database. When a configuration file is loaded to a device, a copy of the loaded configuration file is appended to the comments file associated with this configuration file. In addition, the configuration file that you download to the device is written to the nonvolatile memory in the device. As a result, the existing configuration information in the device's nonvolatile memory is replaced with the new configuration information. For detailed information on configuration information in nonvolatile memory, refer to the Router Products Getting Started Guide.


Requirements for Loading a Configuration File to a Device

Before a configuration file is loaded to a Cisco device, make sure that the device is running the appropriate software release version and that the ReadWrite community string is appropriately specified for the device.


Device Version Number

Configuration files created or loaded by using CiscoWorks configuration management can be used for Cisco devices running the Software Release 8.2 or above.


Community String

Before a configuration file is downloaded to a device, the community string for the device must be specified as RW (ReadWrite). If the community string is RO (ReadOnly), a configuration file cannot be downloaded to a device. To verify the community string for a device, refer to the "Devices Window" in the "Device Management" chapter. For details regarding router settings, refer to the Router Products Configuration and Reference publication.


Option for Enabling Boot File Generation

When a configuration file is loaded from the database to a device, an image of the loaded configuration file can be saved in a TFTP boot file under the /tftpboot directory. If the device is down, you have the choice of retrieving the image of the configuration file from /tftpboot directory. However, the /tftpboot directory may not provide a secure storage location because almost all users can access this directory. Therefore, you may not want the boot file generation feature to be turned off.

By default, CiscoWorks does not enable the boot file generation feature in the /tftpboot directory, unless you activate it by editing the .Xdefaults file and turn it on.

Step 1: To turn on the bootfile generation, add the following line to the .Xdefaults file in your home directory.

Nmconfman*bootfil  e: on

Step 2: Save the changes to the .Xdefaults file using your text editor's save command.

Step 3: To write over the existing information in the .Xdefaults file, enter the following command at the UNIX command line:

hostname# xrdb -merge $HOME/.Xdefaults


Loading a Configuration File to a Device

After you create and add a configuration file to the database, you can load the configuration file from the database to the device, if the TFTP feature was already set up for your system. For instructions on setting up TFTP, refer to the CiscoWorks Getting Started Guide.

Follow these steps to load a configuration file to a device.

Step 1: Select a device name in the Device Name scroll window.

Step 2: If the device name of your choice is not displayed in the Device Name window, enter the device name on the blank line beside the Find button and click on Find.

The device name will appear highlighted in the Device Name scroll window.

Step 3: Select a configuration version in the Configuration Versions in Database scroll window.

Step 4: If the configuration version of your choice is not displayed in the Configuration Versions in Database browser, enter the version number on the blank line beside the Version Number field and click on Find.

The configuration version will appear highlighted in the Configuration Versions in Database scroll browser.

Step 5: Click on the Database to Device button.

You are asked to confirm your choice.


nm140.gif

Step 6: Click on Load to confirm your choice, or Cancel if you do not want to load the configuration file to the device.

If you clicked on Load, the configuration file is loaded to the device and will display the letter L to indicate that this configuration file was loaded to the device. When a configuration file is loaded to a device, the text file is called from the database and converted to a format appropriate to send to the device.

If this operation cannot be completed, a message appears stating that a file could not be created for the selected configuration. The most probable reason for this message is insufficient disk space available to conduct the process. If you suspect this is the case, adjust your memory allocation as required before attempting to repeat a load operation. Refer to Chapter 8, Database Administration. Other reasons for this problem may be that a disk error occurred, the link to the database failed, the community string in the device table is not enabled for ReadWrite, or the file was corrupted during the File to Database operation.


Loading a Device's Configuration File to the Database

If a configuration file is loaded on a device, you can load that file to the database by selecting the device name from the Device Names scroll window and clicking on the Device To Database button.

When the configuration file is read from the device it is assigned a new version number, added to the database as a machine record version, and listed at the top of the list of configurations in the Configuration Versions in Database scroll browser.


Browsing a Configuration File

You can browse a configuration file that is either loaded on a device or in the database.


Note: You cannot make any changes to a configuration file when you are browsing it. If you need to make any changes, use the Edit Config button.


Browsing a Configuration File on a Device

Follow these steps to view a configuration file on a device, without making any changes to it.

Step 1: To view a configuration file loaded on a device, select a device in the Devices window and click on the Browse Config button.

A window similar to Figure 5-5 appears, displaying the appropriate configuration file for the device you chose.


nm091.gif

Figure 5-5 : Browse Config Window Displaying a Configuration File from a Device

Step 2: To scroll up or down in the file, click on either arrow in the scroll bar on the right.

Step 3: Enter a text string in the search field and click on the Search Forward or Search Backward button to locate a text string in the file.

Step 4: To exit the window, select Quit from the File menu.


Browsing a Configuration File in the Database

Follow these steps to view a configuration file from the database without making any changes to it.

Step 1: To view a configuration file from the database, select a device in the Configuration Versions in Database window and click on the Browse Config button.

A window similar to Figure 5-5 appears.

Step 2: To scroll up or down in the file window, click on either arrow in the scroll bar on the right.

Step 3: Enter a text string in the search field and click on the Search Forward or Search Backward button to locate that text string in the file.

Step 4: To exit the window, select Quit from the File menu.


Editing Configuration Comments Files

When a configuration file is created for a device, it will also have a blank comments file associated with it. If the configuration file is loaded to the device, a copy of the original configuration file is appended to the comments file.

The maximum size of a comments file is 108 KB. It can be edited and used to record information about a configuration file. For example, you could add some comments on how a configuration file differs from other versions of the file, or specify the names of other devices that use identical versions of this configuration file. If you provide a brief history of the configuration file in this comments file, other users may find it useful to refer to the comments file for general information.

Follow these steps to edit a comments file associated with a configuration file.

Step 1: To edit an existing configuration comments file associated with a device's configuration, select the device name from the Device Name scroll window.

Step 2: Select the specific configuration version in the Configuration Versions in Database scroll window.

Step 3: Click on the Edit Comments button.

This invokes your text editor and a window similar to Figure 5-6 appears with the comments file.

Step 4: Enter or change comments text as appropriate in the window.

Step 5: Save your comments using the appropriate command for your text editor. If you are using textedit, select Save from File and close the window.

Step 6: To exit from the window, select Quit from the File menu.


nm089.gif

Figure 5-6 : Edit Comments Window


Browsing Configuration Comments Files

Each configuration file will have a comments file associated with it. If a configuration file was loaded to a device either previously or currently, the contents of the configuration file are appended to the comments file. As a result, you can view a copy of the configuration file within the comments file itself.


Note: You can only view, or browse, the comments file within this scroll window. You cannot make any changes to the file here.

When you select a filename in the Configuration Version in Database field and click on the Browse Comments button, a window similar to Figure 5-7 appears. Enter a text string in the search field and click on the Search Forward or Search Backward button to locate that text string in the file.

nm088.gif

Figure 5-7 : Browse Comments Window


Deleting Configuration Files

You can delete configuration files from your database. When you accumulate several versions of configuration files in the database, you may want to delete older versions that you no longer use. Periodically, you can also free up disk space and reduce confusion by eliminating outdated configuration files in the database that are outdated.


Note: When you delete a configuration file from the database, you cannot undo your action. However, if a copy of the configuration file exists as a file on your system, you can always load it back to the database.

Follow these steps to delete a device configuration file from the database.

Step 1: To delete a device configuration file from the database, select the device name in the Device Name scroll window.

Step 2: Select the configuration version in the Configuration Versions in Database scroll window.

Step 3: Click on the Delete From DB button.

A message prompts you to confirm your action.


nm137.gif

Step 4: To confirm the deletion, click on Delete. If you do not want to delete this configuration file from the database, click on Cancel.

Configuration version numbers deleted from the database are not reassigned, and will not appear again in the configuration version list.

Step 5: If you try to delete a configuration loaded on a device (identified in Configuration Versions in Database scroll window with the letter L), the following message appears.

nm138.gif

You cannot delete a configuration file that is marked as L (loaded). This is a security feature of CiscoWorks. However, you can synchronize the information between the database and the actual device configuration.

Step 6: Click on OK to cancel your request.


Note: To obtain a new version of this configuration file, perform a device-to-database operation. To download the newer version of the file to the device, perform a database-to-device operation. The new version will be marked as L to indicate that it is the loaded file. Because the new version is marked L, you can now delete the previously loaded version of the configuration file.


Comparing Configuration Files

The Configuration Management application enables you to compare:

  • A device's loaded configuration file with a version stored in the database and analyze any network problems.

  • Two versions of a configuration file that is stored in the database. Both versions should have been previously loaded to the device at least once.


Comparing a Device's Configuration with the Database Version

To compare a device's configuration file with the configuration file in the database, follow these steps:

Step 1: Select a device name in the Device Names scroll window.

Step 2: Select a configuration file in the Configuration Versions in Database scroll window.

A configuration file that is loaded on a device will have the letter L displayed.

Step 3: Click on the Compare Configs button.

The Compare Configurations window appears and is similar to the window shown in Figure 5-8. The configuration version that is loaded is indicated by the letter L.


nm169.gif

Figure 5-8 : Compare Configurations Window

Step 4: If you want the comparison to include the differences between the upper and lowercase letters, click on On in the Compare Case Sensitive field.

Step 5: Click on the Compare button in the Compare Configurations window.

CiscoWorks reads the configuration data from the device and compares it to the version stored in the database. The results of the comparison are presented as an exception list of line number comparison notations. See Figure 5-9. The comparison list shows the differences between the device and database configuration files, allowing you to quickly find any problems.


nm136.gif

Figure 5-9 : Compare Configuration Exception List

The compare function uses the diff command described in UNIX documentation accompanying your workstation. For more information on diff, refer to the man page on diff. In diff, operator characters are located in the left column and are in the form of !, *, +, and - . These operators tell you how to interpret the relationship between the two command strings. Table 5-3 describes three of the operators.

Table 5-3 : Compare Config DIFF Operators

DIFF Operator Meaning
! The line placement and function is the same in the database and device sourced versions, but the line has been modified. Both versions are in the exception list so you can compare them. In the example window it is easy to see that the addresses in lines 73 and 74 have been modified in the device named tassle's version.
+ The line has been added in the version configuration file, when compared to the other sourced configuration file. If you are viewing the database configuration file, a plus sign tells you the database version has command lines that the device sourced version does not. Viewed from the device sourced list side, a plus sign means the device version has a command line that does not exist in the database version.
-
The line has been deleted in the version command file, when compared to the other sourced file. If you are viewing the database command file, a minus sign tells you the database version does not have command lines that the device sourced version does. Viewed from the device sourced side, a minus sign means the device version is missing a command line that exists in the database version.
a Append. After the line number preceding the a, insert lines specified.
d Delete. After the line number preceding the d, delete the lines specified.

The exception list in Figure 5-10 illustrates how you can clearly determine where command lines differ, in what way they differ, and to what extent.

nm150.gif

Figure 5-10 : Compare Configuration Exception List

If the compared configurations are identical, CiscoWorks displays the following dialog box:

nm017.gif

If you select a configuration version that is not the currently loaded configuration, CiscoWorks displays the following intercept message:

nm134.gif


Comparing Two Device Configuration Files in the Database

If your database contains numerous configuration files for a device, you can compare two configuration files in the database for the same device. This feature is helpful if you revised a configuration file for a device and wish to compare the new configuration file with an older version.

Follow these steps to compare the configuration files in the database for a device.

Step 1: Select a device name in the Device Names scroll window.

Step 2: Click on the Compare Configs button.

The Compare Configurations window appears.

Step 3: Click on the Database Config button in the Compare Configurations window.

Step 4: Click on the configuration files you wish to compare.

The blank beside the word versions is filled with the version of the configuration file you just selected.

Step 5: If you want the comparison to include the differences between the upper and lowercase letters, click on On in the Compare Case Sensitive field.

Step 6: Click on the Compare button in the Compare Configurations window.

CiscoWorks compares the versions of the configuration files that are stored in the database. The results of the comparison are presented as an exception list of line number comparison notations.


Using the nmconfig Command

In addition to using the Compare Configs command in the configuration management window, you can use the nmconfig command at the UNIX command line. When a configuration file is loaded to a device, it is indicated by the letter L in the Configuration Versions in Database window. Both versions of the configuration files (that is, the version loaded in the device and the loaded version in the database) must be identical. However, if a system administrator changes the device's configuration file, those changes may not be reflected in the version indicated by L in the database.

Using the nmconfig command, you can compare a device's current configuration file with the version identified by the letter L in the Configuration Versions in Database window. As a result, any changes to the device's configuration file can be immediately reviewed.

You can automate the comparison of the configuration files on a daily basis by adding the nmconfig command to your crontab file. The results of the comparison will indicate if any changes occurred in the device's configuration file. You can use the nmconfig command either with one device, a set of specified devices, or all devices listed in the database.

The nmconfig command parameters are described in Table 5-4.

Table 5-4 : nmconfig Command Parameters

Parameter Description
-l dirname Specifies the log files directory. dirname is the path of the directory. If the directory does not exist, nmconfig flags an error and exits.1
If this parameter is not specified, the program will use
$NMSROOT/log as the default log files directory.
-U username Specifies the Sybase user account name. This is a required entry. (A space between -U and the username is optional.)
-P password Specifies the Sybase user account password. This is a required entry. A space between -P and the password is optional.
The default password is commonly NULL; you can specify
-P only.
-i Specifies the comparison to be case insensitive (or to ignore the difference between capitalized and lowercase characters). The default is case sensitive.
-m mailist Specifies a list of names to whom the program will send the result summary file. The default is no mail.
-d devices Specifies a device name or a name with wildcard symbols. Defaults to specify every device in the database. The format of the wildcard symbols is detailed in "Wildcard Characters" in the Sybase Commands Reference manual.
-c cmdfile A file containing the above set of parameters. This file is an option. Any command line parameter overrides parameters that appear in this file. The keyword options of this file are: mailist, device, ignorecase, user name, password, and logdir.
A sample file could include the following keywords:
maillist=sybase, nms
devices=x%, d%
ignorecase=yes
user name=your_name
password=your_password
logdir=your_logdir
-s community string When you use this option, the community string you enter overrides the device community string. When you are loading a configuration file to a device, this temporary community string is sent to the device.

1 Do not use a tilde (~) character when specifying a log file directory name.


Example

As an example of the nmconfig command and the use of parameters, you could enter:

nmconfig -d d% -m my login name -i -l dirname -P password -U username

In this example, the nmconfig command selects any device name that begins with d, mails the output to the user, tells the program to ignore case, and places the log file in a specified directory. You must enter your username and password each time you run this command.


Adding nmconfig Command to the Crontab File

You can add the following line in the crontab file to set nmconfig to run automatically at regular intervals:

0  0  *  *  1  $NMSROOT/bin/nmconfig -c /etc/nmconfig/cmdfile -m sybase

Refer to the man page crontab(5) for detailed information on the crontab command and file format.


Output Files

Nmconfig generates three output files: the log file (nmconfig.log.XXXX), the summary file (nmconfig.summary.XXXX) and the diff file (nmconfig.diff.XXXX). XXXX stands for the process id.

The log file captures messages indicating whether or not the configuration comparison between files matches or produces differences, if the device is unreachable, or if there are any other errors. The following is a sample log file:

********  Compare Config Log File ********
******** Started : Wed Jul 17 10:15:09 1992
------------------------------------------------------------
Device <cary> Is Running Software which Does Not
Support SNMP Initiated Configuration File-Loading.
Or The Device Is Unreachable.
------------------------------------------------------------
------------------------------------------------------------
The Configuration In The Database Is Identical To
To The Configuration Currently In Device <mira>
------------------------------------------------------------
A summary file displays the results of compared devices.  A sample summary file:
#Compared Devices Summary
#Started : Wed Jul 17 10:15:09 1992
warners               // Result: different
dente                 // Result: different
drosse                // Result: different
gorka                // Result: different
gregs-gw             // Result: different
mirs                 // Result: indentical
pebles              // Result: different
sandy                // Other problems(see log file)

The diff file displays the results of the configuration comparison between a loaded device and the database version. Refer to "Comparing Configuration Files" earlier in this chapter for an explanation of the diff file output.

A sample diff file is displayed here:

#Compare Result File
#Started : Wed Jul 17 10:15:09 1992
===================================================
*** Database  Wed Jul 10 19:26:35 1992
--- gregs-gw  Wed Jul 17 10:15:32 1992
*** 49,69 ****
  no appletalk route-cache
  !
  interface Serial 1
! no ip address
! encapsulation SMDS
  bandwidth 56
! appletalk address 6969.97
! appletalk zone BammBamm
! smds address c120.1580.4590
! no smds att-mode
! smds multicast APPLETALK e180.0999.9999
! smds multicast AARP e180.0999.9999
! smds enable-arp
  !
--- 49,59 ----
  no appletalk route-cache
  !
  interface Serial 1
! ip address 131.108.137.2 255.255.255.0
! encapsulation X25
  bandwidth 56
! x25 address 000013507400
! x25 map IP 131.108.137.1 000013507300

  !
*** Database  Wed Jul 10 19:27:32 1992
--- debris  Wed Jul 17 10:15:35 1992
***************
*** 15,21 ****
  ip forward-protocol udp 77
  ip forward-protocol udp 111
  !
! decnet routing 13.5
  decnet node-type area
  !
  xns routing aa00.0400.7bcc
--- 15,21 ----
  ip forward-protocol udp 77
  ip forward-protocol udp 111
  !
! decnet routing 2.101
  decnet node-type area
  !
  xns routing aa00.0400.7bcc
===================================================
*** Database  Tue Jul  2 14:52:26 1992
--- pebles  Wed Jul 17 10:15:38 1992
*** 10,15 ****
--- 10,18 ----
  !
  !
+ !
+ !
  appletalk routing
  ===================================================
*** Database  Thu Jun 20 17:04:28 1992
--- gorka  Wed Jul 17 10:15:40 1992


HomeTOCPrevNextGlossSearchHelp
-

Copyright 1988-1996 © Cisco Systems Inc.