Example for Configuring LDP Session Protection

This session provides an example for configuring LDP session protection. The configuration involves configuring a local LDP session and the LDP session protection function.

Networking Requirements

In Figure 1, an LDP session is established between PE1 and PE2. If the direct link between PE1 and PE2 fails, the LDP session is expected to remain connected. To meet this requirement, if a redundancy link between PE1 and PE2 is available, LDP session protection can be configured for the LDP session between PE1 and PE2. If the direct link between PE1 and PE2 fails, LDP session protection prevents the LDP session from being disconnected and the LDP peer relationship from being torn down.

Figure 1 LDP session protection

Interfaces 1 and 2 represent GE 0/1/0 and GE 0/1/1, respectively.


Configuration Roadmap

The configuration roadmap is as follows:

  1. Assign an IP address to each interface and configure IGP routes.

  2. Configure a local LDP session.

  3. Configure LDP session protection.

Data Preparation

To complete the configuration, you need the following data:

Table 1 Data to be prepared

Device Name

Data Item

Value

PE1

Period of time session protection remains effective

Infinite

PE2

Period of time session protection remains effective

Infinite

Procedure

  1. Assign an IP address to each interface and configure IGP routes. For configuration details, see Configuration Files in this section.
  2. Configure a local LDP session.

    # Configure PE1.

    <PE1> system-view
    [~PE1] mpls lsr-id 1.1.1.1
    [*PE1] mpls
    [*PE1-mpls] quit
    [*PE1] mpls ldp
    [*PE1-mpls-ldp] quit
    [*PE1] interface gigabitethernet 0/1/1
    [*PE1-GigabitEthernet0/1/1] mpls
    [*PE1-GigabitEthernet0/1/1] mpls ldp
    [*PE1-GigabitEthernet0/1/1] quit
    [*PE1-GigabitEthernet0/1/1] commit

    # Repeat this step for PE2. For configuration details, see Configuration Files in this section.

  3. Configure LDP session protection.

    # Configure PE1.

    [~PE1] mpls ldp
    [*PE1-mpls-ldp] session protection duration infinite
    [*PE1-mpls-ldp] commit
    [~PE1-mpls-ldp] quit

    # Configure PE2.

    [~PE2] mpls ldp
    [*PE2-mpls-ldp] session protection duration infinite
    [*PE2-mpls-ldp] commit
    [~PE2-mpls-ldp] quit

  4. Verify the configuration.

    # Run the shutdown command to disable PE1's GE 0/1/1 to simulate a link fault. Then run the display mpls ldp remote-peer command on PE1. The command output shows that LDP session protection has taken effect.
    [~PE1] display mpls ldp remote-peer 
                             LDP Remote Entity Information
     ------------------------------------------------------------------------------
     Remote Peer Name  : pe2
     Description       : ----
     Remote Peer IP    : 3.3.3.3              LDP ID        : 1.1.1.1:0
     Transport Address : 1.1.1.1              Entity Status : Active
    
     Configured Keepalive Hold Timer : 45 Sec
     Configured Keepalive Send Timer : ----
     Configured Hello Hold Timer     : 45 Sec
     Negotiated Hello Hold Timer     : 45 Sec
     Configured Hello Send Timer     : ----
     Configured Delay Timer          : 10 Sec
     Hello Packet sent/received      : 91/86
     Label Advertisement Mode        : Downstream Unsolicited
     Auto-config                     : Session-Protect
     Session-Protect effect          : YES
     Session-Protect Duration        : infinite
     Session-Protect Remain          : ----
     ------------------------------------------------------------------------------
     TOTAL: 1 Remote-Peer(s) Found.

Configuration Files

  • PE1 configuration file

    #
    sysname PE1
    #
    mpls lsr-id 1.1.1.1
    #
    mpls
    #
    mpls ldp
     session protection duration infinite
     #
     ipv4-family
    #
    isis 1
     is-level level-2
     network-entity 10.0000.0000.0001.00
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 10.1.1.1 255.255.255.252
     isis enable 1
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 10.1.2.1 255.255.255.252
     isis enable 1
     mpls
     mpls ldp
    #
    interface LoopBack0
     ip address 1.1.1.1 255.255.255.255
     isis enable 1
    #
    return
  • PE3 configuration file

    #
    sysname PE3
    #
    isis 1
     is-level level-2
     network-entity 10.0000.0000.0003.00
    #               
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 10.1.1.2 255.255.255.252
     isis enable 1
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 10.1.3.1 255.255.255.252
     isis enable 1
    #
    interface LoopBack0
     ip address 2.2.2.2 255.255.255.255
     isis enable 1
    #
    return
  • PE2 configuration file

    #
    sysname PE2
    #
    mpls lsr-id 3.3.3.3
    #
    mpls
    #
    mpls ldp
     session protection duration infinite
     #
     ipv4-family
    #
    isis 1
     is-level level-2
     network-entity 10.0000.0000.0002.00
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 10.1.3.2 255.255.255.252
     isis enable 1
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 10.1.2.2 255.255.255.252
     isis enable 1
     mpls
     mpls ldp
    #
    interface LoopBack0
     ip address 3.3.3.3 255.255.255.255
     isis enable 1
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >