cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1705
Views
8
Helpful
8
Replies

BGP AUTO FAILOVER

Isaac001
Level 1
Level 1

Hi community,

I have Organization A (AS 65200) and Organization B(AS 65100). I have attached the topology and running configs for R1 and R2 also.

Org B is adding backup link through R3  with the same AS number 65100 to link with Org A R1. They will be advertising the same networks as shown in the topology.

How can I configure this for BGP auto failover such that R1 to R2 is primary preferred link and R1 to R3 backup link. R1 is expected to advertise its routes to only one path at time to avoid asymmetric routing. We are only responsible for Org A administration.

Kindly share configuration examples that can help achieve this incase its workable.

Regards,

Isaac.

3 Accepted Solutions

Accepted Solutions

Hello,

 

It would depend on the direction of advertisement. 

 

If you are looking at R1 and need to use R2 as a primary way of getting to the routes of 10.1.1.0/24 and 10.2.2.0/24 and R3 as a backup, you can configure weight on the neighbor statements on R1 - higher weight being the preferred neighbor.

On R1:

neighbor 192.168.2.2 weight 500

neighbor 192.168.1.2 weight 100

If traffic at Org B needs to send traffic through R2 as a primary and R3 as a secondary, then they can configure R2 with a local preference higher than that of R3s (100 is the default I think). This will propagate through the iBGP 65100 AS and devices at that site will prefer R2 and then prefer R3 when R2 fails.

ON R2:

route-map LOCAL

set local-preference ## (make this higher than 100 - it will apply to all routes learned from this applied neighbor)

router bgp 65100

neighbor 192.168.2.1 route-map LOCAL in

 

Hope this helps

-David

View solution in original post

Harold Ritter
Spotlight
Spotlight

Hi @Isaac001 ,

As @David Ruess mentioned you can use the weight to make R1 prefer R2 over R3 for the outbound traffic. For inbound traffic, since you can only make changes to R1, you could use the BGP conditional advertisement feature to only advertise 172.16.1.0/24 and 172.16.2.0/24 to R3 if R1 stops receiving 10.1.1.0/24 from R2. 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

Hello
most simplistic solution would be just to append some path preference on rtr1 although conditional route advertisement is the most elegant way to do it.
R1
routemap as-prepend
set as prepend 65100 65100

Router bgp 65100
neighbour (rtr2) weight 50000
nieghbour (rtr3) route-map as-prepend out
clear ip bgp * soft


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

8 Replies 8

Hello,

 

It would depend on the direction of advertisement. 

 

If you are looking at R1 and need to use R2 as a primary way of getting to the routes of 10.1.1.0/24 and 10.2.2.0/24 and R3 as a backup, you can configure weight on the neighbor statements on R1 - higher weight being the preferred neighbor.

On R1:

neighbor 192.168.2.2 weight 500

neighbor 192.168.1.2 weight 100

If traffic at Org B needs to send traffic through R2 as a primary and R3 as a secondary, then they can configure R2 with a local preference higher than that of R3s (100 is the default I think). This will propagate through the iBGP 65100 AS and devices at that site will prefer R2 and then prefer R3 when R2 fails.

ON R2:

route-map LOCAL

set local-preference ## (make this higher than 100 - it will apply to all routes learned from this applied neighbor)

router bgp 65100

neighbor 192.168.2.1 route-map LOCAL in

 

Hope this helps

-David

Harold Ritter
Spotlight
Spotlight

Hi @Isaac001 ,

As @David Ruess mentioned you can use the weight to make R1 prefer R2 over R3 for the outbound traffic. For inbound traffic, since you can only make changes to R1, you could use the BGP conditional advertisement feature to only advertise 172.16.1.0/24 and 172.16.2.0/24 to R3 if R1 stops receiving 10.1.1.0/24 from R2. 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hello
most simplistic solution would be just to append some path preference on rtr1 although conditional route advertisement is the most elegant way to do it.
R1
routemap as-prepend
set as prepend 65100 65100

Router bgp 65100
neighbour (rtr2) weight 50000
nieghbour (rtr3) route-map as-prepend out
clear ip bgp * soft


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi @paul driver ,

Thanks for you and everyone for the feedback. I implemented and it went well except that at OrgB R3 I noticed that the next hop is 192.168.3.1. I expected it to be 192.168.2.1 as in R2 since its the same AS and we have next-hop-self. Why is the next hop not the former on R3? See attached configs

Network Next Hop Metric LocPrf Weight Path
*>i 10.1.1.0/24 192.168.3.1 0 100 0 i
*>i 10.2.2.0/24 192.168.3.1 0 100 0 i
* 172.16.1.0/24 192.168.1.1 0 0 65200 65200 65200 i
*>i 192.168.3.1 0 100 0 65200 i
* 172.16.2.0/24 192.168.1.1 0 0 65200 65200 65200 i
*>i 192.168.3.1 0 100 0 65200 i

Hi @Isaac001 ,

R2 advertises its best path for 172.16.1.0/24 and 172.16.2.0/24 to R3 with its own address (192.168.3.1) as a result of configuring the next-hop-self command. Without this command, R2 would advertise 192.168.2.1 as the next hop to R3.

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hi,

Thanks for your prompt feedback.

I removed the next-hop-self from both R2 and R3 and I think there is an issue. The R1 routes are now not been preferred via shorted AS path through 192.168.2.1 but through 192.168.1.1 with has a longer AS path. why is this the case?

Network Next Hop Metric LocPrf Weight Path
*>i 10.1.1.0/24 192.168.3.1 0 100 0 i
*>i 10.2.2.0/24 192.168.3.1 0 100 0 i
*> 172.16.1.0/24 192.168.1.1 0 0 65200 65200 65200 i
* i 192.168.2.1 0 100 0 65200 i
*> 172.16.2.0/24 192.168.1.1 0 0 65200 65200 65200 i
* i 192.168.2.1 0 100 0 65200 i

Hello
unless you are now trying to manipulate certain traffic other then failover for all routes to R3 then you really need to be pre-pending  on R3  to make this work - You can just apply weight & prepend on R1 only and remove all other from r3
*weight =preferred link  r1-r2 ingress
* as-pretend link r1-r3 egress
Note: if you wish to apply some path manipulation on r2-3 aswell assuming those two rtrs will have iBGP peering to each other then it could be to set default local preferences higher than 100 on R2 bgp router process and as-prepending on R3 -r1 link egress 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

For inbound traffic to your site use 

As-prepend 

For outbound traffic from your site use 

Weight 

That it 

MHM