[c-nsp] Free MIB Browser?

lee.e.rian at census.gov lee.e.rian at census.gov
Tue May 27 07:45:06 EDT 2008


-----"Jeff Cartier" <jcartier at acs.on.ca> wrote: -----

>To: <cisco-nsp at puck.nether.net>
>From: "Jeff Cartier" <jcartier at acs.on.ca>
>Sent by: cisco-nsp-bounces at puck.nether.net
>Date: 05/26/2008 04:23PM
>Subject: [c-nsp] Free MIB Browser?
>
>Just looking for some opinions of a good MIB Browser (Pref: Free)
>for Cisco equipment (including ONS).

I like net-snmp (http://net-snmp.sourceforge.net/).  No GUI, so it's real
easy to make scripts like

  chgTime=`/usr/local/bin/snmpget -c $RKEY -m CISCO-CONFIG-MAN-MIB -OqUtv
  $DEV CISCO-CONFIG-MAN-MIB::ccmHistoryRunningLastChanged.0`
  savTime=`/usr/local/bin/snmpget -c $RKEY -m CISCO-CONFIG-MAN-MIB -OqUtv
  $DEV CISCO-CONFIG-MAN-MIB::ccmHistoryStartupLastChanged.0`

  if [ $savTime -lt $chgTime ]; then
     printf "%-14s config needs to be saved %s %s\n"  $DEV $chgTime
     $savTime
  fi

to get a list of devices that need a "wr mem" and

/usr/local/bin/snmpbulkwalk -m CISCO-IMAGE-MIB -Oq $COMM $DEV
ciscoImageString | \
/usr/bin/nawk -v dev=$DEV '
  $1 ~ /ciscoImageString/  {
     # the image mib returns info with each field separated by dollar
     signs!
     n = split($2,f,"$")
          if ( f[1] == "CW_IMAGE"   ) image = f[2]
     else if ( f[1] == "CW_FAMILY"  ) family = f[2]
     else if ( f[1] == "CW_FEATURE" ) features = f[2]
     else if ( f[1] == "CW_VERSION" ) {
       ver = f[2]
       while ( substr(ver,length(ver),1) ~ /[ ,]/ )
          ver = substr(ver,1,length(ver)-1)
     }
     next
  }

  END {
    printf("%-18s %-14s %-10s %s\n",
           dev, ver, family, features)
    ver = family = features = "***"
    }
'

to get a quick inventory of what version of software your IOS devices are
running.

Regards,
Lee



More information about the cisco-nsp mailing list