Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

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:

  1. 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/32user@host# set prefix-list Request-Loopbacks 10.1.1.2/32user@host# set prefix-list Request-Loopbacks 10.1.1.3/32user@host# set prefix-list Request-Loopbacks 10.1.1.4/32user@host# set policy-statement DOD-Request-Loopbacks term 1 from prefix-list Request-Loopbacksuser@host# set policy-statement DOD-Request-Loopbacks term 1 then accept
  2. Specify the DOD-Request-Loopbacks policy using the dod-request-policy statement at the [edit protocols ldp] hierarchy level.

    The policy specified with the dod-request-policy statement 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 the DOD-Request-Loopbacks policy (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
  3. Include the downstream-on-demand statement in the configuration for the LDP session to enable downstream on demand distribution mode.
    [edit protocols ldp]user@host# set session 1.1.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.

  1. Configure the LDP route policy (redistribute_ldp in this example).

    [edit policy-options]user@host# set policy-statement redistribute_ldp term 1 from protocol ldpuser@host# set policy-statement redistribute_ldp term 1 from tag 1000user@host# set policy-statement redistribute_ldp term 1 then accept
  2. Include the LDP route policy, redistribute_ldp in the BGP configuration (as a part of the BGP group configuration ebgp-to-abr in this example).

    BGP forwards the LDP routes based on the redistribute_ldp policy to the remote PE router

    [edit protocols bgp]user@host# set group ebgp-to-abr type externaluser@host# set group ebgp-to-abr local-address 192.168.0.1user@host# set group ebgp-to-abr peer-as 65319user@host# set group ebgp-to-abr local-as 65320user@host# set group ebgp-to-abr neighbor 192.168.6.1 family inet unicastuser@host# set group ebgp-to-abr neighbor 192.168.6.1 family inet labeled-unicast rib inet.3user@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:

  1. Configure the dod-routes policy to accept routes from LDP.
    user@host# set policy-options policy-statement dod-routes term 1 from protocol ldpuser@host# set policy-options policy-statement dod-routes term 1 from tag 1145307136user@host# set policy-options policy-statement dod-routes term 1 then accept
  2. Configure the do-not-propagate-du-sessions policy to not forward routes to neighbors 1.1.1.1, 2.2.2.2, and 3.3.3.3.
    user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 to neighbor 1.1.1.1user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 to neighbor 2.2.2.2user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 to neighbor 3.3.3.3user@host# set policy-options policy-statement do-not-propagate-du-sessions term 1 then reject
  3. Configure the filter-dod-on-du-sessions policy to prevent the routes examined by the dod-routes policy from being forwarded to the neighboring routers defined in the do-not-propagate-du-sessions policy.
    user@host# set policy-options policy-statement filter-dod-routes-on-du-sessions term 1 from policy dod-routesuser@host# set policy-options policy-statement filter-dod-routes-on-du-sessions term 1 to policy do-not-propagate-du-sessions
  4. Specify the filter-dod-routes-on-du-sesssion policy as the export policy for BGP broup ebgp-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 1.1.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 session command indicates that the Adv. Mode (label advertisement mode) is DOD (meaning the LDP downstream on demand session is operational):

    user@host> show ldp session
      Address          State        Connection     Hold time  Adv. Mode
    1.1.1.2            Operational  Open             22          DOD
  • The following command output for the show ldp session detail command indicates that the Local Label Advertisement mode is Downstream unsolicited, the default value (meaning downstream on demand is not configured on the local session). Conversely, the Remote Label Advertisement mode and the Negotiated Label Advertisement mode both indicate that Downstream on demand is configured on the remote session

    user@host> show ldp session detail
    Address: 1.1.1.2, State: Operational, Connection: Open, Hold time: 24
      Session ID: 1.1.1.1:0--1.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: 1.1.1.1, Remote address: 1.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:
        1.1.1.2

Published: 2014-10-03

Supported Platforms

Published: 2014-10-03