public icon indicating copy to clipboard operation
public copied to clipboard

Update openconfig-bgp-common.yang to support ExRR

Open sachendras opened this issue 6 months ago • 8 comments

Support for extended route retention (ERR) which is an extension to graceful restart.

Scope of Change: This pull request introduces a new feature to the OpenConfig BGP model called BGP Extended Route Retention (ExRR). This feature provides a mechanism for a BGP speaker to retain stale routes from a failed peer for a long, configurable duration, independent of standard Graceful Restart timers.

The core of this feature is a flexible, policy-driven approach. Key changes include:

  • A new bgp-extended-route-retention-config grouping is added to openconfig-bgp-common.yang . This grouping includes new configuration leaves such as:

    • enabled: To activate or deactivate the feature.
    • retention-time: A configurable timer for how long stale routes are held .
    • retention-policy: A leaflist that allows an operator to apply an ordered chain of routing policies to stale routes.
    • default-retention-policy: An explicit control for the default action (accept or reject) for routes that do not match the policy chain.
  • A new bgp-extended-route-retention-state grouping is added to provide operational state, including extended-retention-active to indicate if the feature is active and remaining-retention-time to show the time left before routes are purged.

  • The description clarifies that this feature is distinct from the IETF's Long-Lived Graceful Restart (LLGR, RFC 9494) because ExRR is a purely local behavior that does not require BGP capability negotiation .

  • These new configuration and state capabilities have been added to the BGP model at the global, peer-group, and neighbor levels to allow for flexible application.

Current vendor implementations

Snippet of different proposals below

Path: network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart

module: openconfig-network-instance
  +--rw graceful-restart
     +--rw config
     |  +--rw enabled?            boolean
     |  +--rw restart-time?       uint16
     |  +--rw stale-routes-time?  decimal64
     |  +--rw helper-enabled?     boolean
     +--ro state
     |  +--ro enabled?            boolean
     |  +--ro restart-time?       uint16
     |  +--ro stale-routes-time?  decimal64
     |  +--ro helper-enabled?     boolean
     |  +--ro local-restarting?   boolean
     |  +--ro peer-restarting?    boolean
     |  +--ro peer-restart-time?  uint16
     |  +--ro mode?               identityref
     +--rw extended-route-retention
        +--rw config
        |  +--rw enabled?                      boolean
        |  +--rw retention-time?               uint32
        |  +--rw retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
        |  +--rw default-retention-policy?     oc-pol-types:default-policy-type
        +--ro state
           +--ro enabled?                      boolean
           +--ro retention-time?               uint32
           +--ro retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
           +--ro default-retention-policy?     oc-pol-types:default-policy-type
           +--ro extended-retention-active?    boolean
           +--ro remaining-retention-time?     uint32

Pat: network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/graceful-restart

module: openconfig-network-instance
  +--rw graceful-restart
     +--rw config
     |  +--rw enabled?            boolean
     |  +--rw restart-time?       uint16
     |  +--rw stale-routes-time?  decimal64
     |  +--rw helper-enabled?     boolean
     +--ro state
     |  +--ro enabled?            boolean
     |  +--ro restart-time?       uint16
     |  +--ro stale-routes-time?  decimal64
     |  +--ro helper-enabled?     boolean
     |  +--ro local-restarting?   boolean
     |  +--ro peer-restarting?    boolean
     |  +--ro peer-restart-time?  uint16
     |  +--ro mode?               identityref
     +--rw extended-route-retention
        +--rw config
        |  +--rw enabled?                      boolean
        |  +--rw retention-time?               uint32
        |  +--rw retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
        |  +--rw default-retention-policy?     oc-pol-types:default-policy-type
        +--ro state
           +--ro enabled?                      boolean
           +--ro retention-time?               uint32
           +--ro retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
           +--ro default-retention-policy?     oc-pol-types:default-policy-type
           +--ro extended-retention-active?    boolean
           +--ro remaining-retention-time?     uint32

Path: network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/graceful-restart

module: openconfig-network-instance
  +--rw graceful-restart
     +--rw config
     |  +--rw enabled?            boolean
     |  +--rw restart-time?       uint16
     |  +--rw stale-routes-time?  decimal64
     |  +--rw helper-enabled?     boolean
     +--ro state
     |  +--ro enabled?            boolean
     |  +--ro restart-time?       uint16
     |  +--ro stale-routes-time?  decimal64
     |  +--ro helper-enabled?     boolean
     |  +--ro local-restarting?   boolean
     |  +--ro peer-restarting?    boolean
     |  +--ro peer-restart-time?  uint16
     |  +--ro mode?               identityref
     +--rw extended-route-retention
        +--rw config
        |  +--rw enabled?                      boolean
        |  +--rw retention-time?               uint32
        |  +--rw retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
        |  +--rw default-retention-policy?     oc-pol-types:default-policy-type
        +--ro state
           +--ro enabled?                      boolean
           +--ro retention-time?               uint32
           +--ro retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
           +--ro default-retention-policy?     oc-pol-types:default-policy-type
           +--ro extended-retention-active?    boolean
           +--ro remaining-retention-time?     uint32

Path: network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/graceful-restart

module: openconfig-network-instance
  +--rw graceful-restart
     +--rw config
     |  +--rw enabled?            boolean
     |  +--rw restart-time?       uint16
     |  +--rw stale-routes-time?  decimal64
     |  +--rw helper-enabled?     boolean
     +--ro state
     |  +--ro enabled?            boolean
     |  +--ro restart-time?       uint16
     |  +--ro stale-routes-time?  decimal64
     |  +--ro helper-enabled?     boolean
     |  +--ro local-restarting?   boolean
     |  +--ro peer-restarting?    boolean
     |  +--ro peer-restart-time?  uint16
     |  +--ro mode?               identityref
     +--rw extended-route-retention
        +--rw config
        |  +--rw enabled?                      boolean
        |  +--rw retention-time?               uint32
        |  +--rw retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
        |  +--rw default-retention-policy?     oc-pol-types:default-policy-type
        +--ro state
           +--ro enabled?                      boolean
           +--ro retention-time?               uint32
           +--ro retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
           +--ro default-retention-policy?     oc-pol-types:default-policy-type
           +--ro extended-retention-active?    boolean
           +--ro remaining-retention-time?     uint32

Path: network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/graceful-restart

module: openconfig-network-instance
  +--rw graceful-restart
     +--rw config
     |  +--rw enabled?            boolean
     |  +--rw restart-time?       uint16
     |  +--rw stale-routes-time?  decimal64
     |  +--rw helper-enabled?     boolean
     +--ro state
     |  +--ro enabled?            boolean
     |  +--ro restart-time?       uint16
     |  +--ro stale-routes-time?  decimal64
     |  +--ro helper-enabled?     boolean
     |  +--ro local-restarting?   boolean
     |  +--ro peer-restarting?    boolean
     |  +--ro peer-restart-time?  uint16
     |  +--ro mode?               identityref
     +--rw extended-route-retention
        +--rw config
        |  +--rw enabled?                      boolean
        |  +--rw retention-time?               uint32
        |  +--rw retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
        |  +--rw default-retention-policy?     oc-pol-types:default-policy-type
        +--ro state
           +--ro enabled?                      boolean
           +--ro retention-time?               uint32
           +--ro retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
           +--ro default-retention-policy?     oc-pol-types:default-policy-type
           +--ro extended-retention-active?    boolean
           +--ro remaining-retention-time?     uint32

Path: network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/graceful-restart

module: openconfig-network-instance
  +--rw graceful-restart
     +--rw config
     |  +--rw enabled?            boolean
     |  +--rw restart-time?       uint16
     |  +--rw stale-routes-time?  decimal64
     |  +--rw helper-enabled?     boolean
     +--ro state
     |  +--ro enabled?            boolean
     |  +--ro restart-time?       uint16
     |  +--ro stale-routes-time?  decimal64
     |  +--ro helper-enabled?     boolean
     |  +--ro local-restarting?   boolean
     |  +--ro peer-restarting?    boolean
     |  +--ro peer-restart-time?  uint16
     |  +--ro mode?               identityref
     +--rw extended-route-retention
        +--rw config
        |  +--rw enabled?                      boolean
        |  +--rw retention-time?               uint32
        |  +--rw retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
        |  +--rw default-retention-policy?     oc-pol-types:default-policy-type
        +--ro state
           +--ro enabled?                      boolean
           +--ro retention-time?               uint32
           +--ro retention-policy*             -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
           +--ro default-retention-policy?     oc-pol-types:

sachendras avatar Jun 19 '25 17:06 sachendras

/gcbrun

dplore avatar Jun 20 '25 19:06 dplore

No major YANG version changes in commit a154667d3a427c32c3a224ef9d19724fb35b781a

OpenConfigBot avatar Jun 20 '25 19:06 OpenConfigBot

Is this the same thing as https://datatracker.ietf.org/doc/html/rfc9494 ? If so, please modify naming and add a reference to rfc9494 similar to other OC models which reference RFCs

No. This is DIFFERENT then RFC9494. It is non device local behaviour.

 The Extended Route Retention (ExRR) is different then IETF Long-Lived
    Graceful Restart (RFC 9494). The fundamental differences are:
    - The ERR process stale routes via additional policy, as statead above.
    - The ERR is purly local behaviour of GR reciving speaker (helper). There
    is no BGP capability exchanges and negotiated. This allows enable and
    use ERR on one side of session, when other side may do not support ERR";

rszarecki avatar Jun 24 '25 02:06 rszarecki

@sachendras

  1. Can we use "ExRR" or "XRR" instead of "ERR". ERR sounds like ERROR...

  2. Can you add tree view to description ? following will render tree: pyang -f tree -p ./release/models/*/* --tree-path="network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart" pyang -f tree -p ./release/models/*/* --tree-path="network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/graceful-restart" pyang -f tree -p ./release/models/*/* --tree-path="network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/graceful-restart" pyang -f tree -p ./release/models/*/* --tree-path="network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/graceful-restart" pyang -f tree -p ./release/models/*/* --tree-path="network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/graceful-restart" pyang -f tree -p ./release/models/*/* --tree-path="network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/graceful-restart"

  3. Please add vendor implementation references: Arista

rszarecki avatar Jun 24 '25 02:06 rszarecki

/gcbrun

rszarecki avatar Jun 24 '25 14:06 rszarecki

/gcbrun

dplore avatar Jun 26 '25 19:06 dplore

           +--ro extended-retention-active?    boolean
           +--ro remaining-retention-time?     uint32

are meaningfull only under neighbor and neighor/afi-safi.

retention-time? uint32 is 2^32/3600/24 = 49 days ; I think this is too little.

i description tree for Path: network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/graceful-restart - the last one, seems to be incomplete.

rszarecki avatar Jun 26 '25 22:06 rszarecki

Discussed at OC Operators Meet Oct 07: Looks like this should be in waiting for author? (Some TODOs / comments still open and checks failing)

Feel free to move it back once it's been finalized here.

ElodinLaarz avatar Oct 07 '25 16:10 ElodinLaarz