1 .. _bgp-user-guide-labeled-family:
3 IP Labeled Unicast Family
4 =========================
5 The BGP Labeled Unicast (BGP-LU) Multiprotocol extension is used to distribute a MPLS label that is mapped to a particular route.
6 It can be used to advertise a MPLS transport path between IGP regions and Autonomous Systems.
7 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.
8 In addition, IPv6 Labeled Unicast can be used to interconnect IPv6 islands over IPv4/MPLS networks using 6PE.
10 .. contents:: Contents
16 This section shows a way to enable IPv4 and IPv6 Labeled Unicast family in BGP speaker and peer configuration.
20 To enable IPv4 and IPv6 Labeled Unicast support in BGP plugin, first configure BGP speaker instance:
22 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
26 **Content-Type:** ``application/xml``
32 <protocol xmlns="http://openconfig.net/yang/network-instance">
33 <name>bgp-example</name>
34 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
35 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
38 <router-id>192.0.2.2</router-id>
43 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
46 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
55 Here is an example for BGP peer configuration with enabled IPv4 and IPv6 Labeled Unicast family.
57 **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``
61 **Content-Type:** ``application/xml``
67 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
68 <neighbor-address>192.0.2.1</neighbor-address>
71 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
74 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>
79 IP Labeled Unicast API
80 ^^^^^^^^^^^^^^^^^^^^^^
81 Following trees illustrate the BGP IP Labeled Unicast routes structures.
83 IPv4 Labeled Unicast Route
84 ''''''''''''''''''''''''''
85 .. code-block:: console
87 :(labeled-unicast-routes-case)
88 +--ro labeled-unicast-routes
89 +--ro labeled-unicast-route* [route-key path-id]
90 +--ro route-key string
92 | +--ro label-value? netc:mpls-label
93 +--ro prefix? inet:ip-prefix
99 IPv6 Labeled Unicast Route
100 ''''''''''''''''''''''''''
101 .. code-block:: console
103 :(labeled-unicast-ipv6-routes-case)
104 +--ro labeled-unicast-ipv6-routes
105 +--ro labeled-unicast-route* [route-key path-id]
106 +--ro route-key string
108 | +--ro label-value? netc:mpls-label
109 +--ro prefix? inet:ip-prefix
110 +--ro path-id path-id
116 The IPv4 Labeled Unicast table in an instance of the speaker's Loc-RIB can be verified via REST:
118 **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``
126 <labeled-unicast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
127 <labeled-unicast-route>
129 <route-key>MAA+gRQAAA==</route-key>
135 <global>200.10.0.101</global>
143 <label-value>1000</label-value>
145 <prefix>20.0.0.0/24</prefix>
146 </labeled-unicast-route>
147 </labeled-unicast-routes>
153 This examples show how to originate and remove IPv4 labeled route via programmable RIB.
154 Make sure the *Application Peer* is configured first.
156 **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``
160 **Content-Type:** ``application/xml``
166 <labeled-unicast-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
167 <route-key>label1</route-key>
168 <prefix>1.1.1.1/32</prefix>
171 <label-value>800322</label-value>
175 <global>199.20.160.41</global>
185 </labeled-unicast-route>
189 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.
194 <bgp-prefix-sid-tlvs>
195 <label-index-tlv xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">322</label-index-tlv>
196 </bgp-prefix-sid-tlvs>
197 <bgp-prefix-sid-tlvs>
198 <srgb-value xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
202 </bgp-prefix-sid-tlvs>
207 To remove the route added above, following request can be used:
209 **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``
211 **Method:** ``DELETE``
215 This examples show how to originate and remove IPv6 labeled route via programmable RIB.
217 **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``
221 **Content-Type:** ``application/xml``
227 <labeled-unicast-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
228 <route-key>label1</route-key>
229 <prefix>2001:db8:30::3/128</prefix>
232 <label-value>123</label-value>
236 <global>2003:4:5:6::7</global>
246 </labeled-unicast-route>
250 To remove the route added above, following request can be used:
252 **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``
254 **Method:** ``DELETE``
258 * `Carrying Label Information in BGP-4 <https://tools.ietf.org/html/rfc3107>`_
259 * `Segment Routing Prefix SID extensions for BGP <https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-03>`_
260 * `Connecting IPv6 Islands over IPv4 MPLS Using IPv6 Provider Edge Routers (6PE) <https://tools.ietf.org/html/rfc4798>`_
261 * `BGP-Prefix Segment in large-scale data centers <https://tools.ietf.org/html/draft-ietf-spring-segment-routing-msdc-01>`_
262 * `Egress Peer Engineering using BGP-LU <https://tools.ietf.org/html/draft-gredler-idr-bgplu-epe-06>`_