05-09-2014 05:52 PM
Hello everyone, i have a question on this algorithm. Specifically the relationship between (cisco specific) WEIGHT which is right at the top of the path selection algorithm.... and routes that are ORIGINATED_LOCALLY (3rd one down, after weight and local_pref).
Heres the relevant steps of the decision tree:
1/WEIGHT (highest wins)
2/LOCAL_PREF (highest wins)
3/ORIGINATED LOCALLY (prefer locally originated over peer learnt)
Whats confusing to me is that Jeff's book tells us that if a prefix is ORIGINATED_LOCALLY (ie entered into BGP on that same router - either by a network/aggregate-address statement, or from redistribution) then its WEIGHT will also be set to 32768 (as opposed to a BGP peer learnt route whose WEIGHT is set to 0). I understand this.
My question is why??? Seems to me that if this is the case there is little purpose of having ORIGINATED_LOCALLY in the decision tree at all, as the logic will never get there on account of the the propagation of its value into (the higher up) WEIGHT decision. This also in turn means that ORIGINATED_LOCALLY has the power to override the attribute LOCAL_PREF.... so couldn't this whole logic be simplified to be:
1/WEIGHT or ORIGINATED LOCALLY
2/LOCAL_PREF (highest wins)
This very thing has confused another user on another post too, that user writes: "I tried thinking of an example where "ORIGINATED LOCALLY" works but weight doesn't, but couldn't think of any."
looking forward to the thoughts of this community.
Thanks in advance, Keiran.
PS> perhaps the attached diagram will help visualise this.
05-10-2014 09:13 PM
As per my understanding WEIGHT is Cisco Propritery attribute , and BGP is industry standard routing protocol , so how do other vendor router will decide? thats why 3/ORIGINATED LOCALLY (prefer locally originated over peer learnt) is required ,
because all the other vendor routers do not have weight attribute ,
so they select 1) Local Preference
2) Locally originated
thus , Locally originated attribute is required because we have hundreds or thousands of routers running BGP which do not support weight attribute.
above is as per my understanding , please correct me if something wrong
Thanks & regards
Kamran Shaikh
05-12-2014 12:40 AM
Thanks for your reply shaikhkamran123, i hadn't considered the multivendor environment (where cisco specific concept of 'weight' would be irrelevant to those routers), so yes their decision would start with:
1) Local Preference
2) Locally originated
as opposed to cisco
1/WEIGHT (highest wins)
2/LOCAL_PREF (highest wins)
3/ORIGINATED LOCALLY (prefer locally originated over peer learnt)
but it still doesn't really explain why cisco chose to alter their inbuilt weight based on if a route was locally originated. This alters the logic of the above decision algorithm: ie if its locally originated, it will set a high weight (32768), which will be preferred.... and heres the main thing *BEFORE* local_pref is even looked at. So in other words decision criteria#3, gets merged into #1, skipping ahead of #2. Am i going crazy here??
thanks in advance all...
K.
05-12-2014 03:00 AM
Weight is a Cisco Specific attribute that is applied to a route within a router.
Note: WEIGHT is a Cisco-specific parameter. It is local to the router on which it is configured.
(http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html)
It is not communicated to other routers, its means if router is taking decision upon weight it is purely local router decision and will never affect other routers decision process. While Origin is a Well-known Mandatory attirbute: that recognized and Included in all BGP Updates messages, so if router is selecting a path on Origin it may effect on neighbor router decision process.
Don't forget to rate helpful posts
Sajid Ali Pathan
05-12-2014 05:13 AM
05-12-2014 05:11 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide