Changing OSPF trap generation choices
Optional: OSPF traps (defined by RFC 1850) are supported on the routing switches. OSPF trap generation is disabled by default, but you can use the following command to enable generation of any or all of the supported OSPF traps.
Syntax:
[no] trap [trap-name|all]
Used in the OSPF configuration context to enable or disable OSPF traps.
all
Enables or disables all OSPF traps available on the routing switch.
trap-name
Specifies a trap to enable or disable.
The
no
form disables the specified trap.
Default: All OSPF traps disabled
The table below summarizes OSPF traps supported on the switches, and their associated MIB objects from RFC 1850.
OSPF trap name |
MIB object |
---|---|
interface-authentication-failure |
ospflfAuthFailure |
interface-config-error |
ospflfConfigError |
interface-receive-bad-packet |
ospflfrxBadPacket |
interface-retransmit-packet |
ospfTxRetransmit |
interface-state-change |
- |
neighbor-state-change |
ospfNbrStateChange |
originate-lsa |
ospfOriginateLsa |
originate-maxage-lsa |
ospfMaxAgeLsa |
Enabling OSPF traps
If you wanted to monitor the neighbor-state-change and interface-receive-bad-packet traps, you would use the following commands to configure the routing switch to enable the desired trap. The
show
command verifies the resulting OSPF trap configuration.
switch(ospf)# trap neighbor-state-change switch(ospf)# trap interface-receive-bad-packet switch(ospf)# show ip ospf traps OSPF Traps Enabled ================== Neighbor State Change Interface Receive Bad Packet