Manual:Routing/BFD: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
BFD protocol for routing
==Summary==
Bidirectional Forwarding Detection (BFD) is a low-overhead and short-duration protocol intended to detect faults in the bidirectional path between two forwarding engines, including physical interfaces, sub-interfaces, data link(s), and to the extent possible the forwarding engines themselves, with potentially very low latency. It operates independently of media, data protocols and routing protocols.


==Requirements==
BFD is basically a hello protocol for checking bidirectional neighbor reachability. It provides sub-second link failure detection support. BFD is not routing protocol specific, unlike protocol hello timers or such.
Starting from RouterOS version v4.4, BFD is supported.


==Summary==
BFD Control packets is transmitted in UDP packets with destination port 3784, BFD also uses port 4784 for multihop paths. Source port is in the range 49152 through 65535. And BFD Echo packets are encapsulated in UDP packet with destination port 3785.
BFD is a protocol intended to detect faults in the
bidirectional path between two forwarding engines,
including physical interfaces, sub-interfaces, data
link(s), and to the extent possible the forwarding
engines themselves, with potentially very low latency.
It operates independently of media, data protocols,
and routing protocols.


Bidirectional Forwarding Detection (BFD):
Standards and Technologies:
* hello protocol for checking bidirectional neighbor reachability;
<ul class="bullets">
* provides sub-second link failure detection support;
<li>RFC 5880 Bidirectional Forwarding Detection (BFD)
* not routing protocol specific, unlike protocol hello timers or such
<li>RFC 5881 BFD for IPv4 and IPv6 (Single Hop)
<li>RFC 5882 Generic Application of BFD (Single Hop)
</ul>
 
==Requirements==
RouterOS 4.4 or newer with routing package installed.


==Features supported==
==Features supported==


* asynchronous mode (draft-ietf-bfd-base-09.txt)
* asynchronous mode [http://tools.ietf.org/html/draft-ietf-bfd-base-09/draft-ietf-bfd-base-09.txt]
* BFD timer and detection multiplier configuration per interface;
* BFD timer and detection multiplier configuration per interface;
* enabling BFD for OSPF interfaces
* enabling BFD for OSPF interfaces
* enabling BFD for BGP peers
* enabling BFD for BGP peers
* single hop IPv4 and IPv6 transport (draft-ietf-bfd-v4v6-1hop-10.txt)
* single hop IPv4 and IPv6 transport [http://tools.ietf.org/html/draft-ietf-bfd-base-09/draft-ietf-bfd-v4v6-1hop-10.txt]
* multihop IPv4 and IPv6 transport (draft-ietf-bfd-multihop-08.txt)
* multihop IPv4 and IPv6 transport [http://tools.ietf.org/html/draft-ietf-bfd-base-09/draft-ietf-bfd-multihop-08.txt]
 
==Features not yet supported==
* echo function
* on-demand mode
* authentication


==Configuration==
==Configuration==
BFD configuration should be added in different places as required
BFD configuration should be added in different places as required
====BFD timer configuration====
<p id="shbox"><b>Sub-menu:</b> <code>/routing bfd interface</code></p>
'''Properties'''
{{Mr-arg-table-h
|prop=Property
|desc=Description
}}
{{Mr-arg-table
|arg=interface
|type=string
|default=
|desc=Interface name to which BFD timers will be applied
}}
{{Mr-arg-table
|arg=interval
|type=decimal [0.01 .. 10]sec
|default=0.2sec
|desc=Desired rate at which BFD Control packets should be transmitted to the remote system.
}}
{{Mr-arg-table
|arg=min-rx
|type=decimal [0.01..10]sec
|default=0.2sec
|desc=Min interval desired between received BFD packets
}}
{{Mr-arg-table-end
|arg=multiplier
|type=integer [1..100]
|default=5
|desc=The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time  for the session.
}}
====BFD neighbor status====
<p id="shbox"><b>Sub-menu:</b> <code>/routing bfd neighbor</code></p>
'''Read-only properties'''
{{Mr-arg-table-h
|prop=Property
|desc=Description
}}
{{Mr-arg-ro-table
|arg=actual-tx-interval
|type=decimal
|desc=Actual rate at which BFD Control packets are transmitted
}}
{{Mr-arg-ro-table
|arg=address
|type=IP {{!}} IPv6
|desc=IP/IPv6 address of the neighbor
}}
{{Mr-arg-ro-table
|arg=desired-tx-interval
|type=decimal
|desc=The minimum interval between transmitted BFD Control packets that this system would like to use.
}}
{{Mr-arg-ro-table
|arg=hold-time
|type=time
|desc=
}}
{{Mr-arg-ro-table
|arg=interface
|type=string
|desc=interface name on which BFD neighbor is reachable
}}
{{Mr-arg-ro-table
|arg=multihop
|type=yes {{!}} no
|desc=Whether neighbor is multiple hops away
}}
{{Mr-arg-ro-table
|arg=multiplier
|type=integer
|desc=Desired Detection Time multiplier for BFD Control packets on the local system
}}
{{Mr-arg-ro-table
|arg=packets-rx
|type=integer
|desc=Number of received packets
}}
{{Mr-arg-ro-table
|arg=protocols
|type=ospf {{!}} bgp
|desc=For which protocols BFD is used, currently only OSPF and BGP are possible.
}}
{{Mr-arg-ro-table
|arg=remote-min-rx
|type=decimal
|desc=The last value of Required Min RX Interval received from the remote system in a BFD Control packet
}}
{{Mr-arg-ro-table
|arg=required-min-rx
|type=decimal
|desc=The minimum interval between received BFD Control packets that this system requires.
}}
{{Mr-arg-ro-table
|arg=state
|type=up {{!}} down
|desc=Shows the current BFD session state
}}
{{Mr-arg-ro-table
|arg=state-changes
|type=integer
|desc=Number of state changes occurred between the neighbors
}}
{{Mr-arg-ro-table
|arg=up
|type=yes {{!}} no
|desc=Whether link to the neighbor is up
}}
{{Mr-arg-ro-table-end
|arg=uptime
|type=time
|desc=Link uptime
}}
'''Example''' of BFD neighbor. Neighbor is used by OSPF and is directly connected.
<pre>
[admin@R3-493G] /routing bfd neighbor> print detail
Flags: U - up
0 U state=up address=10.5.101.1 interface=ether1 protocols=ospf multihop=no
    state-changes=1 uptime=12s desired-tx-interval=0.2sec
    actual-tx-interval=0.2sec required-min-rx=0.2sec remote-min-rx=0.2sec
    multiplier=5 hold-time=1sec packets-rx=76 packets-tx=77
</pre>


====OSPF====
====OSPF====
There is only one parameter per OSPF interface to enable BFD
<pre>
  /routing ospf interface add interface=all use-bfd=yes
  /routing ospf interface add interface=all use-bfd=yes
</pre>
====BGP====
====BGP====
Similar to OSPF, only one option per BGP peer to enable BFD
<pre>
  /routing bgp peer add remote-address=x.x.x.x remote-as=xxxxx use-bfd=yes
  /routing bgp peer add remote-address=x.x.x.x remote-as=xxxxx use-bfd=yes
====BFD timer configuration====
</pre>
  /routing bfd interface
 
==Interoperability ==
For interoperability with Cisco make sure to disable echo mode (it is enabled on Cisco by default), since it's not supported on MT.
 
To do that, on Cisco in interface configuration mode type:
  no bfd echo
 
 
 
{{cont}}
 


====BFD neighbor status====
[[Category:Manual|B]]
/routing bfd neighbor

Latest revision as of 09:45, 6 September 2018

Summary

Bidirectional Forwarding Detection (BFD) is a low-overhead and short-duration protocol intended to detect faults in the bidirectional path between two forwarding engines, including physical interfaces, sub-interfaces, data link(s), and to the extent possible the forwarding engines themselves, with potentially very low latency. It operates independently of media, data protocols and routing protocols.

BFD is basically a hello protocol for checking bidirectional neighbor reachability. It provides sub-second link failure detection support. BFD is not routing protocol specific, unlike protocol hello timers or such.

BFD Control packets is transmitted in UDP packets with destination port 3784, BFD also uses port 4784 for multihop paths. Source port is in the range 49152 through 65535. And BFD Echo packets are encapsulated in UDP packet with destination port 3785.

Standards and Technologies:

  • RFC 5880 Bidirectional Forwarding Detection (BFD)
  • RFC 5881 BFD for IPv4 and IPv6 (Single Hop)
  • RFC 5882 Generic Application of BFD (Single Hop)

Requirements

RouterOS 4.4 or newer with routing package installed.

Features supported

  • asynchronous mode [1]
  • BFD timer and detection multiplier configuration per interface;
  • enabling BFD for OSPF interfaces
  • enabling BFD for BGP peers
  • single hop IPv4 and IPv6 transport [2]
  • multihop IPv4 and IPv6 transport [3]

Features not yet supported

  • echo function
  • on-demand mode
  • authentication

Configuration

BFD configuration should be added in different places as required

BFD timer configuration

Sub-menu: /routing bfd interface


Properties

Property Description
interface (string; Default: ) Interface name to which BFD timers will be applied
interval (decimal [0.01 .. 10]sec; Default: 0.2sec) Desired rate at which BFD Control packets should be transmitted to the remote system.
min-rx (decimal [0.01..10]sec; Default: 0.2sec) Min interval desired between received BFD packets
multiplier (integer [1..100]; Default: 5) The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time for the session.


BFD neighbor status

Sub-menu: /routing bfd neighbor

Read-only properties

Property Description
actual-tx-interval (decimal) Actual rate at which BFD Control packets are transmitted
address (IP | IPv6) IP/IPv6 address of the neighbor
desired-tx-interval (decimal) The minimum interval between transmitted BFD Control packets that this system would like to use.
hold-time (time)
interface (string) interface name on which BFD neighbor is reachable
multihop (yes | no) Whether neighbor is multiple hops away
multiplier (integer) Desired Detection Time multiplier for BFD Control packets on the local system
packets-rx (integer) Number of received packets
protocols (ospf | bgp) For which protocols BFD is used, currently only OSPF and BGP are possible.
remote-min-rx (decimal) The last value of Required Min RX Interval received from the remote system in a BFD Control packet
required-min-rx (decimal) The minimum interval between received BFD Control packets that this system requires.
state (up | down) Shows the current BFD session state
state-changes (integer) Number of state changes occurred between the neighbors
up (yes | no) Whether link to the neighbor is up
uptime (time) Link uptime


Example of BFD neighbor. Neighbor is used by OSPF and is directly connected.

[admin@R3-493G] /routing bfd neighbor> print detail 
Flags: U - up 
 0 U state=up address=10.5.101.1 interface=ether1 protocols=ospf multihop=no 
     state-changes=1 uptime=12s desired-tx-interval=0.2sec 
     actual-tx-interval=0.2sec required-min-rx=0.2sec remote-min-rx=0.2sec 
     multiplier=5 hold-time=1sec packets-rx=76 packets-tx=77 

OSPF

There is only one parameter per OSPF interface to enable BFD

 /routing ospf interface add interface=all use-bfd=yes

BGP

Similar to OSPF, only one option per BGP peer to enable BFD

 /routing bgp peer add remote-address=x.x.x.x remote-as=xxxxx use-bfd=yes

Interoperability

For interoperability with Cisco make sure to disable echo mode (it is enabled on Cisco by default), since it's not supported on MT.

To do that, on Cisco in interface configuration mode type:

no bfd echo


[ Top | Back to Content ]