The BFD Admin Down state message is used to bring down a BFD session administratively (applicable for normal BFD sessions and micro BFD sessions), to protect client applications from BFD configuration removal, license issues, and the clearing of BFD sessions.
In recent Junos versions, we can set the state of static route when a BFD Admin Down state message is received from BFD peer.
If we do not set the bfd-admin-down under the "routing-options static" stanza explicitly, the state of static route in BFD Admin Down state follows the default mode. The default mode varies in Junos software versions.
Before version 15.1, after the fix of PR849415 , Junos does not bring down static route when it receives BFD Admin Down state.
From version 16.1R1, after the fix of PR1070477 , we can set the state of static route in BFD Admin Down state.
CLI Introduced:
set routing-options static static-route bfd-admin-down active set routing-options static static-route bfd-admin-down passive
active mode - BFD Admin Down state pulls down the static route passive mode - BFD Admin Down state does not pull down the static route
When the bfd-admin-down is not configured, the default mode is passive , which does not bring down static route when it receives BFD Admin Down state message from BFD peer.
From versions 16.1R5/16.2R2/17.1R3/17.2R2/17.3R1 and higher, after the fix of PR1275973 , the default mode is active . When bfd-admin-down is not configured, static route is deleted with the BFD Admin Down state message from BFD peer.
Topology:
MX80 xe-0/0/0 ------------------ xe-2/0/0 MX104
==== MX80 config ==== set interfaces xe-0/0/0 unit 0 family inet address 123.0.2.1/24 set routing-options static route 40.2.0.0/16 next-hop 123.0.2.2 set routing-options static route 40.2.0.0/16 bfd-liveness-detection minimum-receive-interval 500 set routing-options static route 40.2.0.0/16 bfd-liveness-detection multiplier 4 set routing-options static route 40.2.0.0/16 bfd-liveness-detection transmit-interval minimum-interval 500 ==== MX104 config ==== set interfaces xe-2/0/0 unit 0 family inet address 123.0.2.2/24 set routing-options static route 40.1.0.0/16 next-hop 123.0.2.1 set routing-options static route 40.1.0.0/16 bfd-liveness-detection minimum-receive-interval 500 set routing-options static route 40.1.0.0/16 bfd-liveness-detection multiplier 4 set routing-options static route 40.1.0.0/16 bfd-liveness-detection transmit-interval minimum-interval 500
The 'bfd-admin-down' is not configured under "routing-options static" stanza.
User@MX80> show bfd session Detect Transmit Address State Interface Time Interval Multiplier 123.0.2.2 Up xe-0/0/0.0 2.000 0.500 4 1 sessions, 1 clients Cumulative transmit rate 2.0 pps, cumulative receive rate 2.0 pps
When MX80 receives BFD Admin Down message from BFD peer MX104, the static route is NOT deleted. The default mode is passive in 17.2R1.13.
User@MX80> show version Hostname: MX80 Model: mx80 Junos: 17.2R1.13 User@MX80> show route protocol static 40.2.0.0 |refresh 2 ---(refreshed at 2019-07-08 14:13:42 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:04:12 > to 123.0.2.2 via xe-0/0/0.0 ---(refreshed at 2019-07-08 14:13:44 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:04:14 > to 123.0.2.2 via xe-0/0/0.0 User@MX104> clear bfd session all ---(refreshed at 2019-07-08 14:13:46 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:04:16 > to 123.0.2.2 via xe-0/0/0.0 ---(refreshed at 2019-07-08 14:13:48 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:04:18 > to 123.0.2.2 via xe-0/0/0.0 ---(refreshed at 2019-07-08 14:13:50 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:04:20 > to 123.0.2.2 via xe-0/0/0.0 ---(refreshed at 2019-07-08 14:13:52 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:04:22 > to 123.0.2.2 via xe-0/0/0.0 ---(refreshed at 2019-07-08 14:13:54 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:04:24 > to 123.0.2.2 via xe-0/0/0.0
When MX80 receives BFD Admin Down message from BFD peer MX104, the static route is deleted. The default mode is active in 17.2R2.8.
User@MX80> show version Hostname: MX80 Model: mx80 Junos: 17.2R2.8 User@MX80> show route protocol static 40.2.0.0 |refresh 2 ---(refreshed at 2019-07-08 15:01:39 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:01:06 > to 123.0.2.2 via xe-0/0/0.0 ---(refreshed at 2019-07-08 15:01:41 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:01:08 > to 123.0.2.2 via xe-0/0/0.0 User@MX104> clear bfd session all ---(refreshed at 2019-07-08 15:01:45 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:01:12 > to 123.0.2.2 via xe-0/0/0.0 ---(refreshed at 2019-07-08 15:01:47 JST)---
Note: The static route 40.2.0.0/16 is deleted with the 'clear bfd session' CLI command on MX104.
'clear bfd session'
---(refreshed at 2019-07-08 15:01:49 JST)--- inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.2.0.0/16 *[Static/5] 00:00:00 > to 123.0.2.2 via xe-0/0/0.0