# Advanced LDP

#### Lab file

{% file src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2F3Z2e47Ay6uUxD7N1YaEM%2FChallenge%20-%20Advanced%20LDP.yaml?alt=media&token=631fb5ef-7d86-4a5a-9fd5-4e19816b3582" %}

#### Startup configs

{% file src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2FVxOnl3mYCFrVrysJzHe7%2Fadvanced_ldp_initial_configs.zip?alt=media&token=361a8e11-8e5f-4fb2-bbd1-282f404b6217" %}



In this lab, you will configure more advanced LDP features. IP addressing, OSPF, and LDP are already pre-configured.

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2FA3uaUDU79wdmiU8WBoX7%2FUntitled.png?alt=media&#x26;token=932dd927-b99f-43d2-8b5e-594d979b3308" alt=""><figcaption></figcaption></figure>



### Objectve <a href="#id-9c597d2d-f309-45ab-b008-edc1d78ae34c" id="id-9c597d2d-f309-45ab-b008-edc1d78ae34c"></a>

If the R1-R3 link goes down, R1 should retain the label bindings learned from R3. Find three ways to achieve this.

```
R1(config)#int gi2
R1(config-if)#shut
R1(config-if)#end

R1#show mpls ldp bindings neighbor 3.3.3.3
  lib entry: 1.1.1.1/32, rev 2
        remote binding: lsr: 3.3.3.3:0, label: 16
  lib entry: 2.2.2.2/32, rev 4
        remote binding: lsr: 3.3.3.3:0, label: 17
  lib entry: 3.3.3.3/32, rev 6
        remote binding: lsr: 3.3.3.3:0, label: imp-null
  lib entry: 4.4.4.4/32, rev 8
        remote binding: lsr: 3.3.3.3:0, label: 18
  lib entry: 10.1.2.0/24, rev 10
        remote binding: lsr: 3.3.3.3:0, label: 19
  lib entry: 10.1.3.0/24, rev 18
        remote binding: lsr: 3.3.3.3:0, label: imp-null
  lib entry: 10.2.3.0/24, rev 14
        remote binding: lsr: 3.3.3.3:0, label: imp-null
  lib entry: 10.3.4.0/24, rev 16
        remote binding: lsr: 3.3.3.3:0, label: imp-null
```

* _When R1’s Gi2 interface goes down, it should retain label bindings from neighbor R3 (3.3.3.3)_



Additionally, configure the topology so that R4’s cost to 3.3.3.3/32 is 65536. You can make any change except for directly configuring the interface metrics. R4’s OSPF metrics and R3’s OSPF metrics should appear as below:

```
R4#show ip route 3.3.3.3 | in metric
  Known via "ospf 1", distance 110, metric 65536, type intra area
      Route metric is 65536, traffic share count is 1

R4#show ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               4.4.4.4/32         1     LOOP  0/0
Gi1          1     0               10.3.4.4/24        1     P2P   1/1


R3#show ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               3.3.3.3/32         1     LOOP  0/0
Gi3          1     0               10.3.4.3/24        1     P2P   1/1
Gi2          1     0               10.1.3.3/24        1     P2P   1/1
Gi1          1     0               10.2.3.3/24        1     P2P   1/1
```



Repeat the exercise for the XR topology.



### Answers <a href="#d765b171-6eb7-465a-af71-ac14dadaa942" id="d765b171-6eb7-465a-af71-ac14dadaa942"></a>

Method 1, use LDP session protection on R1, and accept targeted hellos on R3.



Method 2, use a manually configured targeted LDP session to R3. On R3, also form a targeted session to R1 or accept targeted hellos.



Method 3, create an xconnect between R1 and R3 which will automatically form a targeted LDP neighborship.

* The simplest way to do this is go under an unused interface, **no shut**, and configure xconnect under the interface.



Use LDP/IGP sync on R4, and bring down the LDP neighborship between R3-R4. You can do this by setting a password on one side or perhaps using an inbound ACL denying port 646 traffic.
