1 .. _bgp-user-guide-protocol-configuration:
5 As a first step, a new protocol instance needs to be configured.
6 It is a very basic configuration conforming with RFC4271.
8 .. note:: RIB policy must already be configured and present before configuring the protocol.
10 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
14 **Content-Type:** ``application/xml``
20 :emphasize-lines: 2,7,8
22 <protocol xmlns="http://openconfig.net/yang/network-instance">
23 <name>bgp-example</name>
24 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
25 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
28 <router-id>192.0.2.2</router-id>
33 <default-export-policy>REJECT-ROUTE</default-export-policy>
34 <default-import-policy>REJECT-ROUTE</default-import-policy>
35 <import-policy>default-odl-import-policy</import-policy>
36 <export-policy>default-odl-export-policy</export-policy>
43 @line 2: The unique protocol instance identifier.
45 @line 7: BGP Identifier of the speaker.
47 @line 8: Local autonomous system number of the speaker. Note that, OpenDaylight BGP implementation supports four-octet AS numbers only.
49 @line 14: Default ODL Import Policy.
51 @line 15: Default ODL Export Policy.
55 The new instance presence can be verified via REST:
57 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example``
67 <rib xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
71 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
72 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
73 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
75 <uptodate>true</uptodate>
81 @line 3: Loc-RIB - Per-protocol instance RIB, which contains the routes that have been selected by local BGP speaker's decision process.
83 @line 4: The BGP-4 supports carrying IPv4 prefixes, such routes are stored in *ipv4-address-family*/*unicast-subsequent-address-family* table.