On Fri, 4 Dec 2015, Daniel Walton wrote:

I think here we need to mention that if the two paths are both eBGP and
compare router-id is NOT configured, then we prefer the older of the two.  I
think that will help with explaining the router-id knob later.

Ack. Don't know how I didn't include that! Something like:

"@item 10 Already-selected external check

Where both routes were received from eBGP peers, then prefer the route which is already selected. Note that this check is not applied if
@ref{bgp bestpath compare-routerid} is configured."

Note that the code doesn't obviously read that way:

  if (! bgp_flag_check (bgp, BGP_FLAG_COMPARE_ROUTER_ID)
      && new_sort == BGP_PEER_EBGP
      && exist_sort == BGP_PEER_EBGP)
    {
      if (CHECK_FLAG (new->flags, BGP_INFO_SELECTED))
        return 1;
      if (CHECK_FLAG (exist->flags, BGP_INFO_SELECTED))
        return 0;
    }

It probably doesn't make a difference, because one can likely rely on only route being SELECTED at a time, but I had to spend a few seconds telling myself that. It'd be easier to read if that dependency was made explicit and the code made self-documenting:

  if (! bgp_flag_check (bgp, BGP_FLAG_COMPARE_ROUTER_ID)
      && new_sort == BGP_PEER_EBGP
      && exist_sort == BGP_PEER_EBGP)
      && (CHECK_FLAG (new->flags, BGP_INFO_SELECTED)
          != CHECK_FLAG (exist->flags, BGP_INFO_SELECTED)))
  {
     ...
  }

  

      +@deffn {BGP} {bgp bestpath compare-routerid} {}
      +@anchor{bgp bestpath compare-routerid}
      +
      +Ensure that when comparing routes where both are equal on most
      metrics,
      +including local-pref, AS_PATH length, IGP cost, MED, that the
      tie is broken
      +based on router-ID.
      +
      +If this option is enabled, then the external-age check, where
      already
      +selected eBGP routes are preferred, is skipped.
      +

I think one sentence is mainly what need here....mabye change "where already selected eBGP routes are preferred" to "where the oldest eBGP route is preferred".

Or to:

"then the already-selected external check, where an older selected eBGP
 route is preferred"

?

I.e. the oldest route need not be the selected one, so my original tendency to call it an 'age' check seems a bit misleading. ;)
  
      +If a route has an ORIGINATOR_ID attribute because it has been
      reflected,
      +that ORIGINATOR_ID will be used.  Otherwise, the router-ID of
      the peer the
      +route was received from will be used.


I would chop the paragraph above since this is already mentioned in the
bestpath explanation for router-id.

I'd be more likely to chop it from the decision process thing, or just keep both. A lot of readers will be using it as a command reference and not reading it linearly - redundancy may benefit such readers.
  
Ack on everything else.  Thanks for putting this together Paul

Welcome. :)

We possibly have slightly different philosophies on this topic perhaps, but there's a good few details, trade-offs and nuances to it, and it's nice to at least get the agreed ones down to and increase the shared understanding.

MED... such a seemingly simple little attribute, but it's caused a lot of work for people. ;)

There's some other tweaks I might make, based on other previous comments of yours, will follow up.

regards,
--
Paul Jakma, HPE Networking, Advanced Technology Group
Fortune:
If it pours before seven, it has rained by eleven.
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to