5 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.
6 Also, routes are distributed to specific VPN remote sites.
14 This section shows a way to enable IPv4 and IPv6 L3VPN family in BGP speaker and peer configuration.
18 To enable IPv4 and IPv6 L3VPN support in BGP plugin, first configure BGP speaker instance:
20 **URL:** ``/rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols``
28 **Content-Type:** ``application/xml``
34 <protocol xmlns="http://openconfig.net/yang/network-instance">
35 <name>bgp-example</name>
36 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
37 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
40 <router-id>192.0.2.2</router-id>
45 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
48 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
51 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-MULTICAST</afi-safi-name>
54 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-MULTICAST</afi-safi-name>
63 **Content-Type:** ``application/json``
72 "identifier": "openconfig-policy-types:BGP",
73 "name": "bgp-example",
74 "bgp-openconfig-extensions:bgp": {
77 "router-id": "192.0.2.2",
83 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV4-UNICAST"
86 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV6-UNICAST"
89 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV4-MULTICAST"
92 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV6-MULTICAST"
104 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 L3VPN family.
106 **URL:** ``/rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/openconfig-network-instance:protocols/protocol=openconfig-policy-types:BGP/bgp-example/bgp/neighbors``
114 **Content-Type:** ``application/xml``
120 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
121 <neighbor-address>192.0.2.1</neighbor-address>
124 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
127 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
134 **Content-Type:** ``application/json``
143 "neighbor-address": "192.0.2.1",
147 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV4-UNICAST"
150 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV6-UNICAST"
160 Following trees illustrate the BGP IP L3VPN routes structures.
162 IPv4 L3VPN Unicast Route
163 ''''''''''''''''''''''''
164 .. code-block:: console
166 :(vpn-ipv4-routes-case)
167 +--ro vpn-ipv4-routes
168 +--ro vpn-route* [route-key path-id]
169 +--ro route-key string
170 +--ro path-id path-id
172 | +--ro label-value? netc:mpls-label
173 +--ro prefix? inet:ip-prefix
174 +--ro path-id? path-id
175 +--ro route-distinguisher? bgp-t:route-distinguisher
179 IPv6 L3VPN Unicast Route
180 ''''''''''''''''''''''''
181 .. code-block:: console
183 :(vpn-ipv6-routes-case)
184 +--ro vpn-ipv6-routes
185 +--ro vpn-route* [route-key path-id]
186 +--ro route-key string
187 +--ro path-id path-id
189 | +--ro label-value? netc:mpls-label
190 +--ro prefix? inet:ip-prefix
191 +--ro path-id? path-id
192 +--ro route-distinguisher? bgp-t:route-distinguisher
196 IPv4 L3VPN Multicast Route
197 ''''''''''''''''''''''''''
198 .. code-block:: console
200 :(l3vpn-mcast-routes-ipv4-case)
201 +--ro l3vpn-mcast-routes-ipv4
202 +--ro l3vpn-mcast-route* [route-key path-id]
203 +--ro prefix? inet:ip-prefix
204 +--ro route-distinguisher? bgp-t:route-distinguisher
206 IPv6 L3VPN Multicast Route
207 ''''''''''''''''''''''''''
208 .. code-block:: console
210 :(l3vpn-mcast-routes-ipv6-case)
211 +--ro l3vpn-mcast-routes-ipv6
212 +--ro l3vpn-mcast-route* [route-key path-id]
213 +--ro prefix? inet:ip-prefix
214 +--ro route-distinguisher? bgp-t:route-distinguisher
221 The IPv4 L3VPN Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
223 **URL:** ``/rests/data/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?content=nonconfig``
235 <vpn-ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
238 <route-key>cAXdYQABrBAALABlCgIi</route-key>
240 <label-value>24022</label-value>
243 <extended-communities>
244 <transitive>true</transitive>
245 <route-target-extended-community>
246 <global-administrator>65000</global-administrator>
247 <local-administrator>AAAAZQ==</local-administrator>
248 </route-target-extended-community>
249 </extended-communities>
258 <global>127.16.0.44</global>
261 <route-distinguisher>172.16.0.44:101</route-distinguisher>
262 <prefix>10.2.34.0/24</prefix>
273 "bgp-vpn-ipv4:vpn-ipv4-routes": {
275 "route-key": "cAXdYQABrBAALABlCgIi",
281 "extended-communities": {
283 "route-target-extended-community": {
284 "global-administrator": "65000",
285 "local-administrator": "AAAAZQ=="
295 "global": "127.16.0.44"
298 "route-distinguisher": "172.16.0.44:101",
299 "prefix":"10.2.34.0/24"
306 The IPv6 L3VPN Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
308 **URL:** ``/rests/data/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?content=nonconfig``
320 <vpn-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv6">
323 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
325 <label-value>24023</label-value>
331 <extended-communities>
332 <route-target-extended-community>
333 <global-administrator>65000</global-administrator>
334 <local-administrator>AAAAZQ==</local-administrator>
335 </route-target-extended-community>
336 <transitive>true</transitive>
337 </extended-communities>
339 <global>2a02:b80:0:2::1</global>
346 <route-distinguisher>172.16.0.44:101</route-distinguisher>
347 <prefix>2a02:b80:0:1::/64</prefix>
358 "bgp-vpn-ipv6:vpn-ipv6-routes": {
360 "route-key": "mAXdcQABrBAALABlKgILgAAAAAE=",
366 "extended-communities": {
368 "route-target-extended-community": {
369 "global-administrator": "65000",
370 "local-administrator": "AAAAZQ=="
380 "global": "2a02:b80:0:2::1"
383 "route-distinguisher": "172.16.0.44:101",
384 "prefix":"2a02:b80:0:1::/64"
391 The IPv4 L3VPN Multicast table in an instance of the speaker's Loc-RIB can be verified via REST:
393 **URL:** ``/rests/data/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables=bgp-types:ipv4-address-family,bgp-types:mcast-mpls-labeled-vpn-subsequent-address-family/bgp-l3vpn-mcast:l3vpn-mcast-routes?content=nonconfig``
405 <l3vpn-mcast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:l3vpn:mcast">
408 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
409 <route-distinguisher>172.16.0.44:101</route-distinguisher>
410 <prefix>10.2.34.0/24</prefix>
415 <extended-communities>
416 <transitive>true</transitive>
417 <vrf-route-import-extended-community>
418 <inet4-specific-extended-community-common>
419 <global-administrator>10.0.0.1</global-administrator>
420 <local-administrator>123=</local-administrator>
421 </inet4-specific-extended-community-common>
422 </vrf-route-import-extended-community>
423 </extended-communities>
425 <global>127.16.0.44</global>
433 </l3vpn-mcast-routes>
442 "bgp:l3vpn:mcast:l3vpn-mcast-routes": {
443 "l3vpn-mcast-route": {
444 "route-key": "mAXdcQABrBAALABlKgILgAAAAAE=",
447 "extended-communities": {
449 "vrf-route-import-extended-community": {
450 "inet4-specific-extended-community-common": {
451 "global-administrator": "10.0.0.1",
452 "local-administrator": "123="
463 "global": "127.16.0.44"
466 "route-distinguisher": "172.16.0.44:101",
467 "prefix":"10.2.34.0/24"
474 The IPv4 L3VPN Multicast table in an instance of the speaker's Loc-RIB can be verified via REST:
476 **URL:** ``/rests/data/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables=bgp-types:ipv6-address-family,bgp-types:mcast-mpls-labeled-vpn-subsequent-address-family/bgp-l3vpn-mcast:l3vpn-mcast-routes?content=nonconfig``
488 <l3vpn-mcast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:l3vpn:mcast">
491 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
492 <route-distinguisher>172.16.0.44:101</route-distinguisher>
493 <prefix>2a02:b80:0:1::/64</prefix>
498 <extended-communities>
499 <transitive>true</transitive>
500 <vrf-route-import-extended-community>
501 <inet4-specific-extended-community-common>
502 <global-administrator>10.0.0.1</global-administrator>
503 <local-administrator>123=</local-administrator>
504 </inet4-specific-extended-community-common>
505 </vrf-route-import-extended-community>
506 </extended-communities>
508 <global>2a02:b80:0:2::1</global>
516 </l3vpn-mcast-routes>
525 "bgp:l3vpn:mcast:l3vpn-mcast-routes": {
526 "l3vpn-mcast-route": {
527 "route-key": "mAXdcQABrBAALABlKgILgAAAAAE=",
530 "extended-communities": {
532 "vrf-route-import-extended-community": {
533 "inet4-specific-extended-community-common": {
534 "global-administrator": "10.0.0.1",
535 "local-administrator": "123="
546 "global": "2a02:b80:0:2::1"
549 "route-distinguisher": "172.16.0.44:101",
550 "prefix":"2a02:b80:0:1::/64"
557 This examples show how to originate and remove IPv4 L3VPN Unicast route via programmable RIB.
558 Make sure the *Application Peer* is configured first.
560 **URL:** ``/rests/data/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``
568 **Content-Type:** ``application/xml``
574 <vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
576 <route-key>vpn1</route-key>
578 <label-value>123</label-value>
580 <route-distinguisher>429496729:1</route-distinguisher>
581 <prefix>2.2.2.2/32</prefix>
584 <global>199.20.166.41</global>
590 <extended-communities>
591 <route-target-extended-community>
592 <global-administrator>65000</global-administrator>
593 <local-administrator>AAAAZQ==</local-administrator>
594 </route-target-extended-community>
595 <transitive>true</transitive>
596 </extended-communities>
602 **Content-Type:** ``application/json``
618 "route-distinguisher": "429496729:1",
620 "extended-communities": [
623 "route-target-extended-community": {
624 "global-administrator": 65000,
625 "local-administrator": "AAAAZQ=="
630 "global": "199.20.166.41"
636 "prefix": "2.2.2.2/32"
643 To remove the route added above, following request can be used:
645 **URL:** ``/rests/data/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/0``
647 **Method:** ``DELETE``
651 * `BGP/MPLS IP Virtual Private Networks (VPNs) <https://tools.ietf.org/html/rfc4364>`_
652 * `BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN <https://tools.ietf.org/html/rfc4659>`_
653 * `BGP/MPLS VPN Virtual PE <https://tools.ietf.org/html/draft-ietf-bess-virtual-pe-00>`_