06-03-2007 10:55 AM
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
06-03-2007 01:37 PM
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
06-10-2007 12:03 AM
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.
06-10-2007 09:32 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide