BFD on LAN
BFD on LAN
BFD overview is covered in the article BFD for MPLS LSPs. This brief article will cover how BFD works on LAN with OSPF and ISIS as IGP, and see how it works differently for both.
OSPF
Here, R2 is configured to be the Designated Router (DR) for this LAN while the priorities for R3 and R4 is set to 0. All routers are ASR9Ks with IOS-XR 4.3.0. In IOS-XR, by default, the mode is Asynchronous and Echo function is enabled.
The BFD configuration for OSPF is as below:
BFD for OSPF
router ospf 1
area 0
interface Gi 0/0/1/0.100
bfd fast-detect
bfd minimum-interval 100
bfd multiplier 3
!
From the following output, it can be seen that R2 is elected as the DR for the LAN.
RP/0/RSP0/CPU0:R2#show ospf interface brief
Sat Aug 10 14:30:21.443 UTC
* Indicates MADJ interface, (P) Indicates fast detect hold down state
Interfaces for OSPF 1
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Gi0/0/1/0.100 1 0 10.1.1.1/24 1 DR 2/2
With R2 as DR, R3 and R4 will form OSPF FULL neighborship with R2, and 2-WAY neighborship with each other. This causes BFD to form sessions with DR and BDR only. So R3 and R4 have BFD session with R2 only.
RP/0/RSP0/CPU0:R3# show bfd session
Sat Aug 10 14:30:50.138 UTC
Interface Dest Addr Local det time(int*mult) State
Echo Async
------------------- --------------- ---------------- ---------------- ----------
Gi0/0/1/0.100 10.1.1.1 300ms(100ms*3) 6s(2s*3) UP
The show bfd session detail shows OSPF as client of BFD.
RP/0/RSP0/CPU0:R3# show bfd session detail
Sat Aug 10 14:31:17.596 UTC
I/f: GigabitEthernet0/0/1/0.100, Location: 0/0/CPU0
Dest: 10.1.1.1
Src: 10.1.1.3
State: UP for 0d:0h:12m:26s, number of times UP: 1
Session type: PR/V4/SH
Received parameters:
Version: 1, desired tx interval: 2 s, required rx interval: 2 s
Required echo rx interval: 1 ms, multiplier: 3, diag: None
My discr: 2148073475, your discr: 2148073475, state UP, D/F/P/C/A: 0/0/0/1/0
Transmitted parameters:
Version: 1, desired tx interval: 2 s, required rx interval: 2 s
Required echo rx interval: 1 ms, multiplier: 3, diag: None
My discr: 2148073475, your discr: 2148073475, state UP, D/F/P/C/A: 0/0/0/1/0
Timer Values:
Local negotiated async tx interval: 2 s
Remote negotiated async tx interval: 2 s
Desired echo tx interval: 100 ms, local negotiated echo tx interval: 100 ms
Echo detection time: 300 ms(100 ms*3), async detection time: 6 s(2 s*3)
Local Stats:
Intervals between async packets:
Tx: Number of intervals=100, min=1668 ms, max=1991 ms, avg=1813 ms
Last packet transmitted 961 ms ago
Rx: Number of intervals=100, min=1665 ms, max=2005 ms, avg=1833 ms
Last packet received 1020 ms ago
Intervals between echo packets:
Tx: Number of intervals=50, min=5202 ms, max=5202 ms, avg=5202 ms
Last packet transmitted 98 ms ago
Rx: Number of intervals=50, min=5200 ms, max=5205 ms, avg=5202 ms
Last packet received 95 ms ago
Latency of echo packets (time between tx and rx):
Number of packets: 100, min=1 ms, max=5 ms, avg=3 ms
Session owner information:
Desired Adjusted
Client Interval Multiplier Interval Multiplier
-------------------- --------------------- ---------------------
ospf-1 100 ms 3 2 s 3
However, since LAN being Transit link (link-type 2) in OSPF, R3 and R4 can have each other as next-hops for any prefixes advertised by them into the LAN even though they do not have FULL adjacency with each other. In that case, BFD is rendered unimportant since it is unable to detect if the next-hop is available or not.
However, that is not the case with ISIS as we will see next. It seems a bit counter-intuitive as IGP is the client of BFD, yet with OSPF, BFD only forms session with DR and BDR. This is due to the fact that BFD does not have any discovery mechanism and hence relies on the routing protocol. So when OSPF requests BFD session to a neighbor, BFD relies on OSPF Hello protocol to discover the neighbors.
IS-IS
The configuration is fairly simple as below:
BFD for ISIS
router isis CORE
interface Gi 0/0/1/0.100
bfd fast-detect ipv4
bfd minimum-interval 100
bfd multipler 3
!
IS-IS elects a Designated IS (DIS) on LAN. The principle behind the DIS is similar to DR in OSPF - reduce number of LSP advertisements on the LAN when an adjacency changes from UP to DOWN, and vice versa.
However, all routers still form adjacency with each other in IS-IS - they just advertise the DIS adjacency (its actually Pseudo-node rather than DIS, but in general discussion, these terms are interchangeable, and adjacencies are advertised in IS Reachability TLV 2 or 22 within the LSP) to the rest of the network. So, BFD session is formed to all routers on the LAN. In this case, R3 and R4 have BFD session with each other as well as with R2.
RP/0/RSP0/CPU0:R3# show bfd session
Sat Aug 10 13:56:34.542 UTC
Interface Dest Addr Local det time(int*mult) State
Echo Async
------------------- --------------- ---------------- ---------------- ----------
Gi0/0/1/0.100 10.1.1.1 300ms(100ms*3) 6s(2s*3) UP
Gi0/0/1/0.100 10.1.1.4 300ms(100ms*3) 6s(2s*3) UP
Summary
ISIS can take full advantage of BFD on LAN as BFD session is formed between all routers on the LAN. With OSPF, BFD only forms session with DR and BDR. So the next-hop failure detection is not always possible with BFD when OSPF is used on LAN.
References:
RFC 5880
https://supportforums.cisco.com/docs/DOC-33907
http://www.ietf.org/mail-archive/web/rtg-bfd/current/msg00851.html