North American Network Operators Group

Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical

Re: metric 0 vs 'no metric at all'

  • From: Daniel Roesen
  • Date: Tue Jan 03 03:04:38 2006

On Tue, Jan 03, 2006 at 08:21:43AM +0100, Alexander Koch wrote:
> I was wondering if someone had done any or some research on
> this before...

Yup, when troubleshooting the ERXes former wrong handling of
"no MED". :-)

> basically I am not sure with all the many
> implementations of BGP and all the vendors if and what those
> will do when they see a metric of 0 and no metric.

"no MED" is supposed to be equal to "MED=0". Some BGP implementations
(e.g. ERX / Juniper E-Series) have knobs like "bgp bestpath
missing-as-worst" to fiddle with that.

RFC1771 states:

         d) MULTI_EXIT_DISC (Type Code 4):

            This is an optional non-transitive attribute that is a four
            octet non-negative integer. The value of this attribute may
            be used by a BGP speaker's decision process to discriminate
            among multiple exit points to a neighboring autonomous
            system.

   The MULTI_EXIT_DISC attribute may be used on external (inter-AS)
   links to discriminate among multiple exit or entry points to the same
   neighboring AS.  The value of the MULTI_EXIT_DISC attribute is a four
   octet unsigned number which is called a metric.  All other factors
   being equal, the exit or entry point with lower metric should be
   preferred.  If received over external links, the MULTI_EXIT_DISC
   attribute may be propagated over internal links to other BGP speakers
   within the same AS.  The MULTI_EXIT_DISC attribute is never
   propagated to other BGP speakers in neighboring AS's.

So the spec is fuzzy about how "no MED vs. MED=0" should be treated, but
vendors seem to largely agree to "no MED == MED 0". I know of no
deviation, except the old ERX bug which got fixed (ERX treated "no MED"
as best, even better than MED=0 - contrary to documentation).

> I am not an expert knowing the actual protocol's messages exchanged,
> but I see some routes with nothing in the metric field on the
> various show commands, and some have explicit '0' metric.

MED is an optional attribute which may be present or not.


Best regards,
Daniel

-- 
CLUE-RIPE -- Jabber: [email protected] -- [email protected] -- PGP: 0xA85C8AA0