Tuesday, March 6, 2012

BFD


Fundamentals of BFD

BFD is a network protocol intended to provide a lightweight, lowoverhead,
short-duration detection of failures in the path between
two systems.
 If a system stops receiving BFD messages, it is assumed that a
failure along the path has occurred and the associated protocol is
notified of the failure. The routing protocol must then take action
to bypass the failure.
 If more than one link exists between two systems, multiple BFD
sessions may be established to monitor each of the links.
BFD control packets are sent over UDP with destination port number 3784 and source port number in the 49 152 to 65
535 range.
BFD establishes a session between two endpoints over a particular link. If more than one link exists between two
systems, multiple BFD sessions may be established to monitor each link. The session is established with a three-way
handshake, and is torn down the same way. Authentication may be enabled on the session.




In order to create a BFD session, BFD should be configured at the
interface and routing protocol levels.
 BFD does not have a discovery mechanism; sessions must be
explicitly configured between endpoints.
 BFD can provide failure detection in less than one second.
 BFD is not tied to any particular routing protocol.
For BFD to work, it must be enabled at the interface and routing protocol levels and configured on both routers.
Once BFD has been enabled on the interfaces and at the router level for the appropriate routing protocols, a BFD
session is created, BFD timers are negotiated, and the BFD peers will begin to send BFD control packets to each other
at the negotiated interval.


BFD Operation Establishing a neighbor:-







OSPF neighbors discovered.
 OSPF sends a request to the local BFD process to initiate a BFD
neighbor session with the OSPF neighbor.
 The BFD neighbor session with the OSPF neighbor router is
established.
The above slide illustrates a simple network with two routers running OSPF and BFD. When OSPF discovers a neighbor
it sends a request to the local BFD process, which initiates a BFD neighbor session with the OSPF neighbor router. The
BFD neighbor session with the OSPF neighbor router is now established.




BFD operation Failure Detection:-







When a failure occurs in a network:
1. The BFD neighbor session with the OSPF neighbor router is torn
down.
2. BFD notifies the local OSPF process that the BFD neighbor is no
longer reachable.
3. The local OSPF process tears down the OSPF neighbor relationship.
4. Routers converge on alternative path, if available.
When a failure occurs in the network:
1. The BFD neighbor session with the OSPF neighbor router is torn down.
2. BFD notifies the local OSPF process that the BFD neighbor is no longer reachable.
3. The local OSPF process tears down the OSPF neighbor relationship.
4. If an alternative path is available, the routers will immediately start converging on it.

Configuring BFD( Enabling a BFD Session):-



To enable BFD on an interface, use the following command:
Context: config>router>interface
Syntax: bfd [100..100000]* receive [100..100000]* multiplier [3..20]
Example: configure router
interface “to-R2"
address 10.1.2.1/24
port 1/1/1
bfd [100..100000]* receive [100..100000]* multiplier [3..20]
exit
bfd <transmit-interval>[receive<receive-interval>][multiplier<multiplier>]
<transmit-interval> : [100..100000] in milliseconds
<receive-interval> : [100..100000] in milliseconds
<multiplier> : [3..20] number of missed packets before interface is brought down
The multiplier specifies the number of consecutive BFD messages that must be missed from the peer before the BFD
session state is changed to down and the upper level protocols (OSPF, IS-IS, or PIM) are notified of the fault. The
default value is 3 if the multiplier is not specified.
The default is 100 ms for the transmit and receive interval.




Enabling BFD for OSPF:-



To enable BFD for OSPF, use the following command:
Context: config>router>ospf>area>if#
Syntax: [no] enable-bfd
Example:configure router ospf
area 0.0.0.0
interface "system"
exit
interface “to-R1“
enable-bfd
exit


Enabling BFD for ISIS:-



Enabling BFD for IS-IS
 To enable BFD for IS-IS, use the following command:
Context: config>router>isis>interface#
Syntax: [no] enable-bfd
Example:configure router isis
area 49.0001
interface "system"
exit
interface “to-R1“
enable-bfd
exit

Enabling BFD for Static routes:-




config router interface <interface-name>
Config router static-route 10.10.1.10/32 next-hop 10.1.1.2 bfdenable

BFD must be configured on the router interface prior to enabling it on
the static route.
config router interface <interface-name>
Config router static-route 10.10.1.10/32 next-hop 10.1.1.2 bfdenable
BFD is intended to provide a lightweight, low-overhead, short-duration detection of failures in the path between 2
systems.
If a system stops receiving BFD messages, it is assumed that a failure along the path has occurred, and the associated
protocol or service is notified of the failure.
BFD control packets are sent over UDP with destination port number 3784 and source port number in the range 49
152 to 65 535. A path is only declared operational when 2-way communication has been established between the
systems. If multiple BFD sessions exist between 2 nodes, the BFD discriminator is used to demultiplex the BFD control
packet to the appropriate BFD session.
bfd-enable — Associates the state of the static route to a BFD session between the local system and the configured
next-hop. This keyword cannot be configured if the next-hop is indirect or the blackhole keyword is specified.

Verifying BFD
 To verify BFD, use the following command:
A:R1# show router bfd session
====================================================
BFD Session
====================================================
Interface State Tx Intvl Rx Intvl Mult
Remote Address Protocol Tx Pkts Rx Pkts
----------------------------------------------------
To-R2 Up (3) 100 100 3
10.1.2.2 ospf2 3478 3471
------------------------------------------------------
No. of BFD sessions: 1










No comments:

Post a Comment