Merge "Route reflector cluster id doc"
[docs.git] / docs / user-guide / bgpcep-guide / bgp / bgp-user-guide-bgp-peering.rst
index a2391fd131557828f4893c1401b0c20fe1f263b1..91d7b97f9c3b30724048775524181b200ebba5e3 100644 (file)
@@ -32,7 +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>-->
+               <!--<local-address>192.0.2.5</local-address>-->
            </config>
        </transport>
        <config>
@@ -376,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*.
@@ -455,25 +494,25 @@ Following configuration sample is intended for route reflector client peering us
 
 .. code-block:: xml
    :linenos:
-   :emphasize-lines: 5,8
+   :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>
-           <route-reflector-cluster-id>192.0.2.4</route-reflector-cluster-id>
        </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 5: Route-reflector cluster id to use for this specific neighbor when local router is configured as a route reflector.
-
 @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.