ON THIS PAGE
Example: Configuring LDP Downstream on Demand
This example shows how to configure LDP downstream on demand. LDP is commonly configured using downstream unsolicited advertisement mode, meaning label advertisements for all routes are received from all LDP peers. As service providers integrate the access and aggregation networks into a single MPLS domain, LDP downstream on demand is needed to distribute the bindings between the access and aggregation networks and to reduce the processing requirements for the control plane.
Downstream nodes could potentially receive tens of thousands of label bindings from upstream aggregation nodes. Instead of learning and storing all label bindings for all possible loopback addresses within the entire MPLS network, the downstream aggregation node can be configured using LDP downstream on demand to only request the label bindings for the FECs corresponding to the loopback addresses of those egress nodes on which it has services configured.
Requirements
This example uses the following hardware and software components:
-
M Series router
-
Junos OS 12.2
Overview
You can enable LDP downstream on demand label advertisement for an LDP session by
including the downstream-on-demand statement at the [edit protocols ldp
session] hierarchy level. If you have configured downstream on demand,
the Juniper Networks router advertises the downstream on demand request to its peer
routers. For a downstream on demand session to be established between two routers,
both have to advertise downstream on demand mode during LDP session establishment.
If one router advertises downstream unsolicited mode and the other advertises
downstream on demand, downstream unsolicited mode is used.
Configuration
Configuring LDP Downstream on Demand
Step-by-Step Procedure
To configure a LDP downstream on demand policy and then configure that policy and enable LDP downstream on demand on the LDP session:
-
Configure the downstream on demand policy (DOD-Request-Loopbacks in this example).
This policy causes the router to forward label request messages only to the FECs that are matched by the DOD-Request-Loopbacks policy.
[edit policy-options] user@host# set prefix-list Request-Loopbacks 10.1.1.1/32 user@host# set prefix-list Request-Loopbacks 10.1.1.2/32 user@host# set prefix-list Request-Loopbacks 10.1.1.3/32 user@host# set prefix-list Request-Loopbacks 10.1.1.4/32 user@host# set policy-statement DOD-Request-Loopbacks term 1 from prefix-list Request-Loopbacks user@host# set policy-statement DOD-Request-Loopbacks term 1 then accept
-
Specify the DOD-Request-Loopbacks policy using the
dod-request-policystatement at the[edit protocols ldp]hierarchy level.The policy specified with the
dod-request-policystatement is used to identify the prefixes to send label request messages. This policy is similar to an egress policy or an import policy. When processing routes from the inet.0 routing table, the Junos OS software checks for routes matching theDOD-Request-Loopbackspolicy (in this example). If the route matches the policy and the LDP session is negotiated with DOD advertisement mode, label request messages are sent to the corresponding downstream LDP session.[edit protocols ldp] user@host# set dod-request-policy DOD-Request-Loopbacks
-
Include the
downstream-on-demandstatement in the configuration for the LDP session to enable downstream on demand distribution mode.[edit protocols ldp] user@host# set session 172.16.1.1 downstream-on-demand
Distributing LDP Downstream on Demand Routes into Labeled BGP
Step-by-Step Procedure
To distribute LDP downstream on demand routes into labeled BGP, use a BGP export policy.
-
Configure the LDP route policy (
redistribute_ldpin this example).[edit policy-options] user@host# set policy-statement redistribute_ldp term 1 from protocol ldp user@host# set policy-statement redistribute_ldp term 1 from tag 1000 user@host# set policy-statement redistribute_ldp term 1 then accept
-
Include the LDP route policy,
redistribute_ldpin the BGP configuration (as a part of the BGP group configurationebgp-to-abrin this example).BGP forwards the LDP routes based on the
redistribute_ldppolicy to the remote PE router[edit protocols bgp] user@host# set group ebgp-to-abr type external user@host# set group ebgp-to-abr local-address 192.168.0.1 user@host# set group ebgp-to-abr peer-as 65319 user@host# set group ebgp-to-abr local-as 65320 user@host# set group ebgp-to-abr neighbor 192.168.6.1 family inet unicast user@host# set group ebgp-to-abr neighbor 192.168.6.1 family inet labeled-unicast rib inet.3 user@host# set group ebgp-to-abr neighbor 192.168.6.1 export redistribute_ldp
Step-by-Step Procedure
To restrict label propagation to other routers configured in downstream unsolicited mode (instead of downstream on demand), configure the following policies:
-
Configure the
dod-routespolicy to accept routes from LDP.user@host# set policy-options policy-statement dod-routes term 1 from protocol ldp user@host# set policy-options policy-statement dod-routes term 1 from tag 1145307136 user@host# set policy-options policy-statement dod-routes term 1 then accept
-
Configure the
do-not-propagate-du-sessionspolicy to not forward routes to neighbors10.1.1.1,10.2.2.2, and10.3.3.3.user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 to neighbor 10.1.1.1 user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 to neighbor 10.2.2.2 user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 to neighbor 10.3.3.3 user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 then reject
-
Configure the
filter-dod-on-du-sessionspolicy to prevent the routes examined by thedod-routespolicy from being forwarded to the neighboring routers defined in thedo-not-propagate-du-sessionspolicy.user@host# set policy-options policy-statement filter-dod-routes-on-du-sessions term 1 from policy dod-routes user@host# set policy-options policy-statement filter-dod-routes-on-du-sessions term 1 to policy do-not-propagate-du-sessions
-
Specify the
filter-dod-routes-on-du-sesssionpolicy as the export policy for BGP groupebgp-to-abr.[edit protocols bgp] user@host# set group ebgp-to-abr neighbor 192.168.6.2 export filter-dod-routes-on-du-sessions
Results
From configuration mode, confirm your configuration by entering the
show policy-options and show protocols
ldp commands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the
configuration.
user@host#
show policy-options
prefix-list Request-Loopbacks {
10.1.1.1/32;
10.1.1.2/32;
10.1.1.3/32;
10.1.1.4/32;
}
policy-statement DOD-Request-Loopbacks {
term 1 {
from {
prefix-list Request-Loopbacks;
}
then accept;
}
}
policy-statement redistribute_ldp {
term 1 {
from {
protocol ldp;
tag 1000;
}
then accept;
}
}user@host#
show protocols ldp
dod-request-policy DOD-Request-Loopbacks;
session 172.16.1.1 {
downstream-on-demand;
}
user@host#
show protocols bgp
group ebgp-to-abr {
type external;
local-address 192.168.0.1;
peer-as 65319;
local-as 65320;
neighbor 192.168.6.1 {
family inet {
unicast;
labeled-unicast {
rib {
inet.3;
}
}
}
export redistribute_ldp;
}
}Verification
Verifying Label Advertisement Mode
Purpose
Confirm that the configuration is working properly.
Use the show ldp session command to verify the status of the
label advertisement mode for the LDP session.
Action
Issue the show ldp session and show ldp session
detail commands:
-
The following command output for the
show ldp sessioncommand indicates that theAdv. Mode(label advertisement mode) isDOD(meaning the LDP downstream on demand session is operational):user@host>
show ldp sessionAddress State Connection Hold time Adv. Mode 172.16.1.2 Operational Open 22 DOD -
The following command output for the
show ldp session detailcommand indicates that theLocal Label Advertisement modeisDownstream unsolicited, the default value (meaning downstream on demand is not configured on the local session). Conversely, theRemote Label Advertisement modeand theNegotiated Label Advertisement modeboth indicate thatDownstream on demandis configured on the remote sessionuser@host>
show ldp session detailAddress: 172.16.1.2, State: Operational, Connection: Open, Hold time: 24 Session ID: 10.1.1.1:0--10.1.1.2:0 Next keepalive in 4 seconds Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1 Neighbor types: configured-tunneled Keepalive interval: 10, Connect retry interval: 1 Local address: 10.1.1.1, Remote address: 10.1.1.2 Up for 17:54:52 Capabilities advertised: none Capabilities received: none Protection: disabled Local - Restart: disabled, Helper mode: enabled, Remote - Restart: disabled, Helper mode: enabled Local maximum neighbor reconnect time: 120000 msec Local maximum neighbor recovery time: 240000 msec Local Label Advertisement mode: Downstream unsolicited Remote Label Advertisement mode: Downstream on demand Negotiated Label Advertisement mode: Downstream on demand Nonstop routing state: Not in sync Next-hop addresses received: 10.1.1.2