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.
253 To exchange routing information between two BGP systems (peers), it is required to configure a peering on both BGP speakers first.
254 This mean that each BGP speaker has a white list of neighbors, representing remote peers, with which the peering is allowed.
255 BGP uses TCP as its transport protocol, by default listens on port 179.
257 .. important:: OpenDaylight BGP plugin is configured to listen on port *1790*, due to privileged ports restriction for non-root users.
258 One of the workarounds is to use port redirection.
260 The TCP connection is established between two peers and they exchange messages to open and confirm the connection parameters followed by routes exchange.
262 Here is a sample basic neighbor configuration:
264 **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``
268 **Content-Type:** ``application/xml``
274 :emphasize-lines: 3,4
276 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
277 <neighbor-address>192.0.2.1</neighbor-address>
280 <hold-time>90</hold-time>
281 <connect-retry>10</connect-retry>
286 <remote-port>179</remote-port>
287 <passive-mode>false</passive-mode>
291 <peer-type>INTERNAL</peer-type>
295 @line 2: IP address of the remote BGP peer. Also serves as an unique identifier of a neighbor in a list of neighbors.
297 @line 5: Proposed number of seconds for value of the Hold Timer. Default value is **90**.
299 @line 6: Time interval in seconds between attempts to establish session with the peer. Effective in active mode only. Default value is **30**.
301 @line 11: Remote port number to which the local BGP is connecting. Effective in active mode only. Default value **179**.
303 @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**.
305 @line 16: Explicitly designate the peer as internal or external. Default value is **INTERNAL**.
309 Once the remote peer is connected and it advertised routes to local BGP system, routes are stored in peer's RIBs.
310 The RIBs can be checked via REST:
312 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/peer/bgp:%2F%2F192.0.2.1``
320 :emphasize-lines: 8,13,35,40,62,66
322 <peer xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
323 <peer-id>bgp://192.0.2.1</peer-id>
325 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
326 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
328 <peer-role>ibgp</peer-role>
331 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
332 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
333 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
336 <prefix>10.0.0.10/32</prefix>
346 <global>10.10.1.1</global>
352 <uptodate>true</uptodate>
358 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
359 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
360 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
363 <prefix>10.0.0.10/32</prefix>
373 <global>10.10.1.1</global>
379 <uptodate>true</uptodate>
385 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
386 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
387 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
388 <attributes></attributes>
393 @line 8: **Adj-RIB-In** - Per-peer RIB, which contains unprocessed routes that has been advertised to local BGP speaker by the remote peer.
395 @line 13: Here is the reported route with destination *10.0.0.10/32* in Adj-RIB-In.
397 @line 35: **Effective-RIB-In** - Per-peer RIB, which contains processed routes as a result of applying inbound policy to Adj-RIB-In routes.
399 @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.
401 @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.
403 @line 66: The peer's Adj-RIB-Out is empty as there are no routes to be advertise from local BGP speaker.
407 Also the same route should appeared in Loc-RIB now:
409 **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``
417 :emphasize-lines: 4,6,8,11,14
419 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
422 <prefix>10.0.0.10/32</prefix>
432 <global>10.10.1.1</global>
438 @line 4: **Destination** - IPv4 Prefix Address.
440 @line 6: **AS_PATH** - mandatory attribute, contains a list of the autonomous system numbers through that routing information has traversed.
442 @line 8: **ORIGIN** - mandatory attribute, indicates an origin of the route - **ibgp**, **egp**, **incomplete**.
444 @line 11: **LOCAL_PREF** - indicates a degree of preference for external routes, higher value is preferred.
446 @line 14: **NEXT_HOP** - mandatory attribute, defines IP address of the router that should be used as the next hop to the destination.
450 There are much more attributes that may be carried along with the destination:
452 **BGP-4 Path Attributes**
454 * **MULTI_EXIT_DISC** (MED)
455 Optional attribute, to be used to discriminate among multiple exit/entry points on external links, lower number is preferred.
464 * **ATOMIC_AGGREGATE**
465 Indicates whether AS_SET was excluded from AS_PATH due to routes aggregation.
472 Optional attribute, contains AS number and IP address of a BGP speaker which performed routes aggregation.
477 <as-number>65000</as-number>
478 <network-address>192.0.2.2</network-address>
482 Optional attribute, used to store optional attributes, unrecognized by a local BGP speaker.
486 <unrecognized-attributes>
487 <partial>true</partial>
488 <transitive>true</transitive>
490 <value>0101010101010101</value>
491 </unrecognized-attributes>
493 **Route Reflector Attributes**
496 Optional attribute, carries BGP Identifier of the originator of the route.
501 <originator>41.41.41.41</originator>
505 Optional attribute, contains a list of CLUSTER_ID values representing the path that the route has traversed.
510 <cluster>40.40.40.40</cluster>
514 Optional attribute, may be used for policy routing.
519 <as-number>65000</as-number>
520 <semantics>30740</semantics>
523 **Extended Communities**
526 Identifies one or more routers that may receive a route.
530 <extended-communities>
531 <transitive>true</transitive>
533 <global-administrator>192.0.2.2</global-administrator>
534 <local-administrator>123</local-administrator>
536 </extended-communities>
537 <extended-communities>
538 <transitive>true</transitive>
539 <as-4-route-target-extended-community>
540 <as-4-specific-common>
541 <as-number>65000</as-number>
542 <local-administrator>123</local-administrator>
543 </as-4-specific-common>
544 </as-4-route-target-extended-community>
545 </extended-communities>
549 Identifies one or more routers that injected a route.
553 <extended-communities>
554 <transitive>true</transitive>
556 <global-administrator>192.0.2.2</global-administrator>
557 <local-administrator>123</local-administrator>
559 </extended-communities>
560 <extended-communities>
561 <transitive>true</transitive>
562 <as-4-route-origin-extended-community>
563 <as-4-specific-common>
564 <as-number>65000</as-number>
565 <local-administrator>123</local-administrator>
566 </as-4-origin-common>
567 </as-4-route-target-extended-community>
568 </extended-communities>
572 Carries the cost to reach external neighbor.
576 <extended-communities>
577 <transitive>true</transitive>
578 <link-bandwidth-extended-community>
579 <bandwidth>BH9CQAA=</bandwidth>
580 </link-bandwidth-extended-community>
581 </extended-communities>
584 Optional attribute, carries accumulated IGP metric.
595 .. note:: When the remote peer disconnects, it disappear from operational state of local speaker instance and advertised routes are removed too.
597 External peering configuration
598 ''''''''''''''''''''''''''''''
599 An example above provided configuration for internal peering only.
600 Following configuration sample is intended for external peering:
602 **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``
606 **Content-Type:** ``application/xml``
614 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
615 <neighbor-address>192.0.2.3</neighbor-address>
617 <peer-type>EXTERNAL</peer-type>
618 <peer-as>64999</peer-as>
622 @line 5: AS number of the remote peer.
624 Route reflector configuration
625 '''''''''''''''''''''''''''''
626 The local BGP speaker can be configured with a specific *cluster ID*.
627 Following example adds the cluster ID to the existing speaker instance:
629 **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``
633 **Content-Type:** ``application/xml``
642 <router-id>192.0.2.2</router-id>
644 <route-reflector-cluster-id>192.0.2.1</route-reflector-cluster-id>
647 @line 4: Route-reflector cluster id to use when local router is configured as a route reflector.
648 The *router-id* is used as a default value.
652 Following configuration sample is intended for route reflector client peering:
654 **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``
658 **Content-Type:** ``application/xml``
666 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
667 <neighbor-address>192.0.2.4</neighbor-address>
669 <peer-type>INTERNAL</peer-type>
673 <route-reflector-client>true</route-reflector-client>
678 @line 8: Configure the neighbor as a route reflector client. Default value is *false*.
680 MD5 authentication configuration
681 ''''''''''''''''''''''''''''''''
682 The OpenDaylight BGP implementation is supporting TCP MD5 for authentication.
683 Sample configuration below shows how to set authentication password for a peer:
685 **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``
689 **Content-Type:** ``application/xml``
697 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
698 <neighbor-address>192.0.2.5</neighbor-address>
700 <auth-password>topsecret</auth-password>
704 @line 4: Configures an MD5 authentication password for use with neighboring devices.
706 Simple Routing Policy configuration
707 '''''''''''''''''''''''''''''''''''
708 The OpenDaylight BGP implementation is supporting *Simple Routing Policy*.
709 Sample configuration below shows how to set *Simple Routing Policy* 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.7</neighbor-address>
726 <simple-routing-policy>learn-none</simple-routing-policy>
730 @line 4: *Simple Routing Policy*:
732 * ``learn-none`` - routes advertised by the peer are not propagated to Effective-RIB-In and Loc-RIB
733 * ``announce-none`` - routes from local Loc-RIB are not advertised to the peer
735 .. note:: Existing neighbor configuration can be reconfigured (change configuration parameters) anytime.
736 As a result, established connection is dropped, peer instance is recreated with a new configuration settings and connection re-established.
738 .. note:: The BGP configuration is persisted on OpendDaylight shutdown and restored after the re-start.
740 BGP Application Peer and programmable RIB
741 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
742 The OpenDaylight BGP implementation also supports routes injection via *Application Peer*.
743 Such peer has its own programmable RIB, which can be modified by user.
744 This concept allows user to originate new routes and advertise them to all connected peers.
746 Application Peer configuration
747 ''''''''''''''''''''''''''''''
748 Following configuration sample show a way to configure the *Application Peer*:
750 **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``
754 **Content-Type:** ``application/xml``
760 :emphasize-lines: 2,4
762 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
763 <neighbor-address>10.25.1.9</neighbor-address>
765 <peer-group>application-peers</peer-group>
769 @line 2: IP address is uniquely identifying *Application Peer* and its programmable RIB. Address is also used in local BGP speaker decision process.
771 @line 4: Indicates that peer is associated with *application-peers* group. It serves to distinguish *Application Peer's* from regular neighbors.
775 The *Application Peer* presence can be verified via REST:
777 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/peer/bgp:%2F%2F10.25.1.9``
785 :emphasize-lines: 3,8
787 <peer xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
788 <peer-id>bgp://10.25.1.9</peer-id>
789 <peer-role>internal</peer-role>
792 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
793 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
794 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
796 <uptodate>false</uptodate>
802 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
803 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
804 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet"></ipv4-routes>
805 <attributes></attributes>
810 @line 3: Peer role for *Application Peer* is *internal*.
812 @line 8: Adj-RIB-In is empty, as no routes were originated yet.
814 .. note:: There is no Adj-RIB-Out for *Application Peer*.
818 Next example shows how to inject a route into the programmable RIB.
820 **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``
824 **Content-Type:** ``application/xml``
830 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
832 <prefix>10.0.0.11/32</prefix>
842 <global>10.11.1.1</global>
849 Now the injected route appears in *Application Peer's* RIBs and in local speaker's Loc-RIB:
851 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/peer/bgp:%2F%2F10.25.1.9``
861 <peer xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
862 <peer-id>bgp://10.25.1.9</peer-id>
863 <peer-role>internal</peer-role>
866 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
867 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
868 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
871 <prefix>10.0.0.11/32</prefix>
881 <global>10.11.1.1</global>
887 <uptodate>false</uptodate>
893 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
894 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
895 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
898 <prefix>10.0.0.11/32</prefix>
908 <global>10.11.1.1</global>
913 <attributes></attributes>
918 @line 9: Injected route is present in *Application Peer's* Adj-RIB-In and Effective-RIB-In.
922 **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``
932 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
935 <prefix>10.0.0.10/32</prefix>
945 <global>10.11.1.1</global>
951 <prefix>10.0.0.10/32</prefix>
961 <global>10.10.1.1</global>
967 @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.
971 This route is also advertised to the remote peer (*192.0.2.1*), hence route appears in its Adj-RIB-Out:
973 **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``
981 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
983 <prefix>10.0.0.11/32</prefix>
993 <global>10.11.1.1</global>
1000 The injected route can be modified (i.e. different path attribute):
1002 **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``
1006 **Content-Type:** ``application/xml``
1012 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1013 <path-id>0</path-id>
1014 <prefix>10.0.0.11/32</prefix>
1024 <global>10.11.1.2</global>
1031 The route can be removed from programmable RIB in a following way:
1033 **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``
1035 **Method:** ``DELETE``
1039 Also it is possible to remove all routes from a particular table at once:
1041 **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/``
1043 **Method:** ``DELETE``
1047 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).
1049 .. note:: Routes stored in programmable RIB are persisted on OpendDaylight shutdown and restored after the re-start.
1053 .. figure:: ./images/bgpcep/bgp-pipeline.png
1056 BGP pipeline - routes re-advertisement.
1058 .. figure:: ./images/bgpcep/bgp-app-pipeline.png
1059 :alt: BGP Application Peer pipeline.
1061 BGP applcaition peer pipeline - routes injection.
1065 * `A Border Gateway Protocol 4 (BGP-4) <https://tools.ietf.org/html/rfc4271>`_
1066 * `BGP Route Reflection <https://tools.ietf.org/html/rfc4456>`_
1067 * `BGP Communities Attribute <https://tools.ietf.org/html/rfc1997>`_
1068 * `BGP Support for Four-Octet Autonomous System (AS) Number Space <https://tools.ietf.org/html/rfc6793>`_
1069 * `The Accumulated IGP Metric Attribute for BGP <https://tools.ietf.org/html/rfc7311>`_
1070 * `4-Octet AS Specific BGP Extended Community <https://tools.ietf.org/html/rfc5668>`_
1071 * `BGP Link Bandwidth Extended Community <https://tools.ietf.org/html/draft-ietf-idr-link-bandwidth-06>`_
1072 * `Use of BGP for Routing in Large-Scale Data Centers <https://tools.ietf.org/html/rfc7938>`_
1076 The BGP-4 allows to carry IPv4 specific information only.
1077 The basic BGP Multiprotocol extension brings *Unicast* Subsequent Address Family (SAFI) - intended to be used for IP unicast forwarding.
1078 The combination of IPv4 and IPv6 Address Family (AF) and Unicast SAFI is essential for Internet routing.
1079 The IPv4 Unicast routes are interchangeable with BGP-4 routes, as they can carry the same type of routing information.
1081 .. contents:: Contents
1087 This section shows a way to enable IPv4 and IPv6 Unicast family in BGP speaker and peer configuration.
1091 To enable IPv4 and IPv6 Unicast support in BGP plugin, first configure BGP speaker instance:
1093 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1095 **Method:** ``POST``
1097 **Content-Type:** ``application/xml``
1103 <protocol xmlns="http://openconfig.net/yang/network-instance">
1104 <name>bgp-example</name>
1105 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1106 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1109 <router-id>192.0.2.2</router-id>
1114 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
1117 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
1126 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 Unicast family.
1128 **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``
1130 **Method:** ``POST``
1132 **Content-Type:** ``application/xml``
1138 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1139 <neighbor-address>192.0.2.1</neighbor-address>
1142 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
1145 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
1152 Following trees illustrate the BGP IP Unicast routes structures.
1156 .. code-block:: console
1160 +--ro ipv4-route* [prefix path-id]
1161 +--ro prefix inet:ipv4-prefix
1162 +--ro path-id path-id
1165 | +--ro value bgp-t:bgp-origin
1168 | +--ro as-sequence* inet:as-number
1169 | +--ro as-set* inet:as-number
1171 | +--:(ipv4-next-hop-case)
1172 | | +--ro ipv4-next-hop
1173 | | +--ro global? inet:ipv4-address
1174 | +--:(ipv6-next-hop-case)
1175 | | +--ro ipv6-next-hop
1176 | | +--ro global? inet:ipv6-address
1177 | | +--ro link-local? inet:ipv6-address
1178 | +--:(empty-next-hop-case)
1179 | +--ro empty-next-hop? empty
1180 +--ro multi-exit-disc
1183 | +--ro pref? uint32
1184 +--ro atomic-aggregate!
1186 | +--ro as-number? inet:as-number
1187 | +--ro network-address? inet:ipv4-address
1189 | +--ro as-number? inet:as-number
1190 | +--ro semantics? uint16
1191 +--ro extended-communities*
1192 | +--ro transitive? boolean
1193 | +--ro (extended-community)?
1194 | +--:(as-specific-extended-community-case)
1195 | | +--ro as-specific-extended-community
1196 | | +--ro global-administrator? short-as-number
1197 | | +--ro local-administrator? binary
1198 | +--:(inet4-specific-extended-community-case)
1199 | | +--ro inet4-specific-extended-community
1200 | | +--ro global-administrator? inet:ipv4-address
1201 | | +--ro local-administrator? binary
1202 | +--:(opaque-extended-community-case)
1203 | | +--ro opaque-extended-community
1204 | | +--ro value? binary
1205 | +--:(route-target-extended-community-case)
1206 | | +--ro route-target-extended-community
1207 | | +--ro global-administrator? short-as-number
1208 | | +--ro local-administrator? binary
1209 | +--:(route-origin-extended-community-case)
1210 | | +--ro route-origin-extended-community
1211 | | +--ro global-administrator? short-as-number
1212 | | +--ro local-administrator? binary
1213 | +--:(route-target-ipv4-case)
1214 | | +--ro route-target-ipv4
1215 | | +--ro global-administrator? inet:ipv4-address
1216 | | +--ro local-administrator? uint16
1217 | +--:(route-origin-ipv4-case)
1218 | | +--ro route-origin-ipv4
1219 | | +--ro global-administrator? inet:ipv4-address
1220 | | +--ro local-administrator? uint16
1221 | +--:(link-bandwidth-case)
1222 | | +--ro link-bandwidth-extended-community
1223 | | +--ro bandwidth netc:bandwidth
1224 | +--:(as-4-generic-spec-extended-community-case)
1225 | | +--ro as-4-generic-spec-extended-community
1226 | | +--ro as-4-specific-common
1227 | | +--ro as-number inet:as-number
1228 | | +--ro local-administrator uint16
1229 | +--:(as-4-route-target-extended-community-case)
1230 | | +--ro as-4-route-target-extended-community
1231 | | +--ro as-4-specific-common
1232 | | +--ro as-number inet:as-number
1233 | | +--ro local-administrator uint16
1234 | +--:(as-4-route-origin-extended-community-case)
1235 | | +--ro as-4-route-origin-extended-community
1236 | | +--ro as-4-specific-common
1237 | | +--ro as-number inet:as-number
1238 | | +--ro local-administrator uint16
1239 | +--:(encapsulation-case)
1240 | +--ro encapsulation-extended-community
1241 | +--ro tunnel-type encapsulation-tunnel-type
1243 | +--ro originator? inet:ipv4-address
1245 | +--ro cluster* bgp-t:cluster-identifier
1248 | +--ro metric? netc:accumulated-igp-metric
1249 +--ro unrecognized-attributes* [type]
1250 +--ro partial boolean
1251 +--ro transitive boolean
1257 .. code-block:: console
1261 +--ro ipv6-route* [prefix path-id]
1262 +--ro prefix inet:ipv6-prefix
1263 +--ro path-id path-id
1271 The IPv4 Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
1273 **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``
1281 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1283 <path-id>0</path-id>
1284 <prefix>193.0.2.1/32</prefix>
1294 <global>10.0.0.1</global>
1302 The IPv6 Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
1304 **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``
1312 <ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1314 <path-id>0</path-id>
1315 <prefix>2a02:b80:0:1::/64</prefix>
1325 <global>2a02:b80:0:2::1</global>
1331 .. note:: IPv4/6 routes mapping to topology nodes is supported by BGP Topology Provider.
1337 This examples show how to originate and remove IPv4 route via programmable RIB.
1338 Make sure the *Application Peer* is configured first.
1340 **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``
1342 **Method:** ``POST``
1344 **Content-Type:** ``application/xml``
1350 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1351 <path-id>0</path-id>
1352 <prefix>10.0.0.11/32</prefix>
1362 <global>10.11.1.1</global>
1369 To remove the route added above, following request can be used:
1371 **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``
1373 **Method:** ``DELETE``
1377 This examples show how to originate and remove IPv6 route via programmable RIB:
1379 **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``
1381 **Method:** ``POST``
1383 **Content-Type:** ``application/xml``
1389 <ipv6-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
1390 <prefix>2001:db8:30::3/128</prefix>
1391 <path-id>0</path-id>
1394 <global>2001:db8:1::6</global>
1408 To remove the route added above, following request can be used:
1410 **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``
1412 **Method:** ``DELETE``
1416 * `Multiprotocol Extensions for BGP-4 <https://tools.ietf.org/html/rfc4760>`_
1418 IP Labeled Unicast Family
1419 -------------------------
1420 The BGP Labeled Unicast (BGP-LU) Multiprotocol extension is used to distribute a MPLS label that is mapped to a particular route.
1421 It can be used to advertise a MPLS transport path between IGP regions and Autonomous Systems.
1422 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.
1423 In addition, IPv6 Labeled Unicast can be used to interconnect IPv6 islands over IPv4/MPLS networks using 6PE.
1425 .. contents:: Contents
1431 This section shows a way to enable IPv4 and IPv6 Labeled Unicast family in BGP speaker and peer configuration.
1435 To enable IPv4 and IPv6 Labeled Unicast support in BGP plugin, first configure BGP speaker instance:
1437 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1439 **Method:** ``POST``
1441 **Content-Type:** ``application/xml``
1447 <protocol xmlns="http://openconfig.net/yang/network-instance">
1448 <name>bgp-example</name>
1449 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1450 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1453 <router-id>192.0.2.2</router-id>
1458 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
1461 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
1470 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 Labeled Unicast family.
1472 **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``
1474 **Method:** ``POST``
1476 **Content-Type:** ``application/xml``
1482 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1483 <neighbor-address>192.0.2.1</neighbor-address>
1486 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
1489 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
1494 IP Labeled Unicast API
1495 ^^^^^^^^^^^^^^^^^^^^^^
1496 Following trees illustrate the BGP IP Labeled Unicast routes structures.
1498 IPv4 Labeled Unicast Route
1499 ''''''''''''''''''''''''''
1500 .. code-block:: console
1502 :(labeled-unicast-routes-case)
1503 +--ro labeled-unicast-routes
1504 +--ro labeled-unicast-route* [route-key path-id]
1505 +--ro route-key string
1507 | +--ro label-value? netc:mpls-label
1508 +--ro prefix? inet:ip-prefix
1509 +--ro path-id path-id
1514 IPv6 Labeled Unicast Route
1515 ''''''''''''''''''''''''''
1516 .. code-block:: console
1518 :(labeled-unicast-ipv6-routes-case)
1519 +--ro labeled-unicast-ipv6-routes
1520 +--ro labeled-unicast-route* [route-key path-id]
1521 +--ro route-key string
1523 | +--ro label-value? netc:mpls-label
1524 +--ro prefix? inet:ip-prefix
1525 +--ro path-id path-id
1531 The IPv4 Labeled Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
1533 **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``
1541 <labeled-unicast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1542 <labeled-unicast-route>
1543 <path-id>0</path-id>
1544 <route-key>MAA+gRQAAA==</route-key>
1550 <global>200.10.0.101</global>
1558 <label-value>1000</label-value>
1560 <prefix>20.0.0.0/24</prefix>
1561 </labeled-unicast-route>
1562 </labeled-unicast-routes>
1568 This examples show how to originate and remove IPv4 labeled route via programmable RIB.
1569 Make sure the *Application Peer* is configured first.
1571 **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``
1573 **Method:** ``POST``
1575 **Content-Type:** ``application/xml``
1581 <labeled-unicast-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1582 <route-key>label1</route-key>
1583 <prefix>1.1.1.1/32</prefix>
1584 <path-id>0</path-id>
1586 <label-value>800322</label-value>
1590 <global>199.20.160.41</global>
1600 </labeled-unicast-route>
1604 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.
1609 <bgp-prefix-sid-tlvs>
1610 <label-index-tlv xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">322</label-index-tlv>
1611 </bgp-prefix-sid-tlvs>
1612 <bgp-prefix-sid-tlvs>
1613 <srgb-value xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1617 </bgp-prefix-sid-tlvs>
1622 To remove the route added above, following request can be used:
1624 **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``
1626 **Method:** ``DELETE``
1630 This examples show how to originate and remove IPv6 labeled route via programmable RIB.
1632 **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``
1634 **Method:** ``POST``
1636 **Content-Type:** ``application/xml``
1642 <labeled-unicast-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
1643 <route-key>label1</route-key>
1644 <prefix>2001:db8:30::3/128</prefix>
1645 <path-id>0</path-id>
1647 <label-value>123</label-value>
1651 <global>2003:4:5:6::7</global>
1661 </labeled-unicast-route>
1665 To remove the route added above, following request can be used:
1667 **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``
1669 **Method:** ``DELETE``
1673 * `Carrying Label Information in BGP-4 <https://tools.ietf.org/html/rfc3107>`_
1674 * `Segment Routing Prefix SID extensions for BGP <https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-03>`_
1675 * `Connecting IPv6 Islands over IPv4 MPLS Using IPv6 Provider Edge Routers (6PE) <https://tools.ietf.org/html/rfc4798>`_
1676 * `BGP-Prefix Segment in large-scale data centers <https://tools.ietf.org/html/draft-ietf-spring-segment-routing-msdc-01>`_
1677 * `Egress Peer Engineering using BGP-LU <https://tools.ietf.org/html/draft-gredler-idr-bgplu-epe-06>`_
1681 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.
1682 Also, routes are distributed to specific VPN remote sites.
1684 .. contents:: Contents
1690 This section shows a way to enable IPv4 and IPv6 L3VPN family in BGP speaker and peer configuration.
1694 To enable IPv4 and IPv6 L3VPN support in BGP plugin, first configure BGP speaker instance:
1696 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1698 **Method:** ``POST``
1700 **Content-Type:** ``application/xml``
1706 <protocol xmlns="http://openconfig.net/yang/network-instance">
1707 <name>bgp-example</name>
1708 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1709 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1712 <router-id>192.0.2.2</router-id>
1717 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
1720 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
1729 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 L3VPN family.
1731 **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``
1733 **Method:** ``POST``
1735 **Content-Type:** ``application/xml``
1741 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1742 <neighbor-address>192.0.2.1</neighbor-address>
1745 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
1748 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
1755 Following trees illustrate the BGP IP L3VPN routes structures.
1759 .. code-block:: console
1761 :(vpn-ipv4-routes-case)
1762 +--ro vpn-ipv4-routes
1763 +--ro vpn-route* [route-key]
1764 +--ro route-key string
1766 | +--ro label-value? netc:mpls-label
1767 +--ro prefix? inet:ip-prefix
1768 +--ro path-id? path-id
1769 +--ro route-distinguisher? bgp-t:route-distinguisher
1775 .. code-block:: console
1777 :(vpn-ipv6-routes-case)
1778 +--ro vpn-ipv6-routes
1779 +--ro vpn-route* [route-key]
1780 +--ro route-key string
1782 | +--ro label-value? netc:mpls-label
1783 +--ro prefix? inet:ip-prefix
1784 +--ro path-id? path-id
1785 +--ro route-distinguisher? bgp-t:route-distinguisher
1793 The IPv4 L3VPN table in an instance of the speaker's Loc-RIB can be verified via REST:
1795 **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``
1803 <vpn-ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
1805 <route-key>cAXdYQABrBAALABlCgIi</route-key>
1807 <label-value>24022</label-value>
1810 <extended-communities>
1811 <transitive>true</transitive>
1812 <route-target-extended-community>
1813 <global-administrator>65000</global-administrator>
1814 <local-administrator>AAAAZQ==</local-administrator>
1815 </route-target-extended-community>
1816 </extended-communities>
1825 <global>127.16.0.44</global>
1828 <route-distinguisher>172.16.0.44:101</route-distinguisher>
1829 <prefix>10.2.34.0/24</prefix>
1835 The IPv6 L3VPN table in an instance of the speaker's Loc-RIB can be verified via REST:
1837 **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``
1845 <vpn-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv6">
1847 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
1849 <label-value>24023</label-value>
1855 <extended-communities>
1856 <route-target-extended-community>
1857 <global-administrator>65000</global-administrator>
1858 <local-administrator>AAAAZQ==</local-administrator>
1859 </route-target-extended-community>
1860 <transitive>true</transitive>
1861 </extended-communities>
1863 <global>2a02:b80:0:2::1</global>
1870 <route-distinguisher>172.16.0.44:101</route-distinguisher>
1871 <prefix>2a02:b80:0:1::/64</prefix>
1877 This examples show how to originate and remove IPv4 L3VPN route via programmable RIB.
1878 Make sure the *Application Peer* is configured first.
1880 **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``
1882 **Method:** ``POST``
1884 **Content-Type:** ``application/xml``
1890 <vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
1891 <route-key>vpn1</route-key>
1893 <label-value>123</label-value>
1895 <route-distinguisher>429496729:1</route-distinguisher>
1896 <prefix>2.2.2.2/32</prefix>
1899 <global>199.20.166.41</global>
1905 <extended-communities>
1906 <route-target-extended-community>
1907 <global-administrator>65000</global-administrator>
1908 <local-administrator>AAAAZQ==</local-administrator>
1909 </route-target-extended-community>
1910 <transitive>true</transitive>
1911 </extended-communities>
1917 To remove the route added above, following request can be used:
1919 **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``
1921 **Method:** ``DELETE``
1925 * `BGP/MPLS IP Virtual Private Networks (VPNs) <https://tools.ietf.org/html/rfc4364>`_
1926 * `BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN <https://tools.ietf.org/html/rfc4659>`_
1927 * `BGP/MPLS VPN Virtual PE <https://tools.ietf.org/html/draft-ietf-bess-virtual-pe-00>`_
1931 The BGP Link-State (BGP-LS) Multiprotocol extension allows to distribute Link-State and Traffic Engineering (TE) information.
1932 This information is typically distributed by IGP routing protocols with in the network, limiting LSDB or TED visibility to the IGP area.
1933 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).
1934 The information is applicable in ALTO servers and PCEs, as both need to gather information about topologies.
1935 In addition, link-state information is extended to carry segment information (Spring).
1937 .. contents:: Contents
1943 This section shows a way to enable IPv4 and IPv6 Labeled Unicast family in BGP speaker and peer configuration.
1947 To enable BGP-LS support in BGP plugin, first configure BGP speaker instance:
1949 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
1951 **Method:** ``POST``
1953 **Content-Type:** ``application/xml``
1959 <protocol xmlns="http://openconfig.net/yang/network-instance">
1960 <name>bgp-example</name>
1961 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
1962 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
1965 <router-id>192.0.2.2</router-id>
1970 <afi-safi-name>LINKSTATE</afi-safi-name>
1977 Linkstate path attribute
1978 ''''''''''''''''''''''''
1979 IANA allocation for BGP-LS path attribute is TYPE 29.
1980 Some older BGP-LS implementations might still require earliest asigned allocation TYPE 99.
1981 To use TYPE = 99, you need to set value bellow to false.
1983 **URL:** ``/restconf/config/bgp-linkstate-app-config:bgp-linkstate-app-config``
1987 **Content-Type:** ``application/xml``
1993 <bgp-linkstate-app-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate-app-config">
1994 <iana-linkstate-attribute-type>false</iana-linkstate-attribute-type>
1995 </bgp-linkstate-app-config>
1999 Here is an example for BGP peer configuration with enabled BGP-LS family.
2001 **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``
2003 **Method:** ``POST``
2005 **Content-Type:** ``application/xml``
2011 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
2012 <neighbor-address>192.0.2.1</neighbor-address>
2015 <afi-safi-name>LINKSTATE</afi-safi-name>
2020 Link-State Route API
2021 ^^^^^^^^^^^^^^^^^^^^
2022 Following tree illustrate the BGP Link-State route structure.
2024 .. code-block:: console
2026 :(linkstate-routes-case)
2027 +--ro linkstate-routes
2028 +--ro linkstate-route* [route-key]
2029 +--ro route-key binary
2030 +--ro protocol-id protocol-id
2031 +--ro identifier identifier
2032 +--ro (object-type)?
2034 | | +--ro node-descriptors
2035 | | +--ro as-number? inet:as-number
2036 | | +--ro area-id? area-identifier
2037 | | +--ro domain-id? domain-identifier
2038 | | +--ro (c-router-identifier)?
2039 | | +--:(isis-node-case)
2040 | | | +--ro isis-node
2041 | | | +--ro iso-system-id netc:iso-system-identifier
2042 | | +--:(isis-pseudonode-case)
2043 | | | +--ro isis-pseudonode
2044 | | | +--ro is-is-router-identifier
2045 | | | | +--ro iso-system-id netc:iso-system-identifier
2046 | | | +--ro psn uint8
2047 | | +--:(ospf-node-case)
2048 | | | +--ro ospf-node
2049 | | | +--ro ospf-router-id uint32
2050 | | +--:(ospf-pseudonode-case)
2051 | | +--ro ospf-pseudonode
2052 | | +--ro ospf-router-id uint32
2053 | | +--ro lan-interface ospf-interface-identifier
2055 | | +--ro local-node-descriptors
2056 | | | +--ro as-number? inet:as-number
2057 | | | +--ro area-id? area-identifier
2058 | | | +--ro domain-id? domain-identifier
2059 | | | +--ro (c-router-identifier)?
2060 | | | | +--:(isis-node-case)
2061 | | | | | +--ro isis-node
2062 | | | | | +--ro iso-system-id netc:iso-system-identifier
2063 | | | | +--:(isis-pseudonode-case)
2064 | | | | | +--ro isis-pseudonode
2065 | | | | | +--ro is-is-router-identifier
2066 | | | | | | +--ro iso-system-id netc:iso-system-identifier
2067 | | | | | +--ro psn uint8
2068 | | | | +--:(ospf-node-case)
2069 | | | | | +--ro ospf-node
2070 | | | | | +--ro ospf-router-id uint32
2071 | | | | +--:(ospf-pseudonode-case)
2072 | | | | +--ro ospf-pseudonode
2073 | | | | +--ro ospf-router-id uint32
2074 | | | | +--ro lan-interface ospf-interface-identifier
2075 | | | +--ro bgp-router-id? inet:ipv4-address
2076 | | | +--ro member-asn? inet:as-number
2077 | | +--ro remote-node-descriptors
2078 | | | +--ro as-number? inet:as-number
2079 | | | +--ro area-id? area-identifier
2080 | | | +--ro domain-id? domain-identifier
2081 | | | +--ro (c-router-identifier)?
2082 | | | | +--:(isis-node-case)
2083 | | | | | +--ro isis-node
2084 | | | | | +--ro iso-system-id netc:iso-system-identifier
2085 | | | | +--:(isis-pseudonode-case)
2086 | | | | | +--ro isis-pseudonode
2087 | | | | | +--ro is-is-router-identifier
2088 | | | | | | +--ro iso-system-id netc:iso-system-identifier
2089 | | | | | +--ro psn uint8
2090 | | | | +--:(ospf-node-case)
2091 | | | | | +--ro ospf-node
2092 | | | | | +--ro ospf-router-id uint32
2093 | | | | +--:(ospf-pseudonode-case)
2094 | | | | +--ro ospf-pseudonode
2095 | | | | +--ro ospf-router-id uint32
2096 | | | | +--ro lan-interface ospf-interface-identifier
2097 | | | +--ro bgp-router-id? inet:ipv4-address
2098 | | | +--ro member-asn? inet:as-number
2099 | | +--ro link-descriptors
2100 | | +--ro link-local-identifier? uint32
2101 | | +--ro link-remote-identifier? uint32
2102 | | +--ro ipv4-interface-address? ipv4-interface-identifier
2103 | | +--ro ipv6-interface-address? ipv6-interface-identifier
2104 | | +--ro ipv4-neighbor-address? ipv4-interface-identifier
2105 | | +--ro ipv6-neighbor-address? ipv6-interface-identifier
2106 | | +--ro multi-topology-id? topology-identifier
2108 | | +--ro advertising-node-descriptors
2109 | | | +--ro as-number? inet:as-number
2110 | | | +--ro area-id? area-identifier
2111 | | | +--ro domain-id? domain-identifier
2112 | | | +--ro (c-router-identifier)?
2113 | | | +--:(isis-node-case)
2114 | | | | +--ro isis-node
2115 | | | | +--ro iso-system-id netc:iso-system-identifier
2116 | | | +--:(isis-pseudonode-case)
2117 | | | | +--ro isis-pseudonode
2118 | | | | +--ro is-is-router-identifier
2119 | | | | | +--ro iso-system-id netc:iso-system-identifier
2120 | | | | +--ro psn uint8
2121 | | | +--:(ospf-node-case)
2122 | | | | +--ro ospf-node
2123 | | | | +--ro ospf-router-id uint32
2124 | | | +--:(ospf-pseudonode-case)
2125 | | | +--ro ospf-pseudonode
2126 | | | +--ro ospf-router-id uint32
2127 | | | +--ro lan-interface ospf-interface-identifier
2128 | | +--ro prefix-descriptors
2129 | | +--ro multi-topology-id? topology-identifier
2130 | | +--ro ospf-route-type? ospf-route-type
2131 | | +--ro ip-reachability-information? inet:ip-prefix
2133 | +--ro (address-family)?
2135 | | | +--ro ipv4-tunnel-sender-address inet:ipv4-address
2136 | | | +--ro ipv4-tunnel-endpoint-address inet:ipv4-address
2138 | | +--ro ipv6-tunnel-sender-address inet:ipv6-address
2139 | | +--ro ipv6-tunnel-endpoint-address inet:ipv6-address
2140 | +--ro tunnel-id? rsvp:tunnel-id
2141 | +--ro lsp-id? rsvp:lsp-id
2143 +--ro (link-state-attribute)?
2144 +--:(node-attributes-case)
2145 | +--ro node-attributes
2146 | +--ro topology-identifier* topology-identifier
2147 | +--ro node-flags? node-flag-bits
2148 | +--ro isis-area-id* isis-area-identifier
2149 | +--ro dynamic-hostname? string
2150 | +--ro ipv4-router-id? ipv4-router-identifier
2151 | +--ro ipv6-router-id? ipv6-router-identifier
2152 | +--ro sr-capabilities
2153 | | +--ro mpls-ipv4? boolean
2154 | | +--ro mpls-ipv6? boolean
2155 | | +--ro sr-ipv6? boolean
2156 | | +--ro range-size? uint32
2157 | | +--ro (sid-label-index)?
2158 | | +--:(local-label-case)
2159 | | | +--ro local-label? netc:mpls-label
2160 | | +--:(ipv6-address-case)
2161 | | | +--ro ipv6-address? inet:ipv6-address
2163 | | +--ro sid? uint32
2164 | +--ro sr-algorithm
2165 | +--ro algorithms* algorithm
2166 +--:(link-attributes-case)
2167 | +--ro link-attributes
2168 | +--ro local-ipv4-router-id? ipv4-router-identifier
2169 | +--ro local-ipv6-router-id? ipv6-router-identifier
2170 | +--ro remote-ipv4-router-id? ipv4-router-identifier
2171 | +--ro remote-ipv6-router-id? ipv6-router-identifier
2172 | +--ro mpls-protocol? mpls-protocol-mask
2173 | +--ro te-metric? netc:te-metric
2174 | +--ro metric? netc:metric
2175 | +--ro shared-risk-link-groups* rsvp:srlg-id
2176 | +--ro link-name? string
2177 | +--ro max-link-bandwidth? netc:bandwidth
2178 | +--ro max-reservable-bandwidth? netc:bandwidth
2179 | +--ro unreserved-bandwidth* [priority]
2180 | | +--ro priority uint8
2181 | | +--ro bandwidth? netc:bandwidth
2182 | +--ro link-protection? link-protection-type
2183 | +--ro admin-group? administrative-group
2186 | | | +--:(ospf-adj-flags-case)
2187 | | | | +--ro backup? boolean
2188 | | | | +--ro set? boolean
2189 | | | +--:(isis-adj-flags-case)
2190 | | | +--ro backup? boolean
2191 | | | +--ro set? boolean
2192 | | | +--ro address-family? boolean
2193 | | +--ro weight? weight
2194 | | +--ro (sid-label-index)?
2195 | | +--:(local-label-case)
2196 | | | +--ro local-label? netc:mpls-label
2197 | | +--:(ipv6-address-case)
2198 | | | +--ro ipv6-address? inet:ipv6-address
2200 | | +--ro sid? uint32
2201 | +--ro sr-lan-adj-ids*
2203 | | | +--:(ospf-adj-flags-case)
2204 | | | | +--ro backup? boolean
2205 | | | | +--ro set? boolean
2206 | | | +--:(isis-adj-flags-case)
2207 | | | +--ro backup? boolean
2208 | | | +--ro set? boolean
2209 | | | +--ro address-family? boolean
2210 | | +--ro weight? weight
2211 | | +--ro iso-system-id? netc:iso-system-identifier
2212 | | +--ro neighbor-id? inet:ipv4-address
2213 | | +--ro (sid-label-index)?
2214 | | +--:(local-label-case)
2215 | | | +--ro local-label? netc:mpls-label
2216 | | +--:(ipv6-address-case)
2217 | | | +--ro ipv6-address? inet:ipv6-address
2219 | | +--ro sid? uint32
2220 | +--ro peer-node-sid
2221 | | +--ro weight? weight
2222 | | +--ro (sid-label-index)?
2223 | | +--:(local-label-case)
2224 | | | +--ro local-label? netc:mpls-label
2225 | | +--:(ipv6-address-case)
2226 | | | +--ro ipv6-address? inet:ipv6-address
2228 | | +--ro sid? uint32
2229 | +--ro peer-adj-sid
2230 | | +--ro weight? weight
2231 | | +--ro (sid-label-index)?
2232 | | +--:(local-label-case)
2233 | | | +--ro local-label? netc:mpls-label
2234 | | +--:(ipv6-address-case)
2235 | | | +--ro ipv6-address? inet:ipv6-address
2237 | | +--ro sid? uint32
2238 | +--ro peer-set-sids*
2239 | +--ro weight? weight
2240 | +--ro (sid-label-index)?
2241 | +--:(local-label-case)
2242 | | +--ro local-label? netc:mpls-label
2243 | +--:(ipv6-address-case)
2244 | | +--ro ipv6-address? inet:ipv6-address
2247 +--:(prefix-attributes-case)
2248 | +--ro prefix-attributes
2250 | | x--ro up-down? bits
2251 | | +--ro is-is-up-down? boolean
2252 | | +--ro ospf-no-unicast? boolean
2253 | | +--ro ospf-local-address? boolean
2254 | | +--ro ospf-propagate-nssa? boolean
2255 | +--ro route-tags* route-tag
2256 | +--ro extended-tags* extended-route-tag
2257 | +--ro prefix-metric? netc:igp-metric
2258 | +--ro ospf-forwarding-address? inet:ip-address
2261 | | | +--:(isis-prefix-flags-case)
2262 | | | | +--ro no-php? boolean
2263 | | | | +--ro explicit-null? boolean
2264 | | | | +--ro readvertisement? boolean
2265 | | | | +--ro node-sid? boolean
2266 | | | +--:(ospf-prefix-flags-case)
2267 | | | +--ro no-php? boolean
2268 | | | +--ro explicit-null? boolean
2269 | | | +--ro mapping-server? boolean
2270 | | +--ro algorithm? algorithm
2271 | | +--ro (sid-label-index)?
2272 | | +--:(local-label-case)
2273 | | | +--ro local-label? netc:mpls-label
2274 | | +--:(ipv6-address-case)
2275 | | | +--ro ipv6-address? inet:ipv6-address
2277 | | +--ro sid? uint32
2278 | +--ro ipv6-sr-prefix
2279 | | +--ro algorithm? algorithm
2281 | | +--ro inter-area? boolean
2282 | | +--ro range-size? uint16
2284 | | +--ro (range-sub-tlv)?
2285 | | +--:(binding-sid-tlv-case)
2286 | | | +--ro weight? weight
2287 | | | +--ro (flags)?
2288 | | | | +--:(isis-binding-flags-case)
2289 | | | | | +--ro address-family? boolean
2290 | | | | | +--ro mirror-context? boolean
2291 | | | | | +--ro spread-tlv? boolean
2292 | | | | | +--ro leaked-from-level-2? boolean
2293 | | | | | +--ro attached-flag? boolean
2294 | | | | +--:(ospf-binding-flags-case)
2295 | | | | +--ro mirroring? boolean
2296 | | | +--ro binding-sub-tlvs*
2297 | | | +--ro (binding-sub-tlv)?
2298 | | | +--:(prefix-sid-case)
2299 | | | | +--ro (flags)?
2300 | | | | | +--:(isis-prefix-flags-case)
2301 | | | | | | +--ro no-php? boolean
2302 | | | | | | +--ro explicit-null? boolean
2303 | | | | | | +--ro readvertisement? boolean
2304 | | | | | | +--ro node-sid? boolean
2305 | | | | | +--:(ospf-prefix-flags-case)
2306 | | | | | +--ro no-php? boolean
2307 | | | | | +--ro explicit-null? boolean
2308 | | | | | +--ro mapping-server? boolean
2309 | | | | +--ro algorithm? algorithm
2310 | | | | +--ro (sid-label-index)?
2311 | | | | +--:(local-label-case)
2312 | | | | | +--ro local-label? netc:mpls-label
2313 | | | | +--:(ipv6-address-case)
2314 | | | | | +--ro ipv6-address? inet:ipv6-address
2315 | | | | +--:(sid-case)
2316 | | | | +--ro sid? uint32
2317 | | | +--:(ipv6-prefix-sid-case)
2318 | | | | +--ro algorithm? algorithm
2319 | | | +--:(sid-label-case)
2320 | | | | +--ro (sid-label-index)?
2321 | | | | +--:(local-label-case)
2322 | | | | | +--ro local-label? netc:mpls-label
2323 | | | | +--:(ipv6-address-case)
2324 | | | | | +--ro ipv6-address? inet:ipv6-address
2325 | | | | +--:(sid-case)
2326 | | | | +--ro sid? uint32
2327 | | | +--:(ero-metric-case)
2328 | | | | +--ro ero-metric? netc:te-metric
2329 | | | +--:(ipv4-ero-case)
2330 | | | | +--ro loose? boolean
2331 | | | | +--ro address inet:ipv4-address
2332 | | | +--:(ipv6-ero-case)
2333 | | | | +--ro loose? boolean
2334 | | | | +--ro address inet:ipv6-address
2335 | | | +--:(unnumbered-interface-id-ero-case)
2336 | | | | +--ro loose? boolean
2337 | | | | +--ro router-id? uint32
2338 | | | | +--ro interface-id? uint32
2339 | | | +--:(ipv4-ero-backup-case)
2340 | | | | +--ro loose? boolean
2341 | | | | +--ro address inet:ipv4-address
2342 | | | +--:(ipv6-ero-backup-case)
2343 | | | | +--ro loose? boolean
2344 | | | | +--ro address inet:ipv6-address
2345 | | | +--:(unnumbered-interface-id-backup-ero-case)
2346 | | | +--ro loose? boolean
2347 | | | +--ro router-id? uint32
2348 | | | +--ro interface-id? uint32
2349 | | +--:(prefix-sid-tlv-case)
2350 | | | +--ro (flags)?
2351 | | | | +--:(isis-prefix-flags-case)
2352 | | | | | +--ro no-php? boolean
2353 | | | | | +--ro explicit-null? boolean
2354 | | | | | +--ro readvertisement? boolean
2355 | | | | | +--ro node-sid? boolean
2356 | | | | +--:(ospf-prefix-flags-case)
2357 | | | | +--ro no-php? boolean
2358 | | | | +--ro explicit-null? boolean
2359 | | | | +--ro mapping-server? boolean
2360 | | | +--ro algorithm? algorithm
2361 | | | +--ro (sid-label-index)?
2362 | | | +--:(local-label-case)
2363 | | | | +--ro local-label? netc:mpls-label
2364 | | | +--:(ipv6-address-case)
2365 | | | | +--ro ipv6-address? inet:ipv6-address
2366 | | | +--:(sid-case)
2367 | | | +--ro sid? uint32
2368 | | +--:(ipv6-prefix-sid-tlv-case)
2369 | | | +--ro algorithm? algorithm
2370 | | +--:(sid-label-tlv-case)
2371 | | +--ro (sid-label-index)?
2372 | | +--:(local-label-case)
2373 | | | +--ro local-label? netc:mpls-label
2374 | | +--:(ipv6-address-case)
2375 | | | +--ro ipv6-address? inet:ipv6-address
2377 | | +--ro sid? uint32
2378 | +--ro sr-binding-sid-labels*
2379 | +--ro weight? weight
2381 | | +--:(isis-binding-flags-case)
2382 | | | +--ro address-family? boolean
2383 | | | +--ro mirror-context? boolean
2384 | | | +--ro spread-tlv? boolean
2385 | | | +--ro leaked-from-level-2? boolean
2386 | | | +--ro attached-flag? boolean
2387 | | +--:(ospf-binding-flags-case)
2388 | | +--ro mirroring? boolean
2389 | +--ro binding-sub-tlvs*
2390 | +--ro (binding-sub-tlv)?
2391 | +--:(prefix-sid-case)
2393 | | | +--:(isis-prefix-flags-case)
2394 | | | | +--ro no-php? boolean
2395 | | | | +--ro explicit-null? boolean
2396 | | | | +--ro readvertisement? boolean
2397 | | | | +--ro node-sid? boolean
2398 | | | +--:(ospf-prefix-flags-case)
2399 | | | +--ro no-php? boolean
2400 | | | +--ro explicit-null? boolean
2401 | | | +--ro mapping-server? boolean
2402 | | +--ro algorithm? algorithm
2403 | | +--ro (sid-label-index)?
2404 | | +--:(local-label-case)
2405 | | | +--ro local-label? netc:mpls-label
2406 | | +--:(ipv6-address-case)
2407 | | | +--ro ipv6-address? inet:ipv6-address
2409 | | +--ro sid? uint32
2410 | +--:(ipv6-prefix-sid-case)
2411 | | +--ro algorithm? algorithm
2412 | +--:(sid-label-case)
2413 | | +--ro (sid-label-index)?
2414 | | +--:(local-label-case)
2415 | | | +--ro local-label? netc:mpls-label
2416 | | +--:(ipv6-address-case)
2417 | | | +--ro ipv6-address? inet:ipv6-address
2419 | | +--ro sid? uint32
2420 | +--:(ero-metric-case)
2421 | | +--ro ero-metric? netc:te-metric
2422 | +--:(ipv4-ero-case)
2423 | | +--ro loose? boolean
2424 | | +--ro address inet:ipv4-address
2425 | +--:(ipv6-ero-case)
2426 | | +--ro loose? boolean
2427 | | +--ro address inet:ipv6-address
2428 | +--:(unnumbered-interface-id-ero-case)
2429 | | +--ro loose? boolean
2430 | | +--ro router-id? uint32
2431 | | +--ro interface-id? uint32
2432 | +--:(ipv4-ero-backup-case)
2433 | | +--ro loose? boolean
2434 | | +--ro address inet:ipv4-address
2435 | +--:(ipv6-ero-backup-case)
2436 | | +--ro loose? boolean
2437 | | +--ro address inet:ipv6-address
2438 | +--:(unnumbered-interface-id-backup-ero-case)
2439 | +--ro loose? boolean
2440 | +--ro router-id? uint32
2441 | +--ro interface-id? uint32
2442 x--:(te-lsp-attributes-case)
2443 +--ro te-lsp-attributes
2448 The Link-State table in a instance of the speaker's Loc-RIB can be verified via REST:
2450 **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``
2458 <linkstate-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-linkstate">
2462 .. note:: Link-State routes mapping to topology links/nodes/prefixes is supported by BGP Topology Provider.
2466 * `North-Bound Distribution of Link-State and Traffic Engineering (TE) Information Using BGP <https://tools.ietf.org/html/rfc7752>`_
2467 * `BGP Link-State extensions for Segment Routing <https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-03>`_
2468 * `Segment Routing BGP Egress Peer Engineering BGP-LS Extensions <https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05>`_
2469 * `BGP Link-State Information Distribution Implementation Report <https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-impl-04>`_
2471 Flow Specification Family
2472 -------------------------
2473 The BGP Flow Specification (BGP-FS) Multiprotocol extension can be used to distribute traffic flow specifications.
2474 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).
2476 .. contents:: Contents
2482 This section shows a way to enable BGP-FS family in BGP speaker and peer configuration.
2486 To enable BGP-FS support in BGP plugin, first configure BGP speaker instance:
2488 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
2490 **Method:** ``POST``
2492 **Content-Type:** ``application/xml``
2498 <protocol xmlns="http://openconfig.net/yang/network-instance">
2499 <name>bgp-example</name>
2500 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
2501 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
2504 <router-id>192.0.2.2</router-id>
2509 <afi-safi-name>IPV4-FLOW</afi-safi-name>
2512 <afi-safi-name>IPV6-FLOW</afi-safi-name>
2515 <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
2518 <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
2527 Here is an example for BGP peer configuration with enabled BGP-FS family.
2529 **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``
2531 **Method:** ``POST``
2533 **Content-Type:** ``application/xml``
2539 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
2540 <neighbor-address>192.0.2.1</neighbor-address>
2543 <afi-safi-name>IPV4-FLOW</afi-safi-name>
2546 <afi-safi-name>IPV6-FLOW</afi-safi-name>
2549 <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
2552 <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>
2557 Flow Specification API
2558 ^^^^^^^^^^^^^^^^^^^^^^
2559 Following trees illustrate the BGP Flow Specification routes structure.
2561 IPv4 Flow Specification Route
2562 '''''''''''''''''''''''''''''
2563 .. code-block:: console
2565 :(flowspec-routes-case)
2566 +--ro flowspec-routes
2567 +--ro flowspec-route* [route-key path-id]
2568 +--ro route-key string
2570 | +--ro (flowspec-type)?
2573 | | +--ro op? numeric-operand
2574 | | +--ro value? uint16
2575 | +--:(destination-port-case)
2576 | | +--ro destination-ports*
2577 | | +--ro op? numeric-operand
2578 | | +--ro value? uint16
2579 | +--:(source-port-case)
2580 | | +--ro source-ports*
2581 | | +--ro op? numeric-operand
2582 | | +--ro value? uint16
2583 | +--:(icmp-type-case)
2585 | | +--ro op? numeric-operand
2586 | | +--ro value? uint8
2587 | +--:(icmp-code-case)
2589 | | +--ro op? numeric-operand
2590 | | +--ro value? uint8
2591 | +--:(tcp-flags-case)
2592 | | +--ro tcp-flags*
2593 | | +--ro op? bitmask-operand
2594 | | +--ro value? uint16
2595 | +--:(packet-length-case)
2596 | | +--ro packet-lengths*
2597 | | +--ro op? numeric-operand
2598 | | +--ro value? uint16
2601 | | +--ro op? numeric-operand
2602 | | +--ro value? dscp
2603 | +--:(fragment-case)
2604 | | +--ro fragments*
2605 | | +--ro op? bitmask-operand
2606 | | +--ro value? fragment
2607 | +--:(destination-prefix-case)
2608 | | +--ro destination-prefix? inet:ipv4-prefix
2609 | +--:(source-prefix-case)
2610 | | +--ro source-prefix? inet:ipv4-prefix
2611 | +--:(protocol-ip-case)
2612 | +--ro protocol-ips*
2613 | +--ro op? numeric-operand
2614 | +--ro value? uint8
2615 +--ro path-id path-id
2617 +--ro extended-communities*
2618 +--ro transitive? boolean
2619 +--ro (extended-community)?
2620 +--:(traffic-rate-extended-community-case)
2621 | +--ro traffic-rate-extended-community
2622 | +--ro informative-as? bgp-t:short-as-number
2623 | +--ro local-administrator? netc:bandwidth
2624 +--:(traffic-action-extended-community-case)
2625 | +--ro traffic-action-extended-community
2626 | +--ro sample? boolean
2627 | +--ro terminal-action? boolean
2628 +--:(redirect-extended-community-case)
2629 | +--ro redirect-extended-community
2630 | +--ro global-administrator? bgp-t:short-as-number
2631 | +--ro local-administrator? binary
2632 +--:(traffic-marking-extended-community-case)
2633 | +--ro traffic-marking-extended-community
2634 | +--ro global-administrator? dscp
2635 +--:(redirect-ipv4-extended-community-case)
2636 | +--ro redirect-ipv4
2637 | +--ro global-administrator? inet:ipv4-address
2638 | +--ro local-administrator? uint16
2639 +--:(redirect-as4-extended-community-case)
2640 | +--ro redirect-as4
2641 | +--ro global-administrator? inet:as-number
2642 | +--ro local-administrator? uint16
2643 +--:(redirect-ip-nh-extended-community-case)
2644 +--ro redirect-ip-nh-extended-community
2645 +--ro next-hop-address? inet:ip-address
2649 IPv6 Flow Specification Route
2650 '''''''''''''''''''''''''''''
2651 .. code-block:: console
2653 :(flowspec-ipv6-routes-case)
2654 +--ro flowspec-ipv6-routes
2655 +--ro flowspec-route* [route-key path-id]
2657 | +--ro (flowspec-type)?
2660 | | +--ro op? numeric-operand
2661 | | +--ro value? uint16
2662 | +--:(destination-port-case)
2663 | | +--ro destination-ports*
2664 | | +--ro op? numeric-operand
2665 | | +--ro value? uint16
2666 | +--:(source-port-case)
2667 | | +--ro source-ports*
2668 | | +--ro op? numeric-operand
2669 | | +--ro value? uint16
2670 | +--:(icmp-type-case)
2672 | | +--ro op? numeric-operand
2673 | | +--ro value? uint8
2674 | +--:(icmp-code-case)
2676 | | +--ro op? numeric-operand
2677 | | +--ro value? uint8
2678 | +--:(tcp-flags-case)
2679 | | +--ro tcp-flags*
2680 | | +--ro op? bitmask-operand
2681 | | +--ro value? uint16
2682 | +--:(packet-length-case)
2683 | | +--ro packet-lengths*
2684 | | +--ro op? numeric-operand
2685 | | +--ro value? uint16
2688 | | +--ro op? numeric-operand
2689 | | +--ro value? dscp
2690 | +--:(fragment-case)
2691 | | +--ro fragments*
2692 | | +--ro op? bitmask-operand
2693 | | +--ro value? fragment
2694 | +--:(destination-ipv6-prefix-case)
2695 | | +--ro destination-prefix? inet:ipv6-prefix
2696 | +--:(source-ipv6-prefix-case)
2697 | | +--ro source-prefix? inet:ipv6-prefix
2698 | +--:(next-header-case)
2699 | | +--ro next-headers*
2700 | | +--ro op? numeric-operand
2701 | | +--ro value? uint8
2702 | +--:(flow-label-case)
2704 | +--ro op? numeric-operand
2705 | +--ro value? uint32
2706 +--ro path-id path-id
2708 +--ro extended-communities*
2709 +--ro transitive? boolean
2710 +--ro (extended-community)?
2711 +--:(traffic-rate-extended-community-case)
2712 | +--ro traffic-rate-extended-community
2713 | +--ro informative-as? bgp-t:short-as-number
2714 | +--ro local-administrator? netc:bandwidth
2715 +--:(traffic-action-extended-community-case)
2716 | +--ro traffic-action-extended-community
2717 | +--ro sample? boolean
2718 | +--ro terminal-action? boolean
2719 +--:(redirect-extended-community-case)
2720 | +--ro redirect-extended-community
2721 | +--ro global-administrator? bgp-t:short-as-number
2722 | +--ro local-administrator? binary
2723 +--:(traffic-marking-extended-community-case)
2724 | +--ro traffic-marking-extended-community
2725 | +--ro global-administrator? dscp
2726 +--:(redirect-ipv6-extended-community-case)
2727 | +--ro redirect-ipv6
2728 | +--ro global-administrator? inet:ipv6-address
2729 | +--ro local-administrator? uint16
2730 +--:(redirect-as4-extended-community-case)
2731 | +--ro redirect-as4
2732 | +--ro global-administrator? inet:as-number
2733 | +--ro local-administrator? uint16
2734 +--:(redirect-ip-nh-extended-community-case)
2735 +--ro redirect-ip-nh-extended-community
2736 +--ro next-hop-address? inet:ip-address
2741 The flowspec route represents rules and an action, defined as an extended community.
2743 IPv4 Flow Specification
2744 '''''''''''''''''''''''
2745 The IPv4 Flowspec table in an instance of the speaker's Loc-RIB can be verified via REST:
2747 **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``
2755 <flowspec-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2757 <path-id>0</path-id>
2758 <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>
2767 <extended-communities>
2768 <transitive>true</transitive>
2769 <redirect-extended-community>
2770 <local-administrator>AgMWLg==</local-administrator>
2771 <global-administrator>258</global-administrator>
2772 </redirect-extended-community>
2773 </extended-communities>
2776 <destination-prefix>192.168.0.1/32</destination-prefix>
2779 <source-prefix>10.0.0.2/32</source-prefix>
2787 <op>equals end-of-list</op>
2797 <op>equals end-of-list</op>
2803 <op>greater-than</op>
2805 </destination-ports>
2807 <op>less-than and-bit</op>
2809 </destination-ports>
2811 <op>equals end-of-list</op>
2813 </destination-ports>
2817 <op>end-of-list greater-than</op>
2824 IPv6 Flows Specification
2825 ''''''''''''''''''''''''
2826 The IPv6 Flowspec table in an instance of the speaker's Loc-RIB can be verified via REST:
2828 **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``
2836 <flowspec-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2838 <path-id>0</path-id>
2839 <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>
2848 <extended-communities>
2849 <transitive>true</transitive>
2850 <traffic-rate-extended-community>
2851 <informative-as>0</informative-as>
2852 <local-administrator>AAAAAA==</local-administrator>
2853 </traffic-rate-extended-community>
2854 </extended-communities>
2857 <destination-prefix>2001:db8:31::/64</destination-prefix>
2860 <source-prefix>2001:db8:30::/64</source-prefix>
2864 <op>equals end-of-list</op>
2870 <op>equals end-of-list</op>
2876 <op>equals end-of-list</op>
2881 </flowspec-ipv6-routes>
2883 IPv4 L3VPN Flows Specification
2884 ''''''''''''''''''''''''''''''
2885 The IPv4 L3VPN Flowspec table in an instance of the speaker's Loc-RIB can be verified via REST:
2887 **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``
2895 <flowspec-l3vpn-ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2896 <flowspec-l3vpn-route>
2897 <path-id>0</path-id>
2898 <route-key>[l3vpn with route-distinguisher 172.16.0.44:101] all packets from 10.0.0.3/32</route-key>
2904 <global>5.6.7.8</global>
2910 <extended-communities>
2911 <transitive>true</transitive>
2912 <redirect-ip-nh-extended-community>
2914 <next-hop-address>0.0.0.0</next-hop-address>
2915 </redirect-ip-nh-extended-community>
2916 </extended-communities>
2918 <route-distinguisher>172.16.0.44:101</route-distinguisher>
2920 <source-prefix>10.0.0.3/32</source-prefix>
2922 </flowspec-l3vpn-route>
2923 </flowspec-l3vpn-ipv4-routes>
2927 IPv4 Flow Specification
2928 '''''''''''''''''''''''
2929 This examples show how to originate and remove IPv4 fowspec route via programmable RIB.
2930 Make sure the *Application Peer* is configured first.
2932 **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``
2934 **Method:** ``POST``
2936 **Content-Type:** ``application/xml``
2942 <flowspec-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
2943 <route-key>flow1</route-key>
2944 <path-id>0</path-id>
2946 <destination-prefix>192.168.0.1/32</destination-prefix>
2949 <source-prefix>10.0.0.1/32</source-prefix>
2953 <op>equals end-of-list</op>
2959 <op>equals end-of-list</op>
2965 <op>greater-than</op>
2967 </destination-ports>
2969 <op>and-bit less-than end-of-list</op>
2971 </destination-ports>
2975 <op>greater-than end-of-list</op>
2981 <op>equals end-of-list</op>
2987 <op>equals end-of-list</op>
2993 <op>match end-of-list</op>
2999 <op>greater-than</op>
3003 <op>and-bit less-than end-of-list</op>
3009 <op>equals end-of-list</op>
3015 <op>match end-of-list</op>
3016 <value>first</value>
3027 <extended-communities>
3029 </extended-communities>
3035 **Extended Communities**
3042 <extended-communities>
3043 <transitive>true</transitive>
3044 <traffic-rate-extended-community>
3045 <informative-as>123</informative-as>
3046 <local-administrator>AAAAAA==</local-administrator>
3047 </traffic-rate-extended-community>
3048 </extended-communities>
3050 @line 5: A rate in bytes per second, *AAAAAA==* (0) means traffic discard.
3052 * **Traffic Action**
3055 <extended-communities>
3056 <transitive>true</transitive>
3057 <traffic-action-extended-community>
3058 <sample>true</sample>
3059 <terminal-action>false</terminal-action>
3060 </traffic-action-extended-community>
3061 </extended-communities>
3064 * **Redirect to VRF AS 2byte format**
3067 <extended-communities>
3068 <transitive>true</transitive>
3069 <redirect-extended-community>
3070 <global-administrator>123</global-administrator>
3071 <local-administrator>AAAAew==</local-administrator>
3072 </redirect-extended-community>
3073 </extended-communities>
3075 * **Redirect to VRF IPv4 format**
3078 <extended-communities>
3079 <transitive>true</transitive>
3081 <global-administrator>192.168.0.1</global-administrator>
3082 <local-administrator>12345</local-administrator>
3084 </extended-communities>
3086 * **Redirect to VRF AS 4byte format**
3089 <extended-communities>
3090 <transitive>true</transitive>
3092 <global-administrator>64495</global-administrator>
3093 <local-administrator>12345</local-administrator>
3095 </extended-communities>
3097 * **Redirect to IP**
3100 <extended-communities>
3101 <transitive>true</transitive>
3102 <redirect-ip-nh-extended-community>
3104 </redirect-ip-nh-extended-community>
3105 </extended-communities>
3107 * **Traffic Marking**
3110 <extended-communities>
3111 <transitive>true</transitive>
3112 <traffic-marking-extended-community>
3113 <global-administrator>20</global-administrator>
3114 </traffic-marking-extended-community>
3115 </extended-communities>
3119 To remove the route added above, following request can be used:
3121 **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``
3123 **Method:** ``DELETE``
3125 IPv4 L3VPN Flow Specification
3126 '''''''''''''''''''''''''''''
3127 This examples show how to originate and remove IPv4 L3VPN fowspec route via programmable RIB.
3129 **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``
3131 **Method:** ``POST``
3133 **Content-Type:** ``application/xml``
3139 <flowspec-l3vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
3140 <path-id>0</path-id>
3141 <route-key>flow-l3vpn</route-key>
3142 <route-distinguisher>172.16.0.44:101</route-distinguisher>
3144 <source-prefix>10.0.0.3/32</source-prefix>
3154 <extended-communities>
3155 <transitive>true</transitive>
3157 <global-administrator>172.16.0.44</global-administrator>
3158 <local-administrator>102</local-administrator>
3160 </extended-communities>
3162 </flowspec-l3vpn-route>
3166 To remove the route added above, following request can be used:
3168 **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``
3170 **Method:** ``DELETE``
3172 IPv6 Flow Specification
3173 '''''''''''''''''''''''
3174 This examples show how to originate and remove IPv6 fowspec route via programmable RIB.
3176 **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``
3178 **Method:** ``POST``
3180 **Content-Type:** ``application/xml``
3186 <flowspec-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
3187 <route-key>flow-v6</route-key>
3188 <path-id>0</path-id>
3190 <destination-prefix>2001:db8:30::3/128</destination-prefix>
3193 <source-prefix>2001:db8:31::3/128</source-prefix>
3197 <op>equals end-of-list</op>
3202 <extended-communities>
3203 <transitive>true</transitive>
3205 <global-administrator>2001:db8:1::6</global-administrator>
3206 <local-administrator>12345</local-administrator>
3208 </extended-communities>
3221 To remove the route added above, following request can be used:
3223 **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``
3225 **Method:** ``DELETE``
3229 * `Dissemination of Flow Specification Rules <https://tools.ietf.org/html/rfc5575>`_
3230 * `Dissemination of Flow Specification Rules for IPv6 <https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-07>`_
3231 * `BGP Flow-Spec Extended Community for Traffic Redirect to IP Next Hop <https://tools.ietf.org/html/draft-ietf-idr-flowspec-redirect-ip-00>`_
3232 * `Clarification of the Flowspec Redirect Extended Community <https://tools.ietf.org/html/rfc7674>`_
3233 * `Revised Validation Procedure for BGP Flow Specifications <https://tools.ietf.org/html/draft-ietf-idr-bgp-flowspec-oid-03>`_
3237 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.
3238 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.
3239 In addition to MPLS, IP tunnelling encapsulation techniques like VXLAN, NVGRE, MPLSoGRE and others can be used for packet transportation.
3240 Also, Provider Backbone Bridging (PBB) can be combined with EVPN in order to reduce a number of MAC Advertisement routes.
3242 .. contents:: Contents
3248 This section shows a way to enable EVPN family in BGP speaker and peer configuration.
3252 To enable EVPN support in BGP plugin, first configure BGP speaker instance:
3254 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
3256 **Method:** ``POST``
3258 **Content-Type:** ``application/xml``
3264 <protocol xmlns="http://openconfig.net/yang/network-instance">
3265 <name>bgp-example</name>
3266 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
3267 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3270 <router-id>192.0.2.2</router-id>
3275 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
3284 Here is an example for BGP peer configuration with enabled EVPN family.
3286 **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``
3288 **Method:** ``POST``
3290 **Content-Type:** ``application/xml``
3296 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3297 <neighbor-address>192.0.2.1</neighbor-address>
3300 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
3307 Following tree illustrate the BGP EVPN route structure.
3309 .. code-block:: console
3313 +--ro evpn-route* [route-key]
3314 +--ro route-key string
3316 | +--:(ethernet-a-d-route-case)
3317 | | +--ro ethernet-a-d-route
3319 | | | +--:(arbitrary-case)
3320 | | | | +--ro arbitrary
3321 | | | | +--ro arbitrary binary
3322 | | | +--:(lacp-auto-generated-case)
3323 | | | | +--ro lacp-auto-generated
3324 | | | | +--ro ce-lacp-mac-address yang:mac-address
3325 | | | | +--ro ce-lacp-port-key uint16
3326 | | | +--:(lan-auto-generated-case)
3327 | | | | +--ro lan-auto-generated
3328 | | | | +--ro root-bridge-mac-address yang:mac-address
3329 | | | | +--ro root-bridge-priority uint16
3330 | | | +--:(mac-auto-generated-case)
3331 | | | | +--ro mac-auto-generated
3332 | | | | +--ro system-mac-address yang:mac-address
3333 | | | | +--ro local-discriminator uint24
3334 | | | +--:(router-id-generated-case)
3335 | | | | +--ro router-id-generated
3336 | | | | +--ro router-id inet:ipv4-address
3337 | | | | +--ro local-discriminator uint32
3338 | | | +--:(as-generated-case)
3339 | | | +--ro as-generated
3340 | | | +--ro as inet:as-number
3341 | | | +--ro local-discriminator uint32
3342 | | +--ro ethernet-tag-id
3343 | | | +--ro vlan-id uint32
3344 | | +--ro mpls-label netc:mpls-label
3345 | +--:(mac-ip-adv-route-case)
3346 | | +--ro mac-ip-adv-route
3348 | | | +--:(arbitrary-case)
3349 | | | | +--ro arbitrary
3350 | | | | +--ro arbitrary binary
3351 | | | +--:(lacp-auto-generated-case)
3352 | | | | +--ro lacp-auto-generated
3353 | | | | +--ro ce-lacp-mac-address yang:mac-address
3354 | | | | +--ro ce-lacp-port-key uint16
3355 | | | +--:(lan-auto-generated-case)
3356 | | | | +--ro lan-auto-generated
3357 | | | | +--ro root-bridge-mac-address yang:mac-address
3358 | | | | +--ro root-bridge-priority uint16
3359 | | | +--:(mac-auto-generated-case)
3360 | | | | +--ro mac-auto-generated
3361 | | | | +--ro system-mac-address yang:mac-address
3362 | | | | +--ro local-discriminator uint24
3363 | | | +--:(router-id-generated-case)
3364 | | | | +--ro router-id-generated
3365 | | | | +--ro router-id inet:ipv4-address
3366 | | | | +--ro local-discriminator uint32
3367 | | | +--:(as-generated-case)
3368 | | | +--ro as-generated
3369 | | | +--ro as inet:as-number
3370 | | | +--ro local-discriminator uint32
3371 | | +--ro ethernet-tag-id
3372 | | | +--ro vlan-id uint32
3373 | | +--ro mac-address yang:mac-address
3374 | | +--ro ip-address? inet:ip-address
3375 | | +--ro mpls-label1 netc:mpls-label
3376 | | +--ro mpls-label2? netc:mpls-label
3377 | +--:(inc-multi-ethernet-tag-res-case)
3378 | | +--ro inc-multi-ethernet-tag-res
3379 | | +--ro ethernet-tag-id
3380 | | | +--ro vlan-id uint32
3381 | | +--ro orig-route-ip? inet:ip-address
3382 | +--:(es-route-case)
3385 | | +--:(arbitrary-case)
3386 | | | +--ro arbitrary
3387 | | | +--ro arbitrary binary
3388 | | +--:(lacp-auto-generated-case)
3389 | | | +--ro lacp-auto-generated
3390 | | | +--ro ce-lacp-mac-address yang:mac-address
3391 | | | +--ro ce-lacp-port-key uint16
3392 | | +--:(lan-auto-generated-case)
3393 | | | +--ro lan-auto-generated
3394 | | | +--ro root-bridge-mac-address yang:mac-address
3395 | | | +--ro root-bridge-priority uint16
3396 | | +--:(mac-auto-generated-case)
3397 | | | +--ro mac-auto-generated
3398 | | | +--ro system-mac-address yang:mac-address
3399 | | | +--ro local-discriminator uint24
3400 | | +--:(router-id-generated-case)
3401 | | | +--ro router-id-generated
3402 | | | +--ro router-id inet:ipv4-address
3403 | | | +--ro local-discriminator uint32
3404 | | +--:(as-generated-case)
3405 | | +--ro as-generated
3406 | | +--ro as inet:as-number
3407 | | +--ro local-discriminator uint32
3408 | +--ro orig-route-ip inet:ip-address
3409 +--ro route-distinguisher bgp-t:route-distinguisher
3411 +--ro extended-communities*
3412 | +--ro transitive? boolean
3413 | +--ro (extended-community)?
3414 | +--:(encapsulation-case)
3415 | | +--ro encapsulation-extended-community
3416 | | +--ro tunnel-type encapsulation-tunnel-type
3417 | +--:(esi-label-extended-community-case)
3418 | | +--ro esi-label-extended-community
3419 | | +--ro single-active-mode? boolean
3420 | | +--ro esi-label netc:mpls-label
3421 | +--:(es-import-route-extended-community-case)
3422 | | +--ro es-import-route-extended-community
3423 | | +--ro es-import yang:mac-address
3424 | +--:(mac-mobility-extended-community-case)
3425 | | +--ro mac-mobility-extended-community
3426 | | +--ro static? boolean
3427 | | +--ro seq-number uint32
3428 | +--:(default-gateway-extended-community-case)
3429 | | +--ro default-gateway-extended-community!
3430 | +--:(layer-2-attributes-extended-community-case)
3431 | +--ro layer-2-attributes-extended-community
3432 | +--ro primary-pe? boolean
3433 | +--ro backup-pe? boolean
3434 | +--ro control-word? boolean
3435 | +--ro l2-mtu uint16
3437 +--ro leaf-information-required boolean
3438 +--ro mpls-label? netc:mpls-label
3439 +--ro (tunnel-identifier)?
3440 +--:(rsvp-te-p2mp-lsp)
3441 | +--ro rsvp-te-p2mp-lps
3442 | +--ro p2mp-id uint32
3443 | +--ro tunnel-id uint16
3444 | +--ro extended-tunnel-id inet:ip-address
3446 | +--ro mldp-p2mp-lsp
3447 | +--ro address-family identityref
3448 | +--ro root-node-address inet:ip-address
3449 | +--ro opaque-value*
3450 | +--ro opaque-type uint8
3451 | +--ro opaque-extended-type? uint16
3452 | +--ro opaque yang:hex-string
3454 | +--ro pim-ssm-tree
3455 | +--ro p-address inet:ip-address
3456 | +--ro p-multicast-group inet:ip-address
3459 | +--ro p-address inet:ip-address
3460 | +--ro p-multicast-group inet:ip-address
3461 +--:(bidir-pim-tree)
3462 | +--ro bidir-pim-tree
3463 | +--ro p-address inet:ip-address
3464 | +--ro p-multicast-group inet:ip-address
3465 +--:(ingress-replication)
3466 | +--ro ingress-replication
3467 | +--ro receiving-endpoint-address? inet:ip-address
3468 +--:(mldp-mp2mp-lsp)
3469 +--ro mldp-mp2mp-lsp
3470 +--ro opaque-type uint8
3471 +--ro opaque-extended-type? uint16
3477 The L2VPN EVPN table in an instance of the speaker's Loc-RIB can be verified via REST:
3479 **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``
3487 <evpn-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
3489 <route-key>AxEAAcCoZAED6AAAAQAgwKhkAQ==</route-key>
3490 <route-distinguisher>192.168.100.1:1000</route-distinguisher>
3491 <inc-multi-ethernet-tag-res>
3493 <vlan-id>256</vlan-id>
3495 <orig-route-ip>192.168.100.1</orig-route-ip>
3496 </inc-multi-ethernet-tag-res>
3499 <global>172.23.29.104</global>
3505 <extended-communities>
3506 <extended-communities>
3507 <transitive>true</transitive>
3508 <route-target-extended-community>
3509 <global-administrator>65504</global-administrator>
3510 <local-administrator>AAAD6A==</local-administrator>
3511 </route-target-extended-community>
3512 </extended-communities>
3513 </extended-communities>
3515 <leaf-information-required>true</leaf-information-required>
3516 <mpls-label>20024</mpls-label>
3517 <ingress-replication>
3518 <receiving-endpoint-address>192.168.100.1</receiving-endpoint-address>
3519 </ingress-replication>
3527 This examples show how to originate and remove EVPN routes via programmable RIB.
3528 There are four different types of EVPN routes, and several extended communities.
3529 Routes can be used for variety of use-cases supported by BGP/MPLS EVPN, PBB EVPN and NVO EVPN.
3530 Make sure the *Application Peer* is configured first.
3532 **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``
3534 **Method:** ``POST``
3536 **Content-Type:** ``application/xml``
3542 :emphasize-lines: 3,4,14
3544 <evpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
3545 <route-key>evpn</route-key>
3546 <route-distinguisher>172.12.123.3:200</route-distinguisher>
3550 <global>199.20.166.41</global>
3556 <extended-communities>
3558 </extended-communities>
3562 @line 3: Route Distinguisher (RD) - set to RD of the MAC-VRF advertising the NLRI, recommended format *<IP>:<VLAN_ID>*
3564 @line 4: One of the EVPN route must be set here.
3566 @line 14: In some cases, specific extended community presence is required. The route may carry one or more Route Target attributes.
3572 * **Ethernet AD per ESI**
3575 <ethernet-a-d-route>
3576 <mpls-label>0</mpls-label>
3578 <vlan-id>4294967295</vlan-id>
3581 <arbitrary>AAAAAAAAAAAA</arbitrary>
3583 </ethernet-a-d-route>
3585 * **Ethernet AD per EVI**
3588 <ethernet-a-d-route>
3589 <mpls-label>24001</mpls-label>
3591 <vlan-id>2200</vlan-id>
3594 <arbitrary>AAAAAAAAAAAA</arbitrary>
3596 </ethernet-a-d-route>
3598 * **MAC/IP Advertisement**
3603 <arbitrary>AAAAAAAAAAAA</arbitrary>
3606 <vlan-id>2100</vlan-id>
3608 <mac-address>f2:0c:dd:80:9f:f7</mac-address>
3609 <ip-address>10.0.1.12</ip-address>
3610 <mpls-label1>299776</mpls-label1>
3614 * **Inclusive Multicast Ethernet Tag**
3617 <inc-multi-ethernet-tag-res>
3619 <vlan-id>2100</vlan-id>
3621 <orig-route-ip>43.43.43.43</orig-route-ip>
3622 </inc-multi-ethernet-tag-res>
3624 * **Ethernet Segment**
3628 <orig-route-ip>43.43.43.43</orig-route-ip>
3630 <arbitrary>AAAAAAAAAAAA</arbitrary>
3634 **EVPN Ethernet Segment Identifier (ESI):**
3637 Indicates an arbitrary 9-octet ESI.
3642 <arbitrary>AAAAAAAAAAAA</arbitrary>
3646 IEEE 802.1AX LACP is used.
3650 <lacp-auto-generated>
3651 <ce-lacp-mac-address>f2:0c:dd:80:9f:f7</ce-lacp-mac-address>
3652 <ce-lacp-port-key>22</ce-lacp-port-key>
3653 </lacp-auto-generated>
3656 Indirectly connected hosts via a bridged LAN.
3660 <lan-auto-generated>
3661 <root-bridge-mac-address>f2:0c:dd:80:9f:f7</root-bridge-mac-address>
3662 <root-bridge-priority>20</root-bridge-priority>
3663 </lan-auto-generated>
3670 <mac-auto-generated>
3671 <system-mac-address>f2:0c:dd:80:9f:f7</system-mac-address>
3672 <local-discriminator>2000</local-discriminator>
3673 </mac-auto-generated>
3680 <router-id-generated>
3681 <router-id>43.43.43.43</router-id>
3682 <local-discriminator>2000</local-discriminator>
3683 </router-id-generated>
3692 <local-discriminator>2000</local-discriminator>
3695 **Extended Communities:**
3697 * **ESI Label Extended Community**
3700 <extended-communities>
3701 <transitive>true</transitive>
3702 <esi-label-extended-community>
3703 <single-active-mode>false</single-active-mode>
3704 <esi-label>24001</esi-label>
3705 </esi-label-extended-community >
3706 </extended-communities>
3708 * **ES-Import Route Target**
3711 <extended-communities>
3712 <transitive>true</transitive>
3713 <es-import-route-extended-community>
3714 <es-import>f2:0c:dd:80:9f:f7</es-import>
3715 </es-import-route-extended-community>
3716 </extended-communities>
3718 * **MAC Mobility Extended Community**
3721 <extended-communities>
3722 <transitive>true</transitive>
3723 <mac-mobility-extended-community>
3724 <static>true</static>
3725 <seq-number>200</seq-number>
3726 </mac-mobility-extended-community>
3727 </extended-communities>
3729 * **Default Gateway Extended Community**
3732 <extended-communities>
3733 <transitive>true</transitive>
3734 <default-gateway-extended-community>
3735 </default-gateway-extended-community>
3736 </extended-communities>
3738 * **EVPN Layer 2 attributes extended community**
3741 <extended-communities>
3742 <transitive>false</transitive>
3743 <layer-2-attributes-extended-community>
3744 <primary-pe>true</primary-pe>
3745 <backup-pe>true</backup-pe>
3746 <control-word >true</control-word>
3747 <l2-mtu>200</l2-mtu>
3748 </layer-2-attributes-extended-community>
3749 </extended-communities>
3751 * **BGP Encapsulation extended community**
3756 <extended-communities>
3757 <transitive>false</transitive>
3758 <encapsulation-extended-community>
3759 <tunnel-type>vxlan</tunnel-type>
3760 </encapsulation-extended-community>
3761 </extended-communities>
3763 @line 4: `full list of tunnel types <http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#tunnel-types>`_
3765 * **P-Multicast Service Interface Tunnel (PMSI) attribute**
3769 <leaf-information-required>true</leaf-information-required>
3770 <mpls-label>20024</mpls-label>
3771 <ingress-replication>
3772 <receiving-endpoint-address>172.12.123.3</receiving-endpoint-address>
3773 </ingress-replication>
3778 To remove the route added above, following request can be used:
3780 **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``
3782 **Method:** ``DELETE``
3786 .. table:: EVPN Routes Usage.
3788 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3789 | EVN Route Type | Extended Communities | Usage |
3790 +======================================+=====================================================+===========================================+
3791 | **Ethernet Auto-discovery** | ESI Label, BGP EncapsulationEVPN Layer 2 attributes | Fast Convergence, Split Horizon, Aliasing |
3792 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3793 | **MAC/IP Advertisement** | BGP Encapsulation, MAC Mobility, Default Gateway | MAC address reachability |
3794 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3795 | **Inclusive Multicast Ethernet Tag** | PMSI Tunnel, BGP Encapsulation | Handling of Multi-destination traffic |
3796 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3797 | **Ethernet Segment** | BGP Encapsulation, ES-Import Route Target | Designated Forwarder Election |
3798 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
3802 * `BGP MPLS-Based Ethernet VPN <https://tools.ietf.org/html/rfc7432>`_
3803 * `Provider Backbone Bridging Combined with Ethernet VPN <https://tools.ietf.org/html/rfc7623>`_
3804 * `VPWS support in EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-vpws-07>`_
3805 * `A Network Virtualization Overlay Solution using EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-04>`_
3806 * `Interconnect Solution for EVPN Overlay networks <https://tools.ietf.org/html/draft-ietf-bess-dci-evpn-overlay-04>`_
3807 * `Usage and applicability of BGP MPLS based Ethernet VPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-usage-03>`_
3811 The ADD-PATH capability allows to advertise multiple paths for the same address prefix.
3812 It can help with optimal routing and routing convergence in a network by providing potential alternate or backup paths.
3814 .. contents:: Contents
3820 This section shows a way to enable ADD-PATH capability in BGP speaker and peer configuration.
3822 .. note:: The capability is applicable for IP Unicast, IP Labeled Unicast and Flow Specification address families.
3826 To enable ADD-PATH capability in BGP plugin, first configure BGP speaker instance:
3828 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
3830 **Method:** ``POST``
3832 **Content-Type:** ``application/xml``
3838 :emphasize-lines: 14
3840 <protocol xmlns="http://openconfig.net/yang/network-instance">
3841 <name>bgp-example</name>
3842 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
3843 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3846 <router-id>192.0.2.2</router-id>
3851 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3852 <receive>true</receive>
3853 <send-max>2</send-max>
3860 @line 14: Defines path selection strategy: *send-max* > 1 -> Advertise N Paths or *send-max* = 0 -> Advertise All Paths
3862 Here is an example for update a specific family with enable ADD-PATH capability
3864 **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``
3868 **Content-Type:** ``application/xml``
3874 <afi-safi xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3875 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3876 <receive>true</receive>
3877 <send-max>0</send-max>
3882 Here is an example for BGP peer configuration with enabled ADD-PATH capability.
3884 **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``
3886 **Method:** ``POST``
3888 **Content-Type:** ``application/xml``
3894 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3895 <neighbor-address>192.0.2.1</neighbor-address>
3898 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
3901 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3902 <receive>true</receive>
3903 <send-max>0</send-max>
3908 .. 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.
3910 Here is an example for update specific family BGP peer configuration with enabled ADD-PATH capability.
3912 **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``
3916 **Content-Type:** ``application/xml``
3922 <afi-safi xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
3923 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
3924 <receive>true</receive>
3925 <send-max>0</send-max>
3930 The IPv4 Unicast table with enabled ADD-PATH capability in an instance of the speaker's Loc-RIB can be verified via REST:
3932 **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``
3942 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
3944 <path-id>1</path-id>
3945 <prefix>193.0.2.1/32</prefix>
3955 <global>10.0.0.1</global>
3960 <path-id>2</path-id>
3961 <prefix>193.0.2.1/32</prefix>
3971 <global>10.0.0.2</global>
3977 @line 3: The routes with the same destination are distinguished by *path-id* attribute.
3981 * `Advertisement of Multiple Paths in BGP <https://tools.ietf.org/html/rfc7911>`_
3982 * `Best Practices for Advertisement of Multiple Paths in IBGP <https://tools.ietf.org/html/draft-ietf-idr-add-paths-guidelines-08>`_
3986 The Route Refresh Capability allows to dynamically request a re-advertisement of the Adj-RIB-Out from a BGP peer.
3987 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.
3989 .. contents:: Contents
3995 The capability is enabled by default, no additional configuration is required.
3999 To send a Route Refresh request from OpenDaylight BGP speaker instance to its neighbor, invoke RPC:
4001 **URL:** ``/restconf/operations/bgp-peer-rpc:route-refresh-request``
4003 **Method:** ``POST``
4005 **Content-Type:** ``application/xml``
4011 <input xmlns="urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc">
4012 <afi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:ipv4-address-family</afi>
4013 <safi xmlns:types="urn:opendaylight:params:xml:ns:yang:bgp-types">types:unicast-subsequent-address-family</safi>
4014 <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>
4019 * `Route Refresh Capability for BGP-4 <https://tools.ietf.org/html/rfc2918>`_
4023 Running OpenDaylight BGP in clustered environment brings an advantage of the plugin's high availability (HA).
4024 This section illustrates a basic scenario for HA, also presents a configuration for clustered OpenDaylight BGP.
4026 .. contents:: Contents
4032 Following example shows a configuration for running BGP in clustered environment.
4034 #. As the first step, configure (replicated *deafult* shard and *topology* shard if needed) and run OpenDaylight in clustered environment, install BGP and RESTCONF.
4036 #. 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.
4038 #. Remote peer should be configured to accept/initiate connection from/to all OpenDaylight cluster nodes with configured BGP plugin.
4040 #. 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.
4044 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`):
4046 * In ``modules.conf`` add a new module:
4047 .. code-block:: console
4051 namespace = "urn:opendaylight:params:xml:ns:yang:bgp-rib"
4052 shard-strategy = "module"
4055 * In ``module-shards.conf`` define a new module shard:
4056 .. code-block:: console
4070 **Note:** Use correct member name in module shard configuration.
4074 Following section presents a basic BGP speaker failover scenario on 3-node OpenDaylight cluster setup.
4076 .. figure:: ./images/bgpcep/BGP_HA.png
4079 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.
4080 Routes advertised by remote peer are replicated, hence RIBs state on all nodes is the same.
4084 .. figure:: ./images/bgpcep/BGP_HA_failure.png
4085 :alt: Node went down.
4087 In a case a cluster node, where BGP instance is running, goes down (unexpected failure, restart), active BGP session is dropped.
4091 .. figure:: ./images/bgpcep/BGP_HA_recovery.png
4094 Now, one of the stand-by BGP speaker instances become active. Remote peer establishes new connection and advertises routes again.
4098 This section provides an overview of the BGP topology provider service.
4099 It shows how to configure and use all available BGP topology providers.
4100 Providers are building topology view of BGP routes stored in local BGP speaker's Loc-RIB.
4101 Output topologies are rendered in a form of standardised IETF network topology model.
4103 .. contents:: Contents
4107 Inet Reachability Topology
4108 ^^^^^^^^^^^^^^^^^^^^^^^^^^
4109 Inet reachability topology exporter offers a mapping service from IPv4/6 routes to network topology nodes.
4113 Following example shows how to create a new instance of IPv4 BGP topology exporter:
4115 **URL:** ``/restconf/config/network-topology:network-topology``
4117 **Method:** ``POST``
4119 **Content-Type:** ``application/xml``
4125 :emphasize-lines: 2,4,6
4127 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4128 <topology-id>bgp-example-ipv4-topology</topology-id>
4130 <bgp-ipv4-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv4-reachability-topology>
4132 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
4135 @line 2: An identifier for a topology.
4137 @line 4: Used to identify type of the topology. In this case BGP IPv4 reachability topology.
4139 @line 6: A name of the local BGP speaker instance.
4143 The topology exporter instance can be removed in a following way:
4145 **URL:** ``/restconf/config/network-topology:network-topology/topology/bgp-example-ipv4-topology``
4147 **Method:** ``DELETE``
4151 Following example shows how to create a new instance of IPv6 BGP topology exporter:
4153 **URL:** ``/restconf/config/network-topology:network-topology``
4155 **Method:** ``POST``
4157 **Content-Type:** ``application/xml``
4163 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4164 <topology-id>bgp-example-ipv6-topology</topology-id>
4166 <bgp-ipv6-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv6-reachability-topology>
4168 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
4173 Operational state of the topology can be verified via REST:
4175 **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-ipv4-topology``
4183 :emphasize-lines: 8,11
4185 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4186 <topology-id>bgp-example-ipv4-topology</topology-id>
4187 <server-provided>true</server-provided>
4189 <bgp-ipv4-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv4-reachability-topology>
4192 <node-id>10.10.1.1</node-id>
4193 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4195 <prefix>10.0.0.10/32</prefix>
4197 </igp-node-attributes>
4201 @line 8: The identifier of a node in a topology. Its value is mapped from route's NEXT_HOP attribute.
4203 @line 11: The IP prefix attribute of the node. Its value is mapped from routes's destination IP prefix.
4205 BGP Linkstate Topology
4206 ^^^^^^^^^^^^^^^^^^^^^^
4207 BGP linkstate topology exporter offers a mapping service from BGP-LS routes to network topology nodes and links.
4211 Following example shows how to create a new instance of linkstate BGP topology exporter:
4213 **URL:** ``/restconf/config/network-topology:network-topology``
4215 **Method:** ``POST``
4217 **Content-Type:** ``application/xml``
4223 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4224 <topology-id>bgp-example-linkstate-topology</topology-id>
4226 <bgp-linkstate-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-linkstate-topology>
4228 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
4233 Operational state of the topology can be verified via REST.
4234 A sample output below represents a two node topology with two unidirectional links interconnecting those nodes.
4236 **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-linkstate-topology``
4244 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
4245 <topology-id>bgp-example-linkstate-topology</topology-id>
4246 <server-provided>true</server-provided>
4248 <bgp-linkstate-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-linkstate-topology>
4251 <node-id>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</node-id>
4253 <tp-id>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</tp-id>
4254 <igp-termination-point-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"/>
4255 </termination-point>
4256 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4258 <prefix>40.40.40.40/32</prefix>
4262 <prefix>203.20.160.0/24</prefix>
4266 <router-id>40.40.40.40</router-id>
4267 <isis-node-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4269 <te-router-id-ipv4>40.40.40.40</te-router-id-ipv4>
4272 <iso-system-id>MDAwMDAwMDAwMDY0</iso-system-id>
4274 </isis-node-attributes>
4275 </igp-node-attributes>
4278 <node-id>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</node-id>
4280 <tp-id>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</tp-id>
4281 <igp-termination-point-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"/>
4282 </termination-point>
4283 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4285 <prefix>39.39.39.39/32</prefix>
4289 <prefix>203.20.160.0/24</prefix>
4293 <router-id>39.39.39.39</router-id>
4294 <isis-node-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4296 <te-router-id-ipv4>39.39.39.39</te-router-id-ipv4>
4299 <iso-system-id>MDAwMDAwMDAwMDg3</iso-system-id>
4301 </isis-node-attributes>
4302 </igp-node-attributes>
4306 <dest-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</dest-node>
4307 <dest-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</dest-tp>
4309 <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>
4311 <source-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</source-node>
4312 <source-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</source-tp>
4314 <igp-link-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4316 <isis-link-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4319 <max-link-bandwidth>1250000.0</max-link-bandwidth>
4320 <max-resv-link-bandwidth>12500.0</max-resv-link-bandwidth>
4321 <te-default-metric>0</te-default-metric>
4322 <unreserved-bandwidth>
4323 <bandwidth>12500.0</bandwidth>
4324 <priority>0</priority>
4325 </unreserved-bandwidth>
4326 <unreserved-bandwidth>
4327 <bandwidth>12500.0</bandwidth>
4328 <priority>1</priority>
4329 </unreserved-bandwidth>
4330 <unreserved-bandwidth>
4331 <bandwidth>12500.0</bandwidth>
4332 <priority>2</priority>
4333 </unreserved-bandwidth>
4334 <unreserved-bandwidth>
4335 <bandwidth>12500.0</bandwidth>
4336 <priority>3</priority>
4337 </unreserved-bandwidth>
4338 <unreserved-bandwidth>
4339 <bandwidth>12500.0</bandwidth>
4340 <priority>4</priority>
4341 </unreserved-bandwidth>
4342 <unreserved-bandwidth>
4343 <bandwidth>12500.0</bandwidth>
4344 <priority>5</priority>
4345 </unreserved-bandwidth>
4346 <unreserved-bandwidth>
4347 <bandwidth>12500.0</bandwidth>
4348 <priority>6</priority>
4349 </unreserved-bandwidth>
4350 <unreserved-bandwidth>
4351 <bandwidth>12500.0</bandwidth>
4352 <priority>7</priority>
4353 </unreserved-bandwidth>
4355 </isis-link-attributes>
4356 </igp-link-attributes>
4360 <dest-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</dest-node>
4361 <dest-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</dest-tp>
4363 <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>
4365 <source-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</source-node>
4366 <source-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</source-tp>
4368 <igp-link-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
4370 <isis-link-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
4373 <max-link-bandwidth>1250000.0</max-link-bandwidth>
4374 <max-resv-link-bandwidth>12500.0</max-resv-link-bandwidth>
4375 <te-default-metric>0</te-default-metric>
4376 <unreserved-bandwidth>
4377 <bandwidth>12500.0</bandwidth>
4378 <priority>0</priority>
4379 </unreserved-bandwidth>
4380 <unreserved-bandwidth>
4381 <bandwidth>12500.0</bandwidth>
4382 <priority>1</priority>
4383 </unreserved-bandwidth>
4384 <unreserved-bandwidth>
4385 <bandwidth>12500.0</bandwidth>
4386 <priority>2</priority>
4387 </unreserved-bandwidth>
4388 <unreserved-bandwidth>
4389 <bandwidth>12500.0</bandwidth>
4390 <priority>3</priority>
4391 </unreserved-bandwidth>
4392 <unreserved-bandwidth>
4393 <bandwidth>12500.0</bandwidth>
4394 <priority>4</priority>
4395 </unreserved-bandwidth>
4396 <unreserved-bandwidth>
4397 <bandwidth>12500.0</bandwidth>
4398 <priority>5</priority>
4399 </unreserved-bandwidth>
4400 <unreserved-bandwidth>
4401 <bandwidth>12500.0</bandwidth>
4402 <priority>6</priority>
4403 </unreserved-bandwidth>
4404 <unreserved-bandwidth>
4405 <bandwidth>12500.0</bandwidth>
4406 <priority>7</priority>
4407 </unreserved-bandwidth>
4409 </isis-link-attributes>
4410 </igp-link-attributes>
4416 BGP test tools serves to test basic BGP functionality, scalability and performance.
4418 .. contents:: Contents
4424 The BGP Test Tool is a stand-alone Java application purposed to simulate remote BGP peers, that are capable to advertise sample routes.
4425 This application is not part of the OpenDaylight Karaf distribution, however it can be downloaded from OpenDaylight's Nexus (use latest release version):
4427 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/bgp-testtool``
4431 The application can be run from command line:
4433 .. code-block:: console
4435 java -jar bgp-testtool-*-executable.jar
4438 with optional input parameters:
4440 .. code-block:: console
4442 -i <BOOLEAN>, --active <BOOLEAN>
4443 Active initialisation of the connection, by default false.
4445 -ho <N>, --holdtimer <N>
4446 In seconds, value of the desired holdtimer, by default 90.
4448 -sc <N>, --speakersCount <N>
4449 Number of simulated BGP speakers, when creating each speaker, uses incremented local-address for binding, by default 0.
4451 -ra <IP_ADDRESS:PORT,...>, --remoteAddress <IP_ADDRESS:PORT,...>
4452 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.
4454 -la <IP_ADDRESS:PORT>, --localAddress <IP_ADDRESS:PORT>
4455 IP address of BGP speakers which the tools simulates, by default 192.0.2.2:0.
4457 -pr <N>, --prefixes <N>
4458 Number of prefixes to be advertised by each simulated speaker
4460 -mp <BOOLEAN>, --multiPathSupport <BOOLEAN>
4461 Active ADD-PATH support, by default false.
4464 Local AS Number, by default 64496.
4466 -ec <EXTENDED_COMMUNITIES>, --extended_communities <EXTENDED_COMMUNITIES>
4467 Extended communities to be send. Format: x,x,x where x is each extended community from bgp-types.yang, by default empty.
4469 -ll <LOG_LEVEL>, --log_level <LOG_LEVEL>
4470 Log level for console output, by default INFO.
4472 BGP Application Peer Benchmark
4473 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4474 It is a simple OpenDaylight application which is capable to inject and remove specific amount of IPv4 routes.
4475 This application is part of the OpenDaylight Karaf distribution.
4479 As a first step install BGP, RESTCONF and NETCONF connector plugin, then configure *Application Peer*.
4480 Install ``odl-bgpcep-bgp-benchmark`` feature and reconfigure BGP Application Peer Benchmark application as per following:
4482 **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``
4486 **Content-Type:** ``application/xml``
4492 :emphasize-lines: 12
4494 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
4495 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">x:app-peer-benchmark</type>
4496 <name>bgp-app-peer-benchmark</name>
4497 <binding-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">
4498 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
4499 <name>pingpong-binding-data-broker</name>
4500 </binding-data-broker>
4501 <rpc-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">
4502 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-rpc-registry</type>
4503 <name>binding-rpc-broker</name>
4505 <app-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:odl-bgp-benchmark-cfg">10.25.1.9</app-rib-id>
4508 @line 12: The *Application Peer* identifier.
4510 .. warning:: This configuration will be moved to configuration datastore in Carbon release.
4514 Routes injection can be invoked via RPC:
4516 **URL:** ``/restconf/operations/odl-bgp-app-peer-benchmark:add-prefix``
4518 **Method:** ``POST``
4520 **Content-Type:** ``application/xml``
4526 :emphasize-lines: 2,3,4,5
4528 <input xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4529 <prefix>1.1.1.1/32</prefix>
4530 <count>100000</count>
4531 <batchsize>2000</batchsize>
4532 <nexthop>192.0.2.2</nexthop>
4535 @line 2: A initial IPv4 prefix carried in route. Value is incremented for following routes.
4537 @line 3: An amount of routes to be added to *Application Peer's* programmable RIB.
4539 @line 4: A size of the transaction batch.
4541 @line 5: A NEXT_HOP attribute value used in all injected routes.
4547 :emphasize-lines: 3,4,5
4549 <output xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4551 <duration>4301</duration>
4553 <count>100000</count>
4557 @line 3: Request duration in milliseconds.
4559 @line 4: Writes per second rate.
4561 @line 5: An amount of routes added to *Application Peer's* programmable RIB.
4565 Routes deletion can be invoked via RPC:
4567 **URL:** ``/restconf/operations/odl-bgp-app-peer-benchmark:delete-prefix``
4569 **Method:** ``POST``
4571 **Content-Type:** ``application/xml``
4577 :emphasize-lines: 2,3,4
4579 <input xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4580 <prefix>1.1.1.1/32</prefix>
4581 <count>100000</count>
4582 <batchsize>2000</batchsize>
4585 @line 2: A initial IPv4 prefix carried in route to be removed. Value is incremented for following routes.
4587 @line 3: An amount of routes to be removed from *Application Peer's* programmable RIB.
4589 @line 4: A size of the transaction batch.
4595 <output xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark">
4597 <duration>1837</duration>
4599 <count>100000</count>
4605 This section offers advices in a case OpenDaylight BGP plugin is not working as expected.
4607 .. contents:: Contents
4611 BGP is not working...
4612 ^^^^^^^^^^^^^^^^^^^^^
4613 * First of all, ensure that all required features are installed, local and remote BGP configuration is correct.
4615 * Check OpenDaylight Karaf logs:
4619 .. code-block:: console
4623 or open log file: ``data/log/karaf.log``
4625 Possibly, a reason/hint for a cause of the problem can be found there.
4627 * Try to minimise effect of other OpenDaylight features, when searching for a reason of the problem.
4629 * Try to set DEBUG severity level for BGP logger via Karaf console commands, in order to collect more information:
4631 .. code-block:: console
4633 log:set DEBUG org.opendaylight.protocol.bgp
4635 .. code-block:: console
4637 log:set DEBUG org.opendaylight.bgpcep.bgp
4641 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.
4643 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information:
4645 #. State OpenDaylight version
4647 #. Describe your use-case and provide as much details related to BGP as possible
4649 #. Steps to reproduce
4651 #. Attach Karaf log files, optionally packet captures, REST input/output