Can anybody help me in a scenario where i have 4 routers in a ring topology. OSPF is running with BFD and topology is R1 <-> R2 <-> R3 <-> R4 <-> R1. Suppose i get link degradation on link between R2 <-> R3. I create an EEM which increases the ospf link cost on R2 and traffic is rerouted from R2 to R1 instead of R2 to R3. What EEM trigger should i use to get it back to normal routing, which is ideally R2 to R3.
I just did some work like this. In order to detect a return to health, you need to use something like IPSLA to run traffic over all segments. You can use route-maps to make sure this traffic flows over the desired path no matter what OSPF says. Assuming you don't need a huge amount of traffic to detect the degradation, then this will work fine.
After implementing the eem and rerouting traffic to other node during degradation, Is there anyway to check if interface errors like input, output, crc etc are increasing or stable over a period of time?
This is what IPSLA is for. IPSLA ensures some traffic continues to flow over the degraded link so that EEM can still test for errors. The error deltas themselves can be produced by saving previous values into an EEM context, retrieved, and then checked against current values.
As I said previously, this assumes that the rate at which IPSLA produces traffic is sufficient to trigger the errors on the degraded links.