# Basic LDP

#### Lab file

{% file src="<https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2F2tshoa3PopYjiBKhWLwt%2FChallenge%20-%20Basic%20LDP.yaml?alt=media&token=acc46f6c-8a95-4352-a71c-1632c7764704>" %}

#### Startup configs

{% file src="<https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2Ft7XRCtwdFvlqNUxEMNZE%2Fbasic_ldp_initial_configs.zip?alt=media&token=1d78bcfd-2616-459f-b660-5acae8d219e6>" %}

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

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2Fh7JHgCbjI4LRGyZIzJ2Q%2FUntitled.png?alt=media&#x26;token=4b8556b1-e944-47e2-8971-4b71b4fb006c" 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.
