5

I have 2 different carriers on my Cisco 2921 router and I have set weight to 350 for my first carrier to force it for my outbound traffic, and I set second carrier weight to 300.

I am receiving BGP full table from both providers.

My problem here is when my BGP session with carrier #1 disconnects, it takes about 5-10 minutes for the routes received from carrier #1 to be deleted from my routing table so to force my outbound to second carrier. How can I solve this issue? Is there anyway when BGP session with carrier #1 disconnects, all routes are removed immediately ?

  • 2
    Is it really 5-10 minutes, or is it 3 minutes (normal BGP timers)? When things stop working, it can seem like forever. – Ron Trunk Jun 3 at 16:03
  • it takes about at least 5m, so whats your idea for solve this? how can if force immediately set next hop to my backup provider? – Blackmetal Jun 3 at 16:22
  • 2
    A related question: If you prefer one carrier over the other, why are you receiving full routes? Why not a default route only? Processing 500,000 routes takes significant time, especially on a small router). – Ron Trunk Jun 3 at 16:50
  • 3
    You do not need the full routing table to have backups the way you describe; you only need default routes with different ADs. You could then have a faster failover. – Ron Maupin Jun 3 at 17:27
  • 7
    A Cisco 2921, seriously? I'm amazed it's even able to hold 2 full tables. The root cause of your problems is that the CPU in those boxes are not able to cope with losing a full table. Either switch to defaults only (as was suggested in some answers) or upgrade to a model which was designed for this purpose. – Teun Vink Jun 3 at 19:40
6

Another solution, as suggested by @ronmaupin 's comment, is to not accept any BGP routes at all and instead use static default routes (with different administrative distance for each ISP) along with object tracking.

You can ping an internal router of the ISP with IP SLA and use that to track the default route. That will fail over in a few seconds, instead of 3 minutes for BGP.

  • i just tried change my parameter from weight to local prefrence and then shutdown my interface and i see right now it takes 1 minutes and 30 seconds for change to carrier 2! there is much difference between local pref and weight, anyone knows why ? – Blackmetal Jun 3 at 19:48
  • 3
    Shutting down the interface converges much faster than losing a peer. – Ron Trunk Jun 4 at 1:21
  • i tried shuting down interface, disbale ip address, shutdown bgp session all of them has same reslt for local pref. – Blackmetal Jun 4 at 4:36
  • 3
    You are confusing two separate things. Using weight or local preference makes no difference. They are both simply prefix attributes. Stopping the routing process or disabling an interface will be faster, because the router knows immediately that routes need to be removed. If you lose a peer, you have to wait up to 3 minutes before you even know that happened. – Ron Trunk Jun 4 at 11:54
7

There are two issues here:

  1. BGP keepalives are 60 seconds, and the hold down timer is 3 times that. So that's your lower limit, unless you work with your carrier and adjust your timers. You both need to have the same timer values.

  2. You are receiving full routes from both carriers. That's over 400,000 routes from each carrier. So your router needs to process that many entries when a carrier drops a session. That can take time on a small router like a 2900.

One idea is to only receive default routes from your carrier. You can still use local preference to prioritize carriers, but it's much faster to process one route than 400,000. Don't forget that you are still limited by #1.

  • 3
    Make that 770k routes per transit provider. BFD could help solve some of the issues with BGP hold timers. – Teun Vink Jun 3 at 18:00
  • your mean is if i use local pref instead weight , it will process routes faster ? so in a case when one of my bgp session drop local pref change to second provider faster than weight atribute? – Blackmetal Jun 3 at 18:01
  • @Blackmetal No. I assumed you meant local preference because of the value (350). Weight is usually a much higher value. But it's the same problem either way. – Ron Trunk Jun 3 at 18:07
  • 3
    Neither one is faster. The problem is you have too many routes to process. – Ron Trunk Jun 3 at 18:12
  • 1
    That is correct. Too many routes and too weak a router. – Ron Trunk Jun 4 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.