All -
As suggested by Jiri, here is my NCM Config Change Template for upgrading Cisco Catalyst switch IOS versions.
Note that this script was written to upgrade switches by type; i.e. run once to upgrade a batch of 2960 switches, run a second time to upgrade a batch of 3750 switches. Mixing switch types in the same iteration will make your network VERY unhappy.........
The following caveats apply:
Switch must be a relatively recent Catalyst model. I've tested it successfully on the following models:
- 2950
- 2960
- 3560
- 3750
- 3750-E
- 3750-X
The template is dependent on the relevant *.tar image file being available in the \TFTP-Root directory of your Core Server, and the script will ask you for the full filename of the *tar file as a variable (please note you don't need the full pathname, just make sure you include the extension). Please note that the older *.bin type IOS files will not work with this template: it uses the archive download-sw command which expects the *.tar filetype so that it can upgrade the web-based management tool etc.)
The template will NOT reload the switch. It's a personal preference, but I like to ensure that the IOS has been upgrade successfully before I issue the reload command. If you do want to do this, edit the script and change the line:
string @CommandLine = 'archive download-sw /overwrite tftp://${StorageAddress}/' + @IOS_FILENAME
to read:
string @CommandLine = 'archive download-sw /overwrite /reload tftp://${StorageAddress}/' + @IOS_FILENAME
Alternatively, if you wish to schedule a reload of the switch as part of the script check out Cicsco IOS Upgrade Change Template: with scheduled reload
Note that the IOS filenames listed under the .PARAMETER_DESCRIPTION @IOS_FILENAME section of the script are just the versions we use on site. You can edit these accordingly, they are just there as a reminder when you are running the script.
This config does NOT work on NX-OS or IOS-XE switches!!!
Feel free to suggest amendments, or take it and improve it!!
Regards,
John