< Home

Example for Configuring Dynamic BFD for CR-LSPs

Networking Requirements

Figure 1 shows an MPLS network. A TE tunnel with LSRA as the ingress node and LSRC as the egress node needs to be established on LSRA. A hot-standby CR-LSP and best-effort path also need to be configured.
  • The path of the primary CR-LSP is LSRA -> LSRB -> LSRC.

  • The path of the backup CR-LSP is LSRA -> LSRD -> LSRC.

When the primary CR-LSP fails, traffic switches to the backup CR-LSP. After the primary CR-LSP recovers, traffic switches back to the primary CR-LSP in 15 seconds. If both the primary CR-LSP and backup CR-LSP fail, traffic switches to the best-effort path. Explicit paths can be configured for the primary and backup CR-LSPs. A best-effort path can be generated automatically. In this example, the best-effort path is LSRA -> LSRD -> LSRB -> LSRC. The calculated best-effort path varies according to the faulty node.

Dynamic BFD for CR-LSPs needs to be configured to detect primary and backup CR-LSPs:

  • When the primary CR-LSP fails, traffic fast switches to the backup CR-LSP.

  • When the backup CR-LSP fails within 15 seconds after the primary CR-LSP recovers, traffic switches back to the primary CR-LSP.

In this scenario, to avoid loops, ensure that all connected interfaces have STP disabled and connected interfaces are removed from VLAN 1. If STP is enabled and VLANIF interfaces of switches are used to construct a Layer 3 ring network, an interface on the network will be blocked. As a result, Layer 3 services on the network cannot run normally.

Figure 1 Networking of dynamic BFD for CR-LSPs

Compared with static BFD, dynamic BFD is much easier to configure. In addition, dynamic BFD can reduce the number of BFD sessions, and use less network resources because only one BFD session can be created on a tunnel interface.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure a hot-standby CR-LSP and best-effort path.

  2. Enable BFD on the ingress node, configure dynamic BFD for CR-LSPs, and set the intervals for sending and receiving BFD packets and local BFD detection multiplier.

  3. Enable the capability to passively create BFD sessions on the egress node.

Procedure

  1. Configure a hot-standby CR-LSP and best-effort path.

    Configure the primary CR-LSP, backup CR-LSP, and best-effort path according to Example for Configuring CR-LSP Hot Standby.

  2. Configure dynamic BFD for CR-LSPs on the ingress node.

    Configure dynamic BFD for CR-LSPs, and set the intervals for sending and receiving BFD packets to 500 ms and local BFD detection multiplier to 3.

    # Configure LSRA.

    [LSRA] bfd
    [LSRA-bfd] quit
    [LSRA] interface tunnel 1
    [LSRA-Tunnel1] mpls te bfd enable
    [LSRA-Tunnel1] mpls te bfd min-tx-interval 500 min-rx-interval 500 detect-multiplier 3
    [LSRA-Tunnel1] mpls te commit

  3. Enable the capability to passively create BFD sessions on the egress node.

    # Configure LSRC.

    [LSRC] bfd
    [LSRC-bfd] mpls-passive
    [LSRC-bfd] quit

    After the configurations are complete, run the display bfd session mpls-te interface Tunnel 1 te-lsp command on LSRA. You can see that the BFD session status is Up.

    [LSRA] display bfd session mpls-te interface Tunnel 1 te-lsp
    --------------------------------------------------------------------------------
    Local Remote     PeerIpAddr      State     Type        InterfaceName            
    --------------------------------------------------------------------------------
    8192  8192       3.3.3.9         Up        D_TE_LSP    Tunnel1              
    --------------------------------------------------------------------------------
         Total UP/DOWN Session Number : 1/0                                         

    Run the display bfd session passive-dynamic command on LSRC. You can see that a BFD session is created passively.

    [LSRC] display bfd session passive-dynamic
    --------------------------------------------------------------------------------
    Local Remote     PeerIpAddr      State     Type        InterfaceName            
    --------------------------------------------------------------------------------
    8192  8192       1.1.1.9         Up        E_Dynamic         -                  
    --------------------------------------------------------------------------------
         Total UP/DOWN Session Number : 1/0                                         

  4. Verify the configuration.

    Connect two interfaces, Port 1 and Port 2, on a tester to LSRA and LSRC respectively. On Port 1, inject MPLS traffic and send traffic to Port 2. After the cable attached to GE0/0/1 on LSRA or LSRB is removed, traffic fast switches to the backup CR-LSP at the millisecond level.

    After the cable is inserted into GE0/0/1, run the display mpls te tunnel-interface tunnel 1 command to view tunnel information until the primary CR-LSP is set up. Then remove the cable from GE0/0/2 on LSRA or LSRD within 15s. You can see that traffic switches back to the primary CR-LSP at the millisecond level.

Configuration Files

  • LSRA configuration file

    #
     sysname LSRA
    #
    vlan batch 100 500
    #
    bfd
    #
    mpls lsr-id 1.1.1.9
    mpls
     mpls te
     mpls rsvp-te
     mpls te cspf
    #
    explicit-path backup-path
     next hop 172.5.1.2
     next hop 172.3.1.1
     next hop 3.3.3.9
    #
    explicit-path pri-path
     next hop 172.1.1.2
     next hop 172.2.1.2
     next hop 3.3.3.9
    #
    interface Vlanif100
     ip address 172.1.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif500
     ip address 172.5.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 100
    #    
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface LoopBack1
     ip address 1.1.1.9 255.255.255.255
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack1
     tunnel-protocol mpls te                                                        
     destination 3.3.3.9                                                            
     mpls te tunnel-id 100                                                          
     mpls te bfd enable                                                             
     mpls te bfd min-tx-interval 500 min-rx-interval 500
     mpls te record-route                                                           
     mpls te path explicit-path pri-path                                            
     mpls te path explicit-path backup-path secondary                               
     mpls te backup hot-standby mode revertive wtr 15                               
     mpls te backup ordinary best-effort                                            
     mpls te commit
    #
    ospf 1                                                                          
     opaque-capability enable                                                       
     area 0.0.0.0                                                                   
      network 1.1.1.9 0.0.0.0                                                       
      network 172.1.1.0 0.0.0.255                                                   
      network 172.5.1.0 0.0.0.255                                                   
      mpls-te enable
    #
    return
  • LSRB configuration file

    #
     sysname LSRB
    #
    vlan batch 100 200 400
    #
    mpls lsr-id 2.2.2.9
    mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif100
     ip address 172.1.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif200
     ip address 172.2.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif400
     ip address 172.4.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 100
    # 
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    interface LoopBack1
     ip address 2.2.2.9 255.255.255.255
    #
    ospf 1
     opaque-capability enable
     area 0.0.0.0
      network 2.2.2.9 0.0.0.0
      network 172.1.1.0 0.0.0.255
      network 172.2.1.0 0.0.0.255
      network 172.4.1.0 0.0.0.255
      mpls-te enable
    #
    return
  • LSRC configuration file

    #
     sysname LSRC
    #
    vlan batch 200 300
    #
    bfd
     mpls-passive
    #
    mpls lsr-id 3.3.3.9
    mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif200
     ip address 172.2.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif300
     ip address 172.3.1.1 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface LoopBack1
     ip address 3.3.3.9 255.255.255.255
    #
    ospf 1                                                                          
     opaque-capability enable                                                       
     area 0.0.0.0                                                                   
      network 3.3.3.9 0.0.0.0                                                       
      network 172.2.1.0 0.0.0.255                                                   
      network 172.3.1.0 0.0.0.255                                                   
      mpls-te enable                                                                
    # 
    return
  • LSRD configuration file

    #
     sysname LSRD
    #
    vlan batch 300 400 500
    #
    mpls lsr-id 4.4.4.9
    mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif300
     ip address 172.3.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif400
     ip address 172.4.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface Vlanif500
     ip address 172.5.1.2 255.255.255.0
     mpls
     mpls te
     mpls rsvp-te
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    interface LoopBack1
     ip address 4.4.4.9 255.255.255.255
    #
    ospf 1                                                                          
     opaque-capability enable                                                       
     area 0.0.0.0                                                                   
      network 4.4.4.9 0.0.0.0                                                       
      network 172.3.1.0 0.0.0.255                                                   
      network 172.4.1.0 0.0.0.255                                                   
      network 172.5.1.0 0.0.0.255                                                   
      mpls-te enable                                                                
    # 
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >