bfd: bidirectional forwarding detection · 2008-08-19 · bfd conclusions very simple very fast...

21
1 © 2003, Junisco.netcom, Inc. All rights reserved. NANOG_2003_06 BFD: Bidirectional Forwarding Detection Forwarding Plane Failover Detection” Dave’s Katz and Ward June, 2003

Upload: others

Post on 11-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

1© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

BFD:Bidirectional Forwarding

Detection

“Forwarding Plane Failover Detection”

Dave’s Katz and Ward

June, 2003

Page 2: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

222© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

What is the problem?

Convergence doesn’t begin until detection of failure

Can’t use Media layer in all cases

Can’t detect FORWARDING PLANE failures

Fundamental assumption of Graceful Restart mechanismsnever tested

Assumption must be correct or GR fails

Routing or signaling protocols have hello mechanismsToo slow

Overloaded semantics of hello packets

Too costly to implement

Protocols with tweaked ‘fast-hellos’ not always in use

Page 3: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

333© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Other Proposed Solutions?

RSVP, ISIS, OSPF Fast-hellos

High cost in terms of impact to router

Overload RP CPU, Large packets, extra information

High level of false alarms

Not able to handle x0ms detection times

Each protocol has own mechanism

Not all can handle unidirectional links

Page 4: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

444© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Other Proposed Solutions.2?

PLP - Protocol Liveness Protocol

Offboard protocol hello mechanism

TLV structure - expensive to parse

Contained extra information about internal state ofrouter

Contained information about init state of protocol

Page 5: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

555© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Other Proposed Solutions.3?

MARP: Multiaccess Redundancy Protocol

TLV based - very flexible

Centralized and distributed components

Solves a different problem in a different environmentStill under SpecificationFor routers and Switches

Can be router to router

Page 6: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

666© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

What is BFD?

Low-overhead, short-duration detection of failures in

the path between adjacent forwarding engines,

including the interfaces, data link(s), and forwarding

planes

Implemented in forwarding engine of the system,

where forwarding and control engines are separated

Decouples the protocol from the fate of the RP

and thus, very useful for GR verification

Page 7: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

777© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

What is BFD.2?

Runs on top of any data protocol being forwardedbetween two systems

Unicast, point-to-point: Multicast doesn’t help

Supports adaptive detection times to balance fastdetection and network stability

Three-way handshake to ensure both systemsare aware of the change

Page 8: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

888© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Overview of BFD

Detect failures in communicating with a data plane

NextHop

Fixed Field

Pair of systems send the message over each path

between two systems

Passed over whatever encapsulation is appropriate

Page 9: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

999© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Overview of BFD.2

Separate session for each communication and data path

between two systems

Able to handle unidirectional links

Each system estimates how quickly they can send and

receive packets in order to come to agreement about how

rapidly a failure detection will take place

Also allows for fast systems to be on a shared medium w/ aslow system allowing for each system to detect failures tothe best of their ability

Page 10: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

101010© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

What does it look like?

In the case of IPv4 or IPv6, BFD packets are transmittedwith source and destination UDP port <TBD> in anIPv4 or IPv6 packet.

Packet:Version

I Hear You

Diagnostic code - why last session was reset

Detection Multiplier

My Discriminator

Your Discriminator

Suggested Min TX interval - Tell other end how fast you want to send packets

Required Min RX interval - Tell other end how fast you are willing to receive

Page 11: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

111111© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

How is it lighter weight?

Once the parameters are negotiated, the values forsubsequent generation of all packets to the remotepeer is known

Once the parameters are negotiated, the values forsubsequent reception of all packets from the remotepeer is known

Thus, we can achieve x0ms detection time

Only have to pay attention when something changes

Page 12: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

121212© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

What are issues?

What is in SW and what is in HW?How fast can it go? Msec timers

Packet loss/delay

Simple detection multiplier

Security

Use TTL = well known value for directly adjacent routers

If not directly adjacent, use addresses not routable outsidethe domain

Page 13: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

131313© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

What do we mean by forwarding plane?

May appear to be a “Link Deadness Detector”

Triggers Diagnostic and can signal forwarding plane down orreset

This can be due to disconnect w/ RP

Inability to update FIB

FIB hosed

Protocols crash and don’t reinit

We can have it triggered by any number of failures

“I Hear You” field, if sent zero tell the remote end that youstopped receiving BFD packets from them.

Page 14: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

141414© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Async mode:

RTRa RTRb

RTRc

Independent streams between devicesControl packets used for liveness detection

Page 15: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

151515© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Echo Mode

Control packets only for parameter negotiation

Allows for very aggressive detection for future:

Far end simply turns around echo packets in forwarding plane as‘regular’ packet

Sender under complete control of response times

RTRa RTRb

RTRc

Page 16: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

161616© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

How does it handle undirectional linksand node failure?

Packets demuxed independently of the interface from which

they were rx’ed

Discriminator fields allow multiple sessions to be rx’ed on

same interface

Page 17: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

171717© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Problem detail for Ethernet Switches: one-wayfailure:

• Following figure illustrates a generic topology:

RTR RTR

Switch

Data Farm

Page 18: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

181818© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

Problem Detail:

If one of the uplinks, for one reason or another failsand goes unidirectional, the link does not alwaysgo to a “up/down” state on the router in a timelyfashion

The router may continue to advertise the link viaIGPs, possibly “black-holing” traffic inbound to theaffected network.

Really, traditional “subnet reachability” problem forrouters

Note: cannot use echo mode with switches

Page 19: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

191919© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

What scenarios can it handle byrunning independent streams?

• Per Address Family Detection

Runs over IPv4 or IPv6

• Per VRF Detection

Can send to/thru packets in different VRFs

Page 20: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

202020© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

BFD Conclusions

Very Simple

Very fast

Easy implementation

Decouple from routing/signaling protocols

Bidirectional and unidirectional forwarding plane failuredetection

Adaptive changes to protocol values to not reset any statemachine

Works without upgrading software in Switches if betweenrouters

Will Replace PLP - no changes to existing routing protocols

Page 21: BFD: Bidirectional Forwarding Detection · 2008-08-19 · BFD Conclusions Very Simple Very fast Easy implementation Decouple from routing/signaling protocols Bidirectional and unidirectional

212121© 2003, Junisco.netcom, Inc. All rights reserved.NANOG_2003_06

BFD Conclusions.2

Detects when the forwarding plane is belly-up