|
There are a common set of command line options that apply to all of the scripts. They are described below:
| -pw <file> | This option turns on automatic reading of the specified login/password file. This is an optional argument for all of the scripts. If this option is omitted, the user will be prompted for password/login information at the beginning of each script run. Omitting this option is fine when all routers that the script is run against have the same login/password. If the script is run against a number of routers that have different login/passwords, then this option must be used. A sample login/password file (logins_template.txt) is provided and should be used as a template for creating your own login/password file. The template file contains instructional comments on how to modify this file. WARNING: This password file should be encrypted if it stores passwords for “production” routers. Encryption of this file is done using the encrypt_logins program. See Section 6.1 for more information on the password encryption utility. |
| -sf <file> | sf stands for “source tcl file”. This is the argument used for scripts that require input variables. These variables can be easily changed by editing the file. A sample template file is always provided for scripts that require this argument. The name of the template file will be “program_name_template.txt”. This file is in TCL format. The template file should be edited and saved to a new filename (preferably with a .txt extension). The template file will contain instructional comments for the configurable variables. This argument is only used when the help menu for the program states that it is a required argument. (NOTE, THIS OPTION ONLY APPLIES TO SEVERAL OF THE SCRIPTS) |
| -rf <file> | rf stands for router file. The router file contains a list of routers that the script should be run against. This file is NOT in TCL format. Routers must be specified as one per line. Routers can be specified as an IP address or as a name that can be resolved to an IP address through DNS. This argument is only used when the help menu for the program states that it is a required argument. Lines that begin with a “#” are considered comments. IMPORTANT: The name/ip address used for the router in this file, must be the same exact name used in the login/password file. Otherwise, the login/password information for that router will not be found in the login/password file. (This is only relevant when the -pw <filename> option is used). |
Below shows an example of a router file, named east_coast.rt
[allan@localhost tcl]$ more east_coast.rt
###########################
# East Coast Routers
###########################
10.10.1.1
10.10.2.1
10.10.3.1
10.10.4.1
10.11.2.1
10.11.3.1
ny-rtr1
ny-rtr2
| -ssh | Tells the script to use Secure shell, instead of the default telnet, when accessing the routers. This argument is only relevant when the script prompts the user for the login information (i.e. the login/password information is NOT specified with the -pw option). If the -pw option is used, this argument is irrelevant! |
| -log <file> | File to save detailed trace of script run. By default, the detailed trace log file is <program_name.log>. This default trace log file gets over written each script run. If you wish to save the detail-trace log to a separate filename, then use this option. NOTE, if used this should be the FIRST argument on the command line. |
| -ulog <file> | Automatically create a unique log file name. By default, the detailed trace log file is <program_name.log>. This default trace log file gets over written each script run. If you wish to save the detail-trace log to a separate filename, and have the script automatically create this file filename for you, then use this option. NOTE, if used this should be the FIRST argument on the command line. The file name will be program_name_timestamp.log (e.g. cisco_send_cmds_081610_22h31m19s.log). The name of this file is written to the summary.log file. |
|