The Phase 1 decision function shall be invoked whenever the local BGP speaker receives an UPDATE message from a peer located in a neighboring autonomous system that advertises a new route, a replacement route, or a withdrawn route.
The Phase 1 decision function is a separate process which completes when it has no further work to do.
The Phase 1 decision function shall lock an Adj-RIB-In prior to operating on any route contained within it, and shall unlock it after operating on all new or unfeasible routes contained within it.
For each newly received or replacement feasible route, the local BGP speaker shall determine a degree of preference. If the route is learned from a BGP speaker in the local autonomous system, either the value of the LOCAL_PREF attribute shall be taken as the degree of preference, or the local system shall compute the degree of preference of the route based on preconfigured policy information. If the route is learned from a BGP speaker in a neighboring autonomous system, then the degree of preference shall be computed based on preconfigured policy information. The exact nature of this policy information and the computation involved is a local matter. The local speaker shall then run the internal update process of 9.2.1 to select and advertise the most preferable route.