Using the cwcli netconfig to make changes to devices from the command line without the need of webui has many advantages such as simplicity, practicality and speed of deployment for mass pushing of config.
This document will explain how to deploy changes to a single device by creating a subinterface with name description and community strings using the command files, device list and cwcli utilities. The example below applies to both LMS 3.2 and LMS 4.0.
Device must be managed by LMS.
Device must have correct credentials with correct privileges to make changes.
User must have correct privileges to make changes from LMS.
1. Create the content of the files using the following examples for creating community strings and sub-interface with a name description. Note that command1, command2, command3, and command4 are command list examples and not actual syntaxes. You will need to create two files, one for the commands only and the second for the device using the display name as it appears in LMS.
GigabitEthernet0_1.cmd command file:
Command List File
snmp-server community private rw
snmp-server community public ro
Note: Commands are not validated so you must define the complete cli syntax.
GigabitEthernet0_1.dev device file:
Device List File
2. Go to NMSROOT/bin
Running cwcli netconfig
The cwcli config command is located in the following directories, where install_dir is the directory in which LMS is installed:
This example uses NMSROOT/bin/cwcli commands. NMSROOT is the installation directory of CiscoWorks Lan Management Solution.
On UNIX systems, /opt/CSCOpx/bin
On Windows systems, install_dir\CSCOpx\bin where the default install directory is C:\Program Files.
3. Use the following syntax as an example for creating “netconfig” jobs from the cli.