Example for Configuring Static BFD to Detect LDP LSPs
Networking Requirements
On a simple and stable network shown in Figure 3-27, the path PE1 -> P1 -> PE2 is an LDP LSP, while the path PE2 -> P2 -> PE1 is an IP link. It takes an interface a long period to detect a fault on the connected link. Connectivity check on the LSP is required. If a fault occurs on the LSP, PE1 can receive the fault report within 500 ms.
Configuration Roadmap
To meet the preceding requirements, configure static BFD to detect LDP LSPs. The configuration roadmap is as follows:
- Configure BFD that can quickly check connectivity of the LDP LSP.
- Configure static BFD for LDP LSP because the network is stable and IP addresses of devices do not change. Configure BFD sessions on PE1 and PE2.
- Adjust BFD parameters to enable PE1 to receive a fault report within 500 ms.
Procedure
- Configure IP addresses for interfaces.
# Configure PE1. The configurations of P1, P2, and PE2 are similar to the configuration of PE1, and are not mentioned here.
<Huawei> system-view [Huawei] sysname PE1 [PE1] interface loopback 1 [PE1-LoopBack1] ip address 10.10.1.1 32 [PE1-LoopBack1] quit [PE1] interface gigabitethernet 1/0/0 [PE1-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [PE1-GigabitEthernet1/0/0] quit [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] ip address 10.3.1.1 24 [PE1-GigabitEthernet2/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 PE1. The configurations of P1, P2, and PE2 are similar to the configuration of PE1, and are not mentioned here.
[PE1] ospf 1 [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 10.10.1.1 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
- Set up an LDP LSP whose path is PE1 -> P1 -> PE2.
# Configure PE1.
[PE1] mpls lsr-id 10.10.1.1 [PE1] mpls [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface gigabitethernet 1/0/0 [PE1-GigabitEthernet1/0/0] mpls [PE1-GigabitEthernet1/0/0] mpls ldp [PE1-GigabitEthernet1/0/0] quit
# Configure P1.
[P1] mpls lsr-id 10.10.1.2 [P1] mpls [P1-mpls] quit [P1] mpls ldp [P1-mpls-ldp] quit [P1] interface gigabitethernet 1/0/0 [P1-GigabitEthernet1/0/0] mpls [P1-GigabitEthernet1/0/0] mpls ldp [P1-GigabitEthernet1/0/0] quit [P1] interface gigabitethernet 2/0/0 [P1-GigabitEthernet2/0/0] mpls [P1-GigabitEthernet2/0/0] mpls ldp [P1-GigabitEthernet2/0/0] quit
# Configure PE2.
[PE2] mpls lsr-id 10.10.1.4 [PE2] mpls [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface gigabitethernet 1/0/0 [PE2-GigabitEthernet1/0/0] mpls [PE2-GigabitEthernet1/0/0] mpls ldp [PE2-GigabitEthernet1/0/0] quit
# Run the display mpls ldp lsp command. The command output shows that an LDP LSP destined for 10.10.1.4/32 is set up on PE1.
[PE1] 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.4/32 NULL/1025 - 10.1.1.2 GE1/0/0 10.10.1.4/32 1022/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 state A '*' before a DS means the session is stale A '*' before a NextHop means the LSP is FRR LSP
- Enable global BFD on the two nodes of the detected link.
# Configure PE1.
[PE1] bfd [PE1-bfd] quit
# Configure PE2.
[PE2] bfd [PE2-bfd] quit
- Bind the BFD session destined for the LDP LSP on the ingress
node. Set the minimum interval for sending and receiving packets to
both 100 ms. Configure the port status table to be changeable.
# Configure PE1.
[PE1] bfd pe1tope2 bind ldp-lsp peer-ip 10.10.1.4 nexthop 10.1.1.2 interface gigabitethernet 1/0/0 [PE1-bfd-lsp-session-pe1tope2] discriminator local 1 [PE1-bfd-lsp-session-pe1tope2] discriminator remote 2 [PE1-bfd-lsp-session-pe1tope2] min-tx-interval 100 [PE1-bfd-lsp-session-pe1tope2] min-rx-interval 100 [PE1-bfd-lsp-session-pe1tope2] process-pst [PE1-bfd-lsp-session-pe1tope2] commit [PE1-bfd-lsp-session-pe1tope2] quit
- On PE2, configure a BFD session that is bound to the IP
link to notify PE1 of the detected faults on the LDP LSP.
# Configure PE2.
[PE2] bfd pe2tope1 bind peer-ip 10.10.1.1 [PE2-bfd-session-pe2tope1] discriminator local 2 [PE2-bfd-session-pe2tope1] discriminator remote 1 [PE2-bfd-session-pe2tope1] min-tx-interval 100 [PE2-bfd-session-pe2tope1] min-rx-interval 100 [PE2-bfd-session-pe2tope1] commit [PE2-bfd-session-pe2tope1] quit
- Verify the configuration.
# Run the display bfd session all command on PE1. The command output shows that the State field is displayed as Up.
[PE1] display bfd session all -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 1 2 10.10.1.4 Up S_LDP_LSP GigabitEthernet1/0/0 -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0
# Run the display bfd session all command on PE2, and the command output that the State field is displayed as Up.
[PE2] display bfd session all -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 2 1 10.10.1.1 Up S_IP_PEER - -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0
Configuration Files
PE1 configuration file
# sysname PE1 # bfd # mpls lsr-id 10.10.1.1 mpls # mpls ldp # interface GigabitEthernet1/0/0 ip address 10.1.1.1 255.255.255.0 mpls mpls ldp # interface GigabitEthernet2/0/0 ip address 10.3.1.1 255.255.255.0 # interface LoopBack1 ip address 10.10.1.1 255.255.255.255 # bfd pe1tope2 bind ldp-lsp peer-ip 10.10.1.4 nexthop 10.1.1.2 interface GigabitEthernet1/0/0 discriminator local 1 discriminator remote 2 min-tx-interval 100 min-rx-interval 100 process-pst commit # 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 network 10.3.1.0 0.0.0.255 # return
P1 configuration file
# sysname P1 # 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 LoopBack1 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
P2 configuration file
# sysname P2 # interface GigabitEthernet1/0/0 ip address 10.3.1.2 255.255.255.0 # interface GigabitEthernet2/0/0 ip address 10.4.1.1 255.255.255.0 # interface LoopBack1 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.3.1.0 0.0.0.255 network 10.4.1.0 0.0.0.255 # return
PE2 configuration file
# sysname PE2 # bfd # mpls lsr-id 10.10.1.4 mpls # mpls ldp # interface GigabitEthernet1/0/0 ip address 10.2.1.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet2/0/0 ip address 10.4.1.2 255.255.255.0 # interface LoopBack1 ip address 10.10.1.4 255.255.255.255 # bfd pe2tope1 bind peer-ip 10.10.1.1 discriminator local 2 discriminator remote 1 min-tx-interval 100 min-rx-interval 100 commit # ospf 1 area 0.0.0.0 network 10.10.1.4 0.0.0.0 network 10.2.1.0 0.0.0.255 network 10.4.1.0 0.0.0.255 # return