Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

SNMP enable switch..

We have cisco-3560 switch. I want to get monitor all the statices of the switch. How can i enable snmp on that switch. plz. give me deatils of command & how to use them

thanx in advance.

7 REPLIES
New Member

Re: SNMP enable switch..

In IOS you can use the below commands to enable SNMP polling. These are all entered in Global Config mode (config)#

snmp-server community readonlypasswd RO 1

snmp-server community readwritepasswd RW 1

RO denotes read-only access RW denotes read-write access. You may wish to only enable Read-Only depending on your requirements.

The number on the end of the statements are refering to a standard access-list restricting access to the snmp-server on the device. Only allow your management systems access. You don't have to use an access-list but it would be very wise to.

Also make sure you lock down SNMP triggered TFTP transfer from the device to only trusted TFTP servers.

snmp-server tftp-server-list

For further snmp-server options check out the cisco documentation.

http://www.cisco.com/en/US/products/hw/switches/ps5528/products_configuration_guide_chapter09186a008021137a.html

hth

--Phil

P.S Will someone start me off with my netpro points if I've helped :o)

New Member

Re: SNMP enable switch..

thanx for ur help.now i can monitor the traffice of all the interfaces, but how can i see the temprature,cpu load & memory usage of router & switches? As i m using open source MRTG tools with windows XP. Is thr ne configuration i do ?

New Member

Re: SNMP enable switch..

MRTG is very easy to configure to report on anything you know the snmp OID for. I've never built on XP only every on RedHat / Slackware Linux.

For the likes of CPU you need to make sure you change the global options to ensure that you are recording guage values as opposed to 5 minute averages. There is an OID for CPU which reports the 5 minute average so it does not need calulating. For CPU you will also need to list the OID twice in your target as MRTG requires two inputs.

I would recommend you to check out the Cisco SNMP navigator on this site for OIDs.

http://tools.cisco.com/Support/SNMP/do/BrowseOID.do

MRTG website also has lots of information on config file options

http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html

Also if you are graphing lots of targets then seriously consider RRDTOOL (still using mrtg cfg files) to create the graphs as it will drastically improve performance of your monitoring host.

http://oss.oetiker.ch/mrtg/doc/mrtg-rrd.en.html

Below is an example of target recording the 5 minute CPU average on a 7206. No average calculation is perform by MRTG. This reads the 5 minute average on the device itself.

----------------------------------------------------

Target[10.54.x.x_CPU]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:xxxxx@10.54.x.x:

#SetEnv[10.54.x.x_CPU]: MRTG_INT_IP="10.54.x.x" MRTG_INT_DESCR="CPU"

MaxBytes[10.54.x.x_CPU]: 100

Options[10.54.x.x_CPU]:

growright,gauge,nobanner,unknaszero,nopercent

ShortLegend[10.54.x.x_CPU]: %

YLegend[10.54.x.x_CPU]: Utilisation %

LegendI[10.54.x.x_CPU]:  CPU Load:

LegendO[10.54.x.x_CPU]:

Legend1[10.54.x.x_CPU]: Current CPU Load

Legend2[10.54.x.x_CPU]:

Legend3[10.54.x.x_CPU]: Max Observed CPU Load

Legend4[10.54.x.x_CPU]:

Title[10.54.x.x_CPU]: CPU Utilisation -- hostname

PageTop[10.54.x.x_CPU]:

CPU Utilisation -- hostname

System:
hostname in
Description:
CPU Utilisation 5 Minute Average

-----------------------------------------------------

Below is example of target for monitoring temp on 7200. The value is recorded as a guage every 5 minutes without any average calculation.

Target[10.54.x.x_TEMP]: 1.3.6.1.4.1.9.9.13.1.3.1.3.1&1.3.6.1.4.1.9.9.13.1.3.1.3.2:xxxxxx@10.54.x.x:

#SetEnv[10.54.x.x_TEMP]: MRTG_INT_IP="10.54.x.x" MRTG_INT_DESCR="Temp"

MaxBytes[10.54.x.x_TEMP]: 176

Options[10.54.x.x_TEMP]: growright,gauge,nobanner,unknaszero,nopercent

RouterUptime[10.54.x.x_TEMP]: xxxxx@10.54.x.x

ShortLegend[10.54.x.x_TEMP]: C

YLegend[10.54.x.x_TEMP]: Centigrade

LegendI[10.54.x.x_TEMP]: Intake Temperature

LegendO[10.54.x.x_TEMP]: Exhaust Temperature

Legend1[10.54.x.x_TEMP]: Intake Temperature

Legend2[10.54.x.x_TEMP]: Exhaust Temperature

Legend3[10.54.x.x_TEMP]: Peak Intake Temperature

Legend4[10.54.x.x_TEMP]: Peak Exhaust Temperature

Title[10.54.x.x_TEMP]: Temperature -- hostname

PageTop[10.54.x.x_TEMP]:

Temperature -- hostname

System:
hostname in
Description:
Temperature in Centigrade

-------------------------------------------------

HTH

Phil

New Member

Re: SNMP enable switch..

hi,

Your ref. is good .let me ask u smthing. i m using router 2851 & switch 3560, how can i extract deatils such as temprature, memory used, cpu status likewise.what MIB i use to get such information in MRTG.Plz. tell me particulat MIB Id.

thanx

New Member

Re: SNMP enable switch..

You need to know the IOS image version (like c7200-js-mz.12.3-3b ) you are using as different IOS releases support different MIBs. There is not one 'big' MIB with everything in it, instead there are different MIBs for different areas.

When you have your release version enter it into

http://tools.cisco.com/Support/SNMP/do/MIBSupport.do?local=en&step=3

This will then show you all the MIBs supported in the IOS image.

In the list you will see MIBs like CISCO-MEMORY-POOL-MIB (memory), CISCO-ENVMON-MIB (environment e.g. Temp) OLD-CISCO-CPU-MIB (deprecated cpu MIB).

Then go to

http://tools.cisco.com/Support/SNMP/do/BrowseMIB.do?local=en&step=2

Here you can enter the MIB name and view the MIB and also download. You can also view the OID file here

(example memory pool http://tools.cisco.com/Support/SNMP/do/BrowseMIB.do?local=en&step=2&submitClicked=true&mibName=CISCO-MEMORY-POOL-MIB#dependencies )

(example oid ftp://ftp.cisco.com/pub/mibs/oid/CISCO-MEMORY-POOL-MIB.oid )

MRTG has the option to loads Mibs in the global defaults, or you can specify the oids manually on a per target basis. If you having problems you can also walk the oids manually using snmpwalk to see what is being returned.

http://netsnmp.sourceforge.net/docs/man/snmpwalk.html

HTH

--Phil

New Member

Re: SNMP enable switch..

hi phil,

I just want my MRTG display cup, memory & temp. status( router 2851(12.3). but i searched whole cisco website but could not find those MIBes. Please help me out in finding appropriate MIB to get above information. i m confused since i saw pool of mibes on web pages , getting dificult to choose one appropriate MIB to use.

plz guide me in layman terms.

thanx

New Member

Re: SNMP enable switch..

Did you use the Cisco SNMP Navigator?

http://tools.cisco.com/Support/SNMP/do/MIBSupport.do?local=en&step=3

Even if you just enter the first part of image name like c3550 and hit search then from there you can use the drop down lists to get to your exact release.

Please paste the output of show version so I can see IOS image name like below.

For the things you list they are not contained in one single MIB as I said before. It doesn't matter how many MIB files there are as you just load them in the global default in mrtg.

--------------------------------------------------

http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html

'LoadMIBs

Load the MIB file(s) specified and make its OIDs available as symbolic names. For better efficiancy, a cache of MIBs is maintained in the WorkDir.

Example:

LoadMIBs: /dept/net/mibs/netapp.mib,/usr/local/lib/ft100m.mib

--------------------------------------------------

You may find it easier to just query the OID's on a per target basis.

changedtoprotecttheinnocent>sh ver

Cisco Internetwork Operating System Software

IOS (tm) C3550 Software (C3550-I9Q3L2-M), Version 12.1(14)EA1a, RELEASE SOFTWARE

(fc1)

Copyright (c) 1986-2003 by cisco Systems, Inc.

Compiled Tue 02-Sep-03 03:55 by antonino

Image text-base: 0x00003000, data-base: 0x006760F4

ROM: Bootstrap program is C3550 boot loader

changedtoprotecttheinnocent uptime is 1 year, 38 weeks, 6 days, 16 hours, 29 minutes

System returned to ROM by power-on

System restarted at 15:32:21 GMT Tue Aug 31 2004

System image file is "flash:c3550-i9q3l2-mz.121-14.EA1a/c3550-i9q3l2-mz.121-14.E

A1a.bin"

--Phil

752
Views
15
Helpful
7
Replies
CreatePlease to create content