This is my first post here, and hopefully it's pretty simple. I believe this should be straight forward, but I find myself confused after reading CCIE R&S Exam Cert Guide, 4th ed.
On page 476, under "Step 10: Lowest Neighbor ID", the book states the following:
At this point, the router looks at the IP addresses on the neighbor commands corresponding to all the neighbors from which the route was received, and it picks the lowest neighbor IP address. Note that, as usual, it considers all routes again at this step, so it may not pick the neighboring router with the lowest RID at this point.
I've underlined the part of that section that is causing my confusion. This would seem to indicate that each step of the decision process compares all advertised NLRI's, disregarding all previous steps in the decision process. For example, consider a router that learns the same NLRI from 3 neighbors. Neighbor 1 advertises the NLRI with AS_PATH length of 2 and MED of 20. Neighbor 2 advertises the NLRI with AS_PATH length of 2 as well, but with MED of 30. Neighbor 3 advertises the NLRI with AS_PATH length of 3 and MED of 10.
Now, based on the logic mentioned above, step 4 in the decision process cannot determine the best route because two advertised NLRI's tie for the shortest AS_PATH length. Therefor, all else being equal, step 6 should consider all three routes and determine that the route to neighbor 3 is best based on the smallest MED even though it is not one of the two routes that tied for the shortest AS_PATH length.
I know the above logic is not accurate because I tested that scenario in GNS3. In my test, the route to neighbor 1 was chosen because it had the smallest MED among the routes with the shortest AS_PATH length. That being said, I must be misinterpreting the underlined portion of the statement above. I would greatly appreciate it if someone could clarify the point being made in that passage.
Your question reminds me of another thread that was opened by Kevin some time ago (https://supportforums.cisco.com/thread/202538) and we were lucky to have Russ White from Cisco confirming the understanding of the BGP decision process for us.
Sometimes books or CCO documents are wrong, other times bugs in software are interpreted as standard or correct behavior. During the preparation for certifications people sometimes risk to forget what they already know. Not trusting a single source of information as Giuseppe already suggested is the best way to go.