John Mann's Weblog (on sng)
 

String around my finger
A 'blog to remember things I found.
Tie a string around your finger
My Home Page
I work for NIS ITS Monash University Australia.

Index

Flavours

  • index
  • circa 1993
  • RSS
  • Links
    These are a few of my favourite links.

  • Home Page
  • Live weblog
  • Static weblog
  • raelity bytes ;-)
  • Slashdot
  • Subscribe
    Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.


    blosxom

    GeoURL

    IP Geotargeting
    Visit eBay

    Click to call me FWD# 61159

       
    Mon, 13 Dec 2004

    3750 Upgrade

    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 on ns0a 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.

    [ /monash | # ]