Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring BFD for IS-IS

Understanding BFD for IS-IS

The Bidirectional Forwarding Detection (BFD) protocol is a simple hello mechanism that detects failures in a network. Hello packets are sent at a specified, regular interval. A neighbor failure is detected when the routing device stops receiving a reply after a specified interval. BFD works with a wide variety of network environments and topologies. The failure detection timers for BFD have shorter time limits than the failure detection mechanisms of IS-IS, providing faster detection.

The BFD failure detection timers are adaptive and can be adjusted to be faster or slower. For example, the timers can adapt to a higher value if the adjacency fails, or a neighbor can negotiate a higher value for a timer than the configured value. The timers adapt to a higher value when a BFD session flap occurs more than three times in a span of 15 seconds. A back-off algorithm increases the receive (RX) interval by two if the local BFD instance is the reason for the session flap. The transmission (TX) interval is increased by two if the remote BFD instance is the reason for the session flap.

You can use the clear bfd adaptation command to return BFD interval timers to their configured values. The clear bfd adaptation command is hitless, meaning that the command does not affect traffic flow on the routing device.

Note: BFD for IS-IS on an IPv6-only interface is not supported. However, if the interface is dual-stacked (both IPv4 and IPv6 are configured), then you can configure BFD as a client on the IPv4 IS-IS session.

To detect failures in the network, the following set of statements are used in the configuration.

Table 1: Configuring BFD for IS-IS

Statement

Description

bfd-liveness-detection

Enable failure detection.

minimum-interval milliseconds

Specify the minimum transmit and receive intervals for failure detection.

This value represents the minimum interval at which the local router transmits hellos packets as well as the minimum interval at which the router expects to receive a reply from a neighbor with which it has established a BFD session. You can configure a number from 1 through 255,000 milliseconds. You can also specify the minimum transmit and receive intervals separately.

Note: BFD is an intensive protocol that consumes system resources. Specifying a minimum interval for BFD less than 100 ms for Routing Engine-based sessions and 10 ms for distributed BFD sessions can cause undesired BFD flapping.

Depending on your network environment, these additional recommendations might apply:

  • For large-scale network deployments with a large number of BFD sessions, specify a minimum interval of 300 ms for Routing Engine-based sessions and 100 ms for distributed BFD sessions.
  • For very large-scale network deployments with a large number of BFD sessions, please contact Juniper Networks customer support for more information.
  • For BFD sessions to remain up during a Routing Engine switchover event when nonstop active routing (NSR) is configured, specify a minimum interval of 2500 ms for Routing Engine-based sessions. For distributed BFD sessions with nonstop active routing configured, the minimum interval recommendations are unchanged and depend only on your network deployment.

minimum-receive-interval milliseconds

Specify only the minimum receive interval for failure detection.

This value represents the minimum interval at which the local router expects to receive a reply from a neighbor with which it has established a BFD session. You can configure a number from 1 through 255,000 milliseconds.

multiplier number

Specify the number of hello packets not received by the neighbor that causes the originating interface to be declared down.

The default is 3, and you can configure a value from 1 through 225.

no-adaptation

Disable BFD adaptation.

In Junos OS Release 9.0 and later, you can specify that the BFD sessions not adapt to changing network conditions.

Note: We recommend that you not disable BFD adaptation unless it is preferable not to have BFD adaptation enabled in your network.

threshold

  • Specify the threshold for the adaptation of the detection time.

    When the BFD session detection time adapts to a value equal to or greater than the threshold, a single trap and a system log message are sent.

  • Specify the threshold for the transmit interval.

Note: The threshold value must be greater than the minimum transmit interval multiplied by the multiplier number.

transmit-interval minimum-interval

Specify the minimum transmit interval for failure detection.

This value represents the minimum interval at which the local routing device transmits hello packets to the neighbor with which it has established a BFD session. You can configure a value from 1 through 255,000 milliseconds.

version

Specify the BFD version used for detection.

The default is to have the version detected automatically.

Note: You can trace BFD operations by including the traceoptions statement at the [edit protocols bfd] hierarchy level.

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

Example: Configuring BFD for IS-IS

This example describes how to configure the Bidirectional Forwarding Detection (BFD) protocol to detect failures in an IS-IS network.

Requirements

Before you begin, configure IS-IS on both routers. See Example: Configuring IS-IS for information about the required IS-IS configuration.

This example uses the following hardware and software components:

  • Junos OS Release 7.3 or later
  • M Series, MX Series, and T Series routers

Overview

This example shows two routers connected to each other. A loopback interface is configured on each router. IS-IS and BFD protocols are configured on both routers.

Figure 1 shows the sample network.

Figure 1: Configuring BFD for IS-IS

Configuring BFD for IS-IS

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Router R1

set protocols isis interface so-0/0/0 bfd-liveness-detection detection-time threshold 5set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-interval 2set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-receive-interval 1set protocols isis interface so-0/0/0 bfd-liveness-detection no-adaptationset protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval threshold 3 set protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval minimum-interval 1set protocols isis interface so-0/0/0 bfd-liveness-detection multiplier 2set protocols isis interface so-0/0/0 bfd-liveness-detection version automatic

Router R2

set protocols isis interface so-0/0/0 bfd-liveness-detection detection-time threshold 6set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-interval 3set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-receive-interval 1set protocols isis interface so-0/0/0 bfd-liveness-detection no-adaptationset protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval threshold 4set protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval minimum-interval 1set protocols isis interface so-0/0/0 bfd-liveness-detection multiplier 2set protocols isis interface so-0/0/0 bfd-liveness-detection version automatic

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode.

Note: To simply configure BFD for IS-IS, only the minimum-interval statement is required. The BFD protocol selects default parameters for all the other configuration statements when you use the bfd-liveness-detection statement without specifying any parameters.

Note: You can change parameters at any time without stopping or restarting the existing session. BFD automatically adjusts to the new parameter value. However, no changes to BFD parameters take place until the values resynchronize with each BFD peer.

To configure BFD for IS-IS on Routers R1 and R2:

  1. Enable BFD failure detection for IS-IS.
    [edit protocols isis]user@R1# set interface so-0/0/0 bfd-liveness-detection
    [edit protocols isis]user@R2# set interface so-0/0/0 bfd-liveness-detection
  2. Configure the threshold for the adaptation of the detection time, which must be greater than the multiplier number multiplied by the minimum interval.
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set detection-time threshold 5
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set detection-time threshold 6
  3. Configure the minimum transmit and receive intervals for failure detection.
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set minimum-interval 2
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set minimum-interval 3
  4. Configure only the minimum receive interval for failure detection.
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set minimum-receive-interval 1
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set minimum-receive-interval 1
  5. Disable BFD adaptation.
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set no-adaptation
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set no-adaptation
  6. Configure the threshold for the transmit interval, which must be greater than the minimum transmit interval.
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set transmit-interval threshold 3
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set transmit-interval threshold 4
  7. Configure the minimum transmit interval for failure detection.
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set transmit-interval minimum-interval 1
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set transmit-interval minimum-interval 1
  8. Configure the multiplier number, which is the number of hello packets not received by the neighbor that causes the originating interface to be declared down.
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set multiplier 2
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set multiplier 2
  9. Configure the BFD version used for detection.

    The default is to have the version detected automatically.

    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R1# set version automatic
    [edit protocols isis interface so-0/0/0 bfd-liveness-detection]user@R2# set version automatic

Results

From configuration mode, confirm your configuration by issuing the show protocols isis interface command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

user@R1# show protocols isis interface so-0/0/0
    bfd-liveness-detection {
        version automatic;
        minimum-interval 2;
        minimum-receive-interval 1;
        multiplier 2;
        no-adaptation;
        transmit-interval {
            minimum-interval 1;
            threshold 3;
        }
        detection-time {
            threshold 5;
        }
}
...
user@R2# show protocols isis interface so-0/0/0
    bfd-liveness-detection {
        version automatic;
        minimum-interval 3;
        minimum-receive-interval 1;
        multiplier 2;
        no-adaptation;
        transmit-interval {
            minimum-interval 1;
            threshold 4;
        }
        detection-time {
            threshold 6;
        }
}
...

Verification

Confirm that the configuration is working properly.

Verifying the Connection Between Routers R1 and R2

Purpose

Make sure that Routers R1 and R2 are connected to each other.

Action

Ping the other router to check the connectivity between the two routers as per the network topology.

user@R1> ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2): 56 data bytes
64 bytes from 10.0.0.2: icmp_seq=0 ttl=64 time=1.367 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.662 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=1.291 ms
^C
--- 10.0.0.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.291/1.440/1.662/0.160 ms
user@R2> ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=1.287 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.310 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.289 ms
^C
--- 10.0.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.287/1.295/1.310/0.010 ms

Meaning

Routers R1 and R2 are connected to each other.

Verifying That IS-IS Is Configured

Purpose

Make sure that the IS-IS instance is running on both routers.

Action

Use the show isis database statement to check if the IS-IS instance is running on both routers, R1 and R2.

user@R1> show isis database
IS-IS level 1 link-state database:
LSP ID         Sequence Checksum Lifetime Attributes
R1.00-00       0x4a571   0x30c5     1195 L1 L2
R2.00-00       0x4a586   0x4b7e     1195 L1 L2
R2.02-00       0x330ca1  0x3492     1196 L1 L2
  3 LSPs

IS-IS level 2 link-state database:
LSP ID         Sequence Checksum Lifetime Attributes
R1.00-00       0x4a856   0x5db0     1194 L1 L2
R2.00-00       0x4a89d   0x149b     1194 L1 L2
R2.02-00       0x1fb2ff  0xd302     1194 L1 L2
  3 LSPs
user@R2> show isis database
IS-IS level 1 link-state database:
LSP ID            Sequence Checksum Lifetime Attributes
R1.00-00          0x4b707   0xcc80     1195 L1 L2
R2.00-00          0x4b71b   0xeb37     1198 L1 L2
R2.02-00          0x33c2ce  0xb52d     1198 L1 L2
  3 LSPs

IS-IS level 2 link-state database:
LSP ID             Sequence Checksum Lifetime Attributes
R1.00-00           0x4b9f2   0xee70     1192 L1 L2
R2.00-00           0x4ba41   0x9862     1197 L1 L2
R2.02-00               0x3   0x6242     1198 L1 L2
  3 LSPs

Meaning

IS-IS is configured on both routers, R1 and R2.

Verifying That BFD Is configured

Purpose

Make sure that the BFD instance is running on both routers, R1 and R2.

Action

Use the show bfd session detail statement to check if BFD instance is running on the routers.

user@R1> show bfd session detail
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.0.0.2                 Up        so-0/0/0     2.000     1.000        2   
 Client ISIS R2, TX interval 0.001, RX interval 0.001
 Client ISIS R1, TX interval 0.001, RX interval 0.001
 Session down time 00:00:00, previous up time 00:00:15
 Local diagnostic NbrSignal, remote diagnostic NbrSignal
 Remote state AdminDown, version 1
 Router 3, routing table index 17

1 sessions, 2 clients
Cumulative transmit rate 1.0 pps, cumulative receive rate 1.0 pps
user@R2> show bfd session detail
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.0.0.1                 Up        so-0/0/0     2.000     1.000        2   
 Client ISIS R2, TX interval 0.001, RX interval 0.001
 Session down time 00:00:00, previous up time 00:00:05
 Local diagnostic NbrSignal, remote diagnostic NbrSignal
 Remote state AdminDown, version 1
 Router 2, routing table index 15

1 sessions, 1 clients
Cumulative transmit rate 1.0 pps, cumulative receive rate 1.0 pps

Meaning

BFD is configured on Routers R1 and R2 for detecting failures in the IS-IS network.

Published: 2013-07-22