No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ How to apply local preference for route in BGP

Publication Date:  2012-07-27 Views:  77 Downloads:  2
Issue Description
We have 3 routers and 2 ASs. Please, refer to attachments for detail information. 
We have a route to 5.5.5.5 network from 2.2.2.2 router. 
But we need have a route to 5.5.5.5 through 3.3.3.3 router. 
How to apply local preference for destination 5.5.5.5 in AS1?
      
Alarm Information
Null
Handling Process
Configuration flow of RT1.
==== CONFIGURE ACL =======
acl number 2000
 rule 5 permit source 5.5.5.5 0
==== CONFIGURE ROUTE POLICY ====
route-policy lp10 permit node 0
 if-match acl 2000                        
 apply local-preference 10
route-policy lp300 permit node 0
 if-match acl 2000
 apply local-preference 300
====== CONFIGURE BGP =====
bgp 1
 peer 2.2.2.2 as-number 2
 peer 2.2.2.2 ebgp-max-hop 3
 peer 2.2.2.2 connect-interface LoopBack1
 peer 3.3.3.3 as-number 2
 peer 3.3.3.3 ebgp-max-hop 3
 peer 3.3.3.3 connect-interface LoopBack1
 #
 ipv4-family unicast
  undo synchronization
  network 4.4.4.4 255.255.255.255
  peer 2.2.2.2 enable
  peer 2.2.2.2 route-policy lp10 import     /// receive this route with local_pref 10
  peer 3.3.3.3 enable
  peer 3.3.3.3 route-policy lp300 import  /// receive this route with local_pref 300
#
BGP in RT1 prefer route to 5.5.5.5 with bigger local_pref value. So it will be peer to 3.3.3.3 with local_pref 300 for 5.5.5.5 route.
Please refer to attachments for result and RT2 and RT3 configuration.
Root Cause
Need to apply different local preference attribute for EBGP peers.
Suggestions
Use route-policy and attributes to manage routes. You need to restart peers to apply this policy for BGP.

END