cc/td/doc/cisintwk/intsolns
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Task 2— Exploring SNMP Capabilities by Using UCD-SNMP

Task 2— Exploring SNMP Capabilities by Using UCD-SNMP

About Using UCD-SNMP

Researching and identifying which functions are available in SNMP are part of building a dial NMS environment. In this case study, UCD-SNMP, an opensource freeware application that allows access to SNMP functions from a command line interface (CLI), is used to explore the capabilities of SNMP.

There are many benefits to using UCD-SNMP.

You can:

For this case study, the dial engineers at THEnet created a tool called SNMP Commander. The tool aided the MIB research task by enabling dial engineers to build web-based object identification (OIDs) bookmarks, which they could go to without using a keyboard.

By using UCD-SNMP and SNMP Commander, the dial engineers at THEnet identified which items the commercial NMS applications would monitor within the network operations center (NOC).

Installing UCD-SNMP and Downloading Cisco MIBs

To install UCD-SNMP and download MIBs from the Cisco FTP site, follow these steps.


Note   You can also download individual MIBs from http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml


Step 1   Go to
http://ucd-snmp.ucdavis.edu

Step 2   Download, compile, and install UCD-SNMP. In this case study, the UCD-SNMP commands are installed in the /usr/local/bin directory.

Step 3   From the Cisco FTP site, download the MIBs into the /usr/local/share/snmp/mibs directory on your Solaris workstation. By using the following Unix commands, you can copy the entire bundled v1 MIB tar file from ftp.cisco.com.

cd /usr/local/share/snmp/mibs

ftp ftp.cisco.com

cd /pub/mibs/v1

bin

get v1.tar.gz

exit

 

Step 4   Decompress and untar the files in the /usr/local/share/snmp/mibs directory:

gzip -d v1.tar.gz

tar -xvf v1.tar

 

Note   There are many MIBs in the tar file that you may not use. Regardless, Cisco recommends you keep all the MIBs on file to support your evolving network needs.

Exploring SNMP MIBs for Dial Networks

To explore the MIBs for a Cisco IOS device by using SNMP CLI commands, follow the steps in this section. Poll OID variables by using the commands snmpget, snmpwalk, and snmptable.


Note   This section assumes you already have a basic understanding of UCD-SNMP and know how to use its CLI commands.


Step 1   To determine the last restart reason for the router, enter the snmpget command and the relevant OID. In the following example, the restart reason is "reload."

onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p .1.3.6.1.4.1.9.2.1.2.0

Counter32 (is a reserved word): At line 6 in /usr/local/share/snmp/mibs/SNMPv2-S 
MI-V1SMI.my
Gauge32 (is a reserved word): At line 7 in /usr/local/share/snmp/mibs/SNMPv2-SMI
-V1SMI.my
Integer32 (is a reserved word): At line 8 in /usr/local/share/snmp/mibs/SNMPv2-S
MI-V1SMI.my
Did not find 'mib-2' in module RFC1213-MIB (/usr/local/share/snmp/mibs/IANAifTyp
e-MIB-V1SMI.my)
enterprises.9.2.1.2.0 = "reload"

If SNMP-parsing errors are generated, suppress them by appending 2>/dev/null to the end of the command. Standard output is tagged as 1. Error output is tagged as 2.

onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p .1.3.6.1.4.1.9.2.1.2.0 2> /dev/null

enterprises.9.2.1.2.0 = "reload"
onionring:~$
 

Note   If no response is returned by the SNMP agent, allow error messages to print to the screen by removing the 2>/dev/null argument.

Step 2   Check the system up time by entering the snmpget command and sysUpTime OID:

onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p .1.3.6.1.2.1.system.sysUpTime.0 2> 
/dev/null

system.sysUpTime.0 = Timeticks: (45450609) 5 days, 6:15:06.09
onionring:~$ 
 

Step 3   To gather basic configuration management information about the Cisco IOS device, enter the snmpwalk command and the system OID.

onionring:~$ snmpwalk travis-nas-01.the.net 5urf5h0p system 2> /dev/null

system.sysDescr.0 = "Cisco Internetwork Operating System Software ..IOS (tm) 5800 
Software (C5800-P4-M), Version 12.1(2a)T1,  RELEASE SOFTWARE (fc2)..Copyright
(c) 1986-2000 by cisco Systems, Inc...Compiled Mon 12-Jun-00 23:13 by ccai"
system.sysObjectID.0 = OID: enterprises.9.1.188
system.sysUpTime.0 = Timeticks: (45492606) 5 days, 6:22:06.06
system.sysContact.0 = "net-admin@aurora.the.net"
system.sysName.0 = "travis-nas-01.the.net"
system.sysLocation.0 = "Lake Travis (Austin) Dial POP"
system.sysServices.0 = 78
system.8.0 = Timeticks: (0) 0:00:00.00
onionring:~$ 
 

Step 4   Change the OID environmental prefix by entering the commands prefix and export prefix. This step reduces the number of key strokes you must enter at the command line.

onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p .1.3.6.1.4.1.9.2.1.2.0 2> /

dev/null

enterprises.9.2.1.2.0 = "reload"
onionring:~$ PREFIX=.1.3.6.1.4.1.9

onionring:~$ export PREFIX

onionring:~$ snmpget travis-nas-01.the.net 5urf5h0p 2.1.2.0 2> /dev/null

enterprises.9.2.1.2.0 = "reload"
onionring:~$ 
 

The UCD-SNMP application attaches a prefix to the requested variable unless it is fully qualified (for example, unless the variable starts with a period "."). By default, the prefix points to the MIB-II node .1.3.6.1.2.1 location. The Cisco enterprises prefix points to .1.3.6.1.4.1.9

Step 5   Inspect the IP address entry table by entering the snmptable command and ipAddrTable OID:

onionring:~$ snmptable travis-nas-01.the.net 5urf5h0p ip.ipAddrTable 2> /dev/null

SNMP table: ip.ipAddrTable.ipAddrEntry
ipAdEntAddr ipAdEntIfIndex  ipAdEntNetMask ipAdEntBcastAddr ipAdEntReasmMaxSize
172.21.10.1            351   255.255.255.255              1              18024
172.21.101.20          289   255.255.255.0                1              18024
onionring:~$ 
 

Step 6   Poll the interfaces table and redirect the output to a text file by entering the snmptable command and ifTable OID:

onionring:~$ snmptable travis-nas-01.the.net 5urf5h0p interfaces.ifTable 
> /export/home/www/travis-nas-01_ifTable.txt
onionring:~$

Note   Do not forget the space between > and /export

Step 7   Inspect the contents of the interfaces table by entering the cat command. In the following Cisco AS5800 example, notice the interface descriptions (ifDescr) and types (ifType). There is one PPP and DS0 entry for each serial interface.

onionring:~$ cat /export/home/www/travis-nas-01_ifTable.txt 

SNMP table: interfaces.ifTable.ifEntry
 
 ifIndex                         ifDescr                 ifType ifMtu    ifSpeed ........
       1                   "Async1/2/00"                  other  1500       9000        
       2                   "Async1/2/01"                  other  1500       9000        
       3                   "Async1/2/02"                  other  1500       9000        
      .
      .
      .
      .
     289             "FastEthernet0/0/0"         ethernetCsmacd  1500  100000000 
     290                         "Null0"                  other  1500 4294967295  
     291                      "T1 1/0/0"                    ds1     ?          ?   
     292                      "T1 1/0/1"                    ds1     ?          ?   
      .
      .
      .
      .
     301                     "T1 1/0/10"                    ds1     ?          ?    
     302                     "T1 1/0/11"                    ds1     ?          ?     
     303                 "Serial1/0/0:0" propPointToPointSerial  1500      64000      
     304                 "Serial1/0/0:1" propPointToPointSerial  1500      64000       
      .
      .
      .
      .
     326                "Serial1/0/0:23"                   lapd  1500      64000    
     327      "Serial1/0/0:23-Signaling"                   isdn  1500      64000    
     328  "Serial1/0/0:0-Bearer Channel"                    ds0     ?          ?     
     329  "Serial1/0/0:1-Bearer Channel"                    ds0     ?          ?        
      .
      .
      .
      .
     350 "Serial1/0/0:22-Bearer Channel"                    ds0     ?          ?       
     351                     "Loopback0"       softwareLoopback  15144294967295
  To view the complete, unabridged output for this example, go to http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialnms/iftable.txt

About SNMP Commander

The dial engineers at THEnet created a tool called SNMP Commander that:

By using SNMP Commander and a web browser, you can:

The following two components work together to create SNMP Commander:

  For the source code, go to http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialnms/snmpdat.txt
  For the source code, go to http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialnms/snmppl.txt

Setting Up SNMP Commander

To set up SNMP Commander, follow these steps:


Step 1   From CCO, download snmpcmds.dat and snmpcmds.pl

Step 2   Customize the files for your environment. When you find useful OIDs, enter them in the snmpcmds.dat file and use the web-based form of the script to research the MIBs. The web tool functions like an SNMP OID bookmarker.

Step 3   Test SNMP Commander by using a web browser:


Figure 8:
SNMP Commander Tool


Figure 9:
Polling Results from the table cpmActiveCallSummaryTable Command


hometocprevnextglossaryfeedbacksearchhelp
Posted: Fri Sep 29 08:31:20 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.