This session provides an example for configuring LDP session protection. The configuration involves configuring a local LDP session and the LDP session protection function.
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.
The configuration roadmap is as follows:
Assign an IP address to each interface and configure IGP routes.
Configure a local LDP session.
Configure LDP session protection.
To complete the configuration, you need the following data:
Device Name |
Data Item |
Value |
---|---|---|
PE1 |
Period of time session protection remains effective |
Infinite |
PE2 |
Period of time session protection remains effective |
Infinite |
# 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.
# 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
[~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.
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