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:
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:
|
For more information, see the Junos OS Routing Protocols Configuration Guide.
Example: Configuring the Prefixes Advertised into LDP
Advertise all connected routes into LDP: