Reference Guide
Border Gateway Protocol IPv4 (BGPv4) | 187
• AS_CONFED_SEQUENCE has a path length of 1, no matter how many ASs are in the 
AS_CONFED_SEQUENCE. 
5. Prefer the path with the lowest ORIGIN type (IGP is lower than EGP, and EGP is lower than 
INCOMPLETE).
6. Prefer the path with the lowest Multi-Exit Discriminator (MED) attribute. The following criteria apply:
• This comparison is only done if the first (neighboring) AS is the same in the two paths; the MEDs 
are compared only if the first AS in the AS_SEQUENCE is the same for both paths.
• If the 
bgp always-compare-med command is entered, MEDs are compared for all paths.
• Paths with no MED are treated as “worst” and assigned a MED of 4294967295.
7. Prefer external (EBGP) to internal (IBGP) paths or confederation EBGP paths.
8. Prefer the path with the lowest IGP metric to the BGP next-hop is selected when synchronization is 
disabled and only an internal path remains.
9. FTOS deems the paths as equal and does not perform steps 9 through 11 listed below, if the following 
criteria is met: 
• the IBGP multipath or EBGP multipath are configured (
maximum-path command)
• the paths being compared were received from the same AS with the same number of ASs in the AS 
Path but with different NextHops
• the paths were received from IBGP or EBGP neighbor respectively
10. If the 
bgp bestpath router-id ignore command is enabled and:
• If the Router-ID is the same for multiple paths (because the routes were received from the same 
route) skip this step.
• If the Router-ID is NOT the same for multiple paths, Prefer the path that was first received as the 
Best Path. The path selection algorithm should return without performing any of the checks 
outlined below.
11. Prefer the path originated from the BGP router with the lowest router ID. For paths containing a Route 
Reflector (RR) attribute, the originator ID is substituted for the router ID. 
12. If two paths have the same router ID, prefer the path with the lowest cluster ID length. Paths without a 
cluster ID length are set to a 0 cluster ID length.
13. Prefer the path originated from the neighbor with the lowest address. (The neighbor address is used in 
the BGP neighbor configuration, and corresponds to the remote peer used in the TCP connection with 
the local router.)
After a number of best paths is determined, this selection criteria is applied to group’s best to determine the 
ultimate best path.
In non-deterministic mode (the 
bgp non-deterministic-med command is applied), paths are compared in 
the order in which they arrive. This method can lead to FTOS choosing different best paths from a set of 
paths, depending on the order in which they were received from the neighbors since MED may or may not 
get compared between adjacent paths. In deterministic mode, FTOS compares MED between adjacent 
paths within an AS group since all paths in the AS group are from the same AS.










