[PATCH] bgp deterministic med

Alexander V. Chernikov melifaro at ipfw.ru
Sun Nov 27 23:09:12 CET 2011


Ondrej Zajicek wrote:
> On Wed, Nov 23, 2011 at 09:13:17PM +0400, Alexander V. Chernikov wrote:
>>> But as you already wrote the patch i could look at it.
>>>
>> It will be great. This version is rather hackish.
> 
> I found how this feature could be implemented in a much simpler
> way - if we just add to a route some 'suppress' flag (which causes
> the route to be skipped in the best route selection) and some
> rte_suppress protocol callback that is called before the best
> route selection that allows the protocol to suppress routes from
> other instances of the protocol.
> 
> Because the deterministic-med best route selection can be considered
> as two-level linear ordering (one within the group of routes with the
> same neighbor ASN, and one with a slightly different ordering on
> the best routes from groups) we could move the lower level to the
> suppress protocol callback (when all routes besides the best in group
> would be marked as suppressed) while the standard rte_recalculate
> would process the unmarked best routes from groups.
Quagga uses the same approach pre-marking the best routes in a group.
I didn't implemented in in first version because I was afraid about
partial route leaking via pipe protocol without appropriate flag filtering.
> 
> This approach makes almost no changes to rte_recalculate() or
> bgp_rte_better(), and as with a route update only one or two
> best-in-group routes can change, we virtually cache the other
> best-in-group routes so the best path selection would be probably faster
> than with rte_best approach. It will also work consistently without
> global deterministic-med option (which is problematic in BIRD approach).
> I will implement it soon.

Thanks!



More information about the Bird-users mailing list