Merge "Route reflector cluster id doc"
[docs.git] / docs / user-guide / bgpcep-guide / bgp / bgp-user-guide-bgp-peering.rst
index 508209cf4d3733412cf32883dd55debfdd56ebf2..91d7b97f9c3b30724048775524181b200ebba5e3 100644 (file)
@@ -18,7 +18,7 @@ Here is a sample basic neighbor configuration:
 
 .. code-block:: xml
    :linenos:
-   :emphasize-lines: 3,4
+   :emphasize-lines: 2,5,6,11,12,17,19
 
    <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
        <neighbor-address>192.0.2.1</neighbor-address>
@@ -32,6 +32,7 @@ Here is a sample basic neighbor configuration:
            <config>
                <remote-port>179</remote-port>
                <passive-mode>false</passive-mode>
+               <!--<local-address>192.0.2.5</local-address>-->
            </config>
        </transport>
        <config>
@@ -52,9 +53,11 @@ Here is a sample basic neighbor configuration:
 
 @line 12: Wait for peers to issue requests to open a BGP session, rather than initiating sessions from the local router. Default value is **false**.
 
-@line 16: Explicitly designate the peer as internal or external. Default value is **INTERNAL**.
+@line 13: Optional Local IP (either IPv4 or IPv6) address used to establish connections to the remote peer. Effective in active mode only.
 
-@line 18: Enable families.
+@line 17: Explicitly designate the peer as internal or external. Default value is **INTERNAL**.
+
+@line 19: Enable families.
 
 -----
 
@@ -373,6 +376,45 @@ Following configuration sample is intended for external peering:
 
 @line 5: AS number of the remote peer.
 
+Local AS
+''''''''
+
+.. figure:: ./images/local-as.png
+   :alt: BGP eBGP with Local AS setup.
+
+The local-AS feature allows a router(eBGP) to appear to be a member of a second autonomous system (AS), in addition to its real AS.
+
+In updates sent from R3 to R2, the AS_SEQUENCE in the AS_PATH attribute contains "62 63". And updates sent from R2 to R3, the AS_SEQUENCE in the AS_PATH attribute contains "62 65".
+
+AS 62 will be prepended to updates that are sent to and received from R3.
+
+Following configuration sample is intended for external peering with Local AS:
+
+**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``
+
+**Method:** ``POST``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+   :linenos:
+   :emphasize-lines: 5,6
+
+   <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+       <neighbor-address>192.0.2.3</neighbor-address>
+       <config>
+           <peer-type>EXTERNAL</peer-type>
+           <peer-as>64999</peer-as>
+           <local-as>65100</local-as>
+       </config>
+   </neighbor>
+
+@line 5: AS number of the remote peer.
+
+@line 6: Local AS number of the remote peer.
+
 Route reflector configuration
 '''''''''''''''''''''''''''''
 The local BGP speaker can be configured with a specific *cluster ID*.
@@ -429,6 +471,48 @@ Following configuration sample is intended for route reflector client peering:
 
 @line 8: Configure the neighbor as a route reflector client. Default value is *false*.
 
+Route reflector and Multiple Cluster IDs
+''''''''''''''''''''''''''''''''''''''''
+
+An optional non-transitive attribute called CLUSTER_LIST is modified when a route reflector reflects a prefix. 
+For loop prevention the route reflector adds its own cluster ID to, and discards any update containing router's own cluster ID. 
+Using multiple cluster IDs allows updates to propagate to nodes that reside in a different cluster.
+
+
+.. figure:: ./images/MultipleClustersIds.png
+   :alt: BGP RR Multiple Cluster IDs setup.
+
+Following configuration sample is intended for route reflector client peering using specific cluster id:
+
+**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``
+
+**Method:** ``POST``
+
+**Content-Type:** ``application/xml``
+
+**Request Body:**
+
+.. code-block:: xml
+   :linenos:
+   :emphasize-lines: 8,9
+
+   <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+       <neighbor-address>192.0.2.4</neighbor-address>
+       <config>
+           <peer-type>INTERNAL</peer-type>
+       </config>
+       <route-reflector>
+           <config>
+               <route-reflector-client>true</route-reflector-client>
+               <route-reflector-cluster-id>192.0.2.4</route-reflector-cluster-id>
+           </config>
+       </route-reflector>
+   </neighbor>
+
+@line 8: Configure the neighbor as a route reflector client. Default value is *false*.
+
+@line 9: Route-reflector cluster id to use for this specific neighbor when local router is configured as a route reflector.
+
 MD5 authentication configuration
 ''''''''''''''''''''''''''''''''
 The OpenDaylight BGP implementation is supporting TCP MD5 for authentication.