Example for Configuring Dynamic BFD to Detect LDP LSPs
Networking Requirements
On a complex and unstable network shown in Figure 3-28, LSRA, LSRB, and LSRC belong to the same MPLS domain, and an LDP LSP is established between LSRA and LSRC. It takes a period of time for an interface to detect a fault on the connected link. Connectivity check on the LSP is required. If a fault occurs on the LSP, LSRA can receive the fault report within 500 ms.
Configuration Roadmap
To meet the preceding requirements, configure dynamic BFD to detect LDP LSPs. The configuration roadmap is as follows:
- Configure BFD that can quickly check connectivity of the LDP LSP.
- Configure dynamic BFD for LDP LSPs, and configure BFD sessions on LSRA and LSRC.
- Adjust BFD parameters to enable LSRA to receive a fault report within 500 ms.
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
- Create an LDP LSP between LSRA and LSRC.
# 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
# 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
After the configuration is complete, run the display mpls ldp lsp command on LSRA. The command output shows that an LDP LSP is set up between LSRA and LSRC. LSRA is used as an example.
[LSRA] display mpls ldp lsp LDP LSP Information ------------------------------------------------------------------------------- DestAddress/Mask In/OutLabel UpstreamPeer NextHop OutInterface ------------------------------------------------------------------------------- 10.10.1.1/32 3/NULL 10.10.1.2 127.0.0.1 InLoop0 *10.10.1.1/32 Liberal/3 DS/10.10.1.2 10.10.1.2/32 NULL/3 - 10.1.1.2 GE1/0/0 10.10.1.2/32 1024/3 10.10.1.2 10.1.1.2 GE1/0/0 10.10.1.3/32 NULL/1025 - 10.1.1.2 GE1/0/0 10.10.1.3/32 1025/1025 10.10.1.2 10.1.1.2 GE1/0/0 ------------------------------------------------------------------------------- TOTAL: 5 Normal LSP(s) Found. TOTAL: 1 Liberal LSP(s) Found. TOTAL: 0 Frr LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale A '*' before a UpstreamPeer means the session is stale A '*' before a DS means the session is stale A '*' before a NextHop means the LSP is FRR LSP
- Configure dynamic BFD to detect the connectivity of the
LDP LSP between LSRA and LSRC.
# Configure an FEC list on LSRA to ensure that BFD detects only the connectivity of the LDP LSP between LSRA and LSRC.
[LSRA] fec-list tortc [LSRA-fec-list-tortc] fec-node 10.10.1.3 [LSRA-fec-list-tortc] quit
# Enable BFD on LSRA, specify the FEC list that triggers BFD session establishment dynamically, and adjust BFD parameters.
[LSRA] bfd [LSRA-bfd] quit [LSRA] mpls [LSRA-mpls] mpls bfd-trigger fec-list tortc [LSRA-mpls] mpls bfd enable [LSRA-mpls] mpls bfd min-tx-interval 100 min-rx-interval 100 [LSRA-mpls] quit
# Enable BFD for LSPs passively on LSRC.
[LSRC] bfd [LSRC-bfd] mpls-passive
- Verify the configuration.
# Run the display bfd session all command to view the BFD session status that is created dynamically. The command output shows that the State field is displayed as Up.
[LSRA] display bfd session all -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 8192 8192 10.10.1.3 Up D_LDP_LSP GigabitEthernet1/0/0 -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0
# Check the status of the BFD session created dynamically on PE2. The command output shows that the State field is displayed as Up.
[LSRC] display bfd session passive-dynamic -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 8192 8192 10.10.1.1 Up E_Dynamic - -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0
Configuration Files
LSRA configuration file
# sysname LSRA # bfd # mpls lsr-id 10.10.1.1 mpls mpls bfd enable mpls bfd-trigger fec-list tortc mpls bfd min-tx-interval 100 min-rx-interval 100 # fec-list tortc fec-node 10.10.1.3 # mpls ldp # 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 # 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 # bfd mpls-passive # mpls lsr-id 10.10.1.3 mpls # mpls ldp # 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