Example for Configuring LDP GR
Networking Requirements
As shown in Figure 3-31, MPLS LDP is deployed on the MPLS network, and LSRA, LSRB, and LSRC are all equipped with one main control board. During the AMB/SMB switchover or system upgrade, a neighbor deletes an LSP because the LDP session is Down. Therefore, LDP traffic is interrupted for a short period of time. A neighbor is required not to delete an LSP during the AMB/SMB switchover or system upgrade to ensure uninterrupted LDP traffic.
Configuration Roadmap
To meet the preceding requirements, configure LDP GR. The configuration roadmap is as follows:
Enable MPLS LDP GR on each node, ensuring uninterrupted traffic in a short period of time.
Procedure
- Configure IP addresses for interfaces.
# Configure LSRA. The configurations of LSRB and LSRC are similar to the configuration of LSRA, and are not mentioned here.
<Huawei> system-view [Huawei] sysname LSRA [LSRA] interface loopback 0 [LSRA-LoopBack0] ip address 10.10.1.1 32 [LSRA-LoopBack0] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [LSRA-GigabitEthernet1/0/0] quit
- Configure OSPF to advertise the network segments connecting
to interfaces on each node and to advertise the routes of hosts with
LSR IDs.
# Configure LSRA. The configurations of LSRB and LSRC are similar to the configuration of LSRA, and are not mentioned here.
[LSRA] ospf 1 [LSRA-ospf-1] area 0 [LSRA-ospf-1-area-0.0.0.0] network 10.10.1.1 0.0.0.0 [LSRA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255 [LSRA-ospf-1-area-0.0.0.0] quit [LSRA-ospf-1] quit
After the configuration is complete, run the display ip routing-table command on each node, and you can view that the nodes learn routes from each other.
- Configure an LDP LSP.
# Configure LSRA. The configurations of LSRB and LSRC are similar to the configuration of LSRA, and are not mentioned here.
[LSRA] mpls lsr-id 10.10.1.1 [LSRA] mpls [LSRA-mpls] quit [LSRA] mpls ldp [LSRA-mpls-ldp] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] mpls [LSRA-GigabitEthernet1/0/0] mpls ldp [LSRA-GigabitEthernet1/0/0] quit
- Configure LDP GR.
# Configure LSRA.
[LSRA] mpls ldp [LSRA-mpls-ldp] graceful-restart Warning: All the related sessions will be deleted if the operation is performed !Continue? (y/n)y [LSRA-mpls-ldp] quit
# Configure LSRB.
[LSRB] mpls ldp [LSRB-mpls-ldp] graceful-restart Warning: All the related sessions will be deleted if the operation is performed !Continue? (y/n)y [LSRB-mpls-ldp] quit
# Configure LSRC.
[LSRC] mpls ldp [LSRC-mpls-ldp] graceful-restart Warning: All the related sessions will be deleted if the operation is performed !Continue? (y/n)y [LSRC-mpls-ldp] quit
- Verify the configuration.
# Run the display mpls ldp session verbose command on the LSRs. The command output shows that the Session FT Flag field is displayed as On. LSRA is used as an example.
[LSRA]display mpls ldp session verbose LDP Session(s) in Public Network ------------------------------------------------------------------------------ Peer LDP ID : 10.10.1.2:0 Local LDP ID : 10.10.1.1:0 TCP Connection : 10.10.1.1 <- 10.10.1.2 Session State : Operational Session Role : Passive Session FT Flag : On MD5 Flag : Off Reconnect Timer : 0 Sec Recovery Timer : 300 Sec Keychain Name : --- Negotiated Keepalive Hold Timer : 45 Sec Configured Keepalive Send Timer : --- Keepalive Message Sent/Rcvd : 1/1 (Message Count) Label Advertisement Mode : Downstream Unsolicited Label Resource Status(Peer/Local) : Available/Available Session Age : 0000:00:00 (DDDD:HH:MM) Session Deletion Status : No Capability: Capability-Announcement : Off mLDP P2MP Capability : Off mLDP MBB Capability : Off Outbound&Inbound Policies applied : NULL Addresses received from peer: (Count: 3) 10.10.1.2 10.1.1.2 10.2.1.1 ------------------------------------------------------------------------------
# Or run the display mpls ldp peer verbose command on the LSRs. The command output shows that the Peer FT Flag field is displayed as On. LSRA is used as an example.
[LSRA] display mpls ldp peer verbose LDP Peer Information in Public network ------------------------------------------------------------------------------ Peer LDP ID : 10.10.1.2:0 Peer Max PDU Length : 4096 Peer Transport Address : 10.10.1.2 Peer Loop Detection : Off Peer Path Vector Limit : ---- Peer FT Flag : On Peer Keepalive Timer : 45 Sec Recovery Timer : 300 Sec Reconnect Timer : 0 Sec Peer Type : Local Peer Label Advertisement Mode : Downstream Unsolicited Peer Discovery Source : GigabitEthernet1/0/0 Peer Deletion Status : No Capability-Announcement : Off Peer mLDP P2MP Capability : Off Peer mLDP MBB Capability : Off ------------------------------------------------------------------------------
Configuration Files
LSRA configuration file
# sysname LSRA # mpls lsr-id 10.10.1.1 mpls # mpls ldp graceful-restart # interface GigabitEthernet1/0/0 ip address 10.1.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.1 255.255.255.255 # ospf 1 area 0.0.0.0 network 10.10.1.1 0.0.0.0 network 10.1.1.0 0.0.0.255 # return
LSRB configuration file
# sysname LSRB # mpls lsr-id 10.10.1.2 mpls # mpls ldp graceful-restart # interface GigabitEthernet1/0/0 ip address 10.1.1.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet2/0/0 ip address 10.2.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.2 255.255.255.255 # ospf 1 area 0.0.0.0 network 10.10.1.2 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.2.1.0 0.0.0.255 # return
LSRC configuration file
# sysname LSRC # mpls lsr-id 10.10.1.3 mpls # mpls ldp graceful-restart # interface GigabitEthernet1/0/0 ip address 10.2.1.2 255.255.255.0 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.3 255.255.255.255 # ospf 1 area 0.0.0.0 network 10.10.1.3 0.0.0.0 network 10.2.1.0 0.0.0.255 # return