Configuring BFD for OSPF on a Specified Interface

Configuring BFD for OSPF on a specified interface helps speed up OSPF convergence in the case of an interface failure.

Context

After BFD for OSPF is configured on a specified interface and the interface becomes faulty, the router rapidly detects the fault and instructs OSPF to recalculate routes. This speeds up OSPF convergence. When the OSPF neighbor relationship goes Down, the BFD session between OSPF neighbors is dynamically deleted.

Before configuring BFD for OSPF, enable BFD globally.

Perform the following steps on the router:

An interface in this case may be a physical interface or a GRE tunnel interface. If BFD is enabled on a GRE tunnel interface, millisecond-level fault detection can be implemented for the GRE tunnel.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run bfd

    BFD is globally configured.

  3. Run quit

    Return to the system view.

  4. Run interface interface-type interface-number

    The interface view is displayed.

  5. Run ospf bfd enable

    BFD for OSPF is configured, and the default parameter values are used to establish a BFD session.

    If BFD is enabled globally and the neighbor relationships on the interface are in the Full state, OSPF creates a BFD session with default parameter values for the interface.

    The ospf bfd enable command can be run only in the VLANIF interface view.

    The configuration of BFD for OSPF on an interface takes precedence over that in the OSPF process.

  6. (Optional) Run ospf bfd { min-rx-interval receive-interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value | frr-binding } *

    BFD session parameters are modified.

    You can skip this step. The default interval at which BFD packets are transmitted and the default detection multiplier are recommended.

    The parameters are configured based on the network status and network reliability requirements. A short interval at which BFD packets are transmitted can be configured for a link that has a higher requirement for reliability. A long interval at which BFD packets are transmitted can be configured for a link that has a lower requirement for reliability.

    • Actual interval at which BFD packets are transmitted on the local device = Max { configured interval transmit-interval at which BFD packets are transmitted on the local router, configured interval receive-interval at which BFD packets are received on the peer device }
    • Actual interval at which BFD packets are received on the local device = Max { configured interval transmit-interval at which BFD packets are transmitted on the peer device, configured interval receive-interval at which BFD packets are received on the local device }
    • Actual time for detecting BFD packets = Actual interval at which BFD packets are received on the local device x Configured detection multiplier multiplier-value on the peer device

    For example:

    • On the local device, the configured interval at which BFD packets are transmitted is 200 ms; the interval at which BFD packets are received is set to 300 ms; the detection multiplier is 4.
    • On the peer device, the configured interval at which BFD packets are transmitted is 100 ms; the interval at which BFD packets are received is 600 ms; the detection multiplier is 5.

    Then:

    • On the local device, the actual interval at which BFD packets are transmitted is 600 ms calculated by using the formula max {200 ms, 600 ms}; the interval at which BFD packets are received is 300 ms calculated by using the formula max {100 ms, 300 ms}; the detection period is 1500 ms calculated by multiplying 300 ms by 5.
    • On the peer device, the actual interval at which BFD packets are transmitted is 300 ms calculated by using the formula max {100 ms, 300 ms}, the actual interval at which BFD packets are received is 600 ms calculated by using the formula max {200 ms, 600 ms}, and the detection period is 2400 ms calculated by multiplying 600 ms by 4.

  7. (Optional) Run ospf bfd incr-cost { cost | max-reachable }

    The OSPF interface is enabled to adjust the cost based on BFD.

    The interface-specific BFD-associated cost value has a higher priority than the process-specific BFD-associated cost value.

  8. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >