documentation for graceful restart 23/78123/22
authorMatej Perina <matej.perina@pantheon.tech>
Sun, 25 Nov 2018 09:26:04 +0000 (10:26 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 13 Dec 2018 09:14:35 +0000 (09:14 +0000)
- documentation for two new capabilities,
  graceful restart and long-lived graceful restart
- update documentation of operational state, which
  now shows state of graceful restart procedures

Change-Id: Ic698b9e70b2242e53469add7e960af575d76e228
Signed-off-by: Matej Perina <matej.perina@pantheon.tech>
docs/bgp/bgp-user-guide-graceful-restart-capability.rst [new file with mode: 0644]
docs/bgp/bgp-user-guide-long-lived-graceful-restart-capability.rst [new file with mode: 0644]
docs/bgp/bgp-user-guide-operational-state.rst
docs/bgp/bgp-user-guide-supported-capabilities.rst
docs/bgp/index.rst

diff --git a/docs/bgp/bgp-user-guide-graceful-restart-capability.rst b/docs/bgp/bgp-user-guide-graceful-restart-capability.rst
new file mode 100644 (file)
index 0000000..c3331c2
--- /dev/null
@@ -0,0 +1,103 @@
+.. _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>`_
diff --git a/docs/bgp/bgp-user-guide-long-lived-graceful-restart-capability.rst b/docs/bgp/bgp-user-guide-long-lived-graceful-restart-capability.rst
new file mode 100644 (file)
index 0000000..e2555a6
--- /dev/null
@@ -0,0 +1,50 @@
+.. _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>`_
index b45ec041650c40604cd95a63eee03468887f5a2a..9c9c3046e2037d15888a58f75c02a40897939190 100644 (file)
@@ -176,9 +176,6 @@ BGP Neighbor Operational State
 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``
@@ -189,7 +186,7 @@ BGP Neighbor Families Operational State
 
 .. 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>
@@ -198,11 +195,14 @@ BGP Neighbor Families Operational State
                 <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>
@@ -210,11 +210,14 @@ BGP Neighbor Families Operational State
                 <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>
 
@@ -226,13 +229,18 @@ BGP Neighbor Families Operational State
 
 @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``
 
@@ -258,8 +266,11 @@ BGP Neighbor Family Operational State
        </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>
@@ -375,24 +386,27 @@ BGP Neighbor Graceful Restart Operational State
 
 .. 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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
index a56417f0891ed313481d2d85e63bda952b07305f..3651d7d8727c09b61e53c4724764c5f605240ed2 100644 (file)
@@ -39,3 +39,5 @@ In addition to the base protocol implementation, the plugin provides many extens
       * `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
index f7f516cfefe68be5122aeef0cc8bf6838ada94b3..4b83d7d1d3dd8c878afa632961228b45e41f5598 100644 (file)
@@ -22,6 +22,8 @@ The user should learn about BGP basic concepts, supported capabilities, configur
    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