Automatic Nortel Baystack 350 Microcode Update System
Last Updated: 7/29/2002 -
Anthony Anderberg -
- 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:
- tftp_server_ip The TFTP server holding the new microcode.
- community The SNMP write community string for the switches being upgraded.
- log_filename The application's log file.
- device_filename The file listing devices to upgrade.
- update_pause The number of seconds to wait while the switch transfers the code and reboots.
- system_objectid The devices being upgraded must have this sysObjectID (BayStack 350-24Ts are .18.104.22.168.22.214.171.124.30.2)
- old_boot_version The current boot code version.
- old_agent_version The current agent (runtime) code version.
- new_boot_version The new boot code version.
- new_agent_version The new agent (runtime) code version.
- new_boot_filename The boot code filename to fetch via TFTP.
- new_agent_filename The agent (runtime) code filename to fetch via TFTP.
- 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
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.