[chassis][mgmtif][defaultroute] Fix for issue of mgmt if default route #8989
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
If management interface is configured in config db, a default route is added with the management interface (eth0) as the gateway with same admin distance as iBGP routes. This is done as a backup reachability for management interface. In chassis using multi-asic image, this route was interfering with the default routes received from the iBGP sessions since static route has higher preference (i.e., the route on eth0 is selected as best route). However since routesync does not send any route on eth0 to orchagent, we do not have a default route in the datapath. This PR fixes this issue
How I did it
The backup default route management interface as gateway is added as part of staticd configuration in FRR. This is changed to set the administrative distance greater than the administrative distance of iBGP routes.
How to verify it
Description for the changelog
Fix for issue of static default route on management interface interfering with default routes learned via iBGP.