Saturday 3 March 2012

Cisco Carrier Delay

Here are some quick tips on fast convergence on Cisco using Carrier Delay.

The quickest way to converge a network is when the router notices an interface go down, this is controlled by the carrier delay setting.  On WAN circuits, or where switches are between two routers, we may need to rely on our IGP/BGP/BFD timers, so this is not a replacement for tuning those parameters too.


By default Cisco routers will wait 2 seconds before signalling an interface has gone down to the routing table.  To signal this immediately use the following.

(config)# interface gi0/0
(config-if)# carrier-delay down msec 0
(config-if)# carrier-delay down up 10

Notice I have also told the router to wait 10 seconds before bringing the interface up again, this is to protect against link flaps.  To provide additional protection against link flaps then IGP dampening should also be configured on the interface

(config-if)# dampening

It should be noted that if you're using protected circuits then bringing down the circuit straight away may not be the desired behavior.  For these links it is usually desirable to tune the msec down interval to be higher than the protection switchover time.

However, there is still one more piece of tuning we can do.  By default, IOS will signal the interface down event to the RIB.  This will cause the RIB to walk the whole routing table looking for routes using the interface (this process is not very efficient).  Next, it will remove the RIB and CEF entries and cause the IGP to re-converge. Once the IGP has converged a new RIB and CEF entry is created, so we end up with two RIB and CEF events.  We can change this behaviour so interface down events are signalled to the routing protocol (not the RIB), this is much more efficient and also means we only get a single RIB and CEF event.  This is configured like so

(config)# ip routing protocol purge interface

About the Author

The author of this blog works for Vanguard IT who provide a range of professional services and managed services

For more information go to https://vanguard-it.net

3 comments:

  1. Very interesting post. Helped me with a recent Audit in several equipment.

    ReplyDelete
  2. Dude , great doc!!!
    Regards
    CCIE R&S , future to be CCIE SP as well :P

    ReplyDelete
  3. If you enter a 10 second delay before the interface can even come back up, I don't think dampening will ever take effect. With a half life of 5 seconds, you'll be at 250 penalty before the interface can go down again causing a second dampening penalty to occur. You'll never hit the 2000 mark to actually have any effect.

    ReplyDelete