.. _bgp-user-guide-protocol-configuration:
Protocol Configuration
======================
As a first step, a new protocol instance needs to be configured.
It is a very basic configuration conforming with RFC4271.
.. note:: RIB policy must already be configured and present before configuring the protocol.
**URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
**Method:** ``POST``
**Content-Type:** ``application/xml``
**Request Body:**
.. code-block:: xml
:linenos:
:emphasize-lines: 2,7,8
bgp-example
x:BGP
192.0.2.2
65000
REJECT-ROUTE
REJECT-ROUTE
default-odl-import-policy
default-odl-export-policy
@line 2: The unique protocol instance identifier.
@line 7: BGP Identifier of the speaker.
@line 8: Local autonomous system number of the speaker. Note that, OpenDaylight BGP implementation supports four-octet AS numbers only.
@line 14: Default ODL Import Policy.
@line 15: Default ODL Export Policy.
-----
The new instance presence can be verified via REST:
**URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example``
**Method:** ``GET``
**Response Body:**
.. code-block:: xml
:linenos:
:emphasize-lines: 3,4
bgp-example
x:ipv4-address-family
x:unicast-subsequent-address-family
true
@line 3: Loc-RIB - Per-protocol instance RIB, which contains the routes that have been selected by local BGP speaker's decision process.
@line 4: The BGP-4 supports carrying IPv4 prefixes, such routes are stored in *ipv4-address-family*/*unicast-subsequent-address-family* table.