Tracing LDP Protocol Traffic

The following sections describe how to configure the trace options to examine LDP protocol traffic:

Tracing LDP Protocol Traffic at the Protocol and Routing Instance Levels

To trace LDP protocol traffic, you can specify options in the global traceoptions statement at the [edit routing-options] hierarchy level, and you can specify LDP-specific options by including the traceoptions statement:

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

For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.

Use the file statement to specify the name of the file that receives the output of the tracing operation. All files are placed in the directory /var/log. We recommend that you place LDP-tracing output in the file ldp-log.

The following trace flags display the operations associated with the sending and receiving of various LDP messages. Each can carry one or more of the following modifiers:

Tracing LDP Protocol Traffic Within FECs

You can trace LDP protocol traffic within a specific FEC. You can filter LDP trace statements based on a FEC. The following trace flags are available for this purpose: route, path, and binding.

The following example illustrates how you might configure the LDP traceoptions statement to filter LDP trace statements based on a FEC:

[edit protocols ldp traceoptions]flag route filter match-on fec policy "filter-policy-for-ldp-fec";

This feature has the following limitations:

Examples: Tracing LDP Protocol Traffic

Trace LDP path messages in detail:

[edit]protocols {ldp {traceoptions {file ldp size 10m files 5;flag path;}}}

Trace all LDP outgoing messages:

[edit]protocols {ldp {traceoptions {file ldp size 10m files 5;flag packets;}}}

Trace all LDP error conditions:

[edit]protocols {ldp {traceoptions {file ldp size 10m files 5;flag error;}}}

Trace all LDP incoming messages and all label-binding operations:

[edit]protocols {ldp {traceoptions {file ldp size 10m files 5 world-readable;flag packets receive;flag binding;}interface all {}}}