Load balancing across IBGP & EBGP path

Unanswered Question
Jul 19th, 2008

i have a network where in i have one ebgp ckt through a provider to my remote locations & also have a IBGP connection to my remote sites through point to point ckts, now i want to have redundancy as well as load sharing across these two exit points out of which one is ebgp & other is ibgp, can somebody help me out in providing a solution to this problem..

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Marwan ALshawi Sat, 07/19/2008 - 03:59

normaly if u have two routes to the same destination network and one from ibgp and the other from ebgp

the ebgp will always be prefered unless u change the AD for ebgp (which is not recomended)

as work aroung u can use route-maps and ACLs

but it will be better if u post a sample of ur tpology

anuragvats Sat, 07/19/2008 - 22:09

Topology is simple like router R1 connecting to a service provider having EBGP & another router R2 on the same site connecting directly to the the remote office router name R3 by IBGP , router R1 & R2 both have reachability to R3 & subnets behind R3, OSPF is running in the internal network as IGP,my requirement is that i want half of my network to go through R1 to reach R3 & half of the network to go through R2 to reach R3, let me know if some other info is required...



Giuseppe Larosa Sun, 07/20/2008 - 00:16

Hello Anurag

on R2

router bgp yourAS#

neighbor A weight 500

neighbor B weight 500

maximum-paths 2

on the other site: avoid to have a direct iBGP session between R1 and R2

I'm not sure it will work may be some additional commands should be used on R2

Hope to help


royalblues Sun, 07/20/2008 - 01:38

I dont think it will work as the maximum paths command work only when it receives multiple routes from the same AS

For maximum paths to install multiple routes from diff AS you need the hidden command bgp bestpath as-path multipath-relax

But in your case the attributes of the router would differ (As path lengths would be diff for the routes received from IBGP an EBGP) and hence multipath will not work

Lets see if harold can give some advice on this


Giuseppe Larosa Sun, 07/20/2008 - 02:22

Hello Narayan,

I was thinking of that command that you and Harold Ritter had explained in another post but I was not sure about the syntax.

By setting the same weight and both commands it could work

Otherwise R2 would need to ignore AS path length to be able to install both paths

There should be a bgp bestpath as-path ignore


bgp bestpath as-path ignore

To configure Border Gateway Protocol (BGP) to not consider the autonomous system (AS) path during best path route selection, use the bgp bestpath as-path ignore command in router configuration mode. To restore default behavior and configure BGP to consider the AS path during route selection, use the no form of this command.

bgp bestpath as-path ignore

no bgp bestpath as-path ignore



mohammedmahmoud Sun, 07/20/2008 - 05:03

Hi All,

First of all AFIAK we can't load share between iBGP and eBGP (eBGP is always preferred over iBGP) except with VPNv4 (using the "maximum-path eibgp x" command).

As for the as-path ignore and as-path multipath-relax commands, they are mutually exclusive, which is very logically since the first instructs the router to ignore the as-path in the BGP best path selection algorithm (to comply with RFC 1771), and the second informs the router to load share across multiple BGP paths even if the as-path is different, if you tried to configure both you should get this error "% Cannot be used in conjunction with 'bgp bestpath as-path ignore'".

Anyway, lets wait for Harold's wonderful comments.


Mohammed Mahmoud.

Marwan ALshawi Sun, 07/20/2008 - 05:23

Dear Mohammed

i agree with and also my first post here i have mentioned that the ebgp will always be prefered

but i wanted to see the topology with its IGP and BGP to finde a work around

maybe he can use ebgp between all routers i mean make them in deffrent ASs and get the binefit from BGP attributes this is just one way

Anurag : why u r using bgp between r2 and r3 if u have already connecting them through IGP and u have one exit point on each site ? i mesn with ur ISP


Marwan ALshawi Sun, 07/20/2008 - 02:58

it sounds simple but it need a kind of work around to achive it

however i just want u to post ur topology depecting AS numbers and routing protocols and ur private networks

and i will try to solv it

Giuseppe Larosa Mon, 07/21/2008 - 11:48

Hello Anurag,

After having given a look at your configuration files I have the following note

note) you have a single serial from R1 to provider AS 9829 2Mbps is yor pipe.

Between R2 and R3 you have a multilink with two 2Mbps link members

At the moment would be better to use R3-R2 link and to provide preference to iBGP path on R3 and R2

note2) to provide two AS paths of the same length you could:

use AS BGP confederations R3 in one, R1 and R2 in another, have R2 to prepend its own "private" AS

R3 would see EBGP via 9829 65006

and a prepend of ASX ASX for every prefix.

These two should be comparable if we disable preference to eBGP paths over confederations eBGP paths

Hope to help



This Discussion