On Wed, Jan 24, 2024 at 5:23 AM Chris Adams <cma@cmadams.net> wrote:
Once upon a time, William Herrin <bill@herrin.us> said:
On Tue, Jan 23, 2024 at 4:00 PM Chris Adams <cma@cmadams.net> wrote:
Once upon a time, William Herrin <bill@herrin.us> said:
Nevertheless, in the protocol's design, the one expressed in the RFC's, AS path length = distance.
The RFC doesn't make any equivalence between AS path length and distance. You are the one trying to make that equivalence,
Respectfully Chris, you are mistaken.
https://datatracker.ietf.org/doc/html/rfc4271#section-9.1.2.2
"a) Remove from consideration all routes that are not tied for having the smallest number of AS numbers present in their AS_PATH attributes."
So literally, the first thing BGP does when picking the best next hop is to discard all but the routes with the shortest AS path.
That's literally not the first thing - you skipped section 9.1.1.
Phase 1 is local pref. That's what 9.1.1 says. As implied by the word "local," it's set locally by the local operator, not by the origin, though many providers offer haphazard mechanisms that sometimes have some impact if the origin doesn't mind playing whack-a-mole with BGP communities. Unless locally configured to selectively change the local pref off the default, all routes have the same local pref. So it moves to phase 2 (section 9.1.2). This matches what I've been saying for the entire thread: unless the operator intentionally makes the route worse, it follows the shortest AS path. Per the RFC.
It also literally says nothing about distance.
BGP is a distance-vector protocol. BGP's authors preferred different terminology so they used different terminology. Nevertheless, BGP is a distance-vector protocol and when you ask what it uses to determine distance, the answer is the AS path length because all the other criteria are policy functions not distance functions. Want to go another few rounds with pedantry over word choice, or can we leave it there? Regards, Bill Herrin -- William Herrin bill@herrin.us https://bill.herrin.us/