ip route bfd

Syntax

ip route <destination network A.B.C.D> {<subnet mask A.B.C.D> | /<prefix length>} {<next hop A.B.C.D> | vlan <VLAN ID>} {bfd source-ip <IP address A.B.C.D> | bfd destination-ip <IP address A.B.C.D>}

no ip route <destination network A.B.C.D> {<subnet mask A.B.C.D> | /<prefix length>} {<next hop A.B.C.D> | vlan <VLAN ID>} {bfd source-ip <IP address A.B.C.D> | bfd destination-ip <IP address A.B.C.D>}

Description

Enables bidirectional forwarding detection under IP static routing.

The no form disables bidirectional forwarding detection in the specified static route. The no form removes only the BFD configuration provided the bfd option is given. Otherwise, the entire static route along with the BFD configuration is removed

NOTE:

A maximum of 64 BFD sessions (shared between OSPF, VRRP, and STATIC) are supported. A maximum of 16 static route BFD sessions is supported. All other BFD parameters (like detect multiplier, transmit/receive intervals, authentication) are automatically obtained from the associated VLAN interface of the bfd source-ip.

Parameters

destination network A.B.C.D
IP address mask of the destination network.
subnet mask A.B.C.D
IP address of the subnet mask.
prefix length
Network mask length for the destination.
NOTE:

The length parameter must be preceded by / (forward slash).

next hop A.B.C.D
IP address of the next hop.
vlan vlan-id
Specifies the destination VLAN for this route.
bfd source-ip IP address A.B.C.D
Specifies the local router source IP, which sends BFD packets to the next hop destination in order to monitor connectivity with it. This option is required when the next hop IP is specified in the IP route command.
bfd destination-ip IP address A.B.C.D
Specifies the next hop destination IP to which BFD packets are sent from the local source IP configured on a specified VLAN. This option is required when the destination VLAN is specified in the IP route command.

Restrictions

  • A maximum of 16 unique (src/dst combinations) static route BFD sessions is supported.

  • A single Static Route BFD session can be shared with multiple static routes having the same next-hop IP and BFD source IP. It is recommended that you keep the total number of static routes, whose next-hop shares the same physical link, under 64.

  • BFD is supported on single-hop ipv4 static routes. Multi-hop functionality is not supported. BFD neighbors must be no more than one IP hop away for Echo mode.

  • BFD for Static Route is not supported over management VLAN. BFD source IP address should not be DHCP learned.

  • BFD authentication mismatches can cause the registered applications (OSPF and STATIC) to flap.

  • BFD is resource intensive protocol. Setting aggressive control timers for static routes further impacts the system, which could lead to session flaps. It is recommended that a transmit interval be a minimum of 2. Instead, use Echo mode to achieve faster failure detection.

  • BFD is only a failure detection protocol. As the number of routes increases, there can be a slight increase in the route convergence times, even though the failure detection times do not change.

  • If BFD Echo enters the disabled state on any session, it remains there. After fixing the connectivity issues, the administrative state must be toggled to re-enable it.

  • Once a static route BFD session is UP, any change in BFD authentication causing mismatch for the static route BFD session results in a complete removal of the static route from the RIB until the BFD authentication mismatch is resolved. If a mismatch exists before the session is established, the session remains DOWN. The route is undisturbed. BFD can take action only if the session is UP and then transitions to DOWN or vice-versa.

Usage

There are two distinct ways to configure the static route. BFD configuration is allowed on each type of static route configuration:

  • Method 1: Configure the gateway as the IP-address of the next-hop device.

  • Method 2: Configure the gateway as the vlan-id to which the next-hop device is connected.

Example

Configuring static route BFD using next hop IP and BFD source IP. All other BFD parameters (like detect multiplier, transmit/receive intervals, authentication) are automatically obtained from the associated VLAN interface of the bfd source-ip. In the following example, the BFD parameters are obtained from VLAN 10.

Switch 1: Ip route <destination-network/prefix-length> <gateway-ip> bfd {source-ip | destination-ip} <IP-Address-on-self-device>

BFD is enabled between self-device and the peer-device for the static route configured with gateway as Nexthop-IP-Address (Method 1):

switch(config)# ip route 172.192.4.0/24 172.16.4.2 bfd source-ip 172.16.4.1
switch(config)#
switch(config)# show running-config

Running configuration:

; J9850A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9992a
ip route 172.192.4.0 255.255.255.0 172.16.4.2 bfd source-ip 172.16.4.1
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
bfd enable
bfd echo-src-ip-address 2.2.2.2
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A21
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   bfd min-echo-receive-interval 700
   ip address 172.16.4.1 255.255.255.0
   exit
no allow-v2-modules

Switch(config)# show bfd


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 2.2.2.2

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 9098
  Total Number of Control Packets Received     : 9096
  Total Number of Control Packets Dropped      : 16

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.1       172.16.4.2       Enabled    Up          STATIC
Switch(config)#

Switch 2:

switch(config)# ip route 15.212.178.0/24 172.16.4.1 bfd source-ip 172.16.4.2
switch(config)#
switch(config)# show run

Running configuration:

; J9850A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9989a
ip route 15.212.178.0 255.255.255.0 172.16.4.1 bfd source-ip 172.16.4.2
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
bfd enable
bfd echo-src-ip-address 3.3.3.3
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A24
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   bfd min-echo-receive-interval 700
   ip address 172.16.4.2 255.255.255.0
   exit
no allow-v2-modules

Switch(config)# show bfd


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 3.3.3.3

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 9138
  Total Number of Control Packets Received     : 9119
  Total Number of Control Packets Dropped      : 27

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.2       172.16.4.1       Enabled    Up          STATIC

Example

Configuring static route BFD using destination VLAN and BFD destination IP. All other BFD parameters (like detect multiplier, transmit/receive intervals, authentication) are automatically obtained from the associated VLAN interface of next-hop vlan-id. In the following example, the BFD parameters are obtained directly from VLAN 10.

Switch 1: Ip route <destination-network> <network-mask> vlan <gateway-vlan> bfd destination-ip <IP-Address-configured-on-peer-device>

BFD is enabled between self-device and the peer-device for the static route configured with gateway as Nexthop-Vlan-Id (Method 2):

switch(config)# ip route 192.172.4.0/24 vlan 10 bfd destination-ip 172.16.4.2
switch(config)#
switch(config)# show running-config

Running configuration:

; J9850A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9992a
ip route 192.172.4.0 255.255.255.0 vlan 10 bfd destination-ip 172.16.4.2
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
bfd enable
bfd echo-src-ip-address 2.2.2.2
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A21
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   bfd min-echo-receive-interval 700
   ip address 172.16.4.1 255.255.255.0
   exit
no allow-v2-modules

Switch(config)# show bfd


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 2.2.2.2

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 9226
  Total Number of Control Packets Received     : 9172
  Total Number of Control Packets Dropped      : 59

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.1       172.16.4.2       Enabled    Up          STATIC
Switch(config)#

Switch 2:

switch(config)# ip route 0.0.0.0 0.0.0.0 172.16.4.1 bfd source-ip 172.16.4.2
switch(config)# show running-config

Running configuration:

; J9850A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9989a
ip route 0.0.0.0 0.0.0.0 172.16.4.1 bfd source-ip 172.16.4.2
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
bfd enable
bfd echo-src-ip-address 3.3.3.3
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A24
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   ip address 172.16.4.2 255.255.255.0
   bfd min-echo-receive-interval 700
   exit
no allow-v2-modules

Switch(config)# show bfd-session


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 3.3.3.3

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 9256
  Total Number of Control Packets Received     : 9194
  Total Number of Control Packets Dropped      : 57

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.2       172.16.4.1       Enabled    Up          STATIC
Switch(config)#

Example

Sharing a BFD session between STATIC and OSPF applications. When BFD is enabled for both STATIC and OSPF applications over the same pair of source and destination IPs, a single BFD session can be used to monitor the connectivity.

Switch 1:

switch(config)# ip route 200.1.12.0 255.255.255.0 172.16.4.2 bfd source-ip 172.16.4.1
switch(config)# show run

Running configuration:

; J9850A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9992a
ip route 200.1.12.0 255.255.255.0 172.16.4.2 bfd source-ip 172.16.4.1
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
router ospf
   area backbone
   enable
   exit
bfd enable
bfd echo-src-ip-address 2.2.2.2
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A21
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   bfd min-echo-receive-interval 700
   ip address 172.16.4.1 255.255.255.0
   ip ospf 172.16.4.1 area backbone
   ip ospf 172.16.4.1 bfd
   exit
no allow-v2-modules

Switch(config)# show bfd


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 2.2.2.2

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 4330
  Total Number of Control Packets Received     : 4333
  Total Number of Control Packets Dropped      : 4

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.1       172.16.4.2       Enabled    Up          OSPF/STATIC

Switch 2:

switch(config)# ip route 0.0.0.0/0 172.16.4.1 bfd source-ip 172.16.4.2
switch(config)#
switch(config)# show running-config

Running configuration:

; J9850A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9989a
ip route 0.0.0.0 0.0.0.0 172.16.4.1 bfd source-ip 172.16.4.2
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
router ospf
   area backbone
   enable
   exit
bfd enable
bfd echo-src-ip-address 3.3.3.3
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A24
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   bfd min-echo-receive-interval 700
   ip address 172.16.4.2 255.255.255.0
   ip ospf 172.16.4.2 area backbone
   ip ospf 172.16.4.2 bfd
   exit
no allow-v2-modules

Switch(config)# show bfd


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 3.3.3.3

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 8980
  Total Number of Control Packets Received     : 8974
  Total Number of Control Packets Dropped      : 0

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.2       172.16.4.1       Enabled    Up          OSPF/STATIC
Switch(config)#

Note with respect to the previous example:

  • If BFD configuration is removed on SWITCH-1 on vlan-10 on EITHER OSPF or STATIC, still the BFD session is maintained as UP on SWITCH2 with OSPF/STATIC applications. SWITCH1 maintains the session only with BFD enabled application in this case.

  • If OSPF or STATIC Configuration itself is removed on SWITCH-1 on vlan-10, still the BFD session is maintained as UP on SWITCH2 with OSPF/STATIC applications. SWITCH1 maintains the session only with configured application in this case.

  • If BFD configuration is removed on SWITCH-1 on vlan-10 on BOTH OSPF and STATIC, the BFD session will go DOWN on SWITCH2 with OSPF/STATIC applications. SWITCH1 does not maintain any session.

  • If OSPF and STATIC Configuration are removed on SWITCH-1 on vlan-10, the BFD session is maintained as DOWN on SWITCH2 with STATIC applications. SWITCH1 does not maintain any session.

  • If OSPF adjacency breaks due to any reason (for example change in OSPF authentication etc) on SWITCH-1, BFD session will be maintained in UP state since STATIC is also registered on it.

Example

Sharing a single static route BFD session with multiple static routes having the same next-hop IP and BFD source IP.

Switch 1:

switch(config)# ip route 192.172.4.0/24 172.16.4.2 bfd source-ip 172.16.4.1
switch(config)# ip route 192.172.5.0/24 vlan 10 bfd destination-ip 172.16.4.2
switch(config)# ip route 192.172.6.0/24 172.16.4.2 bfd source-ip 172.16.4.1


Switch(config)# show run

Running configuration:

; J9851A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9992a
module L type j9987a
ip route 192.172.4.0 255.255.255.0 172.16.4.2 bfd source-ip 172.16.4.1
ip route 192.172.5.0/24 vlan 10 bfd destination-ip 172.16.4.2
ip route 192.172.6.0/24 172.16.4.2 bfd source-ip 172.16.4.1
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
bfd enable
bfd echo-src-ip-address 2.2.2.2
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A21,L1-L24
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   ip address 172.16.4.1 255.255.255.0
   exit
no allow-v2-modules

Switch(config)# show bfd


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 2.2.2.2

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 158
  Total Number of Control Packets Received     : 153
  Total Number of Control Packets Dropped      : 203

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.1       172.16.4.2       Enabled    Up          STATICVV

Switch 2:

switch(config)# ip route 15.212.178.0/24 172.16.4.1 bfd source-ip 172.16.4.2
switch(config)#
switch(config)# show run

Running configuration:

; J9850A Configuration Editor; Created on release #KB.16.04.0000x
; Ver #10:1b.7f.bf.bb.ff.7c.59.fc.7b.ff.ff.fc.ff.ff.3f.ef:01
hostname "switch"
module A type j9989a
ip route 15.212.178.0 255.255.255.0 172.16.4.1 bfd source-ip 172.16.4.2
ip routing
snmp-server community "public" unrestricted
oobm
   ip address dhcp-bootp
   exit
bfd enable
bfd echo-src-ip-address 3.3.3.3
vlan 1
   name "DEFAULT_VLAN"
   no untagged A1
   untagged A2-A24
   ip address dhcp-bootp
   exit
vlan 10
   name "VLAN10"
   untagged A1
   ip address 172.16.4.2 255.255.255.0
   exit
no allow-v2-modules

Switch(config)# show bfd


 Bidirectional Forwarding Detection (BFD) Information

  Administrative Status : Enabled
  Echo Source IP        : 3.3.3.3

  Maximum number of sessions supported         : 128
  Number of sessions reserved for internal use : 0
  Total Number of Sessions : 1
  Number of Sessions Up    : 1
  Number of Sessions Down  : 0

  Global Statistics:
  Total Number of Control Packets Transmitted  : 9138
  Total Number of Control Packets Received     : 9119
  Total Number of Control Packets Dropped      : 27

  Session  VLAN   Source IP        Destination IP   Echo       State       Application
  -------- ------ ---------------- ---------------- ---------- ----------- -----------
  1        10     172.16.4.2       172.16.4.1       Enabled    Up          STATIC
Switch(config)#
NOTE:

A single static route BFD session can be shared with multiple static routes having same next-hop IP and BFD source IP. It is recommended that you keep the total number of static routes whose next-hop shares the same physical link to under 64.