BGP decision process

Answered Question
Apr 6th, 2010

Hello all,

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.

Thanks,

Blake

I have this problem too.
0 votes
Correct Answer by marikakis about 6 years 8 months ago

Hi Blake,

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.

Kind Regards,

Maria

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Giuseppe Larosa Tue, 04/06/2010 - 10:18

Hello Blake,

your approach is correct:

test results rule

The book text should be a little intepreted.

Also take in consideration the use of CCO as source of fresh an updated information

This should be the more current BGP path selection:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

so another tip: don't consider a single book the only source of your studies at this level, but search for alternative documents and compare.

also MED is compared by default only under some conditions (same peer AS) and so on.

in the document linked above:

step 13:

  • Prefer the path that comes from the lowest neighbor address.

    This address is the IP address that is used in the BGP           neighbor configuration. The address corresponds to           the remote peer that is used in the TCP connection with the local router.

    there are some cases where the use of deterministic MED help in providing a deterministic choice of best path without dependencies on some factors that can vary over time.

    However, the path selection is a hierarchy of criteria to select the best path: the first criteria that produces a single best path is the last considered like shortest AS path is considered first.

    The use of maximum-paths in BGP introduce some relaxing of this rules: BGP routes that match the first N criteria are considered for installation in BGP table and later in IP routing table.

    Hope to help

    Giuseppe

    blakeaa827 Tue, 04/06/2010 - 17:59

    Thank you for the quick response Giuseppe.  I have definitely been using as many sources as I can get my hands on.  Unfortunately, when they conflict, sometimes it's hard to tell which is correct.

    marikakis Tue, 04/06/2010 - 18:54

    Hi Blake,

    Don't worry about it. Our community does not discourage questions. Besides, I remembered the thread because I had participated in the discussion and finding it didn't even involve using the search facility. I went straight to Kevin's profile. Search is easier when you already know what you are looking for. FYI: at the bottom of CCO documents there exist some links to possibly related CSC discussions. In the past those links were not so good, but with the new site the links are generated using keywords, so there are now many more chances of being relevant to the document you are reading. For example, if you go to the BGP Best Path Selection Algorithm document you will see the link of that thread listed there at the very bottom:

    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml#NetPro

    Kind Regards,

    Maria

    Correct Answer
    marikakis Tue, 04/06/2010 - 16:35

    Hi Blake,

    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.

    Kind Regards,

    Maria

    blakeaa827 Tue, 04/06/2010 - 18:50

    Maria,

    Thank you for that link!  I haven't had a chance to read the entire thread, but I read Kevin's original post and those were my thoughts exactly.  Sorry for the duplicate post!

    Thanks again,

    Blake

    blakeaa827 Tue, 04/06/2010 - 19:03

    Maria,

    I just finished that thread, and looks like the cert guide is indeed wrong.  Odd that they are on the 4th edition now and haven't addressed that particular point.

    Thanks again for the link.

    Blake

    Actions

    This Discussion

    Related Content