Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring the Prefixes Advertised into LDP from the Routing Table

You can control the set of prefixes that are advertised into LDP and cause the router or switch to be the egress router or switch for those prefixes. By default, only the loopback address is advertised into LDP. To configure the set of prefixes from the routing table to be advertised into LDP, include the egress-policy statement:

egress-policy policy-name;

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

Note: If you configure an egress policy for LDP that does not include the loopback address, it is no longer advertised in LDP. To continue to advertise the loopback address, you need to explicitly configure it as a part of the LDP egress policy.

The named policy (configured at the [edit policy-options] or [edit logical-systems logical-system-name policy-options] hierarchy level) is applied to all routes in the routing table. Those routes that match the policy are advertised into LDP. You can control the set of neighbors to which those prefixes are advertised by using the export statement. Only from operators are considered; you can use any valid from operator.

Note: Prior to Junos OS Release 12.3, LDP advertised FECs that were matching with the egress-policy from inet.0 route table only. Starting with Junos OS Release 12.3, with the downstream-on-demand, LDP also advertises FECs matching the egress-policy from inet.3 route table. This is done to stitch LDP DoD LSPs with the labeled BGP for seamless MPLS. Thus, when you modify the egress policy, the old behavior can come into effect.

As a workaround, do one of the following:

  • Modify the egress-poliocy to advertise inet.0 FECs only.

    For example:

    [edit policy-options policy-statement statement-name]
    term A {from {rib inet.0;prefix-list prefix-list-name;}then accept;}
  • Do not advertise the loopback address through labeled BGP.

For more information, see the Junos OS Routing Protocols Configuration Guide.

Example: Configuring the Prefixes Advertised into LDP

Advertise all connected routes into LDP:

[edit protocols]
ldp {egress-policy connected-only;}
policy-options {policy-statement connected-only {from {protocol direct;}then accept;}}

Published: 2014-12-11

Published: 2014-12-11