cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

276
Views
0
Helpful
4
Replies
Highlighted
Beginner

BGP local preference and failover query

Hi All,

I intend to direct certain traffic to go through a specific path. The destination has two paths therefore i want to ensure that primary path is taken always, but there should be the possibility to take the backup path (failover). By increasing local preference i can set primary path but how to configure failover mechanism ? The links are "Metro Ethernet".  

 

PATH 1 

neighbor <BGP neighbor1> route-map LOCAL-PREF-150 in
ip prefix-list <test1> seq 5 permit <route being received>
route-map LOCAL-PREF-150 permit 10
match ip address prefix-list <test>
set local-preference 150

 

PATH 2

neighbor <BGP neighbor2> route-map LOCAL-PREF-120 in
ip prefix-list <test2> seq 6 permit <route being received>
route-map LOCAL-PREF-150 permit 11
match ip address prefix-list <test2>
set local-preference 120

 

Thanks for guidance

Everyone's tags (1)
4 REPLIES 4
VIP Advisor

Re: BGP local preference and failover query

Hi there,

Since the default local preference value is 100, there is no need to set the value for PATH2. The route-map you have implemented for PATH1 will have a sufficiently high local preference to ensure its routes make it into the routing table. Therefore you can omit the PATH2 config. In the event of PATH2 failure BGP will reconverge and prefer the path with the default local preference value.

 

cheers,

Seb.

 

 

Beginner

Re: BGP local preference and failover query

Hi Seb,

 

Thanks for the reply. I missed specifying a point in the question i posted, its as follows. There is IBGP between the the two sites. Please see attached diagram. From the diagram you can see that idea is to ensure that RHS and LHS branches take the preferred path as their respective exit points with the possibility of having a backup path from either sites through the "site A and Site B interconnect". 

 

In the IBGP the site A advertises to site B the path to egress to the cloud, Hence traffic for all sites LHS and RHS just go to Site A and egress from there. 

 

Will the below approach work ? Also do i need to advertise the same route over IBGP from site A to B and Site B to A (for failover) ? 

 

> Reduce the local preference on the IBGP route to say 50

> Keep the local preference for the same route to respective egress points on site A and Site B to default (100)

This will ensure that branch sites on B egress through site B while the branch sites on A egress through site A. In case of a link failure BGP would detect the loss of route and the next best route would be the one with local preference set to 50 and hence would exit through either site A or Site B.  

 

 

I intend to put the below config on Site B :

 

configure terminal
ip prefix-list LOW_LP_PREFIXES99 seq 10 permit 10.99.0.0/16
ip prefix-list LOW_LP_PREFIXES102 seq 20 permit 10.102.0.0/19

route-map LOCALPREF99 permit 10
match ip address prefix-list LOW_LP_PREFIXES99
set local-preference 50

route-map LOCALPREF102 permit 20
match ip address prefix-list LOW_LP_PREFIXES102
set local-preference 50
exit

route-map LOCALPREF permit 30
exit

router bgp 65111
neighbor 10.200.1.1 route-map LOCALPREF99 in
neighbor 10.200.1.1 route-map LOCALPREF102 in

exit

 

Thanks for your help !

VIP Advisor

Re: BGP local preference and failover query

If you just what the remote sites to leave via their immediate BGP router (SiteA/B), then there is no need to adjust any of the attributes.

 

In the event of the SiteB outbound link failing, the eBGP prefix would be removed and the iBGP update for the same prefix from SiteB would be preferred. This would draw the LHS traffic over the iBGP link to SiteA and out.

 

You did mention earlier that you had a small subset of eBGP prefixes received at both SiteA and SiteB and that you wanted traffic to those to only egress via one Site router. In this case you would use a route-map to apply a higher local_preference on those prefixes. This would be sent in an update to the iBGP peer and draw the traffic towards it.

 

If you haven't seen it already, take a look at this document:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html

...in particular for your scenario:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html#anc26


cheers,
Seb.

Beginner

Re: BGP local preference and failover query

Hi Seb,

 

Thanks for the reply. I will check and get back.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here