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 545
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 545
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