Logo

EcoRouter

EcoNAT

EcoQOE

EcoBypass

English

BFD protocol EcoRouter Documentation / BFD protocol

Bidirectional Forwarding Detection

Bidirectional Forwarding Detection (BFD) is a protocol for drop link quick detection between routers. BFD allows to detect a loss of connectivity more quickly in comparison with conventional mechanisms using routing protocols. BFD, like routing protocols, uses the Hello messages exchange, but with much shorter dispatch intervals, measured in tens of milliseconds (while for routing protocols the intervals for sending Hello messages are measured in tens of seconds). The BFD protocol is often used along with the LFA functionality for fast switching to the alternative route (read more in the "Loop-Free Alternate (LFA) в OSPF" section of this manual).

The BFD configuration commands on EcoRouter are shown in the table below:


Command

Description

bfd disable

The command is available in the context configuration mode (config-if). As a result of the command execution all the bfd-sessions on the interface are disabled (are set to Admin-Down state). The default value is enabled.

bfd echo

The command is available in the configuration mode (config). As a result of the command execution the echo-function will be enabled with the default parameters for all the bfd-sessions. The default value is disabled.

bfd echo interval <1-4294967>

The command is available in the context configuration mode (config-if). As a result of the command execution the interval for sending echo messages in milliseconds will be set for all bfd sessions on the interface. The default value is 1000.

bfd interval <25-999> minrx <25-999> multiplier <3-50>

The command is available in the context configuration mode (config-if). As a result of the command execution for all the bfd-sessions the following parameters will be specified: the interval for sending bfd-control messages in milliseconds, the expected interval for receiving bfd-control messages in milliseconds, the number of lost messages after which the session is considered to be broken. The default values are 250/250/3.

bfd all-interfaces

The command is available in the context configuration mode (config-router). As a result of the command execution the bfd-sessions will be established with all OSPF neighbors in appropriate OSPF process


Starting from the version 3.2.6.1.16715 the echo function is not supported in the BFD protocol!
The BFD show commands on EcoRouter are shown in the table below:


Command

Description

ecorouter#show bfd
BFD ID: 00      Start Time:Tue Nov 21 08:45:34 2017
BFD Admin State: UP
Number of Sessions:    1
Slow Timer: 2000        Image type: MONOLITHIC
Echo Mode: Disabled     BFD Notifications disabled
Next Session Discriminator:    2

Display global BFD parameters.

Start Time - the oamd process start time;

BFD Admin State - the protocol administrative state on the device;

Number of Sessions - number of active sessions;

Slow Timer - slow timer value;

Image type - hello packets processing type (MONOLITHIC - by one process, DISTRIBUTED - by several processes);

Echo Mode - echo-function state (enabled/disabled);

BFD Notifications - notification state (enabled/disabled);

Next Session Discriminator - next session's which will be established identifier

ecorouter#show bfd interface
Interface: loopback.0  ifindex: 8 state:   UP
Interface level configuration: NO ECHO, NO SLOW TMR
Timers in Milliseconds
Min Tx: 250  Min Rx: 250  Multiplier: 3

Interface:        te0  ifindex: 9 state:   UP
Interface level configuration: NO ECHO, NO SLOW TMR
Timers in Milliseconds
Min Tx: 250  Min Rx: 250  Multiplier: 3

Display information of BFD parameters for all interfaces where BFD is enabled.

Interface - interface name;

ifindex - system serial number of interface;

state - interface state;

Interface level configuration - interface BFD parameters;

Min Tx - interval for sending bfd-control messages;

Min Rx - expected interval for receiving bfd-control messages;

Multiplier - number of lost messages after which the session is considered to be broken



ecorouter#show bfd session
Sess-Idx   Remote-Disc  Lower-Layer  Sess-Type   Sess-State  UP-Time   Remote-Addr
1          1            IPv4         Single-Hop  Up          01:12:50  10.1.1.1/32
4          1            IPv4         Single-Hop  Up          00:00:01  20.1.1.1/32
Number of Sessions:    2

Display information of all active bfd-sessions.

Sess-Idx - session local id;

Remote-Disc - session id on remote device;

Lower-Layer - incapsulating protocol;

Sess-Type - session type (single/multi);

Sess-State - session state;

UP-Time - session up-time;

Remote-Addr - interface address of remote router which session established on;

Number of Sessions - number of active sessions

ecorouter#show bfd session detail
======================================================

Session Interface Index : 9              Session Index : 1
Lower Layer : IPv4                       Version : 1
Session Type : Single Hop                Session State : Up
Local Discriminator : 1                  Local Address : 10.1.1.2/32
Remote Discriminator : 1                 Remote Address : 10.1.1.1/32
Local Port : 49152                       Remote Port : 3784
Options :

Diagnostics : None

Timers in Milliseconds :
Min Tx: 250               Min Rx: 250               Multiplier: 3
Neg Tx: 250               Neg Rx: 2000              Neg detect mult: 3
Min echo Tx: 1000         Min echo Rx: 1000         Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled

Counters values:
Pkt In : 0000000000007f5f                Pkt Out : 0000000000007f5a
Echo Out : 0000000000000000              UP Count : 1                       UPTIME : 01:58:53

Protocol Client Info:
OSPF-> Client ID: 4      Flags: 4
----------------------------------------------------------
Number of Sessions:    1

Display detailed information of all active bfd-sessions.

Session Interface Index - system serial number of local interface;

Lower Layer - incapsulating protocol;

Session Type - session type (single/multi);

Local Discriminator - local session id;

Remote Discriminator - session id on remote device;

Local Port - local UDP port;

Session Index - session local id;

Session State - session state;

Local Address - interface address of local router which session established on;

Remote Address - interface address of remote router which session established on;

Remote Port - remote UDP port;

Min Tx/Neg Tx - local/remote interval for sending bfd-control messages;

Min Rx/Neg Rx - local/remote expected interval for receiving bfd-control messages;

Multiplier/Neg detect multi - number of lost messages after which the session is considered to be broken. Values for local/remote routers;

Min echo Tx/Min echo Rx - local/remote interval for sending echo messages;

Sess down time - session break time;

Sess discontinue time - period during which the session was down;

Bfd GTSM - GTSM function state;

Bfd Authentication - authentication function state;

Pkt In - number of incoming BFD packets;

Pkt Out - number of outgoing BFD packets;

Echo Out - number of outgoing echo packets;

UPTIME - session up-time;

Protocol Client Info - protocol used for session establishment;

Number of Sessions - number of active sessions

ecorouter#show bfd session 10.1.1.2 10.1.1.1

Session Interface Index : 9              Session Index : 1
Lower Layer : IPv4                       Session Type : Single Hop                
Session State : Up
Local Discriminator : 1                  Remote Discriminator : 1
Local Address : 10.1.1.2/32              Remote Address : 10.1.1.1/32
Local Port : 49152                       Remote Port : 3784
Timers in Milliseconds :
Min Tx: 250           Min Rx: 250        Multiplier: 3
UP Count : 1                             UPTIME : 03:10:33

Display information of session between individual local interface with a specific id and remote interfae with a specific id.

Session Interface Index - system serial number of local interface;

Lower Layer - incapsulating protocol;

Session State - session state;

Session Index - session local id;

Session Type - session type (single/multi);

Local Discriminator - session local id;

Local Address -  interface address of local router which session established on;

Local Port - local UDP port;

Remote Discriminator - session id on remote device;

Remote Address -  interface address of remote router which session established on;

Remote Port - remote UDP port;

Min Tx - local interval for sending bfd-control messages;

Min Rx - local expected interval for receiving bfd-control messages;

Multiplier - number of lost messages after which the session is considered to be broken;

UPTIME - session up-time

Example of single-hop BFD-OSPF configuration

EcoRouter1 configuration:

Interface and port configuration:

ecorouter(config)#port te0
ecorouter(config-port)#service-instance si0
ecorouter(config-service-instance)#encapsulation untagged
 
ecorouter(confige)#interface loopback.0
ecorouter(config-lo)#ip address 1.1.1.1/32

ecorouter(config)#interface te0
ecorouter(config-if)#ip address 10.1.1.1/24
ecorouter(config-if)#connect port te0 service-instance si0

OSPF configuration and BFD enabling:

ecorouter(config)#router ospf 100
ecorouter(config-router)#ospf router-id 1.1.1.1
ecorouter(config-router)#network 1.1.1.1/32 area 0.0.0.1
ecorouter(config-router)#network 10.1.1.0/24 area 0.0.0.1
ecorouter(config-router)#bfd all-interfaces

Echo function enabling:

ecorouter(config)#bfd echo

EcoRouter2 configuration:

Interface and port configuration:

ecorouter(config)#port te0
ecorouter(config-port)#service-instance si0
ecorouter(config-service-instance)#encapsulation untagged
 
ecorouter(confige)#interface loopback.0
ecorouter(config-lo)#ip address 2.2.2.2/32

ecorouter(config)#interface te0
ecorouter(config-if)#ip address 10.1.1.2/24
ecorouter(config-if)#connect port te0 service-instance si0

OSPF configuration and BFD enabling:

ecorouter(config)#router ospf 100
ecorouter(config-router)#ospf router-id 2.2.2.2
ecorouter(config-router)#network 2.2.2.2/32 area 0.0.0.1
ecorouter(config-router)#network 10.1.1.0/24 area 0.0.0.1
ecorouter(config-router)#bfd all-interfaces

Echo function enabling:

ecorouter(config)#bfd echo