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``
24 **Content-Type:** ``application/xml``
30 <protocol xmlns="http://openconfig.net/yang/network-instance">
31 <name>bgp-example</name>
32 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
33 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
36 <router-id>192.0.2.2</router-id>
41 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
44 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
47 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-MULTICAST</afi-safi-name>
50 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-MULTICAST</afi-safi-name>
59 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 L3VPN family.
61 **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``
65 **Content-Type:** ``application/xml``
71 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
72 <neighbor-address>192.0.2.1</neighbor-address>
75 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
78 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-name>
85 Following trees illustrate the BGP IP L3VPN routes structures.
87 IPv4 L3VPN Unicast Route
88 ''''''''''''''''''''''''
89 .. code-block:: console
91 :(vpn-ipv4-routes-case)
93 +--ro vpn-route* [route-key path-id]
94 +--ro route-key string
97 | +--ro label-value? netc:mpls-label
98 +--ro prefix? inet:ip-prefix
99 +--ro path-id? path-id
100 +--ro route-distinguisher? bgp-t:route-distinguisher
104 IPv6 L3VPN Unicast Route
105 ''''''''''''''''''''''''
106 .. code-block:: console
108 :(vpn-ipv6-routes-case)
109 +--ro vpn-ipv6-routes
110 +--ro vpn-route* [route-key path-id]
111 +--ro route-key string
112 +--ro path-id path-id
114 | +--ro label-value? netc:mpls-label
115 +--ro prefix? inet:ip-prefix
116 +--ro path-id? path-id
117 +--ro route-distinguisher? bgp-t:route-distinguisher
121 IPv4 L3VPN Multicast Route
122 ''''''''''''''''''''''''''
123 .. code-block:: console
125 :(l3vpn-mcast-routes-ipv4-case)
126 +--ro l3vpn-mcast-routes-ipv4
127 +--ro l3vpn-mcast-route* [route-key path-id]
128 +--ro prefix? inet:ip-prefix
129 +--ro route-distinguisher? bgp-t:route-distinguisher
131 IPv6 L3VPN Multicast Route
132 ''''''''''''''''''''''''''
133 .. code-block:: console
135 :(l3vpn-mcast-routes-ipv6-case)
136 +--ro l3vpn-mcast-routes-ipv6
137 +--ro l3vpn-mcast-route* [route-key path-id]
138 +--ro prefix? inet:ip-prefix
139 +--ro route-distinguisher? bgp-t:route-distinguisher
146 The IPv4 L3VPN Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
148 **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``
156 <vpn-ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
159 <route-key>cAXdYQABrBAALABlCgIi</route-key>
161 <label-value>24022</label-value>
164 <extended-communities>
165 <transitive>true</transitive>
166 <route-target-extended-community>
167 <global-administrator>65000</global-administrator>
168 <local-administrator>AAAAZQ==</local-administrator>
169 </route-target-extended-community>
170 </extended-communities>
179 <global>127.16.0.44</global>
182 <route-distinguisher>172.16.0.44:101</route-distinguisher>
183 <prefix>10.2.34.0/24</prefix>
189 The IPv6 L3VPN Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
191 **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``
199 <vpn-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv6">
202 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
204 <label-value>24023</label-value>
210 <extended-communities>
211 <route-target-extended-community>
212 <global-administrator>65000</global-administrator>
213 <local-administrator>AAAAZQ==</local-administrator>
214 </route-target-extended-community>
215 <transitive>true</transitive>
216 </extended-communities>
218 <global>2a02:b80:0:2::1</global>
225 <route-distinguisher>172.16.0.44:101</route-distinguisher>
226 <prefix>2a02:b80:0:1::/64</prefix>
232 The IPv4 L3VPN Multicast table in an instance of the speaker's Loc-RIB can be verified via REST:
234 **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``
242 <l3vpn-mcast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:l3vpn:mcast">
245 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
246 <route-distinguisher>172.16.0.44:101</route-distinguisher>
247 <prefix>10.2.34.0/24</prefix>
252 <extended-communities>
253 <transitive>true</transitive>
254 <vrf-route-import-extended-community>
255 <inet4-specific-extended-community-common>
256 <global-administrator>10.0.0.1</global-administrator>
257 <local-administrator>123=</local-administrator>
258 </inet4-specific-extended-community-common>
259 </vrf-route-import-extended-community>
260 </extended-communities>
262 <global>127.16.0.44</global>
270 </l3vpn-mcast-routes>
274 The IPv4 L3VPN Multicast table in an instance of the speaker's Loc-RIB can be verified via REST:
276 **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``
284 <l3vpn-mcast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:l3vpn:mcast">
287 <route-key>mAXdcQABrBAALABlKgILgAAAAAE=</route-key>
288 <route-distinguisher>172.16.0.44:101</route-distinguisher>
289 <prefix>2a02:b80:0:1::/64</prefix>
294 <extended-communities>
295 <transitive>true</transitive>
296 <vrf-route-import-extended-community>
297 <inet4-specific-extended-community-common>
298 <global-administrator>10.0.0.1</global-administrator>
299 <local-administrator>123=</local-administrator>
300 </inet4-specific-extended-community-common>
301 </vrf-route-import-extended-community>
302 </extended-communities>
304 <global>2a02:b80:0:2::1</global>
312 </l3vpn-mcast-routes>
316 This examples show how to originate and remove IPv4 L3VPN Unicast route via programmable RIB.
317 Make sure the *Application Peer* is configured first.
319 **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``
323 **Content-Type:** ``application/xml``
329 <vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
331 <route-key>vpn1</route-key>
333 <label-value>123</label-value>
335 <route-distinguisher>429496729:1</route-distinguisher>
336 <prefix>2.2.2.2/32</prefix>
339 <global>199.20.166.41</global>
345 <extended-communities>
346 <route-target-extended-community>
347 <global-administrator>65000</global-administrator>
348 <local-administrator>AAAAZQ==</local-administrator>
349 </route-target-extended-community>
350 <transitive>true</transitive>
351 </extended-communities>
357 To remove the route added above, following request can be used:
359 **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``
361 **Method:** ``DELETE``
365 * `BGP/MPLS IP Virtual Private Networks (VPNs) <https://tools.ietf.org/html/rfc4364>`_
366 * `BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN <https://tools.ietf.org/html/rfc4659>`_
367 * `BGP/MPLS VPN Virtual PE <https://tools.ietf.org/html/draft-ietf-bess-virtual-pe-00>`_