Automating Cisco IOS updates with Unimus — Part 1

Intro

  • FW image source — a server which will serve as a source / host for FW image(s) used for upgrade
  • Cisco IOS devices to upgrade, which will be downloading a provided FW image
  • Unimus’ Mass Config Push feature to push commands to your devices and automate the FW upgrades

Preparing the Image / FW source

FW Transfer methods

SCP

HTTP

Preparing Unimus and Mass Config Push preset for Cisco IOS upgrade

Config Push preset 1 — Upgrade devices

IOS image transfer using SCP

tclsh 
log_user 0
exec "copy scp://SCP_USER:SCP_PASS@FW_SRC_ADDR/UPGRADE_FW_IMAGE flash:"
ios_config "boot system flash:UPGRADE_FW_IMAGE"
tclquit
SCP_USER - SCP user 
SCP_PASS - SCP password
FW_SRC_ADDR - IP or hostname of FW image source device
UPGRADE_FW_IMAGE - file name of a chosen upgrade FW image

IOS image transfer using HTTP

tclsh 
log_user 0
exec "copy http://FW_SRC_ADDR/UPGRADE_FW_IMAGE flash:"
ios_config "boot system flash:UPGRADE_FW_IMAGE"
tclquit
FW_SRC_ADDR - IP or hostname of FW image source device 
UPGRADE_FW_IMAGE - file name of a chosen upgrade FW image

Config Push preset 2 — Reload devices

tclsh 
exec "reload in 1"
tclquit

Quickly setting up a HTTP server

python -m http.server
http://your_machine_ip:8000/image_name.img

Example of a successful run

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store