11-15-2022 05:20 AM
I have one connection on BGP and other on static
How can i go about it to achieve load balance and failover with BGP and Static connections
can you share how i can achieve this?
.
Thanks
11-15-2022 07:08 AM
if you want static route to be primary so you dont need any thing,
static route AD is lower than eBGP AD and hence router always select static route.
if you want eBGP to be primary then you need PBR to set next-hop is eBGP and if the next-hop failed then the router will use static route as it default behave.
11-15-2022 08:18 AM
Possibly as simple as setting your static route's cost to match BGP's AD. However, it gets more complex if BGP has more specific routes than your static routes.
Regarding failover, if BGP fails, all traffic should use just your statics until BGP comes back. If static path fails, much depends on you statics configuration and nature of failure. Port down on your side will disable statics, but port up but upstream failure will cause statics to black hole traffic. The latter can be dealt with by IP SLA Failover.
11-15-2022 09:47 AM
There are uncomfortable solutions for traffic / load sharing between 2 ISPs.
Most simple solution in your case is a default route to static ISP, so you will use BGP for specific routes and static for others. In case you have also from BGP default route, you can load balance (but per destination, not packet). For known address blocks, you can advertise a summary route from static site
11-15-2022 03:21 PM
There are things about this situation that we do not know and which make this a pretty complicated question. In particular:
- if one connection is on static, then is there a single static route or are there multiple static routes? Is the static route a default static or is/are there static routes for particular networks/subnets?
- does the BGP advertise just a single default route ? Or advertise a set of more specific prefixes? Or advertise both a default route and a set of more specific prefixes?
- does the static route/routes specify just the outbound interface, just a next hop address, or both a next hop address and outbound interface?
- is there any mechanism in the config to verify reachability of the next hop for the static route?
11-15-2022 11:00 PM
Hi Richard,
We asked the ISP on BGP to just give us a default route and we are advertising a single prefix on this link
B* 0.0.0.0/0 [20/0] via 41.x.x.x,
The other ISP(static) we just configured the route with next hop address
ip route 0.0.0.0 0.0.0.0 192.168.5.1
to answer last question, IP SLA is not yet configured but ping and traceroute going to the internet are able to go through this link.
Regards,
11-16-2022 08:32 AM
Ah, then I believe the "simple" solution I suggested earlier might work, i.e. just set the static default route cost to 20, same as BGP's. Then see if both default routes appear in route table.
Again, with BGP being a dynamic routing protocol, router should use it or not depending whether BGP neighbor is "good" or not. For the static, also again, it would only drop, by default, if its egress port drops. To handle fault situations other than that, you'll need an IP SLA, possibly tied to next hop IP. Reference I provided earlier should help explain how to configure.
11-16-2022 09:05 AM
@Joseph W. Doherty I never lab it BUT I dont think it work, the bgp will not add prefix to rib instead it will mark it as rib failure in bgp table.
11-16-2022 09:27 AM
Hmm, @MHM Cisco World interesting possible issue. Unfortunately, I don't have the equipment to lab it. @Richard Burts, your thoughts?
11-16-2022 03:18 PM
As I was reading the thread I thought that your suggestion of setting AD of static to equal that of BGP was a good solution. But the suggestion from MHM about rib failure is vey interesting. I do not have the ability to test it, but I suspect that he may very well be right.
11-16-2022 03:48 PM
I did some searching and found this explanation about rib failure "Route with better administrative distance already present in IGP. For example, if a static route already exists in IP Routing table." Here is the link if you want to check it out:
So if rib failure considers AD then I believe that the suggestion of setting static AD equal to BGP probably will work.
11-16-2022 04:15 PM
Thanks Rick!
I do see in that reference it refers to the IGP having a better AD, not equal AD, so as you note it might work after all.
Perhaps the OP might try it.
11-17-2022 11:44 AM
prefix mark as RIB-failure in bgp table as I guess before.
11-17-2022 01:48 PM
Interesting.
What do you do this on/with?
Could you post configs?
11-18-2022 02:05 AM
Indeed interesting. Not what I expected. But pending config details it does appear that actual experience does trump possible ambiguity in documentation.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide