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:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
22 **RFC8040 URL:** ``/rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols``
30 **Content-Type:** ``application/xml``
36 <protocol xmlns="http://openconfig.net/yang/network-instance">
37 <name>bgp-example</name>
38 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
39 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
42 <router-id>192.0.2.2</router-id>
47 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
50 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
53 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-MULTICAST</afi-safi-name>
56 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-MULTICAST</afi-safi-name>
65 **Content-Type:** ``application/json``
74 "identifier": "openconfig-policy-types:BGP",
75 "name": "bgp-example",
76 "bgp-openconfig-extensions:bgp": {
79 "router-id": "192.0.2.2",
85 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV4-UNICAST"
88 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV6-UNICAST"
91 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV4-MULTICAST"
94 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV6-MULTICAST"
106 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 L3VPN family.
108 **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``
116 **Content-Type:** ``application/xml``
122 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
123 <neighbor-address>192.0.2.1</neighbor-address>
126 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
129 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
136 **Content-Type:** ``application/json``
145 "neighbor-address": "192.0.2.1",
149 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV4-UNICAST"
152 "afi-safi-name": "openconfig-bgp-types:L3VPN-IPV6-UNICAST"
162 Following trees illustrate the BGP IP L3VPN routes structures.
164 IPv4 L3VPN Unicast Route
165 ''''''''''''''''''''''''
166 .. code-block:: console
168 :(vpn-ipv4-routes-case)
169 +--ro vpn-ipv4-routes
170 +--ro vpn-route* [route-key path-id]
171 +--ro route-key string
172 +--ro path-id path-id
174 | +--ro label-value? netc:mpls-label
175 +--ro prefix? inet:ip-prefix
176 +--ro path-id? path-id
177 +--ro route-distinguisher? bgp-t:route-distinguisher
181 IPv6 L3VPN Unicast Route
182 ''''''''''''''''''''''''
183 .. code-block:: console
185 :(vpn-ipv6-routes-case)
186 +--ro vpn-ipv6-routes
187 +--ro vpn-route* [route-key path-id]
188 +--ro route-key string
189 +--ro path-id path-id
191 | +--ro label-value? netc:mpls-label
192 +--ro prefix? inet:ip-prefix
193 +--ro path-id? path-id
194 +--ro route-distinguisher? bgp-t:route-distinguisher
198 IPv4 L3VPN Multicast Route
199 ''''''''''''''''''''''''''
200 .. code-block:: console
202 :(l3vpn-mcast-routes-ipv4-case)
203 +--ro l3vpn-mcast-routes-ipv4
204 +--ro l3vpn-mcast-route* [route-key path-id]
205 +--ro prefix? inet:ip-prefix
206 +--ro route-distinguisher? bgp-t:route-distinguisher
208 IPv6 L3VPN Multicast Route
209 ''''''''''''''''''''''''''
210 .. code-block:: console
212 :(l3vpn-mcast-routes-ipv6-case)
213 +--ro l3vpn-mcast-routes-ipv6
214 +--ro l3vpn-mcast-route* [route-key path-id]
215 +--ro prefix? inet:ip-prefix
216 +--ro route-distinguisher? bgp-t:route-distinguisher
223 The IPv4 L3VPN Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
225 **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``
237 <vpn-ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
240 <route-key>cAXdYQABrBAALABlCgIi</route-key>
242 <label-value>24022</label-value>
245 <extended-communities>
246 <transitive>true</transitive>
247 <route-target-extended-community>
248 <global-administrator>65000</global-administrator>
249 <local-administrator>AAAAZQ==</local-administrator>
250 </route-target-extended-community>
251 </extended-communities>
260 <global>127.16.0.44</global>
263 <route-distinguisher>172.16.0.44:101</route-distinguisher>
264 <prefix>10.2.34.0/24</prefix>
275 "bgp-vpn-ipv4:vpn-ipv4-routes": {
277 "route-key": "cAXdYQABrBAALABlCgIi",
283 "extended-communities": {
285 "route-target-extended-community": {
286 "global-administrator": "65000",
287 "local-administrator": "AAAAZQ=="
297 "global": "127.16.0.44"
300 "route-distinguisher": "172.16.0.44:101",
301 "prefix":"10.2.34.0/24"
308 The IPv6 L3VPN Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
310 **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``
322 <vpn-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv6">
325 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
327 <label-value>24023</label-value>
333 <extended-communities>
334 <route-target-extended-community>
335 <global-administrator>65000</global-administrator>
336 <local-administrator>AAAAZQ==</local-administrator>
337 </route-target-extended-community>
338 <transitive>true</transitive>
339 </extended-communities>
341 <global>2a02:b80:0:2::1</global>
348 <route-distinguisher>172.16.0.44:101</route-distinguisher>
349 <prefix>2a02:b80:0:1::/64</prefix>
360 "bgp-vpn-ipv6:vpn-ipv6-routes": {
362 "route-key": "mAXdcQABrBAALABlKgILgAAAAAE=",
368 "extended-communities": {
370 "route-target-extended-community": {
371 "global-administrator": "65000",
372 "local-administrator": "AAAAZQ=="
382 "global": "2a02:b80:0:2::1"
385 "route-distinguisher": "172.16.0.44:101",
386 "prefix":"2a02:b80:0:1::/64"
393 The IPv4 L3VPN Multicast table in an instance of the speaker's Loc-RIB can be verified via REST:
395 **URL:** ``/restconf/operational/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``
407 <l3vpn-mcast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:l3vpn:mcast">
410 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
411 <route-distinguisher>172.16.0.44:101</route-distinguisher>
412 <prefix>10.2.34.0/24</prefix>
417 <extended-communities>
418 <transitive>true</transitive>
419 <vrf-route-import-extended-community>
420 <inet4-specific-extended-community-common>
421 <global-administrator>10.0.0.1</global-administrator>
422 <local-administrator>123=</local-administrator>
423 </inet4-specific-extended-community-common>
424 </vrf-route-import-extended-community>
425 </extended-communities>
427 <global>127.16.0.44</global>
435 </l3vpn-mcast-routes>
444 "bgp:l3vpn:mcast:l3vpn-mcast-routes": {
445 "l3vpn-mcast-route": {
446 "route-key": "mAXdcQABrBAALABlKgILgAAAAAE=",
449 "extended-communities": {
451 "vrf-route-import-extended-community": {
452 "inet4-specific-extended-community-common": {
453 "global-administrator": "10.0.0.1",
454 "local-administrator": "123="
465 "global": "127.16.0.44"
468 "route-distinguisher": "172.16.0.44:101",
469 "prefix":"10.2.34.0/24"
476 The IPv4 L3VPN Multicast table in an instance of the speaker's Loc-RIB can be verified via REST:
478 **URL:** ``/restconf/operational/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``
490 <l3vpn-mcast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:l3vpn:mcast">
493 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
494 <route-distinguisher>172.16.0.44:101</route-distinguisher>
495 <prefix>2a02:b80:0:1::/64</prefix>
500 <extended-communities>
501 <transitive>true</transitive>
502 <vrf-route-import-extended-community>
503 <inet4-specific-extended-community-common>
504 <global-administrator>10.0.0.1</global-administrator>
505 <local-administrator>123=</local-administrator>
506 </inet4-specific-extended-community-common>
507 </vrf-route-import-extended-community>
508 </extended-communities>
510 <global>2a02:b80:0:2::1</global>
518 </l3vpn-mcast-routes>
527 "bgp:l3vpn:mcast:l3vpn-mcast-routes": {
528 "l3vpn-mcast-route": {
529 "route-key": "mAXdcQABrBAALABlKgILgAAAAAE=",
532 "extended-communities": {
534 "vrf-route-import-extended-community": {
535 "inet4-specific-extended-community-common": {
536 "global-administrator": "10.0.0.1",
537 "local-administrator": "123="
548 "global": "2a02:b80:0:2::1"
551 "route-distinguisher": "172.16.0.44:101",
552 "prefix":"2a02:b80:0:1::/64"
559 This examples show how to originate and remove IPv4 L3VPN Unicast route via programmable RIB.
560 Make sure the *Application Peer* is configured first.
562 **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``
570 **Content-Type:** ``application/xml``
576 <vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
578 <route-key>vpn1</route-key>
580 <label-value>123</label-value>
582 <route-distinguisher>429496729:1</route-distinguisher>
583 <prefix>2.2.2.2/32</prefix>
586 <global>199.20.166.41</global>
592 <extended-communities>
593 <route-target-extended-community>
594 <global-administrator>65000</global-administrator>
595 <local-administrator>AAAAZQ==</local-administrator>
596 </route-target-extended-community>
597 <transitive>true</transitive>
598 </extended-communities>
604 **Content-Type:** ``application/json``
620 "route-distinguisher": "429496729:1",
622 "extended-communities": [
625 "route-target-extended-community": {
626 "global-administrator": 65000,
627 "local-administrator": "AAAAZQ=="
632 "global": "199.20.166.41"
638 "prefix": "2.2.2.2/32"
645 To remove the route added above, following request can be used:
647 **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/0``
649 **Method:** ``DELETE``
653 * `BGP/MPLS IP Virtual Private Networks (VPNs) <https://tools.ietf.org/html/rfc4364>`_
654 * `BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN <https://tools.ietf.org/html/rfc4659>`_
655 * `BGP/MPLS VPN Virtual PE <https://tools.ietf.org/html/draft-ietf-bess-virtual-pe-00>`_