BGP with ECMP and weight control
Hi, I have two uplinks (different AS), and one is more stable/preferred, but when "merge paths" is set to on, all routes are generated with weight 1: 5.21.41.0/24 proto bird nexthop via 10.16.0.1 dev uplink1 weight 1 nexthop via 10.17.0.1 dev uplink2 weight 1 Is there any way to adjust weight for ECMP generated from BGP sessions? I could not find any option/attribute when it is related to BGP or kernel protocol, while it is possible for OSPF and static protocols (to a degree). Adjusting local preference or med (in BGP) does not really help - weight is unchanged, though of course I could force routes from specific AS to be preferred, but then I lose ECMP and if preferred session is dropped it takes time to restore connectivity. Thank you! Best regards, Alexander.
On 11/19/20 4:06 PM, Alexander Demenshin wrote:
Hi,
I have two uplinks (different AS), and one is more stable/preferred, but when "merge paths" is set to on, all routes are generated with weight 1:
5.21.41.0/24 proto bird nexthop via 10.16.0.1 dev uplink1 weight 1 nexthop via 10.17.0.1 dev uplink2 weight 1
Is there any way to adjust weight for ECMP generated from BGP sessions?
I could not find any option/attribute when it is related to BGP or kernel protocol, while it is possible for OSPF and static protocols (to a degree).
Adjusting local preference or med (in BGP) does not really help - weight is unchanged, though of course I could force routes from specific AS to be preferred, but then I lose ECMP and if preferred session is dropped it takes time to restore connectivity.
Thank you!
I'd just like to say I'm very interested in this aswell, it would be an amazing feature to have. -N
Hello! Would it be feasible for you to have a special route attribute to be set in filters that would control the nexthop weight? That seems to be probably a most simple solution. Maria On November 19, 2020 5:42:38 PM GMT+01:00, Nigel Kukard <nkukard@LBSD.net> wrote:
On 11/19/20 4:06 PM, Alexander Demenshin wrote:
Hi,
I have two uplinks (different AS), and one is more stable/preferred, but when "merge paths" is set to on, all routes are generated with weight 1:
5.21.41.0/24 proto bird nexthop via 10.16.0.1 dev uplink1 weight 1 nexthop via 10.17.0.1 dev uplink2 weight 1
Is there any way to adjust weight for ECMP generated from BGP sessions?
I could not find any option/attribute when it is related to BGP or kernel protocol, while it is possible for OSPF and static protocols (to a degree).
Adjusting local preference or med (in BGP) does not really help - weight is unchanged, though of course I could force routes from specific AS to be preferred, but then I lose ECMP and if preferred session is dropped it takes time to restore connectivity.
Thank you!
I'd just like to say I'm very interested in this aswell, it would be an amazing feature to have.
-N
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
On 11/19/20 9:25 PM, Maria Matějka wrote:
Hello!
Would it be feasible for you to have a special route attribute to be set in filters that would control the nexthop weight? That seems to be probably a most simple solution. <snip/>
That would certainly work for me, one can then use any combination of the other attributes to set the weight in a filter. Not only simple, but probably the most flexible. -N
On 2020-11-19 22:25, Maria Matějka wrote:
Would it be feasible for you to have a special route attribute to be set in filters that would control the nexthop weight?
Sure, this is quite feasible, especially if this attribute could be applied to any route (exported to kernel), i.e. regardless of protocol/source. Regards, Alexander.
On Fri, Nov 20, 2020 at 10:49:32AM +0100, Alexander Demenshin wrote:
On 2020-11-19 22:25, Maria Matějka wrote:
Would it be feasible for you to have a special route attribute to be set in filters that would control the nexthop weight?
Sure, this is quite feasible, especially if this attribute could be applied to any route (exported to kernel), i.e. regardless of protocol/source.
Hi Implemented here: https://gitlab.nic.cz/labs/bird/-/commit/8cc5bb09e344038a1f8dff96946e05ec806... You can try this patch and set 'weight' during export to kernel protocol. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (4)
-
Alexander Demenshin -
Maria Matějka -
Nigel Kukard -
Ondrej Zajicek