[Contents] [Prev] [Next] [Index] [Report an Error]

Configuring the LDP Egress Policy

You can control the set of prefixes that are advertised into LDP and cause the router to be the egress router 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 the [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. For more information, see the JUNOS Routing Protocols Configuration Guide.

Example: Configuring the LDP Egress Policy

Advertise all connected routes into LDP:

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

[Contents] [Prev] [Next] [Index] [Report an Error]