The following example enables all Cisco-specific OSPF sham-link error traps. Note that the first attempt to enter the snmp-server enable traps ospf cisco-specific errors shamlink command results in an error message that the snmp-server enable traps ospf cisco-specific errors config-error command must be entered first:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# snmp-server enable traps ospf cisco-specific errors shamlink
% Sham-link config error trap not enabled.
% Configure "cisco-specific errors config-error" first.
% This requirement allows both traps to be sent.
Router(config)# snmp-server enable traps ospf cisco-specific errors config-error
Router(config)# snmp-server enable traps ospf cisco-specific errors shamlink
Router(config)# end
The show running-config command is entered to verify that the traps are enabled:
Router# show running-config | include traps
snmp-server enable traps ospf cisco-specific errors config-error
snmp-server enable traps ospf cisco-specific errors shamlink
At the time of disabling the traps, if the no snmp-server enable traps ospf cisco-specific errors config-error command is entered before the snmp-server enable traps ospf cisco-specific errors shamlink command, a message will be displayed to indicate that the sham-link configuration errors traps have also been disabled:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# no snmp-server enable traps ospf cisco-specific errors config-error
! This command also disables the previously-enabled shamlink configuration error traps.
Router(config)# end