Saturday, November 9, 2013

BFD Bidirectional Forwarding Protocol - Juniper



Under Junos there is several HA (High Availability) features, like NSR, Graceful Restart, Graceful RE Switchover and of course BFD. I’ll be briefly write about it and I’ll configure it on two Juniper routers under OSPF process.
What the BFD is actually?
Bidirectional Forwarding Protocol is protocol that is used to detect faults between two forwarding engines connected by link.
BFD is vendor and protocol independent and operates on top of any data protocol (network layer, link layer, tunnels, etc.)  It is very light weight on resources (CPU, Memory) in compered with other protocol faults mechanism, such Hello under OSPF which is very slow compared with BFD.
The benefits of BFD are that provide a single method for managing protocol timers.

Supported protocols are:

  • OSPF
  • Static
  • IS-IS
  • RIP
  • iBGP
  • EBGP
  • RSVP






To configure BFD on Juniper devices go under protocol you want to configure, in our case is OSPF edit interface and issue command as below. To configure BDF over BGP you can do that under protocol, neighbor or group.

Router 1

[edit protocols ospf]
darko@Router_1# show
area 0.0.0.0 {
    interface all;
    interface em2.0 {
        bfd-liveness-detection {
            minimum-interval 300;
        }
    }
}


Router 2

[edit protocols ospf]
darko@Router_2# show
area 0.0.0.0 {
    interface all;
    interface em1.0 {
        bfd-liveness-detection {
            minimum-interval 300;
        }
    }
}


To verify BDF use follows command:


darko@Router_1> show bfd session
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.143.88.20             Up        em2.0          0.900     0.300        3

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

----------------------------------------------------------------------------------

darko@Router_2> show bfd session
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.143.88.10             Up        em1.0          0.900     0.300        3

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


BFD sessions between neighbors are adaptive, if you define a minimum interval value for transmit and receive direction lower than your neighbor you BFD session agree on using higher value. Yes you can configure separately transmit and receive timers.
To change that default behavior issue the command  "no-adaptation" on both routers, in that chase the values on intervals must match.

For more details on BFD use show bfd session extensive command.

darko@Router_1> show bfd session extensive
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.143.88.20             Up        em2.0          0.900     0.300        3
 Client OSPF realm ospf-v2 Area 0.0.0.0, TX interval 0.300, RX interval 0.300
 Session up time 00:00:30
 Local diagnostic None, remote diagnostic None
 Remote state Up, version 1
 Min async interval 0.300, min slow interval 1.000
 Adaptive async TX interval 0.300, RX interval 0.300
 Local min TX interval 0.300, minimum RX interval 0.300, multiplier 3
 Remote min TX interval 0.300, min RX interval 0.300, multiplier 3
 Local discriminator 1, remote discriminator 1
 Echo mode disabled/inactive

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


Set commands from both Routers:

Router_1



set system host-name Router_1
set interfaces em2 unit 0 family inet address 10.143.88.10/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface em2.0 bfd-liveness-detection minimum-interval 300

Router_2 

set system host-name Router_2
set interfaces em2 unit 0 family inet address 10.143.88.20/24
set interfaces lo0 unit 0 family inet address 2.2.2.2/32
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface em1.0 bfd-liveness-detection minimum-interval 300

 

No comments:

Post a Comment