sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

BGP multipath-relax peer-type broken for ipv6

Open skbarista opened this issue 3 years ago • 2 comments

Currently when the static route is added for remote neighbor, kernel assigns it a default metric of 1024 in the case of ipv6. For ipv4 the default metric is 0. Since the metric for the route through which remote neighbor is reachable is higher than the metric for a directly connected neighbor, the EBGP route always wins for IPV6 and the IBGP route via the remote neighbor is not selected. For IPV6 this implies we can never have a ecmp route with both EBGP and internal IBGP paths.

skbarista avatar Nov 29 '21 21:11 skbarista

@skbarista Hi. I'm going to fix this issue. Could you please provide more details about what you exactly did, your configuration e.g. config_db.json and everything possible. Your hardware platform and SONiC version?

MaratGubaiev avatar May 23 '22 08:05 MaratGubaiev

@skbarista

I have found some mentions that metric should be 256 in case of IPv6 and VOQ-switch:

In voq system, We need the static route to the remote neighbor and connected route to have the same metric to enable BGP to choose paths from routes learned via eBGP and iBGP over the internal inband port be part of same ecmp group. For v4 both the metrics (connected and static) are default 0 so we do not need to set the metric explicitly. https://github.com/Azure/sonic-swss/blob/f2e4d250557ec23a09b034341cb1cbbf721d5b34/cfgmgr/nbrmgr.cpp#L512

Kernel adds connected route with default metric of 256. But the metric is not communicated to frr unless the ip address is added with explicit metric In voq system, We need the static route to the remote neighbor and connected route to have the same metric to enable BGP to choose paths from routes learned via eBGP and iBGP over the internal inband port be part of same ecmp group. For v4 both the metrics (connected and static) are default 0 so we do not need to set the metric explicitly. https://github.com/Azure/sonic-swss/blob/f2e4d250557ec23a09b034341cb1cbbf721d5b34/cfgmgr/intfmgr.cpp#L97

It looks like it is possible to make ECMP route with both EBGP and internal IBGP paths.

Could you please explain what exactly is the issue?

MaratGubaiev avatar May 26 '22 15:05 MaratGubaiev