Chapter 2 Advanced Routing for FortiOS 5.0 : Border Gateway Protocol (BGP) : BGP background and concepts : How BGP works : BGP path determination — which route to use
  
BGP path determination — which route to use
Firstly, recall that the number of available or supported routes is not set by the configuration but depends on your FortiGate’s available memory. All learned routes and their attributes come into the BGP router in raw form. Before routes are installed in the routing table or are advertised to other routers, three levels of decisions must be made.
The three phases of BGP best path determination do not change. However, some manufacturers have added more information to the process, such as Cisco’s WEIGHT attribute to enable an administrator to force one route’s selection over another.
There is one Adj-RIB-IN and Adj-RIB-OUT for each configured neighbor. They are updated when the FortiGate unit receives BGP updates, or when the FortiGate unit sends out BGP updates.
Figure 107: Three phases of BGP routing decision