FIB Route Filter HLD#2367
Conversation
Add a High-Level Design for the FIB_ROUTE_FILTER feature under doc/route-filter/. Covers YANG schema, CONFIG_DB shape, the shared Jinja boot-render template, runtime apply via bgpcfgd (FibRouteFilterMgr) and frrcfgd (fib_route_filter_handler), FRR zebra route-map evaluation, info flow diagrams, warmboot/fastboot impact, restrictions, and the testing plan across yang_model_tests, sonic-bgpcfgd, sonic-frr-mgmt-framework, sonic-config-engine, and sonic-mgmt. Signed-off-by: Kalash Nainwal <kalash@nexthop.ai>
|
/azp run |
|
No pipelines are associated with this pull request. |
| ### 9.1 Apply Filter Flow | ||
|
|
||
| ``` | ||
| Operator CONFIG_DB runtime manager FRR (zebra) |
There was a problem hiding this comment.
”runtime manager"? it is frrcfgd, right?
There was a problem hiding this comment.
Thanks for looking @eddieruan-alibaba . The next line clarifies this:
The runtime manager is `bgpcfgd.FibRouteFilterMgr` when `bgpcfgd` owns FRR config translation, and `frrcfgd.fib_route_filter_handler` (routed through `mgmtd`) when `frrcfgd` is the active translator.
| ``` | ||
| Operator CONFIG_DB runtime manager FRR (zebra) | ||
| │ │ │ │ | ||
| │ sonic-db-cli HSET │ │ │ |
There was a problem hiding this comment.
Why not keep the same syntax as vtysh, since it is route-map anyway.
There was a problem hiding this comment.
I don't have any strong reason to pick FIB_ROUTE_FILTER|<vrf>|<afi>|<protocol> → route_map=<RM>, other than that I didn't find following vtysh cmd very intuitive (i.e, the syntax makes it hard to tell this is filtering routes at zebra level and not at individual protocol level):
ip[v6] protocol PROTOCOL route-map ROUTEMAP
I thought FIB_ROUTE_FILTER here would be better than something like IP_PROTOCOL_FILTER in conveying that this feature is filtering routes from fib rather than say applying bgp route maps to filter routes from rib itself.
Adds a HLD for
FIB_ROUTE_FILTER— a CONFIG_DB table that binds a route-map to a(vrf, addr_family, source-protocol)tuple, so operators can selectively prevent specific routes of a given protocol from being installed into the FIB. Backed by FRR's nativeip|ipv6 protocol <P> route-map <RM>zebra route filtering.The HLD covers:
FIB_ROUTE_FILTERzebra.conf.j2(bgpcfgd) andfrr.conf.j2(frrcfgd)FibRouteFilterMgr(bgpcfgd) andfib_route_filter_handler(frrcfgd, via mgmtd)Related PR: sonic-net/sonic-buildimage#27192