Enabling/Disabling traps and logging per interface by SNMP

Unanswered Question
May 14th, 2008

The OID IF-MIB::ifLinkUpDownTrapEnable (1.3.6.1.2.1.31.1.1.1.14) enables you to set or disable the parameter "snmp trap link-status" per Interface.

To do so, you have to invoke the following command:

snmpset -v2c -c write_community <IP address> ifLinkUpDownTrapEnable.8 i disabled # equivalent to "no snmp trap link-status"

IF-MIB::ifLinkUpDownTrapEnable.8 = INTEGER: disabled(2)

snmpset -v2c -c write_community <IP address> ifLinkUpDownTrapEnable.8 i enabled # equivalent to "snmp trap link-status"

IF-MIB::ifLinkUpDownTrapEnable.8 = INTEGER: enabled(1)

To crosscheck if everything went fine, you can invoke a snmpget for the specific interface or "sh run int f0/8"

snmpget -v2c -c read_community <IP address> ifLinkUpDownTrapEnable.8

IF-MIB::ifLinkUpDownTrapEnable.8 = INTEGER: enabled(1)

View on an interface with disabled trap:

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

interface FastEthernet0/8

switchport access vlan nnn

switchport mode trunk

no snmp trap link-status

storm-control broadcast level 65.00 55.00

storm-control multicast level 65.00 55.00

mdix auto

spanning-tree portfast

end

View on an interface with enabled trap:

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

interface FastEthernet0/8

switchport access vlan nnn

switchport mode trunk

storm-control broadcast level 65.00 55.00

storm-control multicast level 65.00 55.00

mdix auto

spanning-tree portfast

end

So far, so good.

Now, I would like to enable/disable additional logging settings; certainly as well by SNMP (as described above). Unfortunatelly, eventough I've checked plenty of MIB's, I cannot find any OID for the following settings:

logging event status

logging event link-status

logging event spanning-tree status

I cannot imagine that there is an OID for "snmp trap link-status" but not for those mentioned above.

Many thanks in advance for any advice.

Horst Ritter

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Wed, 05/14/2008 - 08:11

There is not. You could do this, though, using the CISCO-CONFIG-COPY-MIB to upload a config snippet to this device which would add the desired config to each port. See this tech tip for more details:

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml

Essentially, you'd have a snippet like:

int fa0/8

no logging event link-status

end

And you'd push that to the device using SNMP-triggered TFTP.

Actions

This Discussion