11.12. Configuring IP BFD

Overview

Function Introduction

An increasingly important feature of networking equipment is the rapid detection of communication failures between adjacent systems, in order to more quickly establish alternative paths. Detection can come fairly quickly in certain circumstances when data link hardware comes into play (such as Synchronous Optical Network (SONET) alarms). However, there are media that do not provide this kind of signaling (such as Ethernet), and some media may not detect certain kinds of failures in the path, for example, failing interfaces or forwarding engine components.

Networks use relatively slow “Hello” mechanisms, usually in routing protocols, to detect failures when there is no hardware signaling to help out. The time to detect failures (“Detection Times”) available in the existing protocols is no better than a second, which is far too long for some applications and represents a great deal of lost data at gigabit rates. Furthermore, routing protocol Hellos are of no help when those routing protocols are not in use, and the semantics of detection are subtly different – they detect a failure in the path between the two routing protocol engines.

The goal of Bidirectional Forwarding Detection (BFD) is to provide low-overhead, short-duration detection of failures in the path between adjacent forwarding engines, including the interfaces, data link(s), and, to the extent possible, the forwarding engines themselves.

An additional goal is to provide a single mechanism that can be used for aliveness detection over any media, at any protocol layer, with a wide range of Detection Times and overhead, to avoid a proliferation of different methods.

image40If ethernet CFM mep is configured on an physical port and CFM LM is enabled, at the same time, IP BFD is configured on an vlan interface and the former physical port is a member of the vlan, IP BFD can’t work normally. If CFM LM is disabled, IP BFD can work normally.

Principle Description

Reference RFC 5880 Bidirectional Forwarding Detection (BFD)

Configuration

Configure BFD single hop

image

Fig. 11.35 BFD single hop

This topology and configuration is for three BFD session ,one session based on static configuration with static route,next session based on OSPF ,and last session relate vrrp.

The following configuration should be operated on all switches if the switch ID is not specified.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the interface configure mode and set the attributes of the interface

Interface configuration for Switch1:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 9.9.9.1/24
Switch(config-if)# bfd interval mintx 3 minrx 3 multiplier 3
Switch(config-if)# exit
Switch(config)# interface eth-0-10
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 10.10.10.1/24
Switch(config-if)# bfd interval mintx 3 minrx 3 multiplier 3
Switch(config)# interface eth-0-11
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 11.11.11.1/24
Switch(config-if)# exit

Interface configuration for Switch2:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 9.9.9.2/24
Switch(config-if)# bfd interval mintx 3 minrx 3 multiplier 3
Switch(config-if)# exit
Switch(config)# interface eth-0-10
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 10.10.10.2/24
Switch(config-if)# bfd interval mintx 3 minrx 3 multiplier 3
Switch(config-if)# ip ospf bfd
Switch(config-if)# exit
Switch(config)# interface eth-0-11
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 11.11.11.2/24
Switch(config-if)# exit

Interface configuration for Switch3:

Switch(config)# interface eth-0-11
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# interface eth-0-12
Switch(config-if)# no shutdown
Switch(config-if)# exit

step 3 Configuring ospf

Configuring Switch1:

Switch(config)# router ospf
Switch(config-router)# network 10.10.10.0/24 area 0
Switch(config-router)# exit

Configuring Switch2:

Switch(config)# router ospf
Switch(config-router)# network 10.10.10.0/24 area 0
Switch(config-router)# exit

step 4 Configuring vrrp

Configuring Switch1:

Switch(config)# router vrrp 1
Switch(config-router)# virtual-ip 11.11.11.100
Switch(config-router)# priority 120
Switch(config-router)# interface eth-0-11
Switch(config-router)# enable
Switch(config-router)# exit

Configuring Switch2:

Switch(config)# bfd test peer-ip 11.11.11.1 interface eth-0-11 auto
Switch(config)# track 1 bfd session test
Switch(config)# router vrrp 1
Switch(config-router)# virtual-ip 11.11.11.100
Switch(config-router)# priority 100
Switch(config-router)# interface eth-0-11
Switch(config-router)# track 1 increment 50
Switch(config-router)# enable
Switch(config-router)# exit

step 5 Configuring static route

Configuring Switch1:

Switch(config)# bfd test peer-ip 9.9.9.2 interface eth-0-9 auto
Switch(config)# ip route 1.1.1.0/24 9.9.9.2 bind bfd test

Configuring Switch2:

Switch(config)# bfd test peer-ip 9.9.9.1 interface eth-0-9 auto
Switch(config)# ip route 2.2.2.0/24 9.9.9.1 bind bfd test

step 6 Exit configure mode

Switch(config)# end

step 7 Validation

Display Switch1 results:

Switch# show bfd session
abbreviation:
LD: local Discriminator. RD: Discriminator
S: single hop session. M: multi hop session.
SD: Static Discriminator. DD: Dynamic Discriminator
A: Admin down. D:down. I:init. U:up.
 ======================================================
LD RD TYPE ST UP-Time Remote-Addr vrf
1 1 S-DD U 00:01:05 9.9.9.2 default
2 2 S-DD U 00:00:25 10.10.10.2 default
Number of Sessions: 2

Display Switch2 results:

Switch# show bfd session
abbreviation:
LD: local Discriminator. RD: Discriminator
S: single hop session. M: multi hop session.
SD: Static Discriminator. DD: Dynamic Discriminator
A: Admin down. D:down. I:init. U:up.
 ======================================================
LD RD TYPE ST UP-Time Remote-Addr vrf
1 1 S-DD U 00:01:27 9.9.9.1 default
2 2 S-DD U 00:00:46 10.10.10.1 default
3 3 S-DD U 00:00:25 11.11.11.1 default
Number of Sessions: 3

Configuring BFD multi-hop

image

Fig. 11.36 BFD multi hop

This topology and configuration is for one BFD session which is based on static multiple bfd for static route,

The following configuration should be operated on all switches if the switch ID is not specified.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the interface configure mode and set the attributes of the interface

Interface configuration for Switch1:

Switch(config)# interface eth-0-11
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 11.11.11.1/24
Switch(config-if)# exit

Interface configuration for Switch2:

Switch(config)# interface eth-0-11
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 11.11.11.2/24
Switch(config-if)# exit
Switch(config)# interface eth-0-12
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 12.12.12.1/24
Switch(config-if)# exit

Interface configuration for Switch3:

Switch(config)# interface eth-0-12
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 12.12.12.2/24
Switch(config-if)# exit

step 3 Configuring static route

Configuring Switch1:

Switch(config)# ip route 12.12.12.2/24 11.11.11.2
Switch(config)# bfd test peer-ip 12.12.12.2 source-ip 11.11.11.1
local 10 remote 20
Switch(config)# ip route 192.168.1.1/24 12.12.12.2 bind bfd test

Configuring Switch3:

Switch(config)# ip route 11.11.11.1/24 12.12.12.1
Switch(config)# bfd test peer-ip 11.11.11.1 source-ip 12.12.12.2 local 20 remote 10
Switch(config)# ip route 2.2.2.2/24 11.11.11.1 bind bfd test

step 6 Exit configure mode

Switch(config)# end

step 7 Validation

Display Switch1 results:

Switch# show bfd session
abbreviation:
LD: local Discriminator. RD: Discriminator
S: single hop session. M: multi hop session.
SD: Static Discriminator. DD: Dynamic Discriminator
A: Admin down. D:down. I:init. U:up.
 ======================================================
LD RD TYPE ST UP-Time Remote-Addr vrf
10 20 S-SD U 00:01:27 12.12.12.2 default

Display Switch3 results:

Switch# show bfd session
abbreviation:
LD: local Discriminator. RD: Discriminator
S: single hop session. M: multi hop session.
SD: Static Discriminator. DD: Dynamic Discriminator
A: Admin down. D:down. I:init. U:up.
 ======================================================
LD RD TYPE ST UP-Time Remote-Addr vrf
20 10 S-SD U 00:01:27 11.11.11.1 default

Application cases

N/A