John Mann's Weblog (on sng) | |||||
String around my finger
Index
Flavours
Links
Subscribe
Click to call me FWD# 61159 |
Mon, 13 Dec 2004 I was scheduled to upgrade all the 3750 switches in the basin precinct. This is 58 switches, Doing the same thing manually 58 times over is a) too repetitive, and b) too likely to be done inconsistently. So, I wrote some scripts onns0a and automated it a bit
# get list of all switches to upgrade netc -r 172.20.16 | grep -E 'fes|bds|tbs' > basin.3750.all # check current status before we change anything apply fping < basin.3750.all | tee basin.fping apply apply.show_ver < basin.3750.all | tee basin.ver.all apply apply.show_boot < basin.3750.all | tee basin.boot.all grep path-list basin.boot.all | grep -v 19 # load new software, and check apply apply.12.2.20 < basin.3750.all | tee basin.12.2.20 apply apply.show_ver < basin.3750.all | tee basin.ver.all.2 apply apply.show_boot < basin.3750.all | tee basin.boot.all.2 grep path-list basin.boot.all.2 | grep -v 20 # reload the fes's (remote edge of network) grep fes basin.3750.all | apply /usr/local/bin/ciscoreload apply apply.show_ver < basin.3750.all | tee basin.ver.all.3 # reload non-edge devices (fes's become unreachable again) grep -v fes basin.3750.all | apply /usr/local/bin/ciscoreload apply apply.show_ver < basin.3750.all | tee basin.ver.all.4 # check results using commands like grep "12.1(1" basin.ver.all.4 wc basin.ver.all* wc basin.boot.all* These scripts are still a little bit rough, and you need to check their output carefully. |
||||