BFD – Bidirectional Forwarding Detection
BFD is a routing protocol independent fast failure detection method(subsecond detection is possible). It is basically a faster way to signal to your dynamic routing protocols({Cisco – OSPF, IS-IS, EIGRP, and BGP}{Mikrotik – OSPF and BGP}) that there has been a failure of a neighbor.
The Cisco link above has a very good description of how the whole process works, so I’m simply going to paraphrase here.
Configurations
Interval
This is the desired rate at which this router will send BFD packets to a neighbor.
min-rx(Mikrotik) or min_rx(Cisco)
This is the desire rate at which this router will receive BFD packets from a neighbor.
Note: The rate negotiated for send/receive doesn’t have to be the same. Whichever rate is slower will be used for each direction.
Multiplier
The number of consecutively missed BFD packets before BFD informs the associated protocol that there was a failure.
Cisco Configuration
Setting baseline BFD parameters via interface configuration mode:
1 | bfd interval milliseconds min_rx milliseconds multiplier multiplier-value |
If you are going to be connecting this Cisco router to a Mikrotik via BFD you must disable BFD echo mode on the Cisco:
1 | no bfd echo |
Now you must inform individual protocols that they are to use BFD:
To enable on all active EIGRP interfaces:
1 2 | router eigrp 111 bfd all-interfaces |
To enable on individual EIGRP interfaces:
1 2 | router eigrp 123 bfd interface Gig1/0 |
Mikrotik Configuration
Setting baseline BFD parameters for interfaces(Mikrotik defaults to already having 2MS timers with a multiplier of 5 configured for all interfaces):
1 2 | /routing bfd interface add disabled=no interface=ether1 interval=0.2s min-rx=0.2s multiplier=5 |
Now inform the routing protocol:
1 | /routing ospf interface add interface=ether1 use-bfd=yes |
or
1 | /routing bgp peer add remote-address=1.1.1.1 remote-as=1111 use-bfd=yes |
Troubleshooting/Verification
Cisco
Neighbor info including neighbor address, interface, protocol, negotiated timers, uptime, up/down, and number of state changes.
1 | show bfd neighbors [details] |
Debugging BFD:
1 | debug bfd packet [neighbor address] |
Debug state transitions:
1 | debug bfd event |
Mikrotik
This prints neighbor information including neighbor address, interface, protocol, negotiated timers, uptime, up/down, and number of state changes.
1 | /routing bfd neighbor print detail |
Logging BFD related messages:
1 2 | /system logging add topics=bfd |
So BFD is an interesting addition to routing that may make a large difference to you in certain situations. Having said that, I don’t actually run this in my infrastructure. Since I’m in an ISP environment I generally like OSPF’s speed which is at a moderate pace.
There are some instances where I can see the real value of this. Most of the BGP sessions I establish occur over some layer two medium. If there is a failure between the peering router and me, my router doesn’t know about it until it’s default timers run out. In BGP the default hello is 60 seconds and the default dead is 3 iterations which means it takes 3 minutes for my router to realize there is an issue and to tear down the session. When establishing the BGP session I usually attempt to keep as much default as possible, but this would allow you to put a little zip in the process.
Get to know something new every day! I must admit I never knew something like this existed, but now that it do, I like it 🙂
Will have to do some inhouse testing, but this could be useful in certain cases.
@Tom
I doubt I’ll have time to test it out properly…if you do Cisco to MTK, let me know how it works.
The bad man at the US MUM had to come poke all you wisp people.
TOM! I missed the RE class in TX and I “must” have it for your IE visit… lets talk.
Don
Really, you didn’t approve my last comment.
@Don
Sorry for the delay. The notification email got buried and I’m just now hitting the backlog.
@Greg – Thanks 🙂
Thought you guys didn’t like us HA people for a second.
@Don
HA could mean so many things…I’ve usually heard it as AH. BA-ZING! I like everyone to express themselves here 🙂