[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 0.0.0.0 through 128.255.255.255, 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 0.0.0.0 128.0.0.0 <isp1>
>   ip route 128.0.0.0 128.0.0.0 <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,
> 4.0.0.0/8, 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:

  localpref

  path length

  med

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 128.0.0.0
to Sprint.

 access-list 50 permit 128.0.0.0 127.255.255.255
 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 127.255.255.255 rather than the 128.0.0.0 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
correctly.

Thanks again,

Jeff C.



More information about the cisco-nsp mailing list