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:

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

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:

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