public icon indicating copy to clipboard operation
public copied to clipboard

Routing policy destination protocol match

Open RedLine89 opened this issue 2 years ago • 1 comments

Vendor implementations of routing policies typically have a way to match on destination protocol.

Nokia:

/configure router policy-options policy-statement "NEW_POLICY" entry 10 from protocol bgp-vpn
/configure router policy-options policy-statement "NEW_POLICY" entry 10 to protocol bgp
/configure router policy-options policy-statement "NEW_POLICY" entry 10 from prefix-list "DEFAULT_ROUTE"
/configure router policy-options policy-statement "NEW_POLICY" entry 10 action accept
/configure router policy-options policy-statement "NEW_POLICY" default-action reject

Juniper:

set policy-options policy-statement NEW_POLICY term 10 from protocol bgp
set policy-options policy-statement NEW_POLICY term 10 from prefix-list DEFAULT_ROUTE
set policy-options policy-statement NEW_POLICY term 10 to protocol bgp
set policy-options policy-statement NEW_POLICY term 10 then accept

In Openconfig install-protocol-eq allows to realize from protocol part, but there seems to be no way to match on destination protocol?

Should /oc-rpol:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/config be augmented with something like dst-protocol-eq? (If so maybe it makes sense to change install-protocol-eq to src-protocol-eq).

Otherwise, am I missing another way to achieve this in OC?

Thanks

RedLine89 avatar Aug 30 '22 18:08 RedLine89

Hi!

As far as I know, in Openconfig you can only specify the protocol by with the route was learnt. I've check the IETF model and has also the same issue (in IETF case it is called source-protocol).

In Openconfig it seems there is another way to achieve the same source protocol behaviour with the the container oc-ni-pol:match-protocol-instance. In this case, in adition to the protocol identifier (same identity as install-protocol-eq), you can add the name of the instance. This unlocks the case where there are multiple instances of the same protocol. However, there is no way to indicate the destination protocol in which the route was going to be installed.

image

I think it is reasonable to add the functionality.

In order to add the functionality, either adding the dst-protocol (or install-protocol-dst) directly at /oc-rpol:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/config or at /oc-rpol:routing-policy/policy-definitions/policy-definition/statements/statement/conditions/oc-ni-pol:match-protocol-instance would work.

@RedLine89 In adition to Juniper and Nokia, do you know the support in other platforms?

oscargdd avatar Sep 02 '22 16:09 oscargdd

This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.

github-actions[bot] avatar May 16 '24 02:05 github-actions[bot]