Friday, September 11, 2020

IGP metrics in BGP for choosing the best path

I was torn between posting this to fortigate subreddit, since my issue is kind of with Fortigates, but the best path algorithm should be pretty much the same for all vendors. And fortigate subreddit crowd tends to not be as competent. :D

Anyways, my issue is, that I get the same route from different sources, but I need my BGP endpoint to prefer the one with the lowest metric from IGP, but for some reason, it uses some other parameter, but I don't know, which. I have implemented the "set bestpath-as-path-ignore enable", but this should not even come into play here, since the AS path length is the same to this network.

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight RouteTag Path * 10.253.1.0/24 10.255.7.1 2 0 0 65501 ? <-/-> *> 10.255.8.1 3 0 0 65502 ? <-/1> 

Meaning it chose the one with Metric "3" for some reason.

Excerpt from some FortiOS handbook:

  • If there is a tie, break the tie based on the following in descending order of importance: shortest AS_PATH, smallest ORIGIN number, smallest MED, EBGP over IBGP, smallest metric or cost for reaching the NEXT_HOP, BGP identifier, and lowest IP address.

Does anyone know what do they refer to with the "smallest ORIGIN number"? From my understanding, this could be the only one, that breaks the tie before "smallest metric or cost...". But if it is router id, it would not make sense again.

VRF 0 BGP routing table entry for 10.253.1.0/24 Paths: (2 available, best #2, table Default-IP-Routing-Table) Not advertised to any peer Original VRF 0 65501 10.255.7.1 from 10.255.7.1 (10.255.9.1) Origin incomplete metric 2, localpref 100, valid, external Last update: Fri Sep 11 18:51:10 2020 Original VRF 0 65502 10.255.8.1 from 10.255.8.1 (10.255.9.2) Origin incomplete metric 3, localpref 100, valid, external, best Last update: Fri Sep 11 18:51:10 2020 



No comments:

Post a Comment