[nsp] eBGP routes not balancing

Jeff Chan cisco-nsp at jeffchan.com
Tue Nov 18 05:24:41 EST 2003

On Tuesday, November 18, 2003, 1:16:58 AM, Gert Doering wrote:
> On Mon, Nov 17, 2003 at 02:59:02PM -0800, Steve Francis wrote:
>> One way I've made the load balancing more equal in such situations is to 
>> apply a route map to one of the peers, that says if the route learned is 
>> for an IP in the range through, it has a 
>> local_pref of 90; everything else from that peer has a local_pref of 110.
>> The local_pref of the other peer will have the default of 100.

> Doing that means your BGP setup could as well be replaced by two
> half-default routes

>   ip route <isp1>
>   ip route <isp2>

> as setting local-pref will override everything else, including (and most
> important) path length...

> So if ISP 1 is presenting you a veeeeeeeerrry long path to, say,
>, and ISP 2 has really top connectivity to that network, your
> policy will still force out everything via ISP 1.

> A more reasonable approach would be to achieve the same goal using MED
> (and "bgp always-compare-med").  That way, the manual balancing will only
> affect networks that you see over equal-length paths.

Hi Gert,
Good point.  Using MED allows path lengths to take precedence
since the order of precedence (in descending order, ignoring
other tests) is:


  path length


Since it's generally a good idea to keep using path lengths
(since they result in somewhat intelligent routing decisions),
I agree setting MEDs are preferable over setting localprefs
in this application.

I added the following access list and route map to
one provider (Sprint) to send networks above
to Sprint.

 access-list 50 permit
 access-list 50 deny   any

 route-map PREFER-HIGH-NETS permit 10
  match ip address 50
  set metric 7
  set local-preference 100
 route-map PREFER-HIGH-NETS permit 20
  set metric 20
  set local-preference 100

Note that I believe the mask for half of the Internet should
be rather than the in your example.

There is another route map not shown that sets MED on
routes from the other peer to 10.  (local pref is explicitly
stamped as 100 on all incoming routes so it's not a factor in
the decisions.)

Looking at the route selections, everything seems to be working

Thanks again,

Jeff C.

More information about the cisco-nsp mailing list