Good evening,
I don't understand here why a route received directly from eBGP peer (casa190) has one more ASN (15685) in as_path than route received from iBGP peer r2, which is (i assume) connected to the similar set of eBGP peers. To what eBGP peers are r1 and r2 connected?
It is correct, because R1 and R2 is connected do completely different provider, which has shorter aspath.
It is also strange that i don't see here the route from the the other bird (r4 if this is from r3), but that might be OK if there are different local preferences.
It would be useful to send that output from both R3 and R4 (should be slightly different), together with their configuration.
routes was the same, best via R2 and next routes via 190 and 189
Generally, it is not a good idea to change LOCAL_PREF attribute on iBGP link. That could easily lead to some kind of strange behavior. This attribute is assumed be set only on eBGP links (to describe the preference of that external link for the AS).
Right, it was my fault. I assumed algoritmus will make decision on third step: # Prefer route with the highest Local Preference attribute. # Prefer route with the shortest AS path. # Prefer IGP origin over EGP and EGP over incomplete. However change local pref on ibgp links has no sense, at least in my case.
And what was the setting of local_pref on eBGP links? If you only set for example 500 on iBGP and keep default (100) on eBGP, that would lead to an unstable configuration.
It was my case, i have larger local_pref on iBGP then eBGP links. Thank you very much for your help and explanation!