--- /dev/null
+.. _bgp-user-guide-graceful-restart-capability:
+
+Graceful Restart Capability
+===========================
+The Graceful Restart Capability helps us to minimize the negative effects on routing caused by BGP restart by allowing BGP speaker to express its ability to preserve forwarding state during BGP restart.
+New capability is advertised in OPEN message which contains information about Graceful Restart timer value, supported families and their forwarding state.
+
+.. contents:: Contents
+ :depth: 2
+ :local:
+
+Configuration
+^^^^^^^^^^^^^
+This section shows a way how to configure Graceful Restart Timer and enable Graceful Restart support for specific families.
+
+.. note:: Graceful Restart capability is enabled by default even when no families are advertised. In that case only receiving speaker procedures apllies.
+
+Graceful Restart Timer
+''''''''''''''''''''''
+Routing information for configured families are preserved for time given by Graceful Restart timer in seconds. This can be configured in *graceful-restart* section of *neighbor* or *peer-group* configuration.
+
+**URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/graceful-restart``
+
+or
+
+**URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/peer-groups/peer-group/external-neighbors/graceful-restart``
+
+**Method:** ``PUT``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+ :linenos:
+ :emphasize-lines: 3
+
+ <graceful-restart xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <config>
+ <restart-time>60</restart-time>
+ </config>
+ </graceful-restart>
+
+@line 3: value of Graceful Restart timer in seconds
+
+.. note:: If case that Graceful Restart timer is configured for both neighbor and peer-group, the one from peer-group is used.
+ If no Graceful Restart timer is configured value of HOLD timer is used.
+
+BGP Neighbor Families Graceful Restart Configuration
+''''''''''''''''''''''''''''''''''''''''''''''''''''
+Preserving specific family during Graceful Restart must be enabled in *graceful-restart* section of family configuration for *neighbor* or *peer-group*.
+
+**URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST/graceful-restart``
+
+or
+
+**URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/peer-groups/peer-group/external-neighbors/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST/graceful-restart``
+
+**Method:** ``PUT``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+ :linenos:
+ :emphasize-lines: 3
+
+ <graceful-restart xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <config>
+ <enable>true</enable>
+ </config>
+ </graceful-restart>
+
+@line 3: True if we want to preserve family routing information during Graceful Restart
+
+Usage
+^^^^^
+In case when we are invoking Graceful Restart we act as Restarting Speaker and we are additionally postponing path selection process until end-of-rib is received for all families or Selection Deferral timer expires, whichever happens first.
+To perform Graceful Restart with peer, invoke RPC:
+
+**URL:** ``/restconf/operations/bgp-peer-rpc:restart-gracefully``
+
+**Method:** ``POST``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+ :linenos:
+ :emphasize-lines: 3
+
+ <input xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc">
+ <peer-ref xmlns:rib="urn:opendaylight:params:xml:ns:yang:bgp-rib">/rib:bgp-rib/rib:rib[rib:id="bgp-example"]/rib:peer[rib:peer-id="bgp://10.25.1.9"]</peer-ref>
+ <selection-deferral-time>60</slection-deferral-time>
+ </input>
+
+@line 3: Value of Selection Deferral timer in seconds
+
+References
+^^^^^^^^^^
+* `Graceful Restart Mechanism for BGP <https://tools.ietf.org/html/rfc4724>`_
--- /dev/null
+.. _bgp-user-guide-long-lived-graceful-restart-capability:
+
+Long-Lived Graceful Restart Capability
+======================================
+The Long-Lived Graceful Restart Capability is extension to Graceful Restart that provides tools to retain stale routes for longer time upon session failure.
+New capability is advertised in OPEN message in conjunction with Graceful Restart Capability, which contains list of supported families and their stale timer.
+After session failure and Graceful Restart timer expire routing information is retained for value of Long-Lived Stale Timer.
+
+.. contents:: Contents
+ :depth: 2
+ :local:
+
+Configuration
+^^^^^^^^^^^^^
+Long-Live Graceful Restart is enabled and configured per family in *ll-graceful-restart* section of *neighbor* or *peer-group* family configuration.
+
+**URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST/graceful-restart``
+
+or
+
+**URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/peer-groups/peer-group/external-neighbors/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST/graceful-restart``
+
+**Method:** ``PUT``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+ :linenos:
+ :emphasize-lines: 3,6
+
+ <graceful-restart xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <config>
+ <enable>true</enable>
+ <ll-graceful-restart xmlns="urn:opendaylight:params:xml:ns:yang:bgp:ll-graceful-restart">
+ <config>
+ <long-live-stale-time>180</long-live-stale-time>
+ </config>
+ </ll-graceful-restart>
+ </config>
+ </graceful-restart>
+
+@line 3: if Graceful Restart support is disabled for family only procedures for Long-Lived Graceful Restart applies
+
+@line 6: value of Long-Lived Stale timer in seconds
+
+References
+^^^^^^^^^^
+* `Support for Long-lived BGP Graceful Restart <https://tools.ietf.org/html/draft-uttaro-idr-bgp-persistence-04>`_
BGP Neighbor Families Operational State
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. note:: Graceful Restart not supported yet. Planned for Carbon.
-
-
**URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/afi-safis``
**Method:** ``GET``
.. code-block:: xml
:linenos:
- :emphasize-lines: 3,5,7,9,10
+ :emphasize-lines: 3,5,7,9,10,11,12,13
<afi-safis xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
<afi-safi>
<active>false</active>
</state>
<graceful-restart>
- <state>
- <received>false</received>
- <advertised>false</advertised>
- </state>
- </graceful-restart>
+ <state>
+ <received>true</received>
+ <ll-received>true</ll-received>
+ <ll-advertised>true</ll-advertised>
+ <ll-stale-timer>180</ll-stale-timer>
+ <advertised>true</advertised>
+ </state>
+ </graceful-restart>
</afi-safi>
<afi-safi>
<afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
<active>false</active>
</state>
<graceful-restart>
- <state>
- <received>false</received>
- <advertised>false</advertised>
- </state>
- </graceful-restart>
+ <state>
+ <received>true</received>
+ <ll-received>true</ll-received>
+ <ll-advertised>true</ll-advertised>
+ <ll-stale-timer>100</ll-stale-timer>
+ <advertised>true</advertised>
+ </state>
+ </graceful-restart>
</afi-safi>
</afi-safis>
@line 9: True if the peer supports graceful restart.
-@line 10: True if we support graceful restart.
+@line 10: True if peer supports Long-Lived graceful restart.
+
+@line 11: True if we supports Long-Lived graceful restart.
+
+@line 12: Value of Long-Lived stale timer in seconds for specific family
+
+@line 13: True if we support graceful restart.
BGP Neighbor Family Operational State
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note:: Prefixes state is only provided once session is established.
-.. note:: Graceful Restart not supported yet. Planned to be implemented in Carbon.
**URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST``
</state>
<graceful-restart>
<state>
- <received>false</received>
- <advertised>false</advertised>
+ <received>true</received>
+ <ll-received>true</ll-received>
+ <ll-advertised>true</ll-advertised>
+ <ll-stale-timer>180</ll-stale-timer>
+ <advertised>true</advertised>
</state>
</graceful-restart>
</afi-safi>
.. code-block:: xml
:linenos:
- :emphasize-lines: 3,4,5
+ :emphasize-lines: 3,4,5,6
<graceful-restart xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
<state>
- <peer-restart-time>0</peer-restart-time>
<peer-restarting>false</peer-restarting>
<local-restarting>false</local-restarting>
+ <peer-restart-time>5</peer-restart-time>
+ <mode>BILATERAL</mode>
</state>
</graceful-restart>
-@line 3: The period of time (advertised by the peer) that the peer expects a restart of a BGP session to take.
-
-@line 4: This flag indicates whether the remote neighbor is currently in the process of restarting, and hence
+@line 3: This flag indicates whether the remote neighbor is currently in the process of restarting, and hence
received routes are currently stale.
-@line 5: This flag indicates whether the local neighbor is currently restarting. The flag is unset after all NLRI
+@line 4: This flag indicates whether the local neighbor is currently restarting. The flag is unset after all NLRI
have been advertised to the peer, and the End-of-RIB (EOR) marker has been unset.
+@line 5: The period of time (advertised by the peer) in seconds that the peer expects a restart of a BGP session to take.
+
+@line 6: Mode of Graceful Restart operation, depending on family support advertising to peer and receiving from peer can be HELPER-ONLY (only remote peers support some families), REMOTE-HELPER (only we advertise support), BILATERAL (two-side support).
+
BGP Peer Groups Operational State
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* `draft-sajassi-bess-evpn-vpws-fxc-01 <https://tools.ietf.org/html/draft-sajassi-bess-evpn-vpws-fxc-01>`_ - EVPN VPWS Flexible Cross-Connect Service
* `RFC7911 <https://tools.ietf.org/html/rfc7911>`_ - Advertisement of Multiple Paths in BGP
* `RFC2918 <https://tools.ietf.org/html/rfc2918>`_ - Route Refresh Capability for BGP-4
+* `RFC4724 <https://tools.ietf.org/html/rfc4724>`_ - Graceful Restart Mechanism for BGP
+ * `draft-uttaro-idr-bgp-persistence-04 <https://tools.ietf.org/html/draft-uttaro-idr-bgp-persistence-04>`_ - Support for Long-lived BGP Graceful Restart
\ No newline at end of file
bgp-user-guide-route-target-family
bgp-user-guide-additional-path-capability
bgp-user-guide-route-refresh-capability
+ bgp-user-guide-graceful-restart-capability
+ bgp-user-guide-long-lived-graceful-restart-capability
bgp-user-guide-operational-state
bgp-user-guide-high-availability
bgp-user-guide-topology-provider