0

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 1.1.1.0/24 and 2.2.2.0/24 (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 1.1.1.0/24 and 2.2.2.0/24 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.

0

1 Answer 1

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 1.1.1.1 route-map LPREF850 in ! this i prefer as primary

neighbor 2.2.2.2 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 that you have read and understand our privacy policy and code of conduct.

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