cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4753
Views
0
Helpful
5
Replies

BGP with 2 ISP with automatic failover and load balancing

Sameer Vashisth
Level 1
Level 1

We need to configure BGP with 2 ISP on Single Router, with load balancing and failover. The current configuration is providing load balancing but if ISP1 link goes down, then browsing stops but if ISP2 goes down then we are able to browse. We have added 2 default routes for both ISP. The network diagram is attached.

 

Our BGP configuration is:

router bgp ZZZZZ

 no synchronization

 bgp log-neighbor-changes

 network 3.3.3.0 mask 255.255.255.0

 redistribute static

 neighbor 1.2.3.1 remote-as XXXXX

 neighbor 1.2.3.1 soft-reconfiguration inbound

 neighbor 2.2.3.1 remote-as YYYYY

 neighbor 2.2.3.1 soft-reconfiguration inbound

 no auto-summary

 

ip route 0.0.0.0 0.0.0.0 1.2.3.1

ip route 0.0.0.0 0.0.0.0 2.2.3.1

 

Regards

Sameer

5 Replies 5

Hello
 

ip as-path access-list 1 permit ^$


route-map AS permit 10
 set as-path prepend ZZZ ZZZ ZZZ

route-map AS permit 99

 

router bgp zzz
 neighbor 1.2.3.1 remote-as XXXX
 neighbor 1.2.3.1 weight 40000 (most preffered outbound traffic)
 neighbor 1.2.3.1 filter-list 1 out ( prohibits transit traffic betwen ISPs)

neighbor 2.2.3.1 remote-as YYYY
neighbor 2.2.3.1 weight 30000
neighbor 2.2.3.1 filter-list 1 out ( prohibits transit traffic betwen ISPs)
neighbor 2.2.3.1 route-map AS out ( upstream from ISP2 see a less prefferd to reach AS111 via ISP2)
 

res

Paul

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi Sameer, 

as you would like to setup a load sharing scenario with automatic failover, I would like to ask you a couple of questions:

Are you getting full, partial or default routes from the ISPs ?

What kind of providers are ISP-1 and ISP-2 ? Tier-1, Tier-2..? as you are advertising the same prefix /24 to both providers, the load sharing ratio will depend on the "positioning" of the ISP´s in Internet, so you must take this into account and you might need to manipulate the BGP attributes of the prefix you are advertising in order to get a better utilization of the links.

You said that "current configuration is providing load balancing", but in your configuration I do not see any manipulation to achieve this:

- Outbound path selection: the router will install the routes of one ISP in the RIB and therefore there is going to be just one exit point, unless the other fails. 

You could achieve load sharing with the solution that Tagir proposes with "maximum-paths 2" but I am afraid this will not work as the prefixes you are receiving from both ISP´s are coming from different ASNs. For this to work you, should configure "bgp bestpath as-path multipath-relax"  in addition to "maximum-paths" ,assuming you´re getting the same prefixes from both providers.

- Inbound path selection: here you need to know the ISP´s positioning in Internet and then, maybe, play with prepending. 

I agree with Paul´s proposal of using the AS-PATH filter to avoid using your AS as transit.

Hope this helps,

Jose.

after 

"maximum-paths 2" 

the router will install two default routes

and it will use two routes for upstream

 

u can check every step

sh ip bgp

sh int

and ask your providers do u need to filter upstream updates. usually they do. because nobody wants problems

 

 

Hi Jose,

Both our ISP's are providing default routes only, and both are Tier -1 ISP. 

Tagir Temirgaliyev
Spotlight
Spotlight

for upstream load-balancing u need

router bgp ZZZZZ

 neighbor 1.2.3.1 remote-as XXXX
 neighbor 1.2.3.1 weight 30000
 
neighbor 2.2.3.1 remote-as YYYY
neighbor 2.2.3.1 weight 30000

maximum-paths 2

 

please provide

sh ip bgp

sh ip route

sh bgp nei

and ask your providers do u need to filter upstream updates. usually they do.

Review Cisco Networking for a $25 gift card