Community discussions

MikroTik App
 
blackmetal
Member Candidate
Member Candidate
Topic Author
Posts: 227
Joined: Mon Aug 16, 2010 9:01 am

bgp routing best practice for outbound?

Fri Mar 15, 2019 8:03 am

Hello,
i have 3 upstream provider and i have 2 bgp session from each one (first session is master and second one is backup) and i have only 1 bgp session from 3rd provider. and i am receiving full bgp table from each one. i configured weight for each session as following :
first provider with first bgp session : weight 350
second provider with first bgp session : weight 300
third provider with first bgp session : weight 250
first provider with second bgp session : weight 200
second provider with second bgp session : weight 150

so i want know is this logic correct ? or any other better suggestion ? for example set same weight for "first provider with first bgp session" & "second provider with first bgp session" then they choose routing from as path length, whats your idea or suggestion?
Thank you.
 
pmladenov
just joined
Posts: 5
Joined: Fri Mar 15, 2019 9:32 pm

Re: bgp routing best practice for outbound?

Fri Mar 15, 2019 10:56 pm

first provider with first bgp session : weight 350
second provider with first bgp session : weight 300
third provider with first bgp session : weight 250
first provider with second bgp session : weight 200
second provider with second bgp session : weight 150
With that way you're using only the first bgp session of the first provider for outbound traffic. I guess you're trying to do some load-sharing between all these 3 providers, so probably you should set something like:
1st ISP - 1st bgp - weight 350
1st ISP - 2nd bgp - weight 300
2nd ISP - 1st bgp - weight 350
2nd ISP - 2nd bgp - weight 300
3rd ISP - 1st bgp - weight 350

So BGP will select best route between 1st session of all 3 providers based on shortest AS-PATH and other BGP attributes.
Keep in mind that this won't be the perfect solution either, but will be a good starting point.
 
christopherh
newbie
Posts: 29
Joined: Sun Feb 24, 2019 7:43 am
Location: Sydney, Australia

Re: bgp routing best practice for outbound?

Sat Mar 16, 2019 2:55 am

Hello,

I would configure AS Path prepending (using the set-bgp-prepend directive) on the filters, instead of using weights. You want to set the prepend on the backup sessions, however this would require you to have multiple chains for your primary and secondary sessions (although I would suggest having chains for each session to give you more granular control over filtering, should you ever wish to change what gets filtered to where.

Feel free to reach out on Skype (my user is christopher.hawker) if you have any more questions.

Thanks,
Christopher H.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1742
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: bgp routing best practice for outbound?

Thu Mar 21, 2019 3:34 pm

AS Path prepending is not a technology used for outbound route selection (it controls inbound) and it has limited use in the BGP Global Table these days due to provider traffic engineering with localpref overriding it.

My question before commenting would be what are you trying to achieve? Equal load balancing of upstream traffic?

How much of your traffic is outbound vs. inbound?