Automatic Nortel Baystack 350 Microcode Update System

Autoupdate is an SNMP application that upgrades microcode on Nortel BayStack Workgroup Switches.
At work we use Nortel Baystack 350 workgroup switches to provide Ethernet connections for our wonderful user population. The 350s provide a nice range of features at a very low per-port cost, so we have a few hundred deployed. While this is good for Nortel stock-holders it's not so good for our sanity when we need to update microcode. The update procedure isn't too hard, but after repeating it a few dozen times I was looking for something better.
Recently I had the opportunity to configure and install about a hundred switches and really didn't feel like upgrading them all one at a time. (For reasons I've never understood vendors like to ship products with microcode versions which are out of date.) Anyway, I knew that Nortel's management suite had functions to automatically update microcode by manipulating some SNMP values so I set about creating my own system to do the same thing using Nortel's published Baystack MIBS. The program might also work on Baystack 450s and other Nortel hardware in the same product line if you adjust the sysObjectID in the configuration file.

Using Autoupdate
To use the tool simply update the following configuration file variables, list the devices your upgrading in device list file, then run the application (or script), results are displayed on the screen and recorded in the log file.
Configuration file variables:

Important Notes:
Using this system requires that you have your switch's SNMP write community string set. This isn't necessarily a great idea since SNMP doesn't have much built-in security so you'll have to weigh the pros and cons before setting a write community string.
Whatever you do, don't leave the community strings at their default values.
Always remember that TFTP isn't a terribly robust protocol so be sure the links used to transfer the new images are up to the task, I always try to avoid WAN links.
By default the script waits three minutes (180 seconds) between code updates to allow the switch to transfer and upgrade the code and then reboot. You can set this to 120 seconds if you are in a hurry, but setting it to less than this could cause the script to wake up and start the next series of actions before the switch has transferred the new code, reprogrammed it's flash, and restarted.

Downloading and Installing
The software has been developed and used on WindowsXP, and I expect it will run on Windows NT and 2000, as well as your favorite flavor of Unix.
The program is written in Perl, which is a large part of why it only took an afternoon to create. If you want to use the Perl script you'll need to install a Perl interpreter, I use the one from Active State. If you use the script instead of the EXE you'll also need the Net::SNMP Perl module.
Enjoy, just remember where it came from. :-)

You'll need a TFTP server to transfer the images, I use 3CServer which is available on 3Com's web site for free. It always gives an error the first time switches try to download code, but the switch's automatic second attempt always works, and the price is hard to beat.

How the software works
The software works by setting SNMP variables to configure the TFTP server IP address and the microcode image filename, then by setting a specific variable that tells the switch to begin the upgrade process. The software also checks the sysObjectID and starting and ending version numbers to make sure everything looks like it should. The same process is repeated for both the boot code and the agent (runtime) code, the switch magically knows if it is upgrading boot or agent code based on something in the microcode image file. This same set of SNMP OIDs can be used to upload and download the switch's configuration information, although the resulting file appears to be some kind of binary mush so it's not as useful as it could be.
Details of the SNMP OIDs used.
I use Net-SNMP for all of my SNMP work, and so should you.

Legal Mumbo-Jumbo
Feel free to download and use this software as you wish. This software has been tested, but I am not responsible for anything that occurs to your computer or network.
Use at your own risk, yada, yada, yada.

Last Updated: 7/29/2002 - Anthony Anderberg -