Claudio Jeker a icrit :

This is not possible in OpenBGPD. I'm not even sure why we should add
something like that. Could you please tell me why you need to change
localpref depending on the path length?
The BGP decision process checks this:
1) nexthop state (reachable or not)
2) localpref
3) as path lenght
4) origin
5) MED
6) EBGP vs. IBGP
7) OpenBGPD special weight
8) nexthop costs (not implemented in OpenBGPD as there is no cost stored
in the routing table)
9) route age if route-age evaluation is enabled
10) BGP Id
11) IP

As you can see the AS Path length is compared right after the localpref so
twisting the localpref depending on the AS Path lenght does not change
that much.
The trouble we have is that we have two upstreams with different bandwidth.

The one with the smallest bandwidth has better routes, so close to all traffic goes through it, which is not optimal.

We already kind of solved inbound traffic using prepending & communities.

We modified "local pref" for the outgoing traffic, but now all traffic goes through the other upstream, and nothing more through the smallest one, which is still not optimal.

What I wanted is to force some kind of discrimination so that smaller AS-paths go through one, and bigger through the other, so that I have an arbitrary way to balance between the two upstreams.

I may try using "prefixlen" insted ... would something like

match prefixlen > 16 set localpref +10

??

Reply via email to