i have a cisco router with 6 bgp peers, 4 bgp peers is from out ip transit's and i am receiving full routing (bgp) table from them. 2 bgp session is over GRE tunnel. and i am receiving and (for example) from customers that have bgp with me over GRE tunnel. now sometimes and when i restart router or customer do this, then i check my bgp announcements i see the path for that prefixes are from my ip transit providers, for example its as123 as765 as8263 as9264 asDESTINATION so when i have bgp with my customers as path in my annoucnements should be like as123 (AS123 is for my customers) , so now my question is that if i want tell router that prefer the routes for and from customer than my ip transits i should set highest local pref than my transits? so in this way i receive routes from my customer by bgp then announce it to my upstreams without problems. right?

THank you.


1 Answer 1


Well without knowing your configuration. You can use Local Preference to control, which destination you prefer to use. First you create your local preference, remember that the higher number the more preferred. So in this case, 850 is preferred compared to 800, which is lower. (Default local preference value is 100)

route-map LPREF850 permit 10
 set local-preference 850

route-map LPREF800 permit 10
 set local-preference 800

Then you need to add the local preference to your BGP configuration, for instance:

neighbor route-map LPREF850 in ! this i prefer as primary

neighbor route-map LPREF800 in ! this i prefer as secondary

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.