summaryrefslogtreecommitdiff
path: root/docs/configuration/protocols/bfd.rst
blob: 260e86fb1f349c72ff945268356a9d8a2d3a1d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
:lastproofread: 2023-01-27

.. include:: /_include/need_improvement.txt

.. _routing-bfd:

###
BFD
###

:abbr:`BFD (Bidirectional Forwarding Detection)` is described and extended by
the following RFCs: :rfc:`5880`, :rfc:`5881` and :rfc:`5883`.

In the age of very fast networks, a second of unreachability may equal millions of lost packets.
The idea behind BFD is to detect very quickly when a peer is down and take action extremely fast.

BFD sends lots of small UDP packets very quickly to ensures that the peer is still alive.

This allows avoiding the timers defined in BGP and OSPF protocol to expires.

Configure BFD
=============

.. cfgcmd:: set protocols bfd peer <address>

   Set BFD peer IPv4 address or IPv6 address

.. cfgcmd:: set protocols bfd peer <address> echo-mode

   Enables the echo transmission mode

.. cfgcmd:: set protocols bfd peer <address> multihop

   Allow this BFD peer to not be directly connected

.. cfgcmd:: set protocols bfd peer <address> source
   [address <address> | interface <interface>]

   Bind listener to specific interface/address, mandatory for IPv6

.. cfgcmd:: set protocols bfd peer <address> interval echo-interval <10-60000>

   The minimal echo receive transmission interval that this system is
   capable of handling

.. cfgcmd:: set protocols bfd peer <address> interval multiplier <2-255>

   Remote transmission interval will be multiplied by this value

.. cfgcmd:: set protocols bfd peer <address> interval
   [receive | transmit] <10-60000>

   Interval in milliseconds

.. cfgcmd:: set protocols bfd peer <address> shutdown

   Disable a BFD peer


Enable BFD in BGP
-----------------

.. cfgcmd:: set protocols bgp neighbor <neighbor> bfd

   Enable BFD on a single BGP neighbor

.. cfgcmd:: set protocols bgp peer-group <neighbor> bfd

   Enable BFD on a BGP peer group


Enable BFD in OSPF
------------------

.. cfgcmd:: set protocols ospf interface <interface> bfd

   Enable BFD for OSPF on an interface

.. cfgcmd:: set protocols ospfv3 interface <interface> bfd

   Enable BFD for OSPFv3 on an interface


Enable BFD in ISIS
------------------

.. cfgcmd:: set protocols isis <name> interface <interface> bfd

   Enable BFD for ISIS on an interface



Operational Commands
====================

.. opcmd:: show bfd peers

   Show all BFD peers

   .. code-block:: none

      BFD Peers:
           peer 198.51.100.33 vrf default interface eth4.100
                   ID: 4182341893
                   Remote ID: 12678929647
                   Status: up
                   Uptime: 1 month(s), 16 hour(s), 29 minute(s), 38 second(s)
                   Diagnostics: ok
                   Remote diagnostics: ok
                   Local timers:
                           Receive interval: 300ms
                           Transmission interval: 300ms
                           Echo transmission interval: 50ms
                   Remote timers:
                           Receive interval: 300ms
                           Transmission interval: 300ms
                           Echo transmission interval: 0ms

           peer 198.51.100.55 vrf default interface eth4.101
                   ID: 4618932327
                   Remote ID: 3312345688
                   Status: up
                   Uptime: 20 hour(s), 16 minute(s), 19 second(s)
                   Diagnostics: ok
                   Remote diagnostics: ok
                   Local timers:
                           Receive interval: 300ms
                           Transmission interval: 300ms
                           Echo transmission interval: 50ms
                   Remote timers:
                           Receive interval: 300ms
                           Transmission interval: 300ms
                           Echo transmission interval: 0ms

BFD Static Route Monitoring 
===========================

A monitored static route conditions the installation to the RIB on the BFD 
session running state: when BFD session is up the route is installed to RIB,
but when the BFD session is down it is removed from the RIB.

Configuration
-------------

.. cfgcmd::  set protocols static route <subnet> next-hop <address> 
   bfd profile <profile>

   Configure a static route for <subnet> using gateway <address> 
   and use the gateway address as BFD peer destination address.

.. cfgcmd::  set protocols static route <subnet> next-hop <address> 
   bfd multi-hop source <address> profile <profile>
   
   Configure a static route for <subnet> using gateway <address> 
   , use source address to indentify the peer when is multi-hop session 
   and the gateway address as BFD peer destination address.

.. cfgcmd::  set protocols static route6 <subnet> next-hop <address> 
   bfd profile <profile>

   Configure a static route for <subnet> using gateway <address> 
   and use the gateway address as BFD peer destination address.

.. cfgcmd::  set protocols static route6 <subnet> next-hop <address> 
   bfd multi-hop source <address> profile <profile>
   
   Configure a static route for <subnet> using gateway <address> 
   , use source address to indentify the peer when is multi-hop session 
   and the gateway address as BFD peer destination address.

Operational Commands
====================

.. opcmd:: show bfd static routes

   Showing BFD monitored static routes

   .. code-block:: none

      Showing BFD monitored static routes:

        Next hops:
          VRF default IPv4 Unicast:
              10.10.13.3/32 peer 192.168.2.3 (status: installed)
              172.16.10.3/32 peer 192.168.10.1 (status: uninstalled)
      
          VRF default IPv4 Multicast:
      
          VRF default IPv6 Unicast: