Subject: [Idr] Proposed change to 9.1.2.2

From: "John G. Scudder" <[email-masked]>
Date: Tue, 30 Sep 2003 11:19:23 -0400

Folks,

There is a minor bug in the MED-handling procedures (9.1.2.2) of the BGP spec:

       c) Remove from consideration routes with less-preferred
       MULTI_EXIT_DISC attributes. MULTI_EXIT_DISC is only comparable
       between routes learned from the same neighboring AS (the neighbor-
       ing AS is determined from the AS_PATH attribute). Routes which do
       not have the MULTI_EXIT_DISC attribute are considered to have the
       lowest possible MULTI_EXIT_DISC value.

       This is also described in the following procedure:

             for m = all routes still under consideration
                 for n = all routes still under consideration
                     if (neighborAS(m) == neighborAS(n)) and (MED(n) < MED(m))
                         remove route m from consideration

       In the pseudo-code above, MED(n) is a function which returns the
       value of route n's MULTI_EXIT_DISC attribute. If route n has no
       MULTI_EXIT_DISC attribute, the function returns the lowest possi-
       ble MULTI_EXIT_DISC value, i.e. 0.

       Similarly, neighborAS(n) is a function which returns the neighbor
       AS from which the route was received.  If the route is learned via
       IBGP, and the other IBGP speaker didn't originate the route, it is
       the neighbor AS from which the other IBGP speaker learned the
       route. If the route is learned via IBGP, and the other IBGP
       speaker originated the route, it is the local AS.

This text assumes that it is always possible to unambiguously 
determine a unique neighbor AS for any route.  However, in principle 
this is not the case, as when a border router performs aggregation 
towards IBGP, leading to a route whose AS path begins with an AS_SET.

To correct this I propose that the following paragraph be added 
immediately following the text quoted above.

       In some cases it may not be possible to determine an unambiguous,
       unique neighbor AS, such as when the AS_PATH attribute begins with
       an AS_SET due to aggregation.  If the neighbor AS of a route cannot
       be determined, the MULTI_EXIT_DISC MUST NOT be compared with the
       MULTI_EXIT_DISC of any other route.  For the purposes of the pseudo-
       code above, this can be accomplished by considering neighborAS(n)
       to return a special distinguished "not found" value (which is not
       equal to any AS value) and MED(n) to return 0 for such routes.

I suppose it might also be worth saying (somewhere else, e.g. under 
the discussion of aggregation) that if you create an aggregated route 
which has an AS_SET as the first element in its AS_PATH, then you 
SHOULD strip the MED out.  This is just belt and suspenders though, 
and I don't much care if we do it or not.

In reality I doubt this case is ever seen in the wild, but it's good 
to have the spec right anyway.

Regards,

--John

_______________________________________________
Idr mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/idr