4

Here is the setup: - We have two routers R1 and R2 in two distant locations and in the same AS0. - AS0 is connected to AS1 via both R1 and R2 receive some AS1 route (one and the same prefix) from both sessions - R1 and R2 have iBGP session with no filters

The goal: - We want to force R1 to choose its locally received route towards AS1 - We want to force R2 to also choose its locally received route towards AS1

Question: With a single router in the network we force preference using the local-preference attribute. Can we also use the local-preference in the above described setup?

  • You need to clarify your question. Are you wanting to send traffic destined for local networks to a different AS? – Ron Maupin Mar 30 '16 at 15:51
  • to a different as - both AS1 and AS2 are public ASNs, announcing public prefixes. – Orlin Tenchev Mar 31 '16 at 8:12
  • 5
    Actually I think this should be the default behaviour. Given both routers are connected to the same AS, the local-pref, AS path length, origin type and med should be equal. The next step in the BGP decision process is to prefer eBGP learned routes over iBGP learned routers, which is exactly what you want. Is it possible that your provider has a MED value assigned to the prefixes? Strip them when they enter your network and you should be good. Or am I missing something? – waza-ari Sep 10 '16 at 6:15
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 13 '17 at 20:32
4

For locally received routes at routers R1 & R2 you can use feature WEIGHT for specific interface.

if you want only one router out of two as best to forward the traffic outside the your AS, use local preference.

| improve this answer | |
  • 3
    While technically possible, the weight as far as I know is a Cisco proprietary solution which will not work with other vendors. – waza-ari Sep 10 '16 at 6:07
1

I am copying the comment of waza-ari here, as it helped me realize where my problem was:

Actually I think this should be the default behaviour. Given both routers are connected to the same AS, the local-pref, AS path length, origin type and med should be equal. The next step in the BGP decision process is to prefer eBGP learned routes over iBGP learned routers, which is exactly what you want. Is it possible that your provider has a MED value assigned to the prefixes? Strip them when they enter your network and you should be good. Or am I missing something?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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