Community discussions

MikroTik App
 
upower3
Member
Member
Topic Author
Posts: 425
Joined: Thu May 07, 2015 11:46 am

Dual border routers with BGP and VRRP - how do best?

Tue Jan 03, 2023 12:06 am

I try to add some HA to my BGP border router (just in case of reboot/hw problems etc).

So, instead of simple scheme like:
isp <--> my_bgp_router <--> my company network
I try to implement this:
isp <--> my_bgp_router1 <--> my company network
    ^                      ^ 
    |                      |  VRRP
    +--> my_bgp_router2 <--+
So the idea is I have two BGP sessions to the same uplink announcing the same subnet so if R1 or R2 goes down the announcement will still be alive.

Both routers are in VRRP pair so to the corporate network it'll be the same virtual router.

The question is, if I should set up some scripting and disable announcements from R2 if R1 is alive, or just add some prepends in R2 announcements?
 
connectlife
Frequent Visitor
Frequent Visitor
Posts: 99
Joined: Tue Sep 01, 2020 10:20 pm

Re: Dual border routers with BGP and VRRP - how do best?

Wed Jan 04, 2023 7:33 pm

hi you don't need to use scripts. on the bgp session raise the weight of the MED or add an AS in order to make the path less preferred to your isp. traffic will always go through R1, as soon as R1 dies all traffic will go through R2
 
upower3
Member
Member
Topic Author
Posts: 425
Joined: Thu May 07, 2015 11:46 am

Re: Dual border routers with BGP and VRRP - how do best?

Wed Jan 04, 2023 11:14 pm

on the bgp session raise the weight of the MED or add an AS in order to make the path less preferred to your isp. traffic will always go through R1, as soon as R1 dies all traffic will go through R2
Seems like I'd better add some prepend to make path to R2 longer. I ended up with this:
if (afi ipv4 && dst in n.e.t.0/24 && dst-len == 24) {set bgp-path-prepend 2; accept}
hope this will cover the case.

Who is online

Users browsing this forum: No registered users and 10 guests