Page 1 of 1

bgp routing best practice for outbound?

Posted: Fri Mar 15, 2019 8:03 am
by blackmetal
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.

Re: bgp routing best practice for outbound?

Posted: Fri Mar 15, 2019 10:56 pm
by pmladenov
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.

Re: bgp routing best practice for outbound?

Posted: Sat Mar 16, 2019 2:55 am
by christopherh
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.

Re: bgp routing best practice for outbound?

Posted: Thu Mar 21, 2019 3:34 pm
by StubArea51
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?