Technical Documentation

Tracing OSPF Protocol Traffic

You can trace various OSPF protocol traffic to help debug OSPF protocol issues. To trace OSPF protocol traffic include the traceoptions statement at the [edit protocols ospf|ospf3] hierarchy level:

traceoptions {file filename <files number> <size size> <world-readable | no-world-readable>;flag flag <flag-modifier> <disable>;}

You can specify the following OSPF protocol-specific trace options using the flag statement:

  • database-description—All database description packets, which are used in synchronizing the OSPF topological database
  • error—OSPF error packets
  • event—OSPF state transitions
  • flooding—Link-state flooding packets
  • graceful-restart—Graceful-restart events.
  • hello—Hello packets, which are used to establish neighbor adjacencies and to determine whether neighbors are reachable
  • ldp-synchronization—Synchronization events between OSPF and LDP
  • lsa-ack—Link-state acknowledgement packets, which are used in synchronizing the OSPF topological database
  • lsa-analysis—Link-state analysis packets
  • lsa-request—Link-state request packets, which are used in synchronizing the OSPF topological database
  • lsa-update—Link-state updates packets, which are used in synchronizing the OSPF topological database
  • nsr-synchronization—Nonstop routing synchronization events
  • on-demand—Trace demand circuit extensions
  • packet-dump—Dump the contents of selected packet types
  • packets—All OSPF packets
  • spf—Shortest path first (SPF) calculations

You can optionally specify one or more of the following flag modifiers:

  • detail—Detailed trace information
  • receive—Packets being received
  • send—Packets being transmitted

Note: Use the detail flag modifier with caution as this may cause the CPU to become very busy.

Global tracing options are inherited from the configuration set by the traceoptions statement at the [edit routing-options] hierarchy level. You can override the following global trace options for the OSPF protocol using the traceoptions flag statement included at the [edit protocols ospf] hierarchy level:

  • all—All tracing operations
  • general—All normal operations and routing table changes (a combination of the normal and route trace operations)
  • normal—Normal events
  • policy—Policy processing
  • route—Routing information
  • state—State transitions
  • task—Routing protocol task processing
  • timer—Routing protocol timer processing

Note: Use the trace flag all with caution as this may cause the CPU to become very busy.

Examples: Tracing OSPF Protocol Traffic

Trace only unusual or abnormal operations to the file routing-log, and trace detailed information about all OSPF packets to the file ospf-log:

[edit]routing-options {traceoptions {file routing-log;}}protocols {ospf {traceoptions {file ospf-log size 10k files 5;flag lsa-ack;flag database-description;flag hello;flag lsa-update;flag lsa-request;}area 0.0.0.0 {interface 10.0.0.1;}}}

Trace SPF calculations:

[edit]protocols {ospf {traceoptions {file ospf-log;flag spf;}area 0.0.0.0 {interface 10.0.0.1;}}}

Trace the creation, receipt, and retransmission of all link-state advertisements:

[edit]protocols {ospf {traceoptions {file ospf-log;flag lsa-request;flag lsa-update;flag lsa-ack;area 0.0.0.0 {interface 10.0.0.1;}}}}

Related Topics


Published: 2010-07-02

Help
|
My Account
|
Log Out