Merge "Route reflector cluster id doc"
[docs.git] / docs / user-guide / bgpcep-guide / bgp / bgp-user-guide-bgp-peering.rst
index f1225b446037ef57dcd5f3dfebf44c6a1a41086f..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,11 +32,15 @@ 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>
            <peer-type>INTERNAL</peer-type>
        </config>
+       <afi-safis>
+           ...
+       </afi-safis>
    </neighbor>
 
 @line 2: IP address of the remote BGP peer. Also serves as an unique identifier of a neighbor in a list of neighbors.
@@ -49,7 +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 17: Explicitly designate the peer as internal or external. Default value is **INTERNAL**.
+
+@line 19: Enable families.
 
 -----
 
@@ -368,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*.
@@ -424,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.
@@ -562,35 +651,6 @@ A sample basic neighbor configuration using a peer group follows:
 
 @line 4: Peer group identifier.
 
-Simple Routing Policy configuration
-'''''''''''''''''''''''''''''''''''
-The OpenDaylight BGP implementation is supporting *Simple Routing Policy*.
-Sample configuration below shows how to set *Simple Routing Policy* for a peer:
-
-**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: 4
-
-   <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
-       <neighbor-address>192.0.2.7</neighbor-address>
-       <config>
-           <simple-routing-policy>learn-none</simple-routing-policy>
-       </config>
-   </neighbor>
-
-@line 4: *Simple Routing Policy*:
-
-   * ``learn-none`` - routes advertised by the peer are not propagated to Effective-RIB-In and Loc-RIB
-   * ``announce-none`` - routes from local Loc-RIB are not advertised to the peer
-
 .. note:: Existing neighbor configuration can be reconfigured (change configuration parameters) anytime.
    As a result, established connection is dropped, peer instance is recreated with a new configuration settings and connection re-established.