Global Router Configuration Tool (cisco_config_cmds_rcf) |
Top Previous Next |
Global Router Configuration Tool (cisco_config_cmds_rcf) This program is very similar to the cisco_config_cmds script above except it is designed to send a different set of configuration commands to each Cisco IOS device. Do not use this script to send exec level commands (e.g., show commands). The specific configuration commands, and the IOS devices these commands are sent to, are defined in a text file that you create. The format of the text file is described below. This file containing configuration commands MUST NOT include the commands needed to enter and exit configuration mode on the router. The script will automatically handle that. The commands are sent in sequential order from top to bottom of the file.
Program Name: cisco_config_cmds_rcf
Below shows and example of an rcf file. This is not a TCL formatted file, it is just a text file. Lines that begin with a # are comments. The format of the file is rtrname:filename. One entry per line. The format for the file that contains the configuration commands for a particular router is identical to the “cisco_config_cmds” script.
# Sample template file for cisco_config_cmds_rcf script Figure 2 Sample rcf file
# List of configuration commands to send Figure 3 Contents for file nyrtr1.cmds
# List of configuration commands to send Figure 4 Contents for file cmd_file1.cmds
By default, the configuration commands will not be saved to NVRAM. Use the -wm option to save the configuration changes.
This program also has the option to be run in Safe and SuperSafe mode which should be considered when running scripts in production environments. If entering a configuration command results in an error on the router and the script is running in Safe or SuperSafe mode, the config will not be saved to NVRAM even if the -wm option is applied. If the script is NOT running in Safe or SuperSafe mode, and the -wm option is applied, the config WILL be saved to NVRAM even if there are one or more commands that caused configuration errors.
Sample Command: The following command will send configuration commands to the routers listed in file rtr_mod_100104.rcf. The commands that are sent to each router may be different and are also defined by a filename listed in the file rtr_mod_100104.rcf. After the configuration commands are entered, the config will be saved to NVRAM because of the -wm option. If there are any errors while sending a particular configuration command, the script will abort the script because of the -ssafe option (SAFE Mode). The detailed trace-log will be saved to the file cisco_config_cmds_rcf.log because the -log option is not being used. The script will not prompt the user for passwords because the passwords are being read in from the logins.txt file (-pw option).
cisco_config_cmds_rcf -pw logins.txt -rcf rtr_mod_100104.rcf -wm -ssafe |