> For the complete documentation index, see [llms.txt](https://ccnp-sp.gitbook.io/studyguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ccnp-sp.gitbook.io/studyguide/labs/lab-challenges/basic-ldp.md).

# Basic LDP

#### Lab file

{% file src="/files/NRDMINxTZcF6Ppazq7UV" %}

#### Startup configs

{% file src="/files/0oMvXavYUoPiV8oWV4aX" %}

In this lab you will configure basic LDP features. IP addresses are already pre-configured.

<figure><img src="/files/MMB6d0pWxSGJUF95F6kq" alt=""><figcaption></figcaption></figure>

### Objective <a href="#c1e0246a-a701-4f09-a8c3-1e36e1c70ecb" id="c1e0246a-a701-4f09-a8c3-1e36e1c70ecb"></a>

For this lab, do not make any changes to XR2 or R2.

1. On R1:

   * Confgure OSPF using process 1 and area 0
     * Gi1 should be p2p
     * Advertise all loopbacks into OSPF
     * Use md5 authentication with password **cisco123** and key 1
   * Configure LDP
     * Establish an LDP neighborship with XR2
     * Use LDP authentication with password **cisco456**
     * Make XR2’s LFIB look like this:

   ```
   RP/0/0/CPU0:XR2#show mpls forwarding 
   Mon Oct 17 13:03:37.977 UTC
   Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes       
   Label  Label       or ID              Interface                    Switched    
   ------ ----------- ------------------ ------------ --------------- ------------
   24000  Pop         1.1.1.1/32         Gi0/0/0/0    10.1.2.1        60          
   24001  Pop         1.1.1.10/32        Gi0/0/0/0    10.1.2.1        0           
   24002  Unlabelled  1.1.1.20/32        Gi0/0/0/0    10.1.2.1        0
   ```

2. Preform the same exercise on XR1. R2’s LFIB should look like this:

   ```
   R2#show mpls forwarding-table 
   Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop    
   Label      Label      or Tunnel Id     Switched      interface              
   16         No Label   1.1.1.20/32      0             Gi1        10.1.2.1    
   17         Pop Label  1.1.1.10/32      0             Gi1        10.1.2.1    
   18         Pop Label  1.1.1.1/32       0             Gi1        10.1.2.1
   ```

### Answers <a href="#id-8698a8b3-1c50-44f7-b298-e29b255a4d57" id="id-8698a8b3-1c50-44f7-b298-e29b255a4d57"></a>

Using OSPF and LDP authentication is fairly well documented, so if you have trouble with this I would recommend looking up documentation on these features. You will learn more by finding the answers yourself than if I simply list the configuration here.

In order to make XR2’s LFIB entry for 1.1.1.20/32 unlabeled, you must filter advertisement of this label binding from R1, using LDP conditional label advertisement. Ensure that you are disabling the default advertisement of *all* label allocations.

Likewise on XR1 you must configure LDP conditional label advertisement. Ensure on XR1 that you are disabling the default advertisement of *all* label allocations using **label local advertise disable** as well.
