log (OSPFv2)

Controls the generation of OSPFv2 logs.

Syntax

log { adjacency [ dr-only ] | all | bad-packet [ checksum ] | database | retransmit }
no log { adjacency [ dr-only ] | all | bad-packet [ checksum ] | database | retransmit }

Command Default

Only OSPFv2 messages indicating possible system errors are logged.

Parameters

adjacency
Specifies the logging of essential OSPFv2 neighbor state changes.
dr-only
Specifies the logging of essential OSPF neighbor state changes where the interface state is designated router (DR).
all
Specifies the logging of all syslog messages.
bad-packet
Specifies the logging of bad OSPFv2 packets.
checksum
Specifies all OSPFv2 packets that have checksum errors.
database
Specifies the logging of OSPFv2 LSA-related information.
retransmit
Specifies the logging of OSPFv2 retransmission activities.

Modes

OSPF router configuration mode

OSPF VRF router configuration mode

Usage Guidelines

Use this command to disable or re-enable the logging of specific events related to OSPFv2. If this command is not enabled only OSPFv2 messages indicating possible system errors are logged.

A limitation with the dr-only sub-option is that when a DR/BDR election is underway, OSPF neighbor state changes pertaining to non-DR/BDR routers are not logged. Logging resumes once a DR is elected on that network.

The no form of this command restores the default.

Examples

The following example enables the logging of all OSPFv2-related syslog events.

device# configure terminal
device(config)# router ospf
device(config-router-ospf-vrf-default-vrf)# log all

The following example enables the logging of OSPFv2 retransmission activities.

device# configure terminal
device(config)# router ospf
device(config-router-ospf-vrf-default-vrf)# log retransmit