Example for configuring LDP auto FRR
Networking Requirements
On a complex and unstable network shown in Figure 3-33, MPLS LDP is deployed. The primary and backup LSPs are set up between LSRA and LSRC. The LSP from LSRA to LSRC is the primary LSP, while the LSP LSRA -> LSRB -> LSRC is the backup LSP. Services are interrupted and traffic is lost if a fault occurs on the primary LSP. Traffic must be quickly switched to the backup LSP upon a fault on the primary LSP.
Configuration Roadmap
To meet the preceding requirements, configure LDP auto FRR. The configuration roadmap is as follows:
Configure LDP FRR to support fast switchover to the backup LSP upon a fault on the primary LSP.
Configure LDP auto FRR on a complex and unstable network. Enable IS-IS auto FRR on the LSR from which the protected traffic is originated.
Procedure
- Configure IP addresses for interfaces.
# Configure LSRA. The configurations of LSRB, LSRC, and LSRD 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 [LSRA] interface gigabitethernet 2/0/0 [LSRA-GigabitEthernet2/0/0] ip address 10.1.2.1 24 [LSRA-GigabitEthernet2/0/0] quit
- Configure IS-IS to advertise the network segments connecting
to interfaces on each node and to advertise the routes of hosts with
LSR IDs.
# Configure LSRA.
[LSRA] isis 1 [LSRA-isis-1] network-entity 10.0000.0000.0001.00 [LSRA-isis-1] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] isis enable 1 [LSRA-GigabitEthernet1/0/0] quit [LSRA] interface gigabitethernet 2/0/0 [LSRA-GigabitEthernet2/0/0] isis enable 1 [LSRA-GigabitEthernet2/0/0] quit [LSRA] interface loopback 0 [LSRA-LoopBack0] isis enable 1 [LSRA-LoopBack0] quit
# Configure LSRB.
[LSRB] isis 1 [LSRB-isis-1] network-entity 10.0000.0000.0002.00 [LSRB-isis-1] quit [LSRB] interface gigabitethernet 1/0/0 [LSRB-GigabitEthernet1/0/0] isis enable 1 [LSRB-GigabitEthernet1/0/0] quit [LSRB] interface gigabitethernet 2/0/0 [LSRB-GigabitEthernet2/0/0] isis enable 1 [LSRB-GigabitEthernet2/0/0] quit [LSRB] interface loopback 0 [LSRB-LoopBack0] isis enable 1 [LSRB-LoopBack0] quit
# Configure LSRC.
[LSRC] isis 1 [LSRC-isis-1] network-entity 10.0000.0000.0003.00 [LSRC-isis-1] quit [LSRC] interface gigabitethernet 1/0/0 [LSRC-GigabitEthernet1/0/0] isis enable 1 [LSRC-GigabitEthernet1/0/0] quit [LSRC] interface gigabitethernet 2/0/0 [LSRC-GigabitEthernet2/0/0] isis enable 1 [LSRC-GigabitEthernet2/0/0] quit [LSRC] interface gigabitethernet 3/0/0 [LSRC-GigabitEthernet3/0/0] isis enable 1 [LSRC-GigabitEthernet3/0/0] quit [LSRC] interface loopback 0 [LSRC-LoopBack0] isis enable 1 [LSRC-LoopBack0] quit
# Configure LSRD.
[LSRD] isis 1 [LSRD-isis-1] network-entity 10.0000.0000.0004.00 [LSRD-isis-1] quit [LSRD] interface gigabitethernet 1/0/0 [LSRD-GigabitEthernet1/0/0] isis enable 1 [LSRD-GigabitEthernet1/0/0] quit [LSRD] interface loopback 0 [LSRD-LoopBack0] isis enable 1 [LSRD-LoopBack0] quit
- Configure global and interface-based MPLS and MPLS LDP
on each node so that the network can forward MPLS traffic. Then check
the LSP setup result.
# Configure LSRA.
[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 [LSRA] interface gigabitethernet 2/0/0 [LSRA-GigabitEthernet2/0/0] mpls [LSRA-GigabitEthernet2/0/0] mpls ldp [LSRA-GigabitEthernet2/0/0] quit
# Configure LSRB.
[LSRB] mpls lsr-id 10.10.1.2 [LSRB] mpls [LSRB-mpls] quit [LSRB] mpls ldp [LSRB-mpls-ldp] quit [LSRB] interface gigabitethernet 1/0/0 [LSRB-GigabitEthernet1/0/0] mpls [LSRB-GigabitEthernet1/0/0] mpls ldp [LSRB-GigabitEthernet1/0/0] quit [LSRB] interface gigabitethernet 2/0/0 [LSRB-GigabitEthernet2/0/0] mpls [LSRB-GigabitEthernet2/0/0] mpls ldp [LSRB-GigabitEthernet2/0/0] quit
# Configure LSRC.
[LSRC] mpls lsr-id 10.10.1.3 [LSRC] mpls [LSRC-mpls] quit [LSRC] mpls ldp [LSRC-mpls-ldp] quit [LSRC] interface gigabitethernet 1/0/0 [LSRC-GigabitEthernet1/0/0] mpls [LSRC-GigabitEthernet1/0/0] mpls ldp [LSRC-GigabitEthernet1/0/0] quit [LSRC] interface gigabitethernet 2/0/0 [LSRC-GigabitEthernet2/0/0] mpls [LSRC-GigabitEthernet2/0/0] mpls ldp [LSRC-GigabitEthernet2/0/0] quit [LSRC] interface gigabitethernet 3/0/0 [LSRC-GigabitEthernet3/0/0] mpls [LSRC-GigabitEthernet3/0/0] mpls ldp [LSRC-GigabitEthernet3/0/0] quit
# Configure LSRD.
[LSRD] mpls lsr-id 10.10.1.4 [LSRD] mpls [LSRD-mpls] quit [LSRD] mpls ldp [LSRD-mpls-ldp] quit [LSRD] interface gigabitethernet 1/0/0 [LSRD-GigabitEthernet1/0/0] mpls [LSRD-GigabitEthernet1/0/0] mpls ldp [LSRD-GigabitEthernet1/0/0] quit
# When the configurations are complete, run the display mpls lsp command on LSRA to view the established LSP.
[LSRA] display mpls lsp ------------------------------------------------------------------------------- LSP Information: LDP LSP ------------------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 10.10.1.2/32 NULL/3 -/GE1/0/0 10.10.1.2/32 1024/3 -/GE1/0/0 10.10.1.3/32 NULL/3 -/GE2/0/0 10.10.1.3/32 1025/3 -/GE2/0/0 10.10.1.4/32 NULL/1026 -/GE2/0/0 10.10.1.4/32 1026/1026 -/GE2/0/0 10.10.1.1/32 3/NULL -/-
The preceding command output shows that by default, the routes with 32-bit addresses trigger the setup of LSPs.
- Enable IS-IS auto FRR on LSRA. View the routing information
and the setup of the backup LSP.
# Enable IS-IS auto FRR on LSRA.
[LSRA] isis [LSRA-isis-1] frr [LSRA-isis-1-frr] loop-free-alternate [LSRA-isis-1-frr] quit [LSRA-isis-1] quit
# Display information about the direct routes between LSRA and LSRC, and between LSRA and LSRD.
[LSRA] display ip routing-table 10.1.4.0 verbose Route Flags: R - relay, D - download to fib, T - to vpn-instance ------------------------------------------------------------------------------ Routing Table : Public Summary Count : 1 Destination: 10.1.4.0/24 Protocol: ISIS-L1 Process ID: 1 Preference: 15 Cost: 20 NextHop: 10.1.2.2 Neighbour: 0.0.0.0 State: Active Adv Age: 00h05m38s Tag: 0 Priority: low Label: NULL QoSInfo: 0x0 IndirectID: 0x0 RelayNextHop: 0.0.0.0 Interface: GigabitEthernet2/0/0 TunnelID: 0x0 Flags: D BkNextHop: 10.1.1.2 BkInterface: GigabitEthernet1/0/0 BkLabel: NULL SecTunnelID: 0x0 BkPETunnelID: 0x0 BkPESecTunnelID: 0x0 BkIndirectID: 0x0
The preceding command output shows that a backup IS-IS route is generated after IS-IS auto FRR is enabled.
# Run the display mpls lsp command on LSRA to view the LSP setup result.
[LSRA] display mpls lsp ------------------------------------------------------------------------------- LSP Information: LDP LSP ------------------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 10.10.1.2/32 NULL/3 -/GE1/0/0 **LDP FRR** /1025 /GE2/0/0 10.10.1.2/32 1024/3 -/GE1/0/0 **LDP FRR** /1025 /GE2/0/0 10.10.1.3/32 NULL/3 -/GE2/0/0 **LDP FRR** /1025 /GE1/0/0 10.10.1.3/32 1025/3 -/GE2/0/0 **LDP FRR** /1025 /GE1/0/0 10.10.1.4/32 NULL/1026 -/GE2/0/0 **LDP FRR** /1026 /GE1/0/0 10.10.1.4/32 1026/1026 -/GE2/0/0 **LDP FRR** /1026 /GE1/0/0 10.10.1.1/32 3/NULL -/-
The preceding command output shows that by default, the routes with 32-bit addresses trigger the setup of a backup LSP.
- Run the lsp-trigger command on LSRC to change the
LSP triggering policy so that all routes trigger the setup of LSPs.
Then check the LSP setup result.
# Run the lsp-trigger command on LSRC to change the LSP triggering policy so that all routes trigger the setup of LSPs.
[LSRC] mpls [LSRC-mpls] lsp-trigger all [LSRC-mpls] quit
# Run the display mpls lsp command on LSRA to view the established LSPs.
[LSRA] display mpls lsp ------------------------------------------------------------------------------- LSP Information: LDP LSP ------------------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 10.10.1.2/32 NULL/3 -/GE1/0/0 **LDP FRR** /1025 /GE2/0/0 10.10.1.2/32 1024/3 -/GE1/0/0 **LDP FRR** /1025 /GE2/0/0 10.10.1.3/32 NULL/3 -/GE2/0/0 **LDP FRR** /1025 /GE1/0/0 10.10.1.3/32 1025/3 -/GE2/0/0 **LDP FRR** /1025 /GE1/0/0 10.10.1.4/32 NULL/1026 -/GE2/0/0 **LDP FRR** /1026 /GE1/0/0 10.10.1.4/32 1026/1026 -/GE2/0/0 **LDP FRR** /1026 /GE1/0/0 10.10.1.1/32 3/NULL -/- 10.1.1.0/24 1027/3 -/GE2/0/0 10.1.2.0/24 1028/3 -/GE2/0/0
The preceding command output shows that the routes with 24-bit addresses trigger the setup of LSPs.
- Configure a triggering policy to specify that all backup
routes trigger the setup of backup LSPs.
# Run the auto-frr lsp-trigger command on LSRA so that all backup routes trigger the setup of backup LSPs.
[LSRA] mpls ldp [LSRA-mpls-ldp] auto-frr lsp-trigger all [LSRA-mpls-ldp] quit
- Verify the configuration.
# Run the display mpls lsp command on LSRA to view the setup of backup LSPs.
[LSRA] display mpls lsp ------------------------------------------------------------------------------- LSP Information: LDP LSP ------------------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 10.10.1.2/32 NULL/3 -/GE1/0/0 **LDP FRR** /1025 /GE2/0/0 10.10.1.2/32 1024/3 -/GE1/0/0 **LDP FRR** /1025 /GE2/0/0 10.10.1.3/32 NULL/3 -/GE2/0/0 **LDP FRR** /1025 /GE1/0/0 10.10.1.3/32 1025/3 -/GE2/0/0 **LDP FRR** /1025 /GE1/0/0 10.10.1.4/32 NULL/1026 -/GE2/0/0 **LDP FRR** /1026 /GE1/0/0 10.10.1.4/32 1026/1026 -/GE2/0/0 **LDP FRR** /1026 /GE1/0/0 10.10.1.1/32 3/NULL -/- 10.1.1.0/24 1027/3 -/GE2/0/0 10.1.2.0/24 1028/3 -/GE2/0/0 **LDP FRR** /1027 /GE1/0/0
# The preceding command output shows that the routes with 24-bit addresses trigger the setup of LSPs.
Configuration Files
LSRA configuration file
# sysname LSRA # mpls lsr-id 10.10.1.1 mpls # mpls ldp auto-frr lsp-trigger all # isis 1 frr loop-free-alternate level-1 loop-free-alternate level-2 network-entity 10.0000.0000.0001.00 # interface GigabitEthernet1/0/0 ip address 10.1.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet2/0/0 ip address 10.1.2.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.1 255.255.255.255 isis enable 1 # return
LSRB configuration file
# sysname LSRB # mpls lsr-id 10.10.1.2 mpls # mpls ldp # isis 1 network-entity 10.0000.0000.0002.00 # interface GigabitEthernet1/0/0 ip address 10.1.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet2/0/0 ip address 10.1.3.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.2 255.255.255.255 isis enable 1 # return
LSRC configuration file
# sysname LSRC # mpls lsr-id 10.10.1.3 mpls lsp-trigger all # mpls ldp # isis 1 network-entity 10.0000.0000.0003.00 # interface GigabitEthernet1/0/0 ip address 10.1.2.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet2/0/0 ip address 10.1.3.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet3/0/0 ip address 10.1.4.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.3 255.255.255.255 isis enable 1 # return
LSRD configuration file
# sysname LSRD # mpls lsr-id 10.10.1.4 mpls # mpls ldp # isis 1 network-entity 10.0000.0000.0004.00 # interface GigabitEthernet1/0/0 ip address 10.1.4.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.4 255.255.255.255 isis enable 1 # return