Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

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:

  • address—Trace the operation of address and address withdrawal messages.
  • binding—Trace label-binding operations.
  • error—Trace error conditions.
  • event—Trace protocol events.
  • initialization—Trace the operation of initialization messages.
  • label—Trace the operation of label request, label map, label withdrawal, and label release messages.
  • notification—Trace the operation of notification messages.
  • packets—Trace the operation of address, address withdrawal, initialization, label request, label map, label withdrawal, label release, notification, and periodic messages. This modifier is equivalent to setting the address, initialization, label, notification, and periodic modifiers.

    You can also configure the filter flag modifier with the match-on address sub-option for the packets flag. This allows you to trace based on the source and destination addresses of the packets.

  • path—Trace label-switched path operations.
  • periodic—Trace the operation of hello and keepalive messages.
  • route—Trace the operation of route messages.
  • state—Trace protocol state transitions.

Tracing LDP Protocol Traffic Within FECs

LDP associates a forwarding equivalence class (FEC) with each LSP it creates. The FEC associated with an LSP specifies which packets are mapped to that LSP. LSPs are extended through a network as each router or switch chooses the label advertised by the next hop for the FEC and splices it to the label it advertises to all other routers or switches.

You can trace LDP protocol traffic within a specific FEC and filter LDP trace statements based on an FEC. This is useful when you want to trace or troubleshoot LDP protocol traffic associated with an 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 an FEC:

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

This feature has the following limitations:

  • The filtering capability is only available for FECs composed of IP version 4 (IPv4) prefixes.
  • Layer 2 circuit FECs cannot be filtered.
  • When you configure both route tracing and filtering, MPLS routes are not displayed (they are blocked by the filter).
  • Filtering is determined by the policy and the configured value for the match-on option. When configuring the policy, be sure that the default behavior is always reject.
  • The only match-on option is fec. Consequently, the only type of policy you should include is a route-filter policy.

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 {}}}

Trace LDP protocol traffic for an FEC associated with the LSP:

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

Published: 2014-10-03

Published: 2014-10-03