Guest

CiscoWorks Resource Manager Essentials

How RME Handles Configuration Archive and Modification

Document ID: 13472

Updated: Jan 31, 2006

   Print

Introduction

Configuration management is one of the major functions of CiscoWorks Resource Manager Essentials (RME). It provides easy access to the configuration files for all Cisco IOS Software-based devices and Catalyst switches, FastSwitches, and Cisco routers in your Essential inventory. RME very effectively archives configuration files from network devices. However, many users are unsure how to make modifications to those configuration files and push the new changes out to network devices. The cwconfig program supplied with RME can be used to easily accomplish these tasks. This document explains how to use cwconfig on both Windows NT- and UNIX-based systems to restore configuration files.

Before you begin, remember:

  • The devices you configure must exist in the RME database as Managed Devices.

  • You must have a valid RME login (that is, login "admin" and password "admin," unless it has been changed) for the operation to work properly.

  • The cwconfig program is typically located in the /opt/CSCOpx/bin directory on UNIX systems and in the C:\CSCOpx\bin directory on Windows NT systems.

  • The online help feature for the cwconfig program is extensive. Choose Help > Index from the menu and scroll down to the cwconfig command heading (located under section C). Refer to the online help for specific issues.

  • Make sure to test these procedures on a single device before you make modifications to many devices on the network.

  • These procedures are very basic and use only the "import" feature of cwconfig. Refer to the cwconfig online documentation for greater details.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

The information in this document is based on CiscoWorks RME (all versions).

Conventions

For more information on document conventions, refer to the Cisco Technical Tips Conventions.

Basic Overview

This section provides an overview of the procedures described in subsequent sections.

Update a Single Device

Complete these steps:

  1. Create a temporary file with the new or modified commands to push out.

  2. Push the file out to the device with the cwconfig program.

  3. Verify that the changes have been made.

Update Multiple Devices

Complete these steps:

  1. Create a temporary file with the new or modified commands to push out.

  2. Create a temporary file which lists each device to be modified.

  3. Push the file out to the device with the cwconfig program.

  4. Verify that the changes have been made.

Issue the cwconfig Command to Change Startup and Running Configuration Files

Note: RME must have the target devices in its inventory for cwconfig to work properly.

  1. Create a partial configuration like this one in a file (for example, in the ioscmd file):

    no enable password paswd
    
    enable secret scrt
    
    
  2. Create a second file (for example, the infile file) that contains the names of the target devices and the name of the configuration file created in Step 1 (ioscmd, in this example). The -save option in the commands below tell cwconfig to edit the startup and running configurations of devices. The syntax of the configCommands file (infile) is shown here:

    -f ioscmd -device dev1.cisco.com -save
    -f ioscmd -device dev2.cisco.com -save
    -f ioscmd -device dev3.cisco.com -save
    ......
  3. Verify that both files belong to group bin and owner bin.

  4. To make sure that both files have full permissions, issue the chmod 777 ioscmd command.

  5. Issue the cwconfig import -u username in RME -p password in RME -input infile command to push the new configuration information from ioscmd out to the devices.

Note: Use the -d 5 option if you need debug turned on to help troubleshoot if the configuration does not change.

Scenarios for Microsoft Windows NT

Scenario 1 - I loaded RME on my Windows NT machine and need to change the system location information on a router in my network.

Complete these steps:

  1. Determine the name or IP address of the device name to be modified. This example uses the IP address 10.10.10.1.

  2. Open a command prompt.

  3. Go to a directory to store the temporary files, such as C:\temp.

  4. Use a text editor such as Notepad to create a temporary file that contains the additions and modifications. This example uses the filename newconfig.

  5. Add the necessary information to the file. Make sure the commands are valid commands for the device. If not, the device ignores the statements. For example:

    snmp-server location 1st-floor
  6. Save the file and exit the text editor.

  7. Run the cwconfig program with the necessary command line options to push the new configuration out to the device. Here is an example of the correct syntax:

    dos-prompt# C:\progra~1\CSCOpx\cwconfig import -u admin -p admin -device 10.10.10.1 -f c:\temp\newconfig
    

    This is an example of cwconfig program output:

    7_top10a.gif

  8. Make a Telnet connection to the device and verify the configuration has been updated with the new information.

Scenario 2 - I loaded RME on my Windows NT machine and need to change the system location and system contact information on five routers in my network.

Complete these steps:

  1. Determine the names or IP addresses of the devices to be modified. This example uses these IP addresses:

    10.10.10.1
    
    10.10.10.2
    
    10.10.10.3
    
    10.10.10.4
    
    10.10.10.5
  2. Open a command prompt.

  3. Go to a directory to store the temporary files, such as C:\temp.

  4. Use a text editor such as Notepad to create a temporary file that contains the additions and modifications. This example uses the filename newstuff.

  5. Add the necessary device commands to the file. Place additional commands on separate lines. Make sure the commands are valid commands for the device. If not, the device ignores the statements.

    Here is an example:

    snmp-server location 1st-floor
    
    snmp-server contact William Gimp
    
  6. Save the file and exit the text editor.

  7. Create a temporary file that contains the list of devices you want to modify.

    The syntax of each line should be:

    -device IP_Address -f Config_File_to_Use
    
    

    This example uses the filename c:\temp\devices.

    The file contents are shown here:

    -device 10.10.10.1 -f newstuff
    
    -device 10.10.10.2 -f newstuff
    
    -device 10.10.10.3 -f newstuff
    
    -device 10.10.10.4 -f newstuff
    
    -device 10.10.10.5 -f newstuff
  8. Save the file and exit the text editor.

  9. Use the cwconfig program with the -input option to push the changes to the devices. (The -input option is used to specify the filename that contains the list of devices to modify.) Here is an example:

    dos-prompt# C:\progra~1\CSCOpx\cwconfig import -u admin -p admin -input c:\temp\devices
    

    Here is an example of cwconfig program output:

    7_top10b.gif

  10. Make a Telnet connection to each of the devices and verify the configuration has been updated with the new information.

Scenarios for UNIX

Scenario 1 - I loaded RME on my Solaris machine and need to change the hostname on a router in my network.

Complete these steps:

  1. Determine the name or IP address of the device name to be modified. This example uses the IP address 10.10.10.1.

  2. Open an XTerm window.

  3. Go to a directory, such as /tmp, in which to store the temporary files.

  4. Use a text editor such as vi to create a temporary file that contains the additions and modifications. This example, uses the filename newconfig.

  5. Add the necessary information to the file. Make sure the commands are valid commands for the device. If not, the device ignores the statements. Here is an example:

    hostname BARNEY
    
  6. Save the file and exit the text editor.

  7. Run the cwconfig program with the necessary command line options to push the new test out to the device. Here is an example:

    unix-prompt# /opt/CSCOpx/bin/cwconfig import -u admin -p admin -device 10.10.10.1 -f /tmp/newconfig
    

    An example of this process is shown here:

    7_top10c.gif

  8. Make a Telnet connection to the device and verify the configuration has been updated with the new information.

Scenario 2 - I loaded RME on my Solaris machine and need to change the system location and system contact information on five routers in my network.

Complete these steps:

  1. Determine the name or IP address of the device name to be modified. This example uses these IP addresses:

    10.10.10.1
    
    10.10.10.2
    
    10.10.10.3
    
    10.10.10.4
    
    10.10.10.5
  2. Open an XTerm window.

  3. Go to a directory, such as /tmp, in which to store the temporary files.

  4. Use a text editor such as vi to create a temporary file that contains the additions and modifications. This example uses the filename newstuff.

  5. Add the necessary information to the file. Make sure the commands are valid commands for the device. If not, the device ignores the statements. Also, make sure each command is entered on a separate line. Here is an example:

    snmp-server location 1st-floor
    
    snmp-server contact William Gimp
    
  6. Save the file and exit the text editor.

  7. Create a temporary file that contains the list of devices to be modified. The syntax of each line should be:

    -device IP ADDRESS -f Config-File_to_Use
    
    

    This example uses the filename /tmp/devices.

    The file contents are shown here:

    -device 10.10.10.1 -f /tmp/newstuff 
    -device 10.10.10.2 -f /tmp/newstuff 
    -device 10.10.10.3 -f /tmp/newstuff 
    -device 10.10.10.4 -f /tmp/newstuff 
    -device 10.10.10.5 -f /tmp/newstuff
  8. Save the file and exit the text editor.

  9. Use the cwconfig program with the -input option to push the changes to the devices. (The -input option is used to specify the filename that contains the list of devices to modify.)

    unix-prompt# /opt/CSCOpx/bin/cwconfig import -u admin -p admin -input /tmp/devices
    

    An example of this process is shown here:

    7_top10d.gif

  10. Make a Telnet connection to each of the devices and verify the configuration has been updated with the new information.

Related Information

Updated: Jan 31, 2006
Document ID: 13472