cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
985
Views
15
Helpful
9
Replies

What's the role of 'degree of preference in the Adj-RIBs-In' in BGP?

rookie R
Level 1
Level 1

Hi all!

 

My English is awful, I tried my best, hope you guys could understand what I want to say...

 

'The decision process entails three phases:

  • Phase 1 calculates the degree of preference for each feasible route in the Adj-RIBs-In. It is invoked whenever a router receives a BGP Update from a peer in a neighboring AS containing a new route, a changed route, or a withdrawn route. Each route is considered separately, and a nonnegative integer is derived that indicates the degree of preference for that route.

    • Phase 2 chooses the best route out of all the available routes to a particular destination and installs the route in the Loc-RIB. It is invoked only after phase 1 has been completed. Loops are also detected in Phase 2 by examining the AS_PATH. Any routes with the local AS number in the AS_PATH are dropped.

    • Phase 3 adds the appropriate routes to the Adj-RIBs-Out for advertisement to peers. It is invoked after the Loc-RIB has changed, and only after phase 2 has been completed. Route aggregation, if it is to be performed, happens during this phase.'

The above text comes from this page:https://www.ciscopress.com/articles/article.asp?p=2738462&seqNum=2

 

 

 

In Phase 1, the router calculates the degree of preference for each feasible route, does that degree of preference is used to decide which route is the best to the same destination in phase 2?what is that 'preference' do? Is this 'preference' a representation of BGP routing attributes(such as AS_PATH) is more preferred or not? 

 

 

Thanks!

1 Accepted Solution

Accepted Solutions

I agree that some of the BGP concepts may be difficult to understand at first. They should become more clear as you study more and as you get some experience using BGP in a lab or test network environment.

 

To answer your follow up question: the two concepts are closely related, but not the same. The BGP decision process is an integral part of the process that assigns the degree of preference to each prefix for its ranking. It may help to think of it in this way: the process for degree of preference reads each entry of the Adj-RIBs-In and the process for degree of preference uses the BGP decision process on that prefix and uses the results of the BGP decision process to assign the ranking.

HTH

Rick

View solution in original post

9 Replies 9

Richard Burts
Hall of Fame
Hall of Fame

It is interesting to see this chapter from the new edition of this very well known book. Thanks for pointing this out. I am not sure that I fully understand your question. But let me suggest this explanation and if it does not adequately address your question then you can provide some clarification.

 

I believe that the main part of the question has to do with "the degree of preference for each feasible route". Let us first remember that phase 1 is processing the Adj-RIBs-In which contains all of the advertisements of routes received from all of the BGP neighbors.  There have been no evaluations or edits of these route advertisements. Phase 1 is where the evaluations of those advertisements takes place. The goal of Phase 1 is to derive a non negative integer that indicates the degree of preference for that route. Basically this is saying that BGP attempts to rank each of the entries (which is the best alternative, which is the second best alternative, which is the third best alternative, etc). This is what the degree of preference is really about.

 

It is in the processing of Phase 1 that the well known BGP decision process is applied (consider the weight, consider the local preference, consider the AS path, consider the origin, etc) and the outcome of Phase 1 processing has applied that logic and determined which possible router is first and which is second, etc. At the completion of Phase 1 each prefix that is first preference is selected for insertion into the routing table.

 

I hope that this addresses your confusion. If not then please clarify the question.

HTH

Rick

Thanks so much for helping me. I understand most of what you try to teach me. Would you please help me answer one more question?

 

In the above, you mentioned two concepts. One is BGP using the degree of preference to rank each of the entries, and the other is the BGP decision process(consider the weight, etc. ).

 

In my opinion, these two processes have the same goal to determine the best BGP route to the same destination in multiple routes. What's the difference between these two? Are they the same process?

 

I agree that some of the BGP concepts may be difficult to understand at first. They should become more clear as you study more and as you get some experience using BGP in a lab or test network environment.

 

To answer your follow up question: the two concepts are closely related, but not the same. The BGP decision process is an integral part of the process that assigns the degree of preference to each prefix for its ranking. It may help to think of it in this way: the process for degree of preference reads each entry of the Adj-RIBs-In and the process for degree of preference uses the BGP decision process on that prefix and uses the results of the BGP decision process to assign the ranking.

HTH

Rick

Thanks again for helping me with my confusion. I now understand the relationship between the two concepts and won't confuse these two anymore.

I'm sorry for asking another question about BGP.

The book says, 'Phase 2 chooses the best route out of all the available routes to a particular destination and installs the route in the Loc-RIB'.

Does this 'Loc-RIB' mean the Routing table or the BGP table? I think it's the Routing table because the book says 'chooses the one best route', and the BGP table should have all the routes that have been selected by the local BGP speaker’s Decision Process, not only the best route.

 

Hello @rookie R ,

with Loc-RIB should be intended a part of the BGP table that hosts only the best routes for each destination

see from the link you have provided:

( yes that book is very valuable )

>>Loc-RIB: Contains the routes that the BGP speaker has selected by applying the decision process to the routes contained in Adj-RIBs-In. These routes populate the routing table (RIB) along with routes discovered by other routing protocols.3

 

The objective of the BGP Loc-RIB is to have a ready to use storage place for best routes that can be advertised to other peers in addition to attempt to install them in the local IP routing table.

This is done for efficiency reasons: the RIB-ADj-out for each peer is always a subset of this loc-RIB as each BGP speaker should not advertise back what has learned from a peer. In addition forms of route filtering can be applied outbound to a peer again reducing limiting the routes advertised.

The reason for a Loc-RIB is also that a BGP router cannot advertise a route that is not a best path ( there are some modern features that allow for this additional paths) so it is handy to have a storage place with all the best routes to known destinations.

 

Actually, in Cisco routers update-groups are created automatically to all those peers that share the same outbound policy.

This is again a way to optimize the work load.

 

Hope to help

Giuseppe

 

@Giuseppe Larosa has given a good explanation about your question "Does this 'Loc-RIB' mean the Routing table or the BGP table?". Let me approach the answer from a slightly different perspective. It is quite possible that BGP will select a best path and put it into Loc-RIB but the BGP route will not be in the local IP routing table. The more obvious example is to have learned a BGP route and put it into the Loc-RIB but the router also has a static route for that prefix. In this case the static route is preferred and will be placed into the IP routing table. In this case BGP will identify the prefix as rib failure. It will be in Loc-RIB but not in IP routing table.

HTH

Rick

Thanks for your reply. It helps me a lot. I read some posts you responded to on the forum before. It's like a dream has come true that you reply to my post. The questions I asked were thinking and searched, but my poor English and technical skills make these questions look stupid, especially the last one. I read the definition of Loc-RIB several times but didn't understand it in the right way.

 

I have several things to say in response to your post.

First is to say that you are welcome. I am glad that our explanations have been helpful.

 

Then to say that I do not consider that your questions look stupid. English may not be your primary language, but the questions asked made sense. And the questions asked make sense for someone who is just starting with BGP. I remember when I was just getting started in networking. I found a forum similar to these communities where I could ask questions and people were willing to share what they knew. Now I have a lot of experience and enjoy sharing what I have learned with others. I hope that as your experience and your knowledge increase that you will be willing to share what you know with others. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick

Thanks for your help. I thought I knew the definition of Loc-RIB, but didn't get the point before. Now I know only the best route for each destination can store in the Loc-RIB. I should have read that book more carefully

 

Review Cisco Networking for a $25 gift card