> sh ip bgp regexp _3320_ (next hop addrs removed)
> 
>     Network          Next Hop     Metric LocPrf Weight Path
> * i81.201.32.0/20   x.x.x.x          90     50      0 702 3320 ?
> *>i                 y.y.y.y         100     50      0 286 3320 ?
> 
> We have:
> 1. same local pref.
> 2. equal as-path length
> 3. metric on incoming (!) route map set manually to 90 for next hop
>     x.x.x.x, and to 100 for y.y.y.y because I would prefer x.x.x.x over
>     y.y.y.y if 1. and 2. are equal, because I learned once that
>     smaller metric wins.

Metric on external routes really is the MED of the route. Ciscos 
by default compare MEDs only of routes among the same peer AS (so if
you had 2 uplinks with AS286, MED comparison would use the lower metric
among those two gateways). Note that this behavior is very reasonable,
because normally if you don't set your metric manually, you get whatever
IGP metric your peer attaches to the route. You can't really compare a
metric from ISP1's IGP to the IGP metric of ISP2, they could be completely
different (one running OSPF, the other ISIS). If you always override the
metric in route-maps, you could use "bgp always-compare-med".

If you only want to do route-selection locally on this router, use weights
instead of metric. If you want to distribute the preference within your backbone, 
use local-pref.

Markus
-- 
VIA NET.WORKS (Schweiz) AG
Riedstrasse 1, CH-6343 Rotkreuz, Switzerland
Telefon: +41 41 798 2121 / Fax: +41 41 798 2122
Markus Wild, Manager Engineering, e-mail: [EMAIL PROTECTED]
_______________________________________________
swinog mailing list
[EMAIL PROTECTED]
http://lists.init7.net/cgi-bin/mailman/listinfo/swinog

Reply via email to