3 This guide contains information on how to use OpenDaylight Border Gateway Protocol (BGP) plugin.
4 The user should learn about BGP basic concepts, supported capabilities, configuration and usage.
12 This section provides high-level overview of the Border Gateway Protocol, OpenDaylight implementation and BGP usage in SDN era.
14 .. contents:: Contents
18 Border Gateway Protocol
19 ^^^^^^^^^^^^^^^^^^^^^^^
20 The Border Gateway Protocol (BGP) is an inter-Autonomous System (AS) routing protocol.
21 The primary role of the BGP is an exchange of routes among other BGP systems.
22 The route is an unit of information which pairs destination (IP address prefix) with attributes to the path with the destination.
23 One of the most interesting attributes is a list of ASes that the route traversed - essential when avoiding loop routing.
24 Advertised routes are stored in the Routing Information Bases (RIBs). Routes are later used to forward packets, stored in Routing Table for this purpose.
25 The main advantage of the BGP over other routing protocols is its scalability, thus it has become the standardized Internet routing protocol (Internet is a set of ASes).
29 However BGP evolved long time before SDN was born, it plays a significant role in many SDN use-cases.
30 Also, continuous evolution of the protocol brings extensions that are very well suited for SDN.
31 Nowadays, BGP can carry various types of routing information - L3VPN, L2VPN, IP multicast, linkstate, etc.
32 Here is a brief list of software-based/legacy-network technologies where BGP-based SDN solution get into an action:
34 * SDN WAN - WAN orchestration and optimization
35 * SDN router - Turns switch into an Internet router
36 * Virtual Route Reflector - High-performance server-based BGP Route Reflector
37 * SDX - A Software Defined Internet Exchange controller
38 * Large-Scale Data Centers - BGP Data Center Routing, MPLS/SR in DCs, DC interconnection
39 * DDoS mitigation - Traffic Filtering distribution with BGP
41 OpenDaylight BGP plugin
42 ^^^^^^^^^^^^^^^^^^^^^^^
43 The OpenDaylight controller provides an implementation of BGP (RFC 4271) as a south-bound protocol plugin.
44 The implementation renders all basic *BGP speaker capabilities*:
46 * inter/intra-AS peering
51 The plugin's **north-bound API** (``REST``/``Java``) provides to user:
53 * fully dynamic runtime standardized BGP configuration
54 * read-only access to all RIBs
55 * read-write programmable RIBs
56 * read-only reachability/linkstate topology view
58 .. note:: The BGP plugin is NOT a virtual router - does not construct Routing Tables, nor forward traffic.
60 List of supported capabilities
61 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 In addition to the base protocol implementation, the plugin provides many extensions to BGP, all based on IETF standards.
64 * `RFC4271 <https://tools.ietf.org/html/rfc4271>`_ - A Border Gateway Protocol 4 (BGP-4)
65 * `RFC4456 <https://tools.ietf.org/html/rfc4456>`_ - BGP Route Reflection: An Alternative to Full Mesh Internal BGP (IBGP)
66 * `RFC1997 <https://tools.ietf.org/html/rfc1997>`_ - BGP Communities Attribute
67 * `RFC4360 <https://tools.ietf.org/html/rfc4360>`_ - BGP Extended Communities Attribute
68 * `RFC4486 <https://tools.ietf.org/html/rfc4486>`_ - Subcodes for BGP Cease Notification Message
69 * `RFC5492 <https://tools.ietf.org/html/rfc5492>`_ - Capabilities Advertisement with BGP-4
70 * `RFC5004 <https://tools.ietf.org/html/rfc5004>`_ - Avoid BGP Best Path Transitions from One External to Another
71 * `RFC6286 <https://tools.ietf.org/html/rfc6286>`_ - Autonomous-System-Wide Unique BGP Identifier for BGP-4
72 * `RFC6793 <https://tools.ietf.org/html/rfc6793>`_ - BGP Support for Four-Octet Autonomous System (AS) Number Space
73 * `RFC7311 <https://tools.ietf.org/html/rfc7311>`_ - The Accumulated IGP Metric Attribute for BGP
74 * `RFC5668 <https://tools.ietf.org/html/rfc5668>`_ - 4-Octet AS Specific BGP Extended Community
75 * `draft-ietf-idr-link-bandwidth <https://tools.ietf.org/html/draft-ietf-idr-link-bandwidth-06>`_ - BGP Link Bandwidth Extended Community
76 * `draft-ietf-idr-bgp-extended-messages <https://tools.ietf.org/html/draft-ietf-idr-bgp-extended-messages-13>`_ - Extended Message support for BGP
77 * `RFC4760 <https://tools.ietf.org/html/rfc4760>`_ - Multiprotocol Extensions for BGP-4
78 * `RFC7752 <https://tools.ietf.org/html/rfc7752>`_ - North-Bound Distribution of Link-State and TE Information using BGP
79 * `draft-gredler-idr-bgp-ls-segment-routing-ext <https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-03>`_ - BGP Link-State extensions for Segment Routing
80 * `draft-ietf-idr-bgpls-segment-routing-epe <https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05>`_ - Segment Routing Egress Peer Engineering BGP-LS Extensions
81 * `RFC5575 <https://tools.ietf.org/html/rfc5575>`_ - Dissemination of Flow Specification Rules
82 * `RFC7674 <http://tools.ietf.org/html/rfc7674>`_ - Clarification of the Flowspec Redirect Extended Community
83 * `draft-ietf-idr-flow-spec-v6 <https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-07>`_ - Dissemination of Flow Specification Rules for IPv6
84 * `draft-ietf-idr-flowspec-redirect-ip <https://tools.ietf.org/html/draft-ietf-idr-flowspec-redirect-ip-00>`_ - BGP Flow-Spec Redirect to IP Action
85 * `RFC3107 <https://tools.ietf.org/html/rfc3107>`_ - Carrying Label Information in BGP-4
86 * `draft-ietf-idr-bgp-prefix-sid <https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-03>`_ - Segment Routing Prefix SID extensions for BGP
87 * `RFC4364 <https://tools.ietf.org/html/rfc4364>`_ - BGP/MPLS IP Virtual Private Networks (VPNs)
88 * `RFC4659 <https://tools.ietf.org/html/rfc4659>`_ - BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN
89 * `RFC7432 <https://tools.ietf.org/html/rfc7432>`_ - BGP MPLS-Based Ethernet VPN
90 * `draft-ietf-bess-evpn-overlay <https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-04>`_ - A Network Virtualization Overlay Solution using EVPN
91 * `draft-ietf-bess-evpn-vpws <https://tools.ietf.org/html/draft-ietf-bess-evpn-vpws-07>`_ - VPWS support in EVPN
92 * `RFC7911 <https://tools.ietf.org/html/rfc7911>`_ - Advertisement of Multiple Paths in BGP
93 * `RFC2918 <https://tools.ietf.org/html/rfc2918>`_ - Route Refresh Capability for BGP-4
97 This section explains how to install BGP plugin.
99 1. Install BGP feature - ``odl-bgpcep-bgp``.
100 Also, for sake of this sample, it is required to install RESTCONF.
101 In the Karaf console, type command:
103 .. code-block:: console
105 feature:install odl-restconf odl-bgpcep-bgp
107 2. The BGP plugin contains a default configuration, which is applied after the feature starts up.
108 One instance of BGP plugin is created (named *example-bgp-rib*), and its presence can be verified via REST:
110 **URL:** ``/restconf/operational/bgp-rib:bgp-rib``
118 <bgp-rib xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
120 <id>example-bgp-rib</id>
127 Basic Configuration & Concepts
128 ------------------------------
129 The following section shows how to configure BGP basics, how to verify functionality and presents essential components of the plugin.
130 Next samples demonstrate the plugin's runtime configuration capability.
131 It shows the way to configure the plugin via REST, using standardized OpenConfig BGP APIs.
133 .. contents:: Contents
139 This tree illustrates the BGP RIBs organization in datastore.
141 .. code-block:: console
146 +--ro peer* [peer-id]
147 | +--ro peer-id peer-id
148 | +--ro peer-role peer-role
149 | +--ro simple-routing-policy? simple-routing-policy
150 | +--ro supported-tables* [afi safi]
151 | | +--ro afi identityref
152 | | +--ro safi identityref
153 | | +--ro send-receive? send-receive
155 | | +--ro tables* [afi safi]
156 | | +--ro afi identityref
157 | | +--ro safi identityref
159 | | | +--ro uptodate? boolean
161 | +--ro effective-rib-in
162 | | +--ro tables* [afi safi]
163 | | +--ro afi identityref
164 | | +--ro safi identityref
166 | | | +--ro uptodate? boolean
169 | +--ro tables* [afi safi]
170 | +--ro afi identityref
171 | +--ro safi identityref
173 | | +--ro uptodate? boolean
176 +--ro tables* [afi safi]
177 +--ro afi identityref
178 +--ro safi identityref
180 | +--ro uptodate? boolean
183 Protocol Configuration
184 ^^^^^^^^^^^^^^^^^^^^^^
185 As a first step, a new protocol instance needs to be configured.
186 It is a very basic configuration conforming with RFC4271.
188 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
192 **Content-Type:** ``application/xml``
198 :emphasize-lines: 2,7,8
200 <protocol xmlns="http://openconfig.net/yang/network-instance">
201 <name>bgp-example</name>
202 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
203 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
206 <router-id>192.0.2.2</router-id>
213 @line 2: The unique protocol instance identifier.
215 @line 7: BGP Identifier of the speaker.
217 @line 8: Local autonomous system number of the speaker. Note that, OpenDaylight BGP implementation supports four-octet AS numbers only.
221 The new instance presence can be verified via REST:
223 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example``
231 :emphasize-lines: 3,4
233 <rib xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
237 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
238 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
239 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
241 <uptodate>true</uptodate>
247 @line 3: Loc-RIB - Per-protocol instance RIB, which contains the routes that have been selected by local BGP speaker's decision process.
249 @line 4: The BGP-4 supports carrying IPv4 prefixes, such routes are stored in *ipv4-address-family*/*unicast-subsequent-address-family* table.
254 BGP uses TCP as its transport protocol, by default listens on port 179. OpenDaylight BGP plugin is configured to listen on port *1790*, due to
255 privileged ports restriction for non-root users.
256 One of the workarounds is to use port redirection. In case other port is desired to be used instead, we can reconfigure it.
258 Here is a sample of bgp port listening re-configuration:
260 **URL:** ``/restconf/config/bgp-peer-acceptor-config:bgp-peer-acceptor-config/default``
264 **Content-Type:** ``application/xml``
270 :emphasize-lines: 3,4
272 <bgp-peer-acceptor-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
273 <config-name xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-acceptor-config">default</config-name>
274 <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-acceptor-config">0.0.0.0</binding-address>
275 <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-acceptor-config">1791</binding-port>
276 </bgp-peer-acceptor-config>
278 @line 3: Binding address: By default is 0.0.0.0, so it is not a mandatory field.
280 @line 4: Binding Port: Port were BGP Server will listen.
284 To exchange routing information between two BGP systems (peers), it is required to configure a peering on both BGP speakers first.
285 This mean that each BGP speaker has a white list of neighbors, representing remote peers, with which the peering is allowed.
286 The TCP connection is established between two peers and they exchange messages to open and confirm the connection parameters followed by routes exchange.
288 Here is a sample basic neighbor configuration:
290 **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``
294 **Content-Type:** ``application/xml``
300 :emphasize-lines: 3,4
302 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
303 <neighbor-address>192.0.2.1</neighbor-address>
306 <hold-time>90</hold-time>
307 <connect-retry>10</connect-retry>
312 <remote-port>179</remote-port>
313 <passive-mode>false</passive-mode>
317 <peer-type>INTERNAL</peer-type>
321 @line 2: IP address of the remote BGP peer. Also serves as an unique identifier of a neighbor in a list of neighbors.
323 @line 5: Proposed number of seconds for value of the Hold Timer. Default value is **90**.
325 @line 6: Time interval in seconds between attempts to establish session with the peer. Effective in active mode only. Default value is **30**.
327 @line 11: Remote port number to which the local BGP is connecting. Effective in active mode only. Default value **179**.
329 @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**.
331 @line 16: Explicitly designate the peer as internal or external. Default value is **INTERNAL**.
335 Once the remote peer is connected and it advertised routes to local BGP system, routes are stored in peer's RIBs.
336 The RIBs can be checked via REST:
338 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/peer/bgp:%2F%2F192.0.2.1``
346 :emphasize-lines: 8,13,35,40,62,66
348 <peer xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
349 <peer-id>bgp://192.0.2.1</peer-id>
351 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
352 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
354 <peer-role>ibgp</peer-role>
357 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
358 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
359 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
362 <prefix>10.0.0.10/32</prefix>
372 <global>10.10.1.1</global>
378 <uptodate>true</uptodate>
384 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
385 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
386 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
389 <prefix>10.0.0.10/32</prefix>
399 <global>10.10.1.1</global>
405 <uptodate>true</uptodate>
411 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
412 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
413 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
414 <attributes></attributes>
419 @line 8: **Adj-RIB-In** - Per-peer RIB, which contains unprocessed routes that has been advertised to local BGP speaker by the remote peer.
421 @line 13: Here is the reported route with destination *10.0.0.10/32* in Adj-RIB-In.
423 @line 35: **Effective-RIB-In** - Per-peer RIB, which contains processed routes as a result of applying inbound policy to Adj-RIB-In routes.
425 @line 40: Here is the reported route with destination *10.0.0.10/32*, same as in Adj-RIB-In, as it was not touched by import policy.
427 @line 62: **Adj-RIB-Out** - Per-peer RIB, which contains routes for advertisement to the peer by means of the local speaker's UPDATE message.
429 @line 66: The peer's Adj-RIB-Out is empty as there are no routes to be advertise from local BGP speaker.
433 Also the same route should appeared in Loc-RIB now:
435 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ipv4-routes``
443 :emphasize-lines: 4,6,8,11,14
445 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
448 <prefix>10.0.0.10/32</prefix>
458 <global>10.10.1.1</global>
464 @line 4: **Destination** - IPv4 Prefix Address.
466 @line 6: **AS_PATH** - mandatory attribute, contains a list of the autonomous system numbers through that routing information has traversed.
468 @line 8: **ORIGIN** - mandatory attribute, indicates an origin of the route - **ibgp**, **egp**, **incomplete**.
470 @line 11: **LOCAL_PREF** - indicates a degree of preference for external routes, higher value is preferred.
472 @line 14: **NEXT_HOP** - mandatory attribute, defines IP address of the router that should be used as the next hop to the destination.
476 There are much more attributes that may be carried along with the destination:
478 **BGP-4 Path Attributes**
480 * **MULTI_EXIT_DISC** (MED)
481 Optional attribute, to be used to discriminate among multiple exit/entry points on external links, lower number is preferred.
490 * **ATOMIC_AGGREGATE**
491 Indicates whether AS_SET was excluded from AS_PATH due to routes aggregation.
498 Optional attribute, contains AS number and IP address of a BGP speaker which performed routes aggregation.
503 <as-number>65000</as-number>
504 <network-address>192.0.2.2</network-address>
508 Optional attribute, used to store optional attributes, unrecognized by a local BGP speaker.
512 <unrecognized-attributes>
513 <partial>true</partial>
514 <transitive>true</transitive>
516 <value>0101010101010101</value>
517 </unrecognized-attributes>
519 **Route Reflector Attributes**
522 Optional attribute, carries BGP Identifier of the originator of the route.
527 <originator>41.41.41.41</originator>
531 Optional attribute, contains a list of CLUSTER_ID values representing the path that the route has traversed.
536 <cluster>40.40.40.40</cluster>
540 Optional attribute, may be used for policy routing.
545 <as-number>65000</as-number>
546 <semantics>30740</semantics>
549 **Extended Communities**
552 Identifies one or more routers that may receive a route.
556 <extended-communities>
557 <transitive>true</transitive>
559 <global-administrator>192.0.2.2</global-administrator>
560 <local-administrator>123</local-administrator>
562 </extended-communities>
563 <extended-communities>
564 <transitive>true</transitive>
565 <as-4-route-target-extended-community>
566 <as-4-specific-common>
567 <as-number>65000</as-number>
568 <local-administrator>123</local-administrator>
569 </as-4-specific-common>
570 </as-4-route-target-extended-community>
571 </extended-communities>
575 Identifies one or more routers that injected a route.
579 <extended-communities>
580 <transitive>true</transitive>
582 <global-administrator>192.0.2.2</global-administrator>
583 <local-administrator>123</local-administrator>
585 </extended-communities>
586 <extended-communities>
587 <transitive>true</transitive>
588 <as-4-route-origin-extended-community>
589 <as-4-specific-common>
590 <as-number>65000</as-number>
591 <local-administrator>123</local-administrator>
592 </as-4-origin-common>
593 </as-4-route-target-extended-community>
594 </extended-communities>
598 Carries the cost to reach external neighbor.
602 <extended-communities>
603 <transitive>true</transitive>
604 <link-bandwidth-extended-community>
605 <bandwidth>BH9CQAA=</bandwidth>
606 </link-bandwidth-extended-community>
607 </extended-communities>
610 Optional attribute, carries accumulated IGP metric.
621 .. note:: When the remote peer disconnects, it disappear from operational state of local speaker instance and advertised routes are removed too.
623 External peering configuration
624 ''''''''''''''''''''''''''''''
625 An example above provided configuration for internal peering only.
626 Following configuration sample is intended for external peering:
628 **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``
632 **Content-Type:** ``application/xml``
640 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
641 <neighbor-address>192.0.2.3</neighbor-address>
643 <peer-type>EXTERNAL</peer-type>
644 <peer-as>64999</peer-as>
648 @line 5: AS number of the remote peer.
650 Route reflector configuration
651 '''''''''''''''''''''''''''''
652 The local BGP speaker can be configured with a specific *cluster ID*.
653 Following example adds the cluster ID to the existing speaker instance:
655 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/global/config``
659 **Content-Type:** ``application/xml``
668 <router-id>192.0.2.2</router-id>
670 <route-reflector-cluster-id>192.0.2.1</route-reflector-cluster-id>
673 @line 4: Route-reflector cluster id to use when local router is configured as a route reflector.
674 The *router-id* is used as a default value.
678 Following configuration sample is intended for route reflector client peering:
680 **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``
684 **Content-Type:** ``application/xml``
692 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
693 <neighbor-address>192.0.2.4</neighbor-address>
695 <peer-type>INTERNAL</peer-type>
699 <route-reflector-client>true</route-reflector-client>
704 @line 8: Configure the neighbor as a route reflector client. Default value is *false*.
706 MD5 authentication configuration
707 ''''''''''''''''''''''''''''''''
708 The OpenDaylight BGP implementation is supporting TCP MD5 for authentication.
709 Sample configuration below shows how to set authentication password for a peer:
711 **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``
715 **Content-Type:** ``application/xml``
723 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
724 <neighbor-address>192.0.2.5</neighbor-address>
726 <auth-password>topsecret</auth-password>
730 @line 4: Configures an MD5 authentication password for use with neighboring devices.
732 Simple Routing Policy configuration
733 '''''''''''''''''''''''''''''''''''
734 The OpenDaylight BGP implementation is supporting *Simple Routing Policy*.
735 Sample configuration below shows how to set *Simple Routing Policy* for a peer:
737 **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``
741 **Content-Type:** ``application/xml``
749 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
750 <neighbor-address>192.0.2.7</neighbor-address>
752 <simple-routing-policy>learn-none</simple-routing-policy>
756 @line 4: *Simple Routing Policy*:
758 * ``learn-none`` - routes advertised by the peer are not propagated to Effective-RIB-In and Loc-RIB
759 * ``announce-none`` - routes from local Loc-RIB are not advertised to the peer
761 .. note:: Existing neighbor configuration can be reconfigured (change configuration parameters) anytime.
762 As a result, established connection is dropped, peer instance is recreated with a new configuration settings and connection re-established.
764 .. note:: The BGP configuration is persisted on OpendDaylight shutdown and restored after the re-start.
766 BGP Application Peer and programmable RIB
767 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
768 The OpenDaylight BGP implementation also supports routes injection via *Application Peer*.
769 Such peer has its own programmable RIB, which can be modified by user.
770 This concept allows user to originate new routes and advertise them to all connected peers.
772 Application Peer configuration
773 ''''''''''''''''''''''''''''''
774 Following configuration sample show a way to configure the *Application Peer*:
776 **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``
780 **Content-Type:** ``application/xml``
786 :emphasize-lines: 2,4
788 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
789 <neighbor-address>10.25.1.9</neighbor-address>
791 <peer-group>application-peers</peer-group>
795 @line 2: IP address is uniquely identifying *Application Peer* and its programmable RIB. Address is also used in local BGP speaker decision process.
797 @line 4: Indicates that peer is associated with *application-peers* group. It serves to distinguish *Application Peer's* from regular neighbors.
801 The *Application Peer* presence can be verified via REST:
803 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/peer/bgp:%2F%2F10.25.1.9``
811 :emphasize-lines: 3,8
813 <peer xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
814 <peer-id>bgp://10.25.1.9</peer-id>
815 <peer-role>internal</peer-role>
818 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
819 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
820 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
822 <uptodate>false</uptodate>
828 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
829 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
830 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
831 <attributes></attributes>
836 @line 3: Peer role for *Application Peer* is *internal*.
838 @line 8: Adj-RIB-In is empty, as no routes were originated yet.
840 .. note:: There is no Adj-RIB-Out for *Application Peer*.
844 Next example shows how to inject a route into the programmable RIB.
846 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes``
850 **Content-Type:** ``application/xml``
856 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
858 <prefix>10.0.0.11/32</prefix>
868 <global>10.11.1.1</global>
875 Now the injected route appears in *Application Peer's* RIBs and in local speaker's Loc-RIB:
877 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/peer/bgp:%2F%2F10.25.1.9``
887 <peer xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
888 <peer-id>bgp://10.25.1.9</peer-id>
889 <peer-role>internal</peer-role>
892 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
893 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
894 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
897 <prefix>10.0.0.11/32</prefix>
907 <global>10.11.1.1</global>
913 <uptodate>false</uptodate>
919 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
920 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
921 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
924 <prefix>10.0.0.11/32</prefix>
934 <global>10.11.1.1</global>
939 <attributes></attributes>
944 @line 9: Injected route is present in *Application Peer's* Adj-RIB-In and Effective-RIB-In.
948 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ipv4-routes``
958 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
961 <prefix>10.0.0.10/32</prefix>
971 <global>10.11.1.1</global>
977 <prefix>10.0.0.10/32</prefix>
987 <global>10.10.1.1</global>
993 @line 2: The injected route is now present in Loc-RIB along with a route (destination *10.0.0.10/32*) advertised by remote peer.
997 This route is also advertised to the remote peer (*192.0.2.1*), hence route appears in its Adj-RIB-Out:
999 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/peer/bgp:%2F%2F192.0.2.1/adj-rib-out/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes``
1007 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1008 <path-id>0</path-id>
1009 <prefix>10.0.0.11/32</prefix>
1019 <global>10.11.1.1</global>
1026 The injected route can be modified (i.e. different path attribute):
1028 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0``
1032 **Content-Type:** ``application/xml``
1038 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1039 <path-id>0</path-id>
1040 <prefix>10.0.0.11/32</prefix>
1050 <global>10.11.1.2</global>
1057 The route can be removed from programmable RIB in a following way:
1059 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0``
1061 **Method:** ``DELETE``
1065 Also it is possible to remove all routes from a particular table at once:
1067 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/``
1069 **Method:** ``DELETE``
1073 Consequently, route disappears from programmable RIB, *Application Peer's* RIBs, Loc-RIB and peer's Adj-RIB-Out (UPDATE message with prefix withdrawal is send).
1075 .. note:: Routes stored in programmable RIB are persisted on OpendDaylight shutdown and restored after the re-start.
1079 .. figure:: ./images/bgpcep/bgp-pipeline.png
1082 BGP pipeline - routes re-advertisement.
1084 .. figure:: ./images/bgpcep/bgp-app-pipeline.png
1085 :alt: BGP Application Peer pipeline.
1087 BGP applcaition peer pipeline - routes injection.
1091 * `A Border Gateway Protocol 4 (BGP-4) <https://tools.ietf.org/html/rfc4271>`_
1092 * `BGP Route Reflection <https://tools.ietf.org/html/rfc4456>`_
1093 * `BGP Communities Attribute <https://tools.ietf.org/html/rfc1997>`_
1094 * `BGP Support for Four-Octet Autonomous System (AS) Number Space <https://tools.ietf.org/html/rfc6793>`_
1095 * `The Accumulated IGP Metric Attribute for BGP <https://tools.ietf.org/html/rfc7311>`_
1096 * `4-Octet AS Specific BGP Extended Community <https://tools.ietf.org/html/rfc5668>`_
1097 * `BGP Link Bandwidth Extended Community <https://tools.ietf.org/html/draft-ietf-idr-link-bandwidth-06>`_
1098 * `Use of BGP for Routing in Large-Scale Data Centers <https://tools.ietf.org/html/rfc7938>`_
1102 The BGP-4 allows to carry IPv4 specific information only.
1103 The basic BGP Multiprotocol extension brings *Unicast* Subsequent Address Family (SAFI) - intended to be used for IP unicast forwarding.
1104 The combination of IPv4 and IPv6 Address Family (AF) and Unicast SAFI is essential for Internet routing.
1105 The IPv4 Unicast routes are interchangeable with BGP-4 routes, as they can carry the same type of routing information.
1107 .. contents:: Contents
1113 This section shows a way to enable IPv4 and IPv6 Unicast family in BGP speaker and peer configuration.
1117 To enable IPv4 and IPv6 Unicast support in BGP plugin, first configure BGP speaker instance:
1119 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1121 **Method:** ``POST``
1123 **Content-Type:** ``application/xml``
1129 <protocol xmlns="http://openconfig.net/yang/network-instance">
1130 <name>bgp-example</name>
1131 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1132 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1135 <router-id>192.0.2.2</router-id>
1140 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
1143 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
1152 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 Unicast family.
1154 **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``
1156 **Method:** ``POST``
1158 **Content-Type:** ``application/xml``
1164 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1165 <neighbor-address>192.0.2.1</neighbor-address>
1168 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
1171 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
1178 Following trees illustrate the BGP IP Unicast routes structures.
1182 .. code-block:: console
1186 +--ro ipv4-route* [prefix path-id]
1187 +--ro prefix inet:ipv4-prefix
1188 +--ro path-id path-id
1191 | +--ro value bgp-t:bgp-origin
1194 | +--ro as-sequence* inet:as-number
1195 | +--ro as-set* inet:as-number
1197 | +--:(ipv4-next-hop-case)
1198 | | +--ro ipv4-next-hop
1199 | | +--ro global? inet:ipv4-address
1200 | +--:(ipv6-next-hop-case)
1201 | | +--ro ipv6-next-hop
1202 | | +--ro global? inet:ipv6-address
1203 | | +--ro link-local? inet:ipv6-address
1204 | +--:(empty-next-hop-case)
1205 | +--ro empty-next-hop? empty
1206 +--ro multi-exit-disc
1209 | +--ro pref? uint32
1210 +--ro atomic-aggregate!
1212 | +--ro as-number? inet:as-number
1213 | +--ro network-address? inet:ipv4-address
1215 | +--ro as-number? inet:as-number
1216 | +--ro semantics? uint16
1217 +--ro extended-communities*
1218 | +--ro transitive? boolean
1219 | +--ro (extended-community)?
1220 | +--:(as-specific-extended-community-case)
1221 | | +--ro as-specific-extended-community
1222 | | +--ro global-administrator? short-as-number
1223 | | +--ro local-administrator? binary
1224 | +--:(inet4-specific-extended-community-case)
1225 | | +--ro inet4-specific-extended-community
1226 | | +--ro global-administrator? inet:ipv4-address
1227 | | +--ro local-administrator? binary
1228 | +--:(opaque-extended-community-case)
1229 | | +--ro opaque-extended-community
1230 | | +--ro value? binary
1231 | +--:(route-target-extended-community-case)
1232 | | +--ro route-target-extended-community
1233 | | +--ro global-administrator? short-as-number
1234 | | +--ro local-administrator? binary
1235 | +--:(route-origin-extended-community-case)
1236 | | +--ro route-origin-extended-community
1237 | | +--ro global-administrator? short-as-number
1238 | | +--ro local-administrator? binary
1239 | +--:(route-target-ipv4-case)
1240 | | +--ro route-target-ipv4
1241 | | +--ro global-administrator? inet:ipv4-address
1242 | | +--ro local-administrator? uint16
1243 | +--:(route-origin-ipv4-case)
1244 | | +--ro route-origin-ipv4
1245 | | +--ro global-administrator? inet:ipv4-address
1246 | | +--ro local-administrator? uint16
1247 | +--:(link-bandwidth-case)
1248 | | +--ro link-bandwidth-extended-community
1249 | | +--ro bandwidth netc:bandwidth
1250 | +--:(as-4-generic-spec-extended-community-case)
1251 | | +--ro as-4-generic-spec-extended-community
1252 | | +--ro as-4-specific-common
1253 | | +--ro as-number inet:as-number
1254 | | +--ro local-administrator uint16
1255 | +--:(as-4-route-target-extended-community-case)
1256 | | +--ro as-4-route-target-extended-community
1257 | | +--ro as-4-specific-common
1258 | | +--ro as-number inet:as-number
1259 | | +--ro local-administrator uint16
1260 | +--:(as-4-route-origin-extended-community-case)
1261 | | +--ro as-4-route-origin-extended-community
1262 | | +--ro as-4-specific-common
1263 | | +--ro as-number inet:as-number
1264 | | +--ro local-administrator uint16
1265 | +--:(encapsulation-case)
1266 | +--ro encapsulation-extended-community
1267 | +--ro tunnel-type encapsulation-tunnel-type
1269 | +--ro originator? inet:ipv4-address
1271 | +--ro cluster* bgp-t:cluster-identifier
1274 | +--ro metric? netc:accumulated-igp-metric
1275 +--ro unrecognized-attributes* [type]
1276 +--ro partial boolean
1277 +--ro transitive boolean
1283 .. code-block:: console
1287 +--ro ipv6-route* [prefix path-id]
1288 +--ro prefix inet:ipv6-prefix
1289 +--ro path-id path-id
1297 The IPv4 Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
1299 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ipv4-routes``
1307 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1309 <path-id>0</path-id>
1310 <prefix>193.0.2.1/32</prefix>
1320 <global>10.0.0.1</global>
1328 The IPv6 Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
1330 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ipv6-routes``
1338 <ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1340 <path-id>0</path-id>
1341 <prefix>2a02:b80:0:1::/64</prefix>
1351 <global>2a02:b80:0:2::1</global>
1357 .. note:: IPv4/6 routes mapping to topology nodes is supported by BGP Topology Provider.
1363 This examples show how to originate and remove IPv4 route via programmable RIB.
1364 Make sure the *Application Peer* is configured first.
1366 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes``
1368 **Method:** ``POST``
1370 **Content-Type:** ``application/xml``
1376 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1377 <path-id>0</path-id>
1378 <prefix>10.0.0.11/32</prefix>
1388 <global>10.11.1.1</global>
1395 To remove the route added above, following request can be used:
1397 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0``
1399 **Method:** ``DELETE``
1403 This examples show how to originate and remove IPv6 route via programmable RIB:
1405 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv6-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv6-routes``
1407 **Method:** ``POST``
1409 **Content-Type:** ``application/xml``
1415 <ipv6-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1416 <prefix>2001:db8:30::3/128</prefix>
1417 <path-id>0</path-id>
1420 <global>2001:db8:1::6</global>
1434 To remove the route added above, following request can be used:
1436 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv6-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv6-routes/ipv6-route/2001:db8:30::3%2F128/0``
1438 **Method:** ``DELETE``
1442 * `Multiprotocol Extensions for BGP-4 <https://tools.ietf.org/html/rfc4760>`_
1444 IP Labeled Unicast Family
1445 -------------------------
1446 The BGP Labeled Unicast (BGP-LU) Multiprotocol extension is used to distribute a MPLS label that is mapped to a particular route.
1447 It can be used to advertise a MPLS transport path between IGP regions and Autonomous Systems.
1448 Also, BGP-LU can help to solve the Inter-domain traffic-engineering problem and can be deployed in large-scale data centers along with MPLS and Spring.
1449 In addition, IPv6 Labeled Unicast can be used to interconnect IPv6 islands over IPv4/MPLS networks using 6PE.
1451 .. contents:: Contents
1457 This section shows a way to enable IPv4 and IPv6 Labeled Unicast family in BGP speaker and peer configuration.
1461 To enable IPv4 and IPv6 Labeled Unicast support in BGP plugin, first configure BGP speaker instance:
1463 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1465 **Method:** ``POST``
1467 **Content-Type:** ``application/xml``
1473 <protocol xmlns="http://openconfig.net/yang/network-instance">
1474 <name>bgp-example</name>
1475 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1476 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1479 <router-id>192.0.2.2</router-id>
1484 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
1487 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
1496 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 Labeled Unicast family.
1498 **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``
1500 **Method:** ``POST``
1502 **Content-Type:** ``application/xml``
1508 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1509 <neighbor-address>192.0.2.1</neighbor-address>
1512 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
1515 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
1520 IP Labeled Unicast API
1521 ^^^^^^^^^^^^^^^^^^^^^^
1522 Following trees illustrate the BGP IP Labeled Unicast routes structures.
1524 IPv4 Labeled Unicast Route
1525 ''''''''''''''''''''''''''
1526 .. code-block:: console
1528 :(labeled-unicast-routes-case)
1529 +--ro labeled-unicast-routes
1530 +--ro labeled-unicast-route* [route-key path-id]
1531 +--ro route-key string
1533 | +--ro label-value? netc:mpls-label
1534 +--ro prefix? inet:ip-prefix
1535 +--ro path-id path-id
1540 IPv6 Labeled Unicast Route
1541 ''''''''''''''''''''''''''
1542 .. code-block:: console
1544 :(labeled-unicast-ipv6-routes-case)
1545 +--ro labeled-unicast-ipv6-routes
1546 +--ro labeled-unicast-route* [route-key path-id]
1547 +--ro route-key string
1549 | +--ro label-value? netc:mpls-label
1550 +--ro prefix? inet:ip-prefix
1551 +--ro path-id path-id
1557 The IPv4 Labeled Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
1559 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes``
1567 <labeled-unicast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1568 <labeled-unicast-route>
1569 <path-id>0</path-id>
1570 <route-key>MAA+gRQAAA==</route-key>
1576 <global>200.10.0.101</global>
1584 <label-value>1000</label-value>
1586 <prefix>20.0.0.0/24</prefix>
1587 </labeled-unicast-route>
1588 </labeled-unicast-routes>
1594 This examples show how to originate and remove IPv4 labeled route via programmable RIB.
1595 Make sure the *Application Peer* is configured first.
1597 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes``
1599 **Method:** ``POST``
1601 **Content-Type:** ``application/xml``
1607 <labeled-unicast-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1608 <route-key>label1</route-key>
1609 <prefix>1.1.1.1/32</prefix>
1610 <path-id>0</path-id>
1612 <label-value>800322</label-value>
1616 <global>199.20.160.41</global>
1626 </labeled-unicast-route>
1630 In addition, BGP-LU Spring extension allows to attach BGP Prefix SID attribute to the route, in order to signal the BGP-Prefix-SID, where the SR is applied to MPLS dataplane.
1635 <bgp-prefix-sid-tlvs>
1636 <label-index-tlv xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">322</label-index-tlv>
1637 </bgp-prefix-sid-tlvs>
1638 <bgp-prefix-sid-tlvs>
1639 <srgb-value xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1643 </bgp-prefix-sid-tlvs>
1648 To remove the route added above, following request can be used:
1650 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes/bgp-labeled-unicast:labeled-unicast-route/label1/0``
1652 **Method:** ``DELETE``
1656 This examples show how to originate and remove IPv6 labeled route via programmable RIB.
1658 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-ipv6-routes``
1660 **Method:** ``POST``
1662 **Content-Type:** ``application/xml``
1668 <labeled-unicast-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1669 <route-key>label1</route-key>
1670 <prefix>2001:db8:30::3/128</prefix>
1671 <path-id>0</path-id>
1673 <label-value>123</label-value>
1677 <global>2003:4:5:6::7</global>
1687 </labeled-unicast-route>
1691 To remove the route added above, following request can be used:
1693 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-ipv6-routes/bgp-labeled-unicast:labeled-unicast-route/label1/0``
1695 **Method:** ``DELETE``
1699 * `Carrying Label Information in BGP-4 <https://tools.ietf.org/html/rfc3107>`_
1700 * `Segment Routing Prefix SID extensions for BGP <https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-03>`_
1701 * `Connecting IPv6 Islands over IPv4 MPLS Using IPv6 Provider Edge Routers (6PE) <https://tools.ietf.org/html/rfc4798>`_
1702 * `BGP-Prefix Segment in large-scale data centers <https://tools.ietf.org/html/draft-ietf-spring-segment-routing-msdc-01>`_
1703 * `Egress Peer Engineering using BGP-LU <https://tools.ietf.org/html/draft-gredler-idr-bgplu-epe-06>`_
1707 The BGP/MPLS IP Virtual Private Networks (BGP L3VPN) Multiprotocol extension can be used to exchange particular VPN (customer) routes among the provider's routers attached to that VPN.
1708 Also, routes are distributed to specific VPN remote sites.
1710 .. contents:: Contents
1716 This section shows a way to enable IPv4 and IPv6 L3VPN family in BGP speaker and peer configuration.
1720 To enable IPv4 and IPv6 L3VPN support in BGP plugin, first configure BGP speaker instance:
1722 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1724 **Method:** ``POST``
1726 **Content-Type:** ``application/xml``
1732 <protocol xmlns="http://openconfig.net/yang/network-instance">
1733 <name>bgp-example</name>
1734 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1735 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1738 <router-id>192.0.2.2</router-id>
1743 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
1746 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
1755 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 L3VPN family.
1757 **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``
1759 **Method:** ``POST``
1761 **Content-Type:** ``application/xml``
1767 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1768 <neighbor-address>192.0.2.1</neighbor-address>
1771 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
1774 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
1781 Following trees illustrate the BGP IP L3VPN routes structures.
1785 .. code-block:: console
1787 :(vpn-ipv4-routes-case)
1788 +--ro vpn-ipv4-routes
1789 +--ro vpn-route* [route-key]
1790 +--ro route-key string
1792 | +--ro label-value? netc:mpls-label
1793 +--ro prefix? inet:ip-prefix
1794 +--ro path-id? path-id
1795 +--ro route-distinguisher? bgp-t:route-distinguisher
1801 .. code-block:: console
1803 :(vpn-ipv6-routes-case)
1804 +--ro vpn-ipv6-routes
1805 +--ro vpn-route* [route-key]
1806 +--ro route-key string
1808 | +--ro label-value? netc:mpls-label
1809 +--ro prefix? inet:ip-prefix
1810 +--ro path-id? path-id
1811 +--ro route-distinguisher? bgp-t:route-distinguisher
1819 The IPv4 L3VPN table in an instance of the speaker's Loc-RIB can be verified via REST:
1821 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes``
1829 <vpn-ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
1831 <route-key>cAXdYQABrBAALABlCgIi</route-key>
1833 <label-value>24022</label-value>
1836 <extended-communities>
1837 <transitive>true</transitive>
1838 <route-target-extended-community>
1839 <global-administrator>65000</global-administrator>
1840 <local-administrator>AAAAZQ==</local-administrator>
1841 </route-target-extended-community>
1842 </extended-communities>
1851 <global>127.16.0.44</global>
1854 <route-distinguisher>172.16.0.44:101</route-distinguisher>
1855 <prefix>10.2.34.0/24</prefix>
1861 The IPv6 L3VPN table in an instance of the speaker's Loc-RIB can be verified via REST:
1863 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv6-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv6:vpn-ipv6-routes``
1871 <vpn-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv6">
1873 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
1875 <label-value>24023</label-value>
1881 <extended-communities>
1882 <route-target-extended-community>
1883 <global-administrator>65000</global-administrator>
1884 <local-administrator>AAAAZQ==</local-administrator>
1885 </route-target-extended-community>
1886 <transitive>true</transitive>
1887 </extended-communities>
1889 <global>2a02:b80:0:2::1</global>
1896 <route-distinguisher>172.16.0.44:101</route-distinguisher>
1897 <prefix>2a02:b80:0:1::/64</prefix>
1903 This examples show how to originate and remove IPv4 L3VPN route via programmable RIB.
1904 Make sure the *Application Peer* is configured first.
1906 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes``
1908 **Method:** ``POST``
1910 **Content-Type:** ``application/xml``
1916 <vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
1917 <route-key>vpn1</route-key>
1919 <label-value>123</label-value>
1921 <route-distinguisher>429496729:1</route-distinguisher>
1922 <prefix>2.2.2.2/32</prefix>
1925 <global>199.20.166.41</global>
1931 <extended-communities>
1932 <route-target-extended-community>
1933 <global-administrator>65000</global-administrator>
1934 <local-administrator>AAAAZQ==</local-administrator>
1935 </route-target-extended-community>
1936 <transitive>true</transitive>
1937 </extended-communities>
1943 To remove the route added above, following request can be used:
1945 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes/vpn-route/vpn1``
1947 **Method:** ``DELETE``
1951 * `BGP/MPLS IP Virtual Private Networks (VPNs) <https://tools.ietf.org/html/rfc4364>`_
1952 * `BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN <https://tools.ietf.org/html/rfc4659>`_
1953 * `BGP/MPLS VPN Virtual PE <https://tools.ietf.org/html/draft-ietf-bess-virtual-pe-00>`_
1957 The BGP Link-State (BGP-LS) Multiprotocol extension allows to distribute Link-State and Traffic Engineering (TE) information.
1958 This information is typically distributed by IGP routing protocols with in the network, limiting LSDB or TED visibility to the IGP area.
1959 The BGP-LS-enabled routers are capable to collect such information from networks (multiple IGP areas, inter-AS) and share with external components (i.e. OpenDaylight BGP).
1960 The information is applicable in ALTO servers and PCEs, as both need to gather information about topologies.
1961 In addition, link-state information is extended to carry segment information (Spring).
1963 .. contents:: Contents
1969 This section shows a way to enable IPv4 and IPv6 Labeled Unicast family in BGP speaker and peer configuration.
1973 To enable BGP-LS support in BGP plugin, first configure BGP speaker instance:
1975 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1977 **Method:** ``POST``
1979 **Content-Type:** ``application/xml``
1985 <protocol xmlns="http://openconfig.net/yang/network-instance">
1986 <name>bgp-example</name>
1987 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1988 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1991 <router-id>192.0.2.2</router-id>
1996 <afi-safi-name>LINKSTATE</afi-safi-name>
2005 Here is an example for BGP peer configuration with enabled BGP-LS family.
2007 **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``
2009 **Method:** ``POST``
2011 **Content-Type:** ``application/xml``
2017 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
2018 <neighbor-address>192.0.2.1</neighbor-address>
2021 <afi-safi-name>LINKSTATE</afi-safi-name>
2026 Link-State Route API
2027 ^^^^^^^^^^^^^^^^^^^^
2028 Following tree illustrate the BGP Link-State route structure.
2030 .. code-block:: console
2032 :(linkstate-routes-case)
2033 +--ro linkstate-routes
2034 +--ro linkstate-route* [route-key]
2035 +--ro route-key binary
2036 +--ro protocol-id protocol-id
2037 +--ro identifier identifier
2038 +--ro (object-type)?
2040 | | +--ro node-descriptors
2041 | | +--ro as-number? inet:as-number
2042 | | +--ro area-id? area-identifier
2043 | | +--ro domain-id? domain-identifier
2044 | | +--ro (c-router-identifier)?
2045 | | +--:(isis-node-case)
2046 | | | +--ro isis-node
2047 | | | +--ro iso-system-id netc:iso-system-identifier
2048 | | +--:(isis-pseudonode-case)
2049 | | | +--ro isis-pseudonode
2050 | | | +--ro is-is-router-identifier
2051 | | | | +--ro iso-system-id netc:iso-system-identifier
2052 | | | +--ro psn uint8
2053 | | +--:(ospf-node-case)
2054 | | | +--ro ospf-node
2055 | | | +--ro ospf-router-id uint32
2056 | | +--:(ospf-pseudonode-case)
2057 | | +--ro ospf-pseudonode
2058 | | +--ro ospf-router-id uint32
2059 | | +--ro lan-interface ospf-interface-identifier
2061 | | +--ro local-node-descriptors
2062 | | | +--ro as-number? inet:as-number
2063 | | | +--ro area-id? area-identifier
2064 | | | +--ro domain-id? domain-identifier
2065 | | | +--ro (c-router-identifier)?
2066 | | | | +--:(isis-node-case)
2067 | | | | | +--ro isis-node
2068 | | | | | +--ro iso-system-id netc:iso-system-identifier
2069 | | | | +--:(isis-pseudonode-case)
2070 | | | | | +--ro isis-pseudonode
2071 | | | | | +--ro is-is-router-identifier
2072 | | | | | | +--ro iso-system-id netc:iso-system-identifier
2073 | | | | | +--ro psn uint8
2074 | | | | +--:(ospf-node-case)
2075 | | | | | +--ro ospf-node
2076 | | | | | +--ro ospf-router-id uint32
2077 | | | | +--:(ospf-pseudonode-case)
2078 | | | | +--ro ospf-pseudonode
2079 | | | | +--ro ospf-router-id uint32
2080 | | | | +--ro lan-interface ospf-interface-identifier
2081 | | | +--ro bgp-router-id? inet:ipv4-address
2082 | | | +--ro member-asn? inet:as-number
2083 | | +--ro remote-node-descriptors
2084 | | | +--ro as-number? inet:as-number
2085 | | | +--ro area-id? area-identifier
2086 | | | +--ro domain-id? domain-identifier
2087 | | | +--ro (c-router-identifier)?
2088 | | | | +--:(isis-node-case)
2089 | | | | | +--ro isis-node
2090 | | | | | +--ro iso-system-id netc:iso-system-identifier
2091 | | | | +--:(isis-pseudonode-case)
2092 | | | | | +--ro isis-pseudonode
2093 | | | | | +--ro is-is-router-identifier
2094 | | | | | | +--ro iso-system-id netc:iso-system-identifier
2095 | | | | | +--ro psn uint8
2096 | | | | +--:(ospf-node-case)
2097 | | | | | +--ro ospf-node
2098 | | | | | +--ro ospf-router-id uint32
2099 | | | | +--:(ospf-pseudonode-case)
2100 | | | | +--ro ospf-pseudonode
2101 | | | | +--ro ospf-router-id uint32
2102 | | | | +--ro lan-interface ospf-interface-identifier
2103 | | | +--ro bgp-router-id? inet:ipv4-address
2104 | | | +--ro member-asn? inet:as-number
2105 | | +--ro link-descriptors
2106 | | +--ro link-local-identifier? uint32
2107 | | +--ro link-remote-identifier? uint32
2108 | | +--ro ipv4-interface-address? ipv4-interface-identifier
2109 | | +--ro ipv6-interface-address? ipv6-interface-identifier
2110 | | +--ro ipv4-neighbor-address? ipv4-interface-identifier
2111 | | +--ro ipv6-neighbor-address? ipv6-interface-identifier
2112 | | +--ro multi-topology-id? topology-identifier
2114 | | +--ro advertising-node-descriptors
2115 | | | +--ro as-number? inet:as-number
2116 | | | +--ro area-id? area-identifier
2117 | | | +--ro domain-id? domain-identifier
2118 | | | +--ro (c-router-identifier)?
2119 | | | +--:(isis-node-case)
2120 | | | | +--ro isis-node
2121 | | | | +--ro iso-system-id netc:iso-system-identifier
2122 | | | +--:(isis-pseudonode-case)
2123 | | | | +--ro isis-pseudonode
2124 | | | | +--ro is-is-router-identifier
2125 | | | | | +--ro iso-system-id netc:iso-system-identifier
2126 | | | | +--ro psn uint8
2127 | | | +--:(ospf-node-case)
2128 | | | | +--ro ospf-node
2129 | | | | +--ro ospf-router-id uint32
2130 | | | +--:(ospf-pseudonode-case)
2131 | | | +--ro ospf-pseudonode
2132 | | | +--ro ospf-router-id uint32
2133 | | | +--ro lan-interface ospf-interface-identifier
2134 | | +--ro prefix-descriptors
2135 | | +--ro multi-topology-id? topology-identifier
2136 | | +--ro ospf-route-type? ospf-route-type
2137 | | +--ro ip-reachability-information? inet:ip-prefix
2139 | +--ro (address-family)?
2141 | | | +--ro ipv4-tunnel-sender-address inet:ipv4-address
2142 | | | +--ro ipv4-tunnel-endpoint-address inet:ipv4-address
2144 | | +--ro ipv6-tunnel-sender-address inet:ipv6-address
2145 | | +--ro ipv6-tunnel-endpoint-address inet:ipv6-address
2146 | +--ro tunnel-id? rsvp:tunnel-id
2147 | +--ro lsp-id? rsvp:lsp-id
2149 +--ro (link-state-attribute)?
2150 +--:(node-attributes-case)
2151 | +--ro node-attributes
2152 | +--ro topology-identifier* topology-identifier
2153 | +--ro node-flags? node-flag-bits
2154 | +--ro isis-area-id* isis-area-identifier
2155 | +--ro dynamic-hostname? string
2156 | +--ro ipv4-router-id? ipv4-router-identifier
2157 | +--ro ipv6-router-id? ipv6-router-identifier
2158 | +--ro sr-capabilities
2159 | | +--ro mpls-ipv4? boolean
2160 | | +--ro mpls-ipv6? boolean
2161 | | +--ro sr-ipv6? boolean
2162 | | +--ro range-size? uint32
2163 | | +--ro (sid-label-index)?
2164 | | +--:(local-label-case)
2165 | | | +--ro local-label? netc:mpls-label
2166 | | +--:(ipv6-address-case)
2167 | | | +--ro ipv6-address? inet:ipv6-address
2169 | | +--ro sid? uint32
2170 | +--ro sr-algorithm
2171 | +--ro algorithms* algorithm
2172 +--:(link-attributes-case)
2173 | +--ro link-attributes
2174 | +--ro local-ipv4-router-id? ipv4-router-identifier
2175 | +--ro local-ipv6-router-id? ipv6-router-identifier
2176 | +--ro remote-ipv4-router-id? ipv4-router-identifier
2177 | +--ro remote-ipv6-router-id? ipv6-router-identifier
2178 | +--ro mpls-protocol? mpls-protocol-mask
2179 | +--ro te-metric? netc:te-metric
2180 | +--ro metric? netc:metric
2181 | +--ro shared-risk-link-groups* rsvp:srlg-id
2182 | +--ro link-name? string
2183 | +--ro max-link-bandwidth? netc:bandwidth
2184 | +--ro max-reservable-bandwidth? netc:bandwidth
2185 | +--ro unreserved-bandwidth* [priority]
2186 | | +--ro priority uint8
2187 | | +--ro bandwidth? netc:bandwidth
2188 | +--ro link-protection? link-protection-type
2189 | +--ro admin-group? administrative-group
2192 | | | +--:(ospf-adj-flags-case)
2193 | | | | +--ro backup? boolean
2194 | | | | +--ro set? boolean
2195 | | | +--:(isis-adj-flags-case)
2196 | | | +--ro backup? boolean
2197 | | | +--ro set? boolean
2198 | | | +--ro address-family? boolean
2199 | | +--ro weight? weight
2200 | | +--ro (sid-label-index)?
2201 | | +--:(local-label-case)
2202 | | | +--ro local-label? netc:mpls-label
2203 | | +--:(ipv6-address-case)
2204 | | | +--ro ipv6-address? inet:ipv6-address
2206 | | +--ro sid? uint32
2207 | +--ro sr-lan-adj-ids*
2209 | | | +--:(ospf-adj-flags-case)
2210 | | | | +--ro backup? boolean
2211 | | | | +--ro set? boolean
2212 | | | +--:(isis-adj-flags-case)
2213 | | | +--ro backup? boolean
2214 | | | +--ro set? boolean
2215 | | | +--ro address-family? boolean
2216 | | +--ro weight? weight
2217 | | +--ro iso-system-id? netc:iso-system-identifier
2218 | | +--ro neighbor-id? inet:ipv4-address
2219 | | +--ro (sid-label-index)?
2220 | | +--:(local-label-case)
2221 | | | +--ro local-label? netc:mpls-label
2222 | | +--:(ipv6-address-case)
2223 | | | +--ro ipv6-address? inet:ipv6-address
2225 | | +--ro sid? uint32
2226 | +--ro peer-node-sid
2227 | | +--ro weight? weight
2228 | | +--ro (sid-label-index)?
2229 | | +--:(local-label-case)
2230 | | | +--ro local-label? netc:mpls-label
2231 | | +--:(ipv6-address-case)
2232 | | | +--ro ipv6-address? inet:ipv6-address
2234 | | +--ro sid? uint32
2235 | +--ro peer-adj-sid
2236 | | +--ro weight? weight
2237 | | +--ro (sid-label-index)?
2238 | | +--:(local-label-case)
2239 | | | +--ro local-label? netc:mpls-label
2240 | | +--:(ipv6-address-case)
2241 | | | +--ro ipv6-address? inet:ipv6-address
2243 | | +--ro sid? uint32
2244 | +--ro peer-set-sids*
2245 | +--ro weight? weight
2246 | +--ro (sid-label-index)?
2247 | +--:(local-label-case)
2248 | | +--ro local-label? netc:mpls-label
2249 | +--:(ipv6-address-case)
2250 | | +--ro ipv6-address? inet:ipv6-address
2253 +--:(prefix-attributes-case)
2254 | +--ro prefix-attributes
2256 | | x--ro up-down? bits
2257 | | +--ro is-is-up-down? boolean
2258 | | +--ro ospf-no-unicast? boolean
2259 | | +--ro ospf-local-address? boolean
2260 | | +--ro ospf-propagate-nssa? boolean
2261 | +--ro route-tags* route-tag
2262 | +--ro extended-tags* extended-route-tag
2263 | +--ro prefix-metric? netc:igp-metric
2264 | +--ro ospf-forwarding-address? inet:ip-address
2267 | | | +--:(isis-prefix-flags-case)
2268 | | | | +--ro no-php? boolean
2269 | | | | +--ro explicit-null? boolean
2270 | | | | +--ro readvertisement? boolean
2271 | | | | +--ro node-sid? boolean
2272 | | | +--:(ospf-prefix-flags-case)
2273 | | | +--ro no-php? boolean
2274 | | | +--ro explicit-null? boolean
2275 | | | +--ro mapping-server? boolean
2276 | | +--ro algorithm? algorithm
2277 | | +--ro (sid-label-index)?
2278 | | +--:(local-label-case)
2279 | | | +--ro local-label? netc:mpls-label
2280 | | +--:(ipv6-address-case)
2281 | | | +--ro ipv6-address? inet:ipv6-address
2283 | | +--ro sid? uint32
2284 | +--ro ipv6-sr-prefix
2285 | | +--ro algorithm? algorithm
2287 | | +--ro inter-area? boolean
2288 | | +--ro range-size? uint16
2290 | | +--ro (range-sub-tlv)?
2291 | | +--:(binding-sid-tlv-case)
2292 | | | +--ro weight? weight
2293 | | | +--ro (flags)?
2294 | | | | +--:(isis-binding-flags-case)
2295 | | | | | +--ro address-family? boolean
2296 | | | | | +--ro mirror-context? boolean
2297 | | | | | +--ro spread-tlv? boolean
2298 | | | | | +--ro leaked-from-level-2? boolean
2299 | | | | | +--ro attached-flag? boolean
2300 | | | | +--:(ospf-binding-flags-case)
2301 | | | | +--ro mirroring? boolean
2302 | | | +--ro binding-sub-tlvs*
2303 | | | +--ro (binding-sub-tlv)?
2304 | | | +--:(prefix-sid-case)
2305 | | | | +--ro (flags)?
2306 | | | | | +--:(isis-prefix-flags-case)
2307 | | | | | | +--ro no-php? boolean
2308 | | | | | | +--ro explicit-null? boolean
2309 | | | | | | +--ro readvertisement? boolean
2310 | | | | | | +--ro node-sid? boolean
2311 | | | | | +--:(ospf-prefix-flags-case)
2312 | | | | | +--ro no-php? boolean
2313 | | | | | +--ro explicit-null? boolean
2314 | | | | | +--ro mapping-server? boolean
2315 | | | | +--ro algorithm? algorithm
2316 | | | | +--ro (sid-label-index)?
2317 | | | | +--:(local-label-case)
2318 | | | | | +--ro local-label? netc:mpls-label
2319 | | | | +--:(ipv6-address-case)
2320 | | | | | +--ro ipv6-address? inet:ipv6-address
2321 | | | | +--:(sid-case)
2322 | | | | +--ro sid? uint32
2323 | | | +--:(ipv6-prefix-sid-case)
2324 | | | | +--ro algorithm? algorithm
2325 | | | +--:(sid-label-case)
2326 | | | | +--ro (sid-label-index)?
2327 | | | | +--:(local-label-case)
2328 | | | | | +--ro local-label? netc:mpls-label
2329 | | | | +--:(ipv6-address-case)
2330 | | | | | +--ro ipv6-address? inet:ipv6-address
2331 | | | | +--:(sid-case)
2332 | | | | +--ro sid? uint32
2333 | | | +--:(ero-metric-case)
2334 | | | | +--ro ero-metric? netc:te-metric
2335 | | | +--:(ipv4-ero-case)
2336 | | | | +--ro loose? boolean
2337 | | | | +--ro address inet:ipv4-address
2338 | | | +--:(ipv6-ero-case)
2339 | | | | +--ro loose? boolean
2340 | | | | +--ro address inet:ipv6-address
2341 | | | +--:(unnumbered-interface-id-ero-case)
2342 | | | | +--ro loose? boolean
2343 | | | | +--ro router-id? uint32
2344 | | | | +--ro interface-id? uint32
2345 | | | +--:(ipv4-ero-backup-case)
2346 | | | | +--ro loose? boolean
2347 | | | | +--ro address inet:ipv4-address
2348 | | | +--:(ipv6-ero-backup-case)
2349 | | | | +--ro loose? boolean
2350 | | | | +--ro address inet:ipv6-address
2351 | | | +--:(unnumbered-interface-id-backup-ero-case)
2352 | | | +--ro loose? boolean
2353 | | | +--ro router-id? uint32
2354 | | | +--ro interface-id? uint32
2355 | | +--:(prefix-sid-tlv-case)
2356 | | | +--ro (flags)?
2357 | | | | +--:(isis-prefix-flags-case)
2358 | | | | | +--ro no-php? boolean
2359 | | | | | +--ro explicit-null? boolean
2360 | | | | | +--ro readvertisement? boolean
2361 | | | | | +--ro node-sid? boolean
2362 | | | | +--:(ospf-prefix-flags-case)
2363 | | | | +--ro no-php? boolean
2364 | | | | +--ro explicit-null? boolean
2365 | | | | +--ro mapping-server? boolean
2366 | | | +--ro algorithm? algorithm
2367 | | | +--ro (sid-label-index)?
2368 | | | +--:(local-label-case)
2369 | | | | +--ro local-label? netc:mpls-label
2370 | | | +--:(ipv6-address-case)
2371 | | | | +--ro ipv6-address? inet:ipv6-address
2372 | | | +--:(sid-case)
2373 | | | +--ro sid? uint32
2374 | | +--:(ipv6-prefix-sid-tlv-case)
2375 | | | +--ro algorithm? algorithm
2376 | | +--:(sid-label-tlv-case)
2377 | | +--ro (sid-label-index)?
2378 | | +--:(local-label-case)
2379 | | | +--ro local-label? netc:mpls-label
2380 | | +--:(ipv6-address-case)
2381 | | | +--ro ipv6-address? inet:ipv6-address
2383 | | +--ro sid? uint32
2384 | +--ro sr-binding-sid-labels*
2385 | +--ro weight? weight
2387 | | +--:(isis-binding-flags-case)
2388 | | | +--ro address-family? boolean
2389 | | | +--ro mirror-context? boolean
2390 | | | +--ro spread-tlv? boolean
2391 | | | +--ro leaked-from-level-2? boolean
2392 | | | +--ro attached-flag? boolean
2393 | | +--:(ospf-binding-flags-case)
2394 | | +--ro mirroring? boolean
2395 | +--ro binding-sub-tlvs*
2396 | +--ro (binding-sub-tlv)?
2397 | +--:(prefix-sid-case)
2399 | | | +--:(isis-prefix-flags-case)
2400 | | | | +--ro no-php? boolean
2401 | | | | +--ro explicit-null? boolean
2402 | | | | +--ro readvertisement? boolean
2403 | | | | +--ro node-sid? boolean
2404 | | | +--:(ospf-prefix-flags-case)
2405 | | | +--ro no-php? boolean
2406 | | | +--ro explicit-null? boolean
2407 | | | +--ro mapping-server? boolean
2408 | | +--ro algorithm? algorithm
2409 | | +--ro (sid-label-index)?
2410 | | +--:(local-label-case)
2411 | | | +--ro local-label? netc:mpls-label
2412 | | +--:(ipv6-address-case)
2413 | | | +--ro ipv6-address? inet:ipv6-address
2415 | | +--ro sid? uint32
2416 | +--:(ipv6-prefix-sid-case)
2417 | | +--ro algorithm? algorithm
2418 | +--:(sid-label-case)
2419 | | +--ro (sid-label-index)?
2420 | | +--:(local-label-case)
2421 | | | +--ro local-label? netc:mpls-label
2422 | | +--:(ipv6-address-case)
2423 | | | +--ro ipv6-address? inet:ipv6-address
2425 | | +--ro sid? uint32
2426 | +--:(ero-metric-case)
2427 | | +--ro ero-metric? netc:te-metric
2428 | +--:(ipv4-ero-case)
2429 | | +--ro loose? boolean
2430 | | +--ro address inet:ipv4-address
2431 | +--:(ipv6-ero-case)
2432 | | +--ro loose? boolean
2433 | | +--ro address inet:ipv6-address
2434 | +--:(unnumbered-interface-id-ero-case)
2435 | | +--ro loose? boolean
2436 | | +--ro router-id? uint32
2437 | | +--ro interface-id? uint32
2438 | +--:(ipv4-ero-backup-case)
2439 | | +--ro loose? boolean
2440 | | +--ro address inet:ipv4-address
2441 | +--:(ipv6-ero-backup-case)
2442 | | +--ro loose? boolean
2443 | | +--ro address inet:ipv6-address
2444 | +--:(unnumbered-interface-id-backup-ero-case)
2445 | +--ro loose? boolean
2446 | +--ro router-id? uint32
2447 | +--ro interface-id? uint32
2448 x--:(te-lsp-attributes-case)
2449 +--ro te-lsp-attributes
2454 The Link-State table in a instance of the speaker's Loc-RIB can be verified via REST:
2456 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-linkstate:linkstate-address-family/bgp-linkstate:linkstate-subsequent-address-family/linkstate-routes``
2464 <linkstate-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-linkstate">
2468 .. note:: Link-State routes mapping to topology links/nodes/prefixes is supported by BGP Topology Provider.
2472 * `North-Bound Distribution of Link-State and Traffic Engineering (TE) Information Using BGP <https://tools.ietf.org/html/rfc7752>`_
2473 * `BGP Link-State extensions for Segment Routing <https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-03>`_
2474 * `Segment Routing BGP Egress Peer Engineering BGP-LS Extensions <https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05>`_
2475 * `BGP Link-State Information Distribution Implementation Report <https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-impl-04>`_
2477 Flow Specification Family
2478 -------------------------
2479 The BGP Flow Specification (BGP-FS) Multiprotocol extension can be used to distribute traffic flow specifications.
2480 For example, the BGP-FS can be used in a case of (distributed) denial-of-service (DDoS) attack mitigation procedures and traffic filtering (BGP/MPLS VPN service, DC).
2482 .. contents:: Contents
2488 This section shows a way to enable BGP-FS family in BGP speaker and peer configuration.
2492 To enable BGP-FS support in BGP plugin, first configure BGP speaker instance:
2494 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
2496 **Method:** ``POST``
2498 **Content-Type:** ``application/xml``
2504 <protocol xmlns="http://openconfig.net/yang/network-instance">
2505 <name>bgp-example</name>
2506 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
2507 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
2510 <router-id>192.0.2.2</router-id>
2515 <afi-safi-name>IPV4-FLOW</afi-safi-name>
2518 <afi-safi-name>IPV6-FLOW</afi-safi-name>
2521 <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
2524 <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
2533 Here is an example for BGP peer configuration with enabled BGP-FS family.
2535 **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``
2537 **Method:** ``POST``
2539 **Content-Type:** ``application/xml``
2545 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
2546 <neighbor-address>192.0.2.1</neighbor-address>
2549 <afi-safi-name>IPV4-FLOW</afi-safi-name>
2552 <afi-safi-name>IPV6-FLOW</afi-safi-name>
2555 <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
2558 <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
2563 Flow Specification API
2564 ^^^^^^^^^^^^^^^^^^^^^^
2565 Following trees illustrate the BGP Flow Specification routes structure.
2567 IPv4 Flow Specification Route
2568 '''''''''''''''''''''''''''''
2569 .. code-block:: console
2571 :(flowspec-routes-case)
2572 +--ro flowspec-routes
2573 +--ro flowspec-route* [route-key path-id]
2574 +--ro route-key string
2576 | +--ro (flowspec-type)?
2579 | | +--ro op? numeric-operand
2580 | | +--ro value? uint16
2581 | +--:(destination-port-case)
2582 | | +--ro destination-ports*
2583 | | +--ro op? numeric-operand
2584 | | +--ro value? uint16
2585 | +--:(source-port-case)
2586 | | +--ro source-ports*
2587 | | +--ro op? numeric-operand
2588 | | +--ro value? uint16
2589 | +--:(icmp-type-case)
2591 | | +--ro op? numeric-operand
2592 | | +--ro value? uint8
2593 | +--:(icmp-code-case)
2595 | | +--ro op? numeric-operand
2596 | | +--ro value? uint8
2597 | +--:(tcp-flags-case)
2598 | | +--ro tcp-flags*
2599 | | +--ro op? bitmask-operand
2600 | | +--ro value? uint16
2601 | +--:(packet-length-case)
2602 | | +--ro packet-lengths*
2603 | | +--ro op? numeric-operand
2604 | | +--ro value? uint16
2607 | | +--ro op? numeric-operand
2608 | | +--ro value? dscp
2609 | +--:(fragment-case)
2610 | | +--ro fragments*
2611 | | +--ro op? bitmask-operand
2612 | | +--ro value? fragment
2613 | +--:(destination-prefix-case)
2614 | | +--ro destination-prefix? inet:ipv4-prefix
2615 | +--:(source-prefix-case)
2616 | | +--ro source-prefix? inet:ipv4-prefix
2617 | +--:(protocol-ip-case)
2618 | +--ro protocol-ips*
2619 | +--ro op? numeric-operand
2620 | +--ro value? uint8
2621 +--ro path-id path-id
2623 +--ro extended-communities*
2624 +--ro transitive? boolean
2625 +--ro (extended-community)?
2626 +--:(traffic-rate-extended-community-case)
2627 | +--ro traffic-rate-extended-community
2628 | +--ro informative-as? bgp-t:short-as-number
2629 | +--ro local-administrator? netc:bandwidth
2630 +--:(traffic-action-extended-community-case)
2631 | +--ro traffic-action-extended-community
2632 | +--ro sample? boolean
2633 | +--ro terminal-action? boolean
2634 +--:(redirect-extended-community-case)
2635 | +--ro redirect-extended-community
2636 | +--ro global-administrator? bgp-t:short-as-number
2637 | +--ro local-administrator? binary
2638 +--:(traffic-marking-extended-community-case)
2639 | +--ro traffic-marking-extended-community
2640 | +--ro global-administrator? dscp
2641 +--:(redirect-ipv4-extended-community-case)
2642 | +--ro redirect-ipv4
2643 | +--ro global-administrator? inet:ipv4-address
2644 | +--ro local-administrator? uint16
2645 +--:(redirect-as4-extended-community-case)
2646 | +--ro redirect-as4
2647 | +--ro global-administrator? inet:as-number
2648 | +--ro local-administrator? uint16
2649 +--:(redirect-ip-nh-extended-community-case)
2650 +--ro redirect-ip-nh-extended-community
2651 +--ro next-hop-address? inet:ip-address
2655 IPv6 Flow Specification Route
2656 '''''''''''''''''''''''''''''
2657 .. code-block:: console
2659 :(flowspec-ipv6-routes-case)
2660 +--ro flowspec-ipv6-routes
2661 +--ro flowspec-route* [route-key path-id]
2663 | +--ro (flowspec-type)?
2666 | | +--ro op? numeric-operand
2667 | | +--ro value? uint16
2668 | +--:(destination-port-case)
2669 | | +--ro destination-ports*
2670 | | +--ro op? numeric-operand
2671 | | +--ro value? uint16
2672 | +--:(source-port-case)
2673 | | +--ro source-ports*
2674 | | +--ro op? numeric-operand
2675 | | +--ro value? uint16
2676 | +--:(icmp-type-case)
2678 | | +--ro op? numeric-operand
2679 | | +--ro value? uint8
2680 | +--:(icmp-code-case)
2682 | | +--ro op? numeric-operand
2683 | | +--ro value? uint8
2684 | +--:(tcp-flags-case)
2685 | | +--ro tcp-flags*
2686 | | +--ro op? bitmask-operand
2687 | | +--ro value? uint16
2688 | +--:(packet-length-case)
2689 | | +--ro packet-lengths*
2690 | | +--ro op? numeric-operand
2691 | | +--ro value? uint16
2694 | | +--ro op? numeric-operand
2695 | | +--ro value? dscp
2696 | +--:(fragment-case)
2697 | | +--ro fragments*
2698 | | +--ro op? bitmask-operand
2699 | | +--ro value? fragment
2700 | +--:(destination-ipv6-prefix-case)
2701 | | +--ro destination-prefix? inet:ipv6-prefix
2702 | +--:(source-ipv6-prefix-case)
2703 | | +--ro source-prefix? inet:ipv6-prefix
2704 | +--:(next-header-case)
2705 | | +--ro next-headers*
2706 | | +--ro op? numeric-operand
2707 | | +--ro value? uint8
2708 | +--:(flow-label-case)
2710 | +--ro op? numeric-operand
2711 | +--ro value? uint32
2712 +--ro path-id path-id
2714 +--ro extended-communities*
2715 +--ro transitive? boolean
2716 +--ro (extended-community)?
2717 +--:(traffic-rate-extended-community-case)
2718 | +--ro traffic-rate-extended-community
2719 | +--ro informative-as? bgp-t:short-as-number
2720 | +--ro local-administrator? netc:bandwidth
2721 +--:(traffic-action-extended-community-case)
2722 | +--ro traffic-action-extended-community
2723 | +--ro sample? boolean
2724 | +--ro terminal-action? boolean
2725 +--:(redirect-extended-community-case)
2726 | +--ro redirect-extended-community
2727 | +--ro global-administrator? bgp-t:short-as-number
2728 | +--ro local-administrator? binary
2729 +--:(traffic-marking-extended-community-case)
2730 | +--ro traffic-marking-extended-community
2731 | +--ro global-administrator? dscp
2732 +--:(redirect-ipv6-extended-community-case)
2733 | +--ro redirect-ipv6
2734 | +--ro global-administrator? inet:ipv6-address
2735 | +--ro local-administrator? uint16
2736 +--:(redirect-as4-extended-community-case)
2737 | +--ro redirect-as4
2738 | +--ro global-administrator? inet:as-number
2739 | +--ro local-administrator? uint16
2740 +--:(redirect-ip-nh-extended-community-case)
2741 +--ro redirect-ip-nh-extended-community
2742 +--ro next-hop-address? inet:ip-address
2747 The flowspec route represents rules and an action, defined as an extended community.
2749 IPv4 Flow Specification
2750 '''''''''''''''''''''''
2751 The IPv4 Flowspec table in an instance of the speaker's Loc-RIB can be verified via REST:
2753 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes``
2761 <flowspec-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2763 <path-id>0</path-id>
2764 <route-key>all packets to 192.168.0.1/32 AND from 10.0.0.2/32 AND where IP protocol equals to 17 or equals to 6 AND where port equals to 80 or equals to 8080 AND where destination port is greater than 8080 and is less than 8088 or equals to 3128 AND where source port is greater than 1024 </route-key>
2773 <extended-communities>
2774 <transitive>true</transitive>
2775 <redirect-extended-community>
2776 <local-administrator>AgMWLg==</local-administrator>
2777 <global-administrator>258</global-administrator>
2778 </redirect-extended-community>
2779 </extended-communities>
2782 <destination-prefix>192.168.0.1/32</destination-prefix>
2785 <source-prefix>10.0.0.2/32</source-prefix>
2793 <op>equals end-of-list</op>
2803 <op>equals end-of-list</op>
2809 <op>greater-than</op>
2811 </destination-ports>
2813 <op>less-than and-bit</op>
2815 </destination-ports>
2817 <op>equals end-of-list</op>
2819 </destination-ports>
2823 <op>end-of-list greater-than</op>
2830 IPv6 Flows Specification
2831 ''''''''''''''''''''''''
2832 The IPv6 Flowspec table in an instance of the speaker's Loc-RIB can be verified via REST:
2834 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv6-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-ipv6-routes``
2842 <flowspec-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2844 <path-id>0</path-id>
2845 <route-key>all packets to 2001:db8:31::/64 AND from 2001:db8:30::/64 AND where next header equals to 17 AND where DSCP equals to 50 AND where flow label equals to 2013 </route-key>
2854 <extended-communities>
2855 <transitive>true</transitive>
2856 <traffic-rate-extended-community>
2857 <informative-as>0</informative-as>
2858 <local-administrator>AAAAAA==</local-administrator>
2859 </traffic-rate-extended-community>
2860 </extended-communities>
2863 <destination-prefix>2001:db8:31::/64</destination-prefix>
2866 <source-prefix>2001:db8:30::/64</source-prefix>
2870 <op>equals end-of-list</op>
2876 <op>equals end-of-list</op>
2882 <op>equals end-of-list</op>
2887 </flowspec-ipv6-routes>
2889 IPv4 L3VPN Flows Specification
2890 ''''''''''''''''''''''''''''''
2891 The IPv4 L3VPN Flowspec table in an instance of the speaker's Loc-RIB can be verified via REST:
2893 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-l3vpn-subsequent-address-family/bgp-flowspec:flowspec-l3vpn-ipv4-routes``
2901 <flowspec-l3vpn-ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2902 <flowspec-l3vpn-route>
2903 <path-id>0</path-id>
2904 <route-key>[l3vpn with route-distinguisher 172.16.0.44:101] all packets from 10.0.0.3/32</route-key>
2910 <global>5.6.7.8</global>
2916 <extended-communities>
2917 <transitive>true</transitive>
2918 <redirect-ip-nh-extended-community>
2920 <next-hop-address>0.0.0.0</next-hop-address>
2921 </redirect-ip-nh-extended-community>
2922 </extended-communities>
2924 <route-distinguisher>172.16.0.44:101</route-distinguisher>
2926 <source-prefix>10.0.0.3/32</source-prefix>
2928 </flowspec-l3vpn-route>
2929 </flowspec-l3vpn-ipv4-routes>
2933 IPv4 Flow Specification
2934 '''''''''''''''''''''''
2935 This examples show how to originate and remove IPv4 fowspec route via programmable RIB.
2936 Make sure the *Application Peer* is configured first.
2938 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes``
2940 **Method:** ``POST``
2942 **Content-Type:** ``application/xml``
2948 <flowspec-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2949 <route-key>flow1</route-key>
2950 <path-id>0</path-id>
2952 <destination-prefix>192.168.0.1/32</destination-prefix>
2955 <source-prefix>10.0.0.1/32</source-prefix>
2959 <op>equals end-of-list</op>
2965 <op>equals end-of-list</op>
2971 <op>greater-than</op>
2973 </destination-ports>
2975 <op>and-bit less-than end-of-list</op>
2977 </destination-ports>
2981 <op>greater-than end-of-list</op>
2987 <op>equals end-of-list</op>
2993 <op>equals end-of-list</op>
2999 <op>match end-of-list</op>
3005 <op>greater-than</op>
3009 <op>and-bit less-than end-of-list</op>
3015 <op>equals end-of-list</op>
3021 <op>match end-of-list</op>
3022 <value>first</value>
3033 <extended-communities>
3035 </extended-communities>
3041 **Extended Communities**
3048 <extended-communities>
3049 <transitive>true</transitive>
3050 <traffic-rate-extended-community>
3051 <informative-as>123</informative-as>
3052 <local-administrator>AAAAAA==</local-administrator>
3053 </traffic-rate-extended-community>
3054 </extended-communities>
3056 @line 5: A rate in bytes per second, *AAAAAA==* (0) means traffic discard.
3058 * **Traffic Action**
3061 <extended-communities>
3062 <transitive>true</transitive>
3063 <traffic-action-extended-community>
3064 <sample>true</sample>
3065 <terminal-action>false</terminal-action>
3066 </traffic-action-extended-community>
3067 </extended-communities>
3070 * **Redirect to VRF AS 2byte format**
3073 <extended-communities>
3074 <transitive>true</transitive>
3075 <redirect-extended-community>
3076 <global-administrator>123</global-administrator>
3077 <local-administrator>AAAAew==</local-administrator>
3078 </redirect-extended-community>
3079 </extended-communities>
3081 * **Redirect to VRF IPv4 format**
3084 <extended-communities>
3085 <transitive>true</transitive>
3087 <global-administrator>192.168.0.1</global-administrator>
3088 <local-administrator>12345</local-administrator>
3090 </extended-communities>
3092 * **Redirect to VRF AS 4byte format**
3095 <extended-communities>
3096 <transitive>true</transitive>
3098 <global-administrator>64495</global-administrator>
3099 <local-administrator>12345</local-administrator>
3101 </extended-communities>
3103 * **Redirect to IP**
3106 <extended-communities>
3107 <transitive>true</transitive>
3108 <redirect-ip-nh-extended-community>
3110 </redirect-ip-nh-extended-community>
3111 </extended-communities>
3113 * **Traffic Marking**
3116 <extended-communities>
3117 <transitive>true</transitive>
3118 <traffic-marking-extended-community>
3119 <global-administrator>20</global-administrator>
3120 </traffic-marking-extended-community>
3121 </extended-communities>
3125 To remove the route added above, following request can be used:
3127 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes/bgp-flowspec:flowspec-route/flow1/0``
3129 **Method:** ``DELETE``
3131 IPv4 L3VPN Flow Specification
3132 '''''''''''''''''''''''''''''
3133 This examples show how to originate and remove IPv4 L3VPN fowspec route via programmable RIB.
3135 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-l3vpn-subsequent-address-family/bgp-flowspec:flowspec-l3vpn-ipv4-routes``
3137 **Method:** ``POST``
3139 **Content-Type:** ``application/xml``
3145 <flowspec-l3vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
3146 <path-id>0</path-id>
3147 <route-key>flow-l3vpn</route-key>
3148 <route-distinguisher>172.16.0.44:101</route-distinguisher>
3150 <source-prefix>10.0.0.3/32</source-prefix>
3160 <extended-communities>
3161 <transitive>true</transitive>
3163 <global-administrator>172.16.0.44</global-administrator>
3164 <local-administrator>102</local-administrator>
3166 </extended-communities>
3168 </flowspec-l3vpn-route>
3172 To remove the route added above, following request can be used:
3174 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-l3vpn-subsequent-address-family/bgp-flowspec:flowspec-l3vpn-ipv4-routes/flowspec-l3vpn-route/flow-l3vpn/0``
3176 **Method:** ``DELETE``
3178 IPv6 Flow Specification
3179 '''''''''''''''''''''''
3180 This examples show how to originate and remove IPv6 fowspec route via programmable RIB.
3182 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv6-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-ipv6-routes``
3184 **Method:** ``POST``
3186 **Content-Type:** ``application/xml``
3192 <flowspec-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
3193 <route-key>flow-v6</route-key>
3194 <path-id>0</path-id>
3196 <destination-prefix>2001:db8:30::3/128</destination-prefix>
3199 <source-prefix>2001:db8:31::3/128</source-prefix>
3203 <op>equals end-of-list</op>
3208 <extended-communities>
3209 <transitive>true</transitive>
3211 <global-administrator>2001:db8:1::6</global-administrator>
3212 <local-administrator>12345</local-administrator>
3214 </extended-communities>
3227 To remove the route added above, following request can be used:
3229 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv6-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-ipv6-routes/bgp-flowspec:flowspec-route/flow-v6/0``
3231 **Method:** ``DELETE``
3235 * `Dissemination of Flow Specification Rules <https://tools.ietf.org/html/rfc5575>`_
3236 * `Dissemination of Flow Specification Rules for IPv6 <https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-07>`_
3237 * `BGP Flow-Spec Extended Community for Traffic Redirect to IP Next Hop <https://tools.ietf.org/html/draft-ietf-idr-flowspec-redirect-ip-00>`_
3238 * `Clarification of the Flowspec Redirect Extended Community <https://tools.ietf.org/html/rfc7674>`_
3239 * `Revised Validation Procedure for BGP Flow Specifications <https://tools.ietf.org/html/draft-ietf-idr-bgp-flowspec-oid-03>`_
3243 The BGP MPLS-Based Ethernet VPN (BGP EVPN) Multiprotocol extension can be used to distribute Ethernet L2VPN service related routes in order to support a concept of MAC routing.
3244 A major use-case for BGP EVPN is data-center interconnection (DCI), where advantage of BGP EVPN are MAC/IP address advertising across MPLS network, Multihoming functionality including Fast Convergence, Split Horizon and Aliasing support, VM (MAC) Mobility, support Multicast and Broadcast traffic.
3245 In addition to MPLS, IP tunnelling encapsulation techniques like VXLAN, NVGRE, MPLSoGRE and others can be used for packet transportation.
3246 Also, Provider Backbone Bridging (PBB) can be combined with EVPN in order to reduce a number of MAC Advertisement routes.
3248 .. contents:: Contents
3254 This section shows a way to enable EVPN family in BGP speaker and peer configuration.
3258 To enable EVPN support in BGP plugin, first configure BGP speaker instance:
3260 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
3262 **Method:** ``POST``
3264 **Content-Type:** ``application/xml``
3270 <protocol xmlns="http://openconfig.net/yang/network-instance">
3271 <name>bgp-example</name>
3272 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
3273 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3276 <router-id>192.0.2.2</router-id>
3281 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
3290 Here is an example for BGP peer configuration with enabled EVPN family.
3292 **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``
3294 **Method:** ``POST``
3296 **Content-Type:** ``application/xml``
3302 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3303 <neighbor-address>192.0.2.1</neighbor-address>
3306 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
3313 Following tree illustrate the BGP EVPN route structure.
3315 .. code-block:: console
3319 +--ro evpn-route* [route-key]
3320 +--ro route-key string
3322 | +--:(ethernet-a-d-route-case)
3323 | | +--ro ethernet-a-d-route
3325 | | | +--:(arbitrary-case)
3326 | | | | +--ro arbitrary
3327 | | | | +--ro arbitrary binary
3328 | | | +--:(lacp-auto-generated-case)
3329 | | | | +--ro lacp-auto-generated
3330 | | | | +--ro ce-lacp-mac-address yang:mac-address
3331 | | | | +--ro ce-lacp-port-key uint16
3332 | | | +--:(lan-auto-generated-case)
3333 | | | | +--ro lan-auto-generated
3334 | | | | +--ro root-bridge-mac-address yang:mac-address
3335 | | | | +--ro root-bridge-priority uint16
3336 | | | +--:(mac-auto-generated-case)
3337 | | | | +--ro mac-auto-generated
3338 | | | | +--ro system-mac-address yang:mac-address
3339 | | | | +--ro local-discriminator uint24
3340 | | | +--:(router-id-generated-case)
3341 | | | | +--ro router-id-generated
3342 | | | | +--ro router-id inet:ipv4-address
3343 | | | | +--ro local-discriminator uint32
3344 | | | +--:(as-generated-case)
3345 | | | +--ro as-generated
3346 | | | +--ro as inet:as-number
3347 | | | +--ro local-discriminator uint32
3348 | | +--ro ethernet-tag-id
3349 | | | +--ro vlan-id uint32
3350 | | +--ro mpls-label netc:mpls-label
3351 | +--:(mac-ip-adv-route-case)
3352 | | +--ro mac-ip-adv-route
3354 | | | +--:(arbitrary-case)
3355 | | | | +--ro arbitrary
3356 | | | | +--ro arbitrary binary
3357 | | | +--:(lacp-auto-generated-case)
3358 | | | | +--ro lacp-auto-generated
3359 | | | | +--ro ce-lacp-mac-address yang:mac-address
3360 | | | | +--ro ce-lacp-port-key uint16
3361 | | | +--:(lan-auto-generated-case)
3362 | | | | +--ro lan-auto-generated
3363 | | | | +--ro root-bridge-mac-address yang:mac-address
3364 | | | | +--ro root-bridge-priority uint16
3365 | | | +--:(mac-auto-generated-case)
3366 | | | | +--ro mac-auto-generated
3367 | | | | +--ro system-mac-address yang:mac-address
3368 | | | | +--ro local-discriminator uint24
3369 | | | +--:(router-id-generated-case)
3370 | | | | +--ro router-id-generated
3371 | | | | +--ro router-id inet:ipv4-address
3372 | | | | +--ro local-discriminator uint32
3373 | | | +--:(as-generated-case)
3374 | | | +--ro as-generated
3375 | | | +--ro as inet:as-number
3376 | | | +--ro local-discriminator uint32
3377 | | +--ro ethernet-tag-id
3378 | | | +--ro vlan-id uint32
3379 | | +--ro mac-address yang:mac-address
3380 | | +--ro ip-address? inet:ip-address
3381 | | +--ro mpls-label1 netc:mpls-label
3382 | | +--ro mpls-label2? netc:mpls-label
3383 | +--:(inc-multi-ethernet-tag-res-case)
3384 | | +--ro inc-multi-ethernet-tag-res
3385 | | +--ro ethernet-tag-id
3386 | | | +--ro vlan-id uint32
3387 | | +--ro orig-route-ip? inet:ip-address
3388 | +--:(es-route-case)
3391 | | +--:(arbitrary-case)
3392 | | | +--ro arbitrary
3393 | | | +--ro arbitrary binary
3394 | | +--:(lacp-auto-generated-case)
3395 | | | +--ro lacp-auto-generated
3396 | | | +--ro ce-lacp-mac-address yang:mac-address
3397 | | | +--ro ce-lacp-port-key uint16
3398 | | +--:(lan-auto-generated-case)
3399 | | | +--ro lan-auto-generated
3400 | | | +--ro root-bridge-mac-address yang:mac-address
3401 | | | +--ro root-bridge-priority uint16
3402 | | +--:(mac-auto-generated-case)
3403 | | | +--ro mac-auto-generated
3404 | | | +--ro system-mac-address yang:mac-address
3405 | | | +--ro local-discriminator uint24
3406 | | +--:(router-id-generated-case)
3407 | | | +--ro router-id-generated
3408 | | | +--ro router-id inet:ipv4-address
3409 | | | +--ro local-discriminator uint32
3410 | | +--:(as-generated-case)
3411 | | +--ro as-generated
3412 | | +--ro as inet:as-number
3413 | | +--ro local-discriminator uint32
3414 | +--ro orig-route-ip inet:ip-address
3415 +--ro route-distinguisher bgp-t:route-distinguisher
3417 +--ro extended-communities*
3418 | +--ro transitive? boolean
3419 | +--ro (extended-community)?
3420 | +--:(encapsulation-case)
3421 | | +--ro encapsulation-extended-community
3422 | | +--ro tunnel-type encapsulation-tunnel-type
3423 | +--:(esi-label-extended-community-case)
3424 | | +--ro esi-label-extended-community
3425 | | +--ro single-active-mode? boolean
3426 | | +--ro esi-label netc:mpls-label
3427 | +--:(es-import-route-extended-community-case)
3428 | | +--ro es-import-route-extended-community
3429 | | +--ro es-import yang:mac-address
3430 | +--:(mac-mobility-extended-community-case)
3431 | | +--ro mac-mobility-extended-community
3432 | | +--ro static? boolean
3433 | | +--ro seq-number uint32
3434 | +--:(default-gateway-extended-community-case)
3435 | | +--ro default-gateway-extended-community!
3436 | +--:(layer-2-attributes-extended-community-case)
3437 | +--ro layer-2-attributes-extended-community
3438 | +--ro primary-pe? boolean
3439 | +--ro backup-pe? boolean
3440 | +--ro control-word? boolean
3441 | +--ro l2-mtu uint16
3443 +--ro leaf-information-required boolean
3444 +--ro mpls-label? netc:mpls-label
3445 +--ro (tunnel-identifier)?
3446 +--:(rsvp-te-p2mp-lsp)
3447 | +--ro rsvp-te-p2mp-lps
3448 | +--ro p2mp-id uint32
3449 | +--ro tunnel-id uint16
3450 | +--ro extended-tunnel-id inet:ip-address
3452 | +--ro mldp-p2mp-lsp
3453 | +--ro address-family identityref
3454 | +--ro root-node-address inet:ip-address
3455 | +--ro opaque-value*
3456 | +--ro opaque-type uint8
3457 | +--ro opaque-extended-type? uint16
3458 | +--ro opaque yang:hex-string
3460 | +--ro pim-ssm-tree
3461 | +--ro p-address inet:ip-address
3462 | +--ro p-multicast-group inet:ip-address
3465 | +--ro p-address inet:ip-address
3466 | +--ro p-multicast-group inet:ip-address
3467 +--:(bidir-pim-tree)
3468 | +--ro bidir-pim-tree
3469 | +--ro p-address inet:ip-address
3470 | +--ro p-multicast-group inet:ip-address
3471 +--:(ingress-replication)
3472 | +--ro ingress-replication
3473 | +--ro receiving-endpoint-address? inet:ip-address
3474 +--:(mldp-mp2mp-lsp)
3475 +--ro mldp-mp2mp-lsp
3476 +--ro opaque-type uint8
3477 +--ro opaque-extended-type? uint16
3483 The L2VPN EVPN table in an instance of the speaker's Loc-RIB can be verified via REST:
3485 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/evpn-routes``
3493 <evpn-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
3495 <route-key>AxEAAcCoZAED6AAAAQAgwKhkAQ==</route-key>
3496 <route-distinguisher>192.168.100.1:1000</route-distinguisher>
3497 <inc-multi-ethernet-tag-res>
3499 <vlan-id>256</vlan-id>
3501 <orig-route-ip>192.168.100.1</orig-route-ip>
3502 </inc-multi-ethernet-tag-res>
3505 <global>172.23.29.104</global>
3511 <extended-communities>
3512 <extended-communities>
3513 <transitive>true</transitive>
3514 <route-target-extended-community>
3515 <global-administrator>65504</global-administrator>
3516 <local-administrator>AAAD6A==</local-administrator>
3517 </route-target-extended-community>
3518 </extended-communities>
3519 </extended-communities>
3521 <leaf-information-required>true</leaf-information-required>
3522 <mpls-label>20024</mpls-label>
3523 <ingress-replication>
3524 <receiving-endpoint-address>192.168.100.1</receiving-endpoint-address>
3525 </ingress-replication>
3533 This examples show how to originate and remove EVPN routes via programmable RIB.
3534 There are four different types of EVPN routes, and several extended communities.
3535 Routes can be used for variety of use-cases supported by BGP/MPLS EVPN, PBB EVPN and NVO EVPN.
3536 Make sure the *Application Peer* is configured first.
3538 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes``
3540 **Method:** ``POST``
3542 **Content-Type:** ``application/xml``
3548 :emphasize-lines: 3,4,14
3550 <evpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
3551 <route-key>evpn</route-key>
3552 <route-distinguisher>172.12.123.3:200</route-distinguisher>
3556 <global>199.20.166.41</global>
3562 <extended-communities>
3564 </extended-communities>
3568 @line 3: Route Distinguisher (RD) - set to RD of the MAC-VRF advertising the NLRI, recommended format *<IP>:<VLAN_ID>*
3570 @line 4: One of the EVPN route must be set here.
3572 @line 14: In some cases, specific extended community presence is required. The route may carry one or more Route Target attributes.
3578 * **Ethernet AD per ESI**
3581 <ethernet-a-d-route>
3582 <mpls-label>0</mpls-label>
3584 <vlan-id>4294967295</vlan-id>
3587 <arbitrary>AAAAAAAAAAAA</arbitrary>
3589 </ethernet-a-d-route>
3591 * **Ethernet AD per EVI**
3594 <ethernet-a-d-route>
3595 <mpls-label>24001</mpls-label>
3597 <vlan-id>2200</vlan-id>
3600 <arbitrary>AAAAAAAAAAAA</arbitrary>
3602 </ethernet-a-d-route>
3604 * **MAC/IP Advertisement**
3609 <arbitrary>AAAAAAAAAAAA</arbitrary>
3612 <vlan-id>2100</vlan-id>
3614 <mac-address>f2:0c:dd:80:9f:f7</mac-address>
3615 <ip-address>10.0.1.12</ip-address>
3616 <mpls-label1>299776</mpls-label1>
3620 * **Inclusive Multicast Ethernet Tag**
3623 <inc-multi-ethernet-tag-res>
3625 <vlan-id>2100</vlan-id>
3627 <orig-route-ip>43.43.43.43</orig-route-ip>
3628 </inc-multi-ethernet-tag-res>
3630 * **Ethernet Segment**
3634 <orig-route-ip>43.43.43.43</orig-route-ip>
3636 <arbitrary>AAAAAAAAAAAA</arbitrary>
3640 **EVPN Ethernet Segment Identifier (ESI):**
3643 Indicates an arbitrary 9-octet ESI.
3648 <arbitrary>AAAAAAAAAAAA</arbitrary>
3652 IEEE 802.1AX LACP is used.
3656 <lacp-auto-generated>
3657 <ce-lacp-mac-address>f2:0c:dd:80:9f:f7</ce-lacp-mac-address>
3658 <ce-lacp-port-key>22</ce-lacp-port-key>
3659 </lacp-auto-generated>
3662 Indirectly connected hosts via a bridged LAN.
3666 <lan-auto-generated>
3667 <root-bridge-mac-address>f2:0c:dd:80:9f:f7</root-bridge-mac-address>
3668 <root-bridge-priority>20</root-bridge-priority>
3669 </lan-auto-generated>
3676 <mac-auto-generated>
3677 <system-mac-address>f2:0c:dd:80:9f:f7</system-mac-address>
3678 <local-discriminator>2000</local-discriminator>
3679 </mac-auto-generated>
3686 <router-id-generated>
3687 <router-id>43.43.43.43</router-id>
3688 <local-discriminator>2000</local-discriminator>
3689 </router-id-generated>
3698 <local-discriminator>2000</local-discriminator>
3701 **Extended Communities:**
3703 * **ESI Label Extended Community**
3706 <extended-communities>
3707 <transitive>true</transitive>
3708 <esi-label-extended-community>
3709 <single-active-mode>false</single-active-mode>
3710 <esi-label>24001</esi-label>
3711 </esi-label-extended-community >
3712 </extended-communities>
3714 * **ES-Import Route Target**
3717 <extended-communities>
3718 <transitive>true</transitive>
3719 <es-import-route-extended-community>
3720 <es-import>f2:0c:dd:80:9f:f7</es-import>
3721 </es-import-route-extended-community>
3722 </extended-communities>
3724 * **MAC Mobility Extended Community**
3727 <extended-communities>
3728 <transitive>true</transitive>
3729 <mac-mobility-extended-community>
3730 <static>true</static>
3731 <seq-number>200</seq-number>
3732 </mac-mobility-extended-community>
3733 </extended-communities>
3735 * **Default Gateway Extended Community**
3738 <extended-communities>
3739 <transitive>true</transitive>
3740 <default-gateway-extended-community>
3741 </default-gateway-extended-community>
3742 </extended-communities>
3744 * **EVPN Layer 2 attributes extended community**
3747 <extended-communities>
3748 <transitive>false</transitive>
3749 <layer-2-attributes-extended-community>
3750 <primary-pe>true</primary-pe>
3751 <backup-pe>true</backup-pe>
3752 <control-word >true</control-word>
3753 <l2-mtu>200</l2-mtu>
3754 </layer-2-attributes-extended-community>
3755 </extended-communities>
3757 * **BGP Encapsulation extended community**
3762 <extended-communities>
3763 <transitive>false</transitive>
3764 <encapsulation-extended-community>
3765 <tunnel-type>vxlan</tunnel-type>
3766 </encapsulation-extended-community>
3767 </extended-communities>
3769 @line 4: `full list of tunnel types <http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#tunnel-types>`_
3771 * **P-Multicast Service Interface Tunnel (PMSI) attribute**
3775 <leaf-information-required>true</leaf-information-required>
3776 <mpls-label>20024</mpls-label>
3777 <ingress-replication>
3778 <receiving-endpoint-address>172.12.123.3</receiving-endpoint-address>
3779 </ingress-replication>
3784 To remove the route added above, following request can be used:
3786 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes/evpn-route/evpn``
3788 **Method:** ``DELETE``
3792 .. table:: EVPN Routes Usage.
3794 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3795 | EVN Route Type | Extended Communities | Usage |
3796 +======================================+=====================================================+===========================================+
3797 | **Ethernet Auto-discovery** | ESI Label, BGP EncapsulationEVPN Layer 2 attributes | Fast Convergence, Split Horizon, Aliasing |
3798 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3799 | **MAC/IP Advertisement** | BGP Encapsulation, MAC Mobility, Default Gateway | MAC address reachability |
3800 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3801 | **Inclusive Multicast Ethernet Tag** | PMSI Tunnel, BGP Encapsulation | Handling of Multi-destination traffic |
3802 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3803 | **Ethernet Segment** | BGP Encapsulation, ES-Import Route Target | Designated Forwarder Election |
3804 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3808 * `BGP MPLS-Based Ethernet VPN <https://tools.ietf.org/html/rfc7432>`_
3809 * `Provider Backbone Bridging Combined with Ethernet VPN <https://tools.ietf.org/html/rfc7623>`_
3810 * `VPWS support in EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-vpws-07>`_
3811 * `A Network Virtualization Overlay Solution using EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-04>`_
3812 * `Interconnect Solution for EVPN Overlay networks <https://tools.ietf.org/html/draft-ietf-bess-dci-evpn-overlay-04>`_
3813 * `Usage and applicability of BGP MPLS based Ethernet VPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-usage-03>`_
3817 The ADD-PATH capability allows to advertise multiple paths for the same address prefix.
3818 It can help with optimal routing and routing convergence in a network by providing potential alternate or backup paths.
3820 .. contents:: Contents
3826 This section shows a way to enable ADD-PATH capability in BGP speaker and peer configuration.
3828 .. note:: The capability is applicable for IP Unicast, IP Labeled Unicast and Flow Specification address families.
3832 To enable ADD-PATH capability in BGP plugin, first configure BGP speaker instance:
3834 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
3836 **Method:** ``POST``
3838 **Content-Type:** ``application/xml``
3844 :emphasize-lines: 14
3846 <protocol xmlns="http://openconfig.net/yang/network-instance">
3847 <name>bgp-example</name>
3848 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
3849 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3852 <router-id>192.0.2.2</router-id>
3857 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3858 <receive>true</receive>
3859 <send-max>2</send-max>
3866 @line 14: Defines path selection strategy: *send-max* > 1 -> Advertise N Paths or *send-max* = 0 -> Advertise All Paths
3868 Here is an example for update a specific family with enable ADD-PATH capability
3870 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/global/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST``
3874 **Content-Type:** ``application/xml``
3880 <afi-safi xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3881 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3882 <receive>true</receive>
3883 <send-max>0</send-max>
3888 Here is an example for BGP peer configuration with enabled ADD-PATH capability.
3890 **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``
3892 **Method:** ``POST``
3894 **Content-Type:** ``application/xml``
3900 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3901 <neighbor-address>192.0.2.1</neighbor-address>
3904 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
3907 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3908 <receive>true</receive>
3909 <send-max>0</send-max>
3914 .. note:: The path selection strategy is not configurable on per peer basis. The send-max presence indicates a willingness to send ADD-PATH NLRIs to the neighbor.
3916 Here is an example for update specific family BGP peer configuration with enabled ADD-PATH capability.
3918 **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/neighbor/192.0.2.1/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST``
3922 **Content-Type:** ``application/xml``
3928 <afi-safi xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3929 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3930 <receive>true</receive>
3931 <send-max>0</send-max>
3936 The IPv4 Unicast table with enabled ADD-PATH capability in an instance of the speaker's Loc-RIB can be verified via REST:
3938 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ipv4-routes``
3948 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
3950 <path-id>1</path-id>
3951 <prefix>193.0.2.1/32</prefix>
3961 <global>10.0.0.1</global>
3966 <path-id>2</path-id>
3967 <prefix>193.0.2.1/32</prefix>
3977 <global>10.0.0.2</global>
3983 @line 3: The routes with the same destination are distinguished by *path-id* attribute.
3987 * `Advertisement of Multiple Paths in BGP <https://tools.ietf.org/html/rfc7911>`_
3988 * `Best Practices for Advertisement of Multiple Paths in IBGP <https://tools.ietf.org/html/draft-ietf-idr-add-paths-guidelines-08>`_
3992 The Route Refresh Capability allows to dynamically request a re-advertisement of the Adj-RIB-Out from a BGP peer.
3993 This is useful when the inbound routing policy for a peer changes and all prefixes from a peer must be reexamined against a new policy.
3995 .. contents:: Contents
4001 The capability is enabled by default, no additional configuration is required.
4005 To send a Route Refresh request from OpenDaylight BGP speaker instance to its neighbor, invoke RPC:
4007 **URL:** ``/restconf/operations/bgp-peer-rpc:route-refresh-request``
4009 **Method:** ``POST``
4011 **Content-Type:** ``application/xml``
4017 <input xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc">
4018 <afi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:ipv4-address-family</afi>
4019 <safi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:unicast-subsequent-address-family</safi>
4020 <peer-ref xmlns:rib="urn:opendaylight:params:xml:ns:yang:bgp-rib">/rib:bgp-rib/rib:rib[rib:id="bgp-example"]/rib:peer[rib:peer-id="bgp://10.25.1.9"]</peer-ref>
4025 * `Route Refresh Capability for BGP-4 <https://tools.ietf.org/html/rfc2918>`_
4029 Running OpenDaylight BGP in clustered environment brings an advantage of the plugin's high availability (HA).
4030 This section illustrates a basic scenario for HA, also presents a configuration for clustered OpenDaylight BGP.
4032 .. contents:: Contents
4038 Following example shows a configuration for running BGP in clustered environment.
4040 #. As the first step, configure (replicated *deafult* shard and *topology* shard if needed) and run OpenDaylight in clustered environment, install BGP and RESTCONF.
4042 #. On one node (OpenDaylight instance), configure BGP speaker instance and neighbor. In addition, configure BGP topology exporter if required. The configuration is shared across all interconnected cluster nodes, however BGP become active only on one node. Other nodes with configured BGP serves as stand-by backups.
4044 #. Remote peer should be configured to accept/initiate connection from/to all OpenDaylight cluster nodes with configured BGP plugin.
4046 #. Connect remote peer, let it advertise some routes. Verify routes presence in Loc-RIB and/or BGP topology exporter instance on all nodes of the OpenDaylight cluster.
4050 Replicating RIBs across the cluster nodes is causing severe scalability issue and overall performance degradation. To avoid this problems, configure BGP RIB module as a separate shard without enabled replication. Change configuration on all nodes as following (`configuration/initial`):
4052 * In ``modules.conf`` add a new module:
4053 .. code-block:: console
4057 namespace = "urn:opendaylight:params:xml:ns:yang:bgp-rib"
4058 shard-strategy = "module"
4061 * In ``module-shards.conf`` define a new module shard:
4062 .. code-block:: console
4076 **Note:** Use correct member name in module shard configuration.
4080 Following section presents a basic BGP speaker failover scenario on 3-node OpenDaylight cluster setup.
4082 .. figure:: ./images/bgpcep/BGP_HA.png
4085 Once the OpenDaylight BGP is configured, the speaker become active on one of the cluster nodes. Remote peer can establish connection with this BGP instance.
4086 Routes advertised by remote peer are replicated, hence RIBs state on all nodes is the same.
4090 .. figure:: ./images/bgpcep/BGP_HA_failure.png
4091 :alt: Node went down.
4093 In a case a cluster node, where BGP instance is running, goes down (unexpected failure, restart), active BGP session is dropped.
4097 .. figure:: ./images/bgpcep/BGP_HA_recovery.png
4100 Now, one of the stand-by BGP speaker instances become active. Remote peer establishes new connection and advertises routes again.
4104 This section provides an overview of the BGP topology provider service.
4105 It shows how to configure and use all available BGP topology providers.
4106 Providers are building topology view of BGP routes stored in local BGP speaker's Loc-RIB.
4107 Output topologies are rendered in a form of standardised IETF network topology model.
4109 .. contents:: Contents
4113 Inet Reachability Topology
4114 ^^^^^^^^^^^^^^^^^^^^^^^^^^
4115 Inet reachability topology exporter offers a mapping service from IPv4/6 routes to network topology nodes.
4119 Following example shows how to create a new instance of IPv4 BGP topology exporter:
4121 **URL:** ``/restconf/config/network-topology:network-topology``
4123 **Method:** ``POST``
4125 **Content-Type:** ``application/xml``
4131 :emphasize-lines: 2,4,6
4133 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4134 <topology-id>bgp-example-ipv4-topology</topology-id>
4136 <bgp-ipv4-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv4-reachability-topology>
4138 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
4141 @line 2: An identifier for a topology.
4143 @line 4: Used to identify type of the topology. In this case BGP IPv4 reachability topology.
4145 @line 6: A name of the local BGP speaker instance.
4149 The topology exporter instance can be removed in a following way:
4151 **URL:** ``/restconf/config/network-topology:network-topology/topology/bgp-example-ipv4-topology``
4153 **Method:** ``DELETE``
4157 Following example shows how to create a new instance of IPv6 BGP topology exporter:
4159 **URL:** ``/restconf/config/network-topology:network-topology``
4161 **Method:** ``POST``
4163 **Content-Type:** ``application/xml``
4169 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4170 <topology-id>bgp-example-ipv6-topology</topology-id>
4172 <bgp-ipv6-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv6-reachability-topology>
4174 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
4179 Operational state of the topology can be verified via REST:
4181 **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-ipv4-topology``
4189 :emphasize-lines: 8,11
4191 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4192 <topology-id>bgp-example-ipv4-topology</topology-id>
4193 <server-provided>true</server-provided>
4195 <bgp-ipv4-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv4-reachability-topology>
4198 <node-id>10.10.1.1</node-id>
4199 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4201 <prefix>10.0.0.10/32</prefix>
4203 </igp-node-attributes>
4207 @line 8: The identifier of a node in a topology. Its value is mapped from route's NEXT_HOP attribute.
4209 @line 11: The IP prefix attribute of the node. Its value is mapped from routes's destination IP prefix.
4211 BGP Linkstate Topology
4212 ^^^^^^^^^^^^^^^^^^^^^^
4213 BGP linkstate topology exporter offers a mapping service from BGP-LS routes to network topology nodes and links.
4217 Following example shows how to create a new instance of linkstate BGP topology exporter:
4219 **URL:** ``/restconf/config/network-topology:network-topology``
4221 **Method:** ``POST``
4223 **Content-Type:** ``application/xml``
4229 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4230 <topology-id>bgp-example-linkstate-topology</topology-id>
4232 <bgp-linkstate-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-linkstate-topology>
4234 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
4239 Operational state of the topology can be verified via REST.
4240 A sample output below represents a two node topology with two unidirectional links interconnecting those nodes.
4242 **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-linkstate-topology``
4250 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4251 <topology-id>bgp-example-linkstate-topology</topology-id>
4252 <server-provided>true</server-provided>
4254 <bgp-linkstate-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-linkstate-topology>
4257 <node-id>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</node-id>
4259 <tp-id>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</tp-id>
4260 <igp-termination-point-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"/>
4261 </termination-point>
4262 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4264 <prefix>40.40.40.40/32</prefix>
4268 <prefix>203.20.160.0/24</prefix>
4272 <router-id>40.40.40.40</router-id>
4273 <isis-node-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4275 <te-router-id-ipv4>40.40.40.40</te-router-id-ipv4>
4278 <iso-system-id>MDAwMDAwMDAwMDY0</iso-system-id>
4280 </isis-node-attributes>
4281 </igp-node-attributes>
4284 <node-id>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</node-id>
4286 <tp-id>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</tp-id>
4287 <igp-termination-point-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"/>
4288 </termination-point>
4289 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4291 <prefix>39.39.39.39/32</prefix>
4295 <prefix>203.20.160.0/24</prefix>
4299 <router-id>39.39.39.39</router-id>
4300 <isis-node-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4302 <te-router-id-ipv4>39.39.39.39</te-router-id-ipv4>
4305 <iso-system-id>MDAwMDAwMDAwMDg3</iso-system-id>
4307 </isis-node-attributes>
4308 </igp-node-attributes>
4312 <dest-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</dest-node>
4313 <dest-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</dest-tp>
4315 <link-id>bgpls://IsisLevel2:1/type=link&local-as=65000&local-domain=673720360&local-router=0000.0000.0040&remote-as=65000&remote-domain=673720360&remote-router=0000.0000.0039&ipv4-iface=203.20.160.40&ipv4-neigh=203.20.160.39</link-id>
4317 <source-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</source-node>
4318 <source-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</source-tp>
4320 <igp-link-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4322 <isis-link-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4325 <max-link-bandwidth>1250000.0</max-link-bandwidth>
4326 <max-resv-link-bandwidth>12500.0</max-resv-link-bandwidth>
4327 <te-default-metric>0</te-default-metric>
4328 <unreserved-bandwidth>
4329 <bandwidth>12500.0</bandwidth>
4330 <priority>0</priority>
4331 </unreserved-bandwidth>
4332 <unreserved-bandwidth>
4333 <bandwidth>12500.0</bandwidth>
4334 <priority>1</priority>
4335 </unreserved-bandwidth>
4336 <unreserved-bandwidth>
4337 <bandwidth>12500.0</bandwidth>
4338 <priority>2</priority>
4339 </unreserved-bandwidth>
4340 <unreserved-bandwidth>
4341 <bandwidth>12500.0</bandwidth>
4342 <priority>3</priority>
4343 </unreserved-bandwidth>
4344 <unreserved-bandwidth>
4345 <bandwidth>12500.0</bandwidth>
4346 <priority>4</priority>
4347 </unreserved-bandwidth>
4348 <unreserved-bandwidth>
4349 <bandwidth>12500.0</bandwidth>
4350 <priority>5</priority>
4351 </unreserved-bandwidth>
4352 <unreserved-bandwidth>
4353 <bandwidth>12500.0</bandwidth>
4354 <priority>6</priority>
4355 </unreserved-bandwidth>
4356 <unreserved-bandwidth>
4357 <bandwidth>12500.0</bandwidth>
4358 <priority>7</priority>
4359 </unreserved-bandwidth>
4361 </isis-link-attributes>
4362 </igp-link-attributes>
4366 <dest-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</dest-node>
4367 <dest-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</dest-tp>
4369 <link-id>bgpls://IsisLevel2:1/type=link&local-as=65000&local-domain=673720360&local-router=0000.0000.0039&remote-as=65000&remote-domain=673720360&remote-router=0000.0000.0040&ipv4-iface=203.20.160.39&ipv4-neigh=203.20.160.40</link-id>
4371 <source-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</source-node>
4372 <source-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</source-tp>
4374 <igp-link-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4376 <isis-link-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4379 <max-link-bandwidth>1250000.0</max-link-bandwidth>
4380 <max-resv-link-bandwidth>12500.0</max-resv-link-bandwidth>
4381 <te-default-metric>0</te-default-metric>
4382 <unreserved-bandwidth>
4383 <bandwidth>12500.0</bandwidth>
4384 <priority>0</priority>
4385 </unreserved-bandwidth>
4386 <unreserved-bandwidth>
4387 <bandwidth>12500.0</bandwidth>
4388 <priority>1</priority>
4389 </unreserved-bandwidth>
4390 <unreserved-bandwidth>
4391 <bandwidth>12500.0</bandwidth>
4392 <priority>2</priority>
4393 </unreserved-bandwidth>
4394 <unreserved-bandwidth>
4395 <bandwidth>12500.0</bandwidth>
4396 <priority>3</priority>
4397 </unreserved-bandwidth>
4398 <unreserved-bandwidth>
4399 <bandwidth>12500.0</bandwidth>
4400 <priority>4</priority>
4401 </unreserved-bandwidth>
4402 <unreserved-bandwidth>
4403 <bandwidth>12500.0</bandwidth>
4404 <priority>5</priority>
4405 </unreserved-bandwidth>
4406 <unreserved-bandwidth>
4407 <bandwidth>12500.0</bandwidth>
4408 <priority>6</priority>
4409 </unreserved-bandwidth>
4410 <unreserved-bandwidth>
4411 <bandwidth>12500.0</bandwidth>
4412 <priority>7</priority>
4413 </unreserved-bandwidth>
4415 </isis-link-attributes>
4416 </igp-link-attributes>
4422 BGP test tools serves to test basic BGP functionality, scalability and performance.
4424 .. contents:: Contents
4430 The BGP Test Tool is a stand-alone Java application purposed to simulate remote BGP peers, that are capable to advertise sample routes.
4431 This application is not part of the OpenDaylight Karaf distribution, however it can be downloaded from OpenDaylight's Nexus (use latest release version):
4433 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/bgp-testtool``
4437 The application can be run from command line:
4439 .. code-block:: console
4441 java -jar bgp-testtool-*-executable.jar
4444 with optional input parameters:
4446 .. code-block:: console
4448 -i <BOOLEAN>, --active <BOOLEAN>
4449 Active initialisation of the connection, by default false.
4451 -ho <N>, --holdtimer <N>
4452 In seconds, value of the desired holdtimer, by default 90.
4454 -sc <N>, --speakersCount <N>
4455 Number of simulated BGP speakers, when creating each speaker, uses incremented local-address for binding, by default 0.
4457 -ra <IP_ADDRESS:PORT,...>, --remoteAddress <IP_ADDRESS:PORT,...>
4458 A list of IP addresses of remote BGP peers, that the tool can accept or initiate connect to that address (based on the mode), by default 192.0.2.2:1790.
4460 -la <IP_ADDRESS:PORT>, --localAddress <IP_ADDRESS:PORT>
4461 IP address of BGP speakers which the tools simulates, by default 192.0.2.2:0.
4463 -pr <N>, --prefixes <N>
4464 Number of prefixes to be advertised by each simulated speaker
4466 -mp <BOOLEAN>, --multiPathSupport <BOOLEAN>
4467 Active ADD-PATH support, by default false.
4470 Local AS Number, by default 64496.
4472 -ec <EXTENDED_COMMUNITIES>, --extended_communities <EXTENDED_COMMUNITIES>
4473 Extended communities to be send. Format: x,x,x where x is each extended community from bgp-types.yang, by default empty.
4475 -ll <LOG_LEVEL>, --log_level <LOG_LEVEL>
4476 Log level for console output, by default INFO.
4478 BGP Application Peer Benchmark
4479 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4480 It is a simple OpenDaylight application which is capable to inject and remove specific amount of IPv4 routes.
4481 This application is part of the OpenDaylight Karaf distribution.
4485 As a first step install BGP, RESTCONF and NETCONF connector plugin, then configure *Application Peer*.
4486 Install ``odl-bgpcep-bgp-benchmark`` feature and reconfigure BGP Application Peer Benchmark application as per following:
4488 **URL:** ``/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-benchmark-cfg:app-peer-benchmark/bgp-app-peer-benchmark``
4492 **Content-Type:** ``application/xml``
4498 :emphasize-lines: 12
4500 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
4501 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">x:app-peer-benchmark</type>
4502 <name>bgp-app-peer-benchmark</name>
4503 <binding-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">
4504 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
4505 <name>pingpong-binding-data-broker</name>
4506 </binding-data-broker>
4507 <rpc-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">
4508 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-rpc-registry</type>
4509 <name>binding-rpc-broker</name>
4511 <app-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">10.25.1.9</app-rib-id>
4514 @line 12: The *Application Peer* identifier.
4516 .. warning:: This configuration will be moved to configuration datastore in Carbon release.
4520 Routes injection can be invoked via RPC:
4522 **URL:** ``/restconf/operations/odl-bgp-app-peer-benchmark:add-prefix``
4524 **Method:** ``POST``
4526 **Content-Type:** ``application/xml``
4532 :emphasize-lines: 2,3,4,5
4534 <input xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4535 <prefix>1.1.1.1/32</prefix>
4536 <count>100000</count>
4537 <batchsize>2000</batchsize>
4538 <nexthop>192.0.2.2</nexthop>
4541 @line 2: A initial IPv4 prefix carried in route. Value is incremented for following routes.
4543 @line 3: An amount of routes to be added to *Application Peer's* programmable RIB.
4545 @line 4: A size of the transaction batch.
4547 @line 5: A NEXT_HOP attribute value used in all injected routes.
4553 :emphasize-lines: 3,4,5
4555 <output xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4557 <duration>4301</duration>
4559 <count>100000</count>
4563 @line 3: Request duration in milliseconds.
4565 @line 4: Writes per second rate.
4567 @line 5: An amount of routes added to *Application Peer's* programmable RIB.
4571 Routes deletion can be invoked via RPC:
4573 **URL:** ``/restconf/operations/odl-bgp-app-peer-benchmark:delete-prefix``
4575 **Method:** ``POST``
4577 **Content-Type:** ``application/xml``
4583 :emphasize-lines: 2,3,4
4585 <input xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4586 <prefix>1.1.1.1/32</prefix>
4587 <count>100000</count>
4588 <batchsize>2000</batchsize>
4591 @line 2: A initial IPv4 prefix carried in route to be removed. Value is incremented for following routes.
4593 @line 3: An amount of routes to be removed from *Application Peer's* programmable RIB.
4595 @line 4: A size of the transaction batch.
4601 <output xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4603 <duration>1837</duration>
4605 <count>100000</count>
4611 This section offers advices in a case OpenDaylight BGP plugin is not working as expected.
4613 .. contents:: Contents
4617 BGP is not working...
4618 ^^^^^^^^^^^^^^^^^^^^^
4619 * First of all, ensure that all required features are installed, local and remote BGP configuration is correct.
4621 * Check OpenDaylight Karaf logs:
4625 .. code-block:: console
4629 or open log file: ``data/log/karaf.log``
4631 Possibly, a reason/hint for a cause of the problem can be found there.
4633 * Try to minimise effect of other OpenDaylight features, when searching for a reason of the problem.
4635 * Try to set DEBUG severity level for BGP logger via Karaf console commands, in order to collect more information:
4637 .. code-block:: console
4639 log:set DEBUG org.opendaylight.protocol.bgp
4641 .. code-block:: console
4643 log:set DEBUG org.opendaylight.bgpcep.bgp
4647 Before you report a bug, check `BGPCEP Bugzilla <https://bugs.opendaylight.org/buglist.cgi?list_id=65849&product=bgpcep&resolution=--->`_ to ensure same/similar bug is not already filed there.
4649 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information:
4651 #. State OpenDaylight version
4653 #. Describe your use-case and provide as much details related to BGP as possible
4655 #. Steps to reproduce
4657 #. Attach Karaf log files, optionally packet captures, REST input/output