BGP balancing with outbound traffic

Unanswered Question
Jan 24th, 2008
User Badges:

Hello All,

I have two routers 2811's one with a DS3 and the other with an ethernet feed from two different providers. I am running BGP for the providers and IBGP between routers. I haver very well balanced inbound traffic but I have 90+% of my traffic goes out of one provider. Do you know a way to me to add hops to one of my providers to try to force more traffic to the other. or any other idea ??



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Joseph W. Doherty Thu, 01/24/2008 - 18:09
User Badges:
  • Super Bronze, 10000 points or more

You might also want to look at OER/PfR which can dynamically load balance.

Istvan_Rabai Sat, 01/26/2008 - 13:06
User Badges:
  • Gold, 750 points or more

Hi Casey,

I know a way to add AS-numbers to the path attributes in updates from the ISPs to cause traffic to go through the other router.

You should configure a route map to do this and an access-list to select to which routes you add an additional AS-number.

route-map ADD-AS permit 10

match ip address 1

set as-path prepend 65000

route-map ADD-AS permit 20

You should configure this route-map on the overloaded router under the BGP process with the "neighbor x.x.x.x route-map ADD-AS in" command.

This route-map will do the following:

It will add an additional AS-number (e.g. 65000) to the path attribute of an update coming from the x.x.x.x neighbor for routes permitted by access-list 1.

It will do nothing to routes denied by the access-list.

The result may be that BGP will not choose these selected routes for forwarding packets according to the BGP path selection process, step 4.

It is necessary to note, that a more direct way to achieve this result is to configure the local preference for some selected routes. See the BGP path selection process, step 2.



Danilo Dy Sun, 01/27/2008 - 00:52
User Badges:
  • Blue, 1500 points or more



Do you received full internet route from both provider or you received full internet route from provider-A (>90%) and only default route from provider-B (<10%)?


If you received full internet route from both providers, do you see from the "show ip bgp" that you have two paths to the same destination? This is to make sure that iBGP is configured and working properly.



classeigne Mon, 01/28/2008 - 06:32
User Badges:

Hey Dandy, The answer to both your questions is yes and yes... I have not tried too many things I am still tring to get a pattern to decide the best way to fix this...

Thanks for you reply


amin.amor Wed, 01/30/2008 - 03:22
User Badges:


I have the same situation and my problem is solved by using two HSRP sessions. Each router is used as primary for half of the traffic (I divvied my ip space to two part for example /22 will be 1/23 and 2/23). The traffic from 1/23 is sent to the first router via HSRP and the traffic from 2/23 is sent to the other router via HSRP. This solution also provides you with redundancy in case that one router goes down.

OER is another possible option, but you may end up as test lab for Cisco bugs.

Good luck


Rick Morris Fri, 02/01/2008 - 09:04
User Badges:
  • Silver, 250 points or more

You are looking for a way to share your traffic outbound.


2 Different Providers

Both sending full routes

BGP with both peers

iBGP between your routers

What I don't understand is the bandwidth on both links? are they equal?

Have you tried shutting one bgp session down and seeing doing a sh ip bgp to see the path it takes and compare once it comes back up?

How does your internal traffic know where to go? Is there something set-up that it allways hits one router over the other? If 90% of your traffic hits one router then it will always assume that outbound because to go to the other router outbound will be one more hop.

Haris P Mon, 04/28/2008 - 22:11
User Badges:
  • Bronze, 100 points or more

Dear Casey ,

I think for outbound BGP balancing ( if you receiving default routes from both upstream ) you may have to use PBR .

Prefix A+ Prefix B

Prefix A -----Outgoing thru ISP A

Prefix B -----Outgoing thru ISP B

Route-map ISP_B permit 10

Match as-path 10

Set local preference 200

Router bgp XXXX

neighbor ISP_B route-map ISP_B in

This will set ISP_B routes has a Local preference of 200 and ISP_B will be the default outgoing .

Now make a route-map to make Prefix_A outgoing thru ISP_A , you can use object tracking for this route-map to make sure that prefix_A outgoing is going only when there is reachability thru ISP_A

Route-map outgoing permit 10

Match ip address prefix A

Set ip next-hop ISP_A

Route-map outgoing permit 10

Match ip address prefix A+B

----------this will follow default routing table which is ISP B




This Discussion