Guest

CiscoWorks Resource Manager Essentials

Changing Network Device Configurations Using RME

Document ID: 15210



Contents

Introduction
Prerequisites
      Requirements
      Components Used
      Conventions
Basic Overview
      Single Device
      Multiple Devices
Scenarios for Microsoft Windows NT
Scenarios for UNIX
Cisco Support Community - Featured Conversations
Related Information

Introduction

Resource Manager Essentials (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 change configurations of the network devices. 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 under the /opt/CSCOpx/bin directory for UNIX systems and the C:\CSCOpx\bin directory for Windows NT systems.

  • The online help feature for the cwconfig program is very extensive. Choose RME > Configuration Management > Configuration Management Administration > Using cwconfig Command for Batch Processing from the menu. Review the online help for specific issues. This online help is located in the CiscoWorks Desktop within the RME application installed on the Windows or UNIX server, not on the web.

  • 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 within the RME application for greater details. Select the online help within the Configuration Management section of RME and search for cwconfig to get the details.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware 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.

Single Device

To update a single device:

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

  2. Use the cwconfig program to push the file out to the device.

  3. Verify the changes have taken place.

Multiple Devices

To update multiple devices:

  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. Use the cwconfig program to push the file out to the device.

  4. Verify the changes have taken place.

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, such as C:\temp, in which to store the temporary files.

  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. Here is an 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
    

    Here is the cwconfig program output:

    47a.gif

  8. Make a Telnet connection to the device and verify that 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, such as C:\temp, in which to store the temporary files.

  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.

    Here is an example of the appropriate syntax of each line:

    -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 the cwconfig program output:

    47b.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
    

    This image shows an example of the process:

    47c.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. Here is an example of the syntax of each line:

    -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:

    47d.gif

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

Cisco Support Community - Featured Conversations

Cisco Support Community is a forum for you to ask and answer questions, share suggestions, and collaborate with your peers. Below are just some of the most recent and relevant conversations happening right now.

 

Related Information



Updated: Jan 10, 2006Document ID: 15210