Recieving SNMP traps on 3750 IP switch

Unanswered Question
Jun 3rd, 2007

Hello,

I need to configure 3750 switch via SNMP so I can receive traps.

Do I need to register for traps, if so, what MIB do I have to use and how?

Thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Sun, 06/03/2007 - 13:37

Configuring a switch to send traps is easy. But first, you need to decide which traps you care about. If you really have no idea where to start, perhaps you should start by sending all traps, then slowly disable those you don't care about. To enable all traps:

snmp-server enable traps

snmp-server host x.x.x.x traps COMMUNITY

Here, x.x.x.x is the IP address of your trap recipient and COMMUNITY is the community string to put in your trap PDUs.

Each trap will come from a different MIB, so you will need to load quite a few MIBs in your trap manager to be able to decode all varbinds. The MIBs supported by your switch can be found at http://www.cisco.com/go/mibs/ using the MIB Locator tool.

Now if you really need to configure the switch via SNMP to send these traps (i.e. you cann telnet or SSH and do this through the CLI), see http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094aa6.shtml for a tech tip on how to copy a config snippet to a device using SNMP and TFTP. Your snippet in this case will be:

snmp-server enable traps

snmp-server host x.x.x.x traps COMMUNITY

end

adi111111 Sun, 06/10/2007 - 00:03

Thank you for the advice.

I've succeeded to configure the switch using SNMP to send trap to manager, I still don't know how to enable traps via SNMP. I need to enable

config-copy traps.

Thanks.

Joe Clarke Sun, 06/10/2007 - 09:32

You do not need to enable config-copy traps to be able to upload a config to a device using the CISCO-CONFIG-COPY-MIB. All you need are SNMP read-write credentials configured on the device. If you follow the tech tip link I sent you previously you will be able to do all sorts of configuration changes using SNMP to trigger a TFTP config copy. For example, to enable all traps on a device, and send them to host 10.1.1.1, create a config snippet like the following:

snmp-server enable traps

snmp-server host 10.1.1.1 traps public

end

Then follow the tech tip to set the necessary objects to copy this snippet on to the device.

Actions

This Discussion