1. Is the NEXT_HOP reachable? Many texts, as well as RFC 1771, mention the fact that if a router does not have a route to the NEXT_HOP PA for a route, it should be rejected in the decision process.
2. Highest administrative weight: This is a Cisco-proprietary feature. The administrative weight can be assigned to each NLRI locally on a router, and the value cannot be communicated to another router. The higher the value, the better the route.
3. Highest LOCAL_PREF PA: This well-known discretionary PA can be set on a router inside an AS, and distributed inside the AS only. As a result, this feature can be used by all BGP routers in one AS to choose the same exit point from their AS for a particular NLRI. The higher the value, the better the route.
4. Locally injected routes: Pick the route injected into BGP locally (using the networkcommand, redistribution, or route summarization). (This step is seldom needed, and is sometimes omitted from other BGP references.)
5. Shortest AS_PATH length: The shorter the AS_PATH length, the better the route.The length calculation ignores both AS_CONFED_SET and AS_CONFED_SEQ, and treats an AS_SET as one ASN, regardless of the number of ASNs in the AS_SET It counts each ASN in the AS_SEQUENCE as one. (This step is ignored if the bgp bestpath as-path ignore command is configured.)
6. ORIGIN PA: IGP (I) routes are preferred over EGP (E) routes, which are in turn preferred over incomplete (?) routes.
7. Smallest Multi-Exit Discriminator (MED) PA: Traditionally, this PA allows an ISP with multiple peer connections to a customer AS to tell the customer AS which of the peer connections is best for reaching a particular NLRI. The smaller the value, the better the route.
8. Neighbor Type: Prefer external BGP (eBGP) routes over internal BGP (iBGP). For thisstep, treat confederation eBGP as equal to iBGP.
9. IGP metric for reaching the NEXT_HOP: IGP metrics for each NLRI’s NEXT_HOPare compared. The lower the value, the better the route.
Three Final Tiebreaker Step
10. Keep the oldest eBGP route. If the routes being
compared are eBGP, and one of the paths is currently the best path, retain the existing
best path. This action reduces eBGP route flaps.
11. Choose the smallest neighbor router ID (RID). Use the route whose next-hop router RID is the smallest. Only perform this step if bgp bestpath compare-routerid is configured.
12. Smallest neighbor ID. To get to this step, the local router has at least two neighbor relationships with a single other router. For this atypical case, the router now prefers the route advertised by the lowest neighbor ID, as listed in that router’s neighbor commands.