Skip to content

Conversation

sachendras
Copy link
Contributor

@sachendras sachendras commented Jun 19, 2025

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:

Support for extended route retention (ERR)
Added container for extended-route-retention under container graceful-restart.
Update for ERR support
Update for ERR addition.
Added ERR under AFI section of Global BGP config
ERR definition at Neighbor level and Neighbor AFI/SAFI level.
Added ERR under AFI/SAFI level
Copy link
Member

@dplore dplore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dplore
Copy link
Member

dplore commented Jun 20, 2025

/gcbrun

@OpenConfigBot
Copy link

OpenConfigBot commented Jun 20, 2025

No major YANG version changes in commit a154667

@rszarecki
Copy link
Contributor

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
Copy link
Contributor

rszarecki commented Jun 24, 2025

@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

Addressing comments:

- Enable policy chaining: The retention-policy node is changed from a leaf to a leaflist to allow an operator to apply an ordered chain of multiple routing policies
- Add Explicit and Reusable Default Policy: Is reusing the existing oc-pol-types:default-policy-type
- Add Operational State for ERR
Updated to include "bgp-extended-route-retention-state"
Update to include bgp-extended-route-retention-state;
Updates to include bgp-extended-route-retention-state for state.
@rszarecki
Copy link
Contributor

/gcbrun

@sachendras sachendras changed the title Update openconfig-bgp-common.yang to support ERR Update openconfig-bgp-common.yang to support ExRR Jun 24, 2025
modified line on LLGR based on review feedback
Correction to remaining-retention-time with more clarity
@dplore
Copy link
Member

dplore commented Jun 26, 2025

/gcbrun

@dplore dplore moved this to Ready to discuss in OC Operator Review Jun 26, 2025
@rszarecki
Copy link
Contributor

           +--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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready to discuss
Development

Successfully merging this pull request may close these issues.

5 participants