1 .. _bgp-user-guide-evpn-family:
5 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.
6 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.
7 In addition to MPLS, IP tunnelling encapsulation techniques like VXLAN, NVGRE, MPLSoGRE and others can be used for packet transportation.
8 Also, Provider Backbone Bridging (PBB) can be combined with EVPN in order to reduce a number of MAC Advertisement routes.
10 .. contents:: Contents
16 This section shows a way to enable EVPN family in BGP speaker and peer configuration.
20 To enable EVPN 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:L2VPN-EVPN</afi-safi-name>
52 Here is an example for BGP peer configuration with enabled EVPN family.
54 **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``
58 **Content-Type:** ``application/xml``
64 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
65 <neighbor-address>192.0.2.1</neighbor-address>
68 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
75 Following tree illustrate the BGP EVPN route structure.
77 .. code-block:: console
81 +--ro evpn-route* [route-key path-id]
82 +--ro route-key string
85 | +--:(ethernet-a-d-route-case)
86 | | +--ro ethernet-a-d-route
88 | | | +--:(arbitrary-case)
89 | | | | +--ro arbitrary
90 | | | | +--ro arbitrary binary
91 | | | +--:(lacp-auto-generated-case)
92 | | | | +--ro lacp-auto-generated
93 | | | | +--ro ce-lacp-mac-address yang:mac-address
94 | | | | +--ro ce-lacp-port-key uint16
95 | | | +--:(lan-auto-generated-case)
96 | | | | +--ro lan-auto-generated
97 | | | | +--ro root-bridge-mac-address yang:mac-address
98 | | | | +--ro root-bridge-priority uint16
99 | | | +--:(mac-auto-generated-case)
100 | | | | +--ro mac-auto-generated
101 | | | | +--ro system-mac-address yang:mac-address
102 | | | | +--ro local-discriminator uint24
103 | | | +--:(router-id-generated-case)
104 | | | | +--ro router-id-generated
105 | | | | +--ro router-id inet:ipv4-address
106 | | | | +--ro local-discriminator uint32
107 | | | +--:(as-generated-case)
108 | | | +--ro as-generated
109 | | | +--ro as inet:as-number
110 | | | +--ro local-discriminator uint32
111 | | +--ro ethernet-tag-id
112 | | | +--ro vlan-id uint32
113 | | +--ro mpls-label netc:mpls-label
114 | +--:(mac-ip-adv-route-case)
115 | | +--ro mac-ip-adv-route
117 | | | +--:(arbitrary-case)
118 | | | | +--ro arbitrary
119 | | | | +--ro arbitrary binary
120 | | | +--:(lacp-auto-generated-case)
121 | | | | +--ro lacp-auto-generated
122 | | | | +--ro ce-lacp-mac-address yang:mac-address
123 | | | | +--ro ce-lacp-port-key uint16
124 | | | +--:(lan-auto-generated-case)
125 | | | | +--ro lan-auto-generated
126 | | | | +--ro root-bridge-mac-address yang:mac-address
127 | | | | +--ro root-bridge-priority uint16
128 | | | +--:(mac-auto-generated-case)
129 | | | | +--ro mac-auto-generated
130 | | | | +--ro system-mac-address yang:mac-address
131 | | | | +--ro local-discriminator uint24
132 | | | +--:(router-id-generated-case)
133 | | | | +--ro router-id-generated
134 | | | | +--ro router-id inet:ipv4-address
135 | | | | +--ro local-discriminator uint32
136 | | | +--:(as-generated-case)
137 | | | +--ro as-generated
138 | | | +--ro as inet:as-number
139 | | | +--ro local-discriminator uint32
140 | | +--ro ethernet-tag-id
141 | | | +--ro vlan-id uint32
142 | | +--ro mac-address yang:mac-address
143 | | +--ro ip-address? inet:ip-address
144 | | +--ro mpls-label1 netc:mpls-label
145 | | +--ro mpls-label2? netc:mpls-label
146 | +--:(inc-multi-ethernet-tag-res-case)
147 | | +--ro inc-multi-ethernet-tag-res
148 | | +--ro ethernet-tag-id
149 | | | +--ro vlan-id uint32
150 | | +--ro orig-route-ip? inet:ip-address
151 | +--:(es-route-case)
154 | | +--:(arbitrary-case)
155 | | | +--ro arbitrary
156 | | | +--ro arbitrary binary
157 | | +--:(lacp-auto-generated-case)
158 | | | +--ro lacp-auto-generated
159 | | | +--ro ce-lacp-mac-address yang:mac-address
160 | | | +--ro ce-lacp-port-key uint16
161 | | +--:(lan-auto-generated-case)
162 | | | +--ro lan-auto-generated
163 | | | +--ro root-bridge-mac-address yang:mac-address
164 | | | +--ro root-bridge-priority uint16
165 | | +--:(mac-auto-generated-case)
166 | | | +--ro mac-auto-generated
167 | | | +--ro system-mac-address yang:mac-address
168 | | | +--ro local-discriminator uint24
169 | | +--:(router-id-generated-case)
170 | | | +--ro router-id-generated
171 | | | +--ro router-id inet:ipv4-address
172 | | | +--ro local-discriminator uint32
173 | | +--:(as-generated-case)
174 | | +--ro as-generated
175 | | +--ro as inet:as-number
176 | | +--ro local-discriminator uint32
177 | +--ro orig-route-ip inet:ip-address
178 +--ro route-distinguisher bgp-t:route-distinguisher
180 +--ro extended-communities*
181 | +--ro transitive? boolean
182 | +--ro (extended-community)?
183 | +--:(encapsulation-case)
184 | | +--ro encapsulation-extended-community
185 | | +--ro tunnel-type encapsulation-tunnel-type
186 | +--:(esi-label-extended-community-case)
187 | | +--ro esi-label-extended-community
188 | | +--ro single-active-mode? boolean
189 | | +--ro esi-label netc:mpls-label
190 | +--:(es-import-route-extended-community-case)
191 | | +--ro es-import-route-extended-community
192 | | +--ro es-import yang:mac-address
193 | +--:(mac-mobility-extended-community-case)
194 | | +--ro mac-mobility-extended-community
195 | | +--ro static? boolean
196 | | +--ro seq-number uint32
197 | +--:(default-gateway-extended-community-case)
198 | | +--ro default-gateway-extended-community!
199 | +--:(layer-2-attributes-extended-community-case)
200 | +--ro layer-2-attributes-extended-community
201 | +--ro primary-pe? boolean
202 | +--ro backup-pe? boolean
203 | +--ro control-word? boolean
204 | +--ro l2-mtu uint16
206 +--ro leaf-information-required boolean
207 +--ro mpls-label? netc:mpls-label
208 +--ro (tunnel-identifier)?
209 +--:(rsvp-te-p2mp-lsp)
210 | +--ro rsvp-te-p2mp-lps
211 | +--ro p2mp-id uint32
212 | +--ro tunnel-id uint16
213 | +--ro extended-tunnel-id inet:ip-address
215 | +--ro mldp-p2mp-lsp
216 | +--ro address-family identityref
217 | +--ro root-node-address inet:ip-address
218 | +--ro opaque-value*
219 | +--ro opaque-type uint8
220 | +--ro opaque-extended-type? uint16
221 | +--ro opaque yang:hex-string
224 | +--ro p-address inet:ip-address
225 | +--ro p-multicast-group inet:ip-address
228 | +--ro p-address inet:ip-address
229 | +--ro p-multicast-group inet:ip-address
231 | +--ro bidir-pim-tree
232 | +--ro p-address inet:ip-address
233 | +--ro p-multicast-group inet:ip-address
234 +--:(ingress-replication)
235 | +--ro ingress-replication
236 | +--ro receiving-endpoint-address? inet:ip-address
239 +--ro opaque-type uint8
240 +--ro opaque-extended-type? uint16
246 The L2VPN EVPN table in an instance of the speaker's Loc-RIB can be verified via REST:
248 **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``
256 <evpn-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
258 <route-key>AxEAAcCoZAED6AAAAQAgwKhkAQ==</route-key>
260 <route-distinguisher>192.168.100.1:1000</route-distinguisher>
261 <inc-multi-ethernet-tag-res>
263 <vlan-id>256</vlan-id>
265 <orig-route-ip>192.168.100.1</orig-route-ip>
266 </inc-multi-ethernet-tag-res>
269 <global>172.23.29.104</global>
275 <extended-communities>
276 <extended-communities>
277 <transitive>true</transitive>
278 <route-target-extended-community>
279 <global-administrator>65504</global-administrator>
280 <local-administrator>AAAD6A==</local-administrator>
281 </route-target-extended-community>
282 </extended-communities>
283 </extended-communities>
285 <leaf-information-required>true</leaf-information-required>
286 <mpls-label>20024</mpls-label>
287 <ingress-replication>
288 <receiving-endpoint-address>192.168.100.1</receiving-endpoint-address>
289 </ingress-replication>
297 This examples show how to originate and remove EVPN routes via programmable RIB.
298 There are four different types of EVPN routes, and several extended communities.
299 Routes can be used for variety of use-cases supported by BGP/MPLS EVPN, PBB EVPN and NVO EVPN.
300 Make sure the *Application Peer* is configured first.
302 **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``
306 **Content-Type:** ``application/xml``
312 :emphasize-lines: 4,5,15
314 <evpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
315 <route-key>evpn</route-key>
317 <route-distinguisher>172.12.123.3:200</route-distinguisher>
321 <global>199.20.166.41</global>
327 <extended-communities>
329 </extended-communities>
333 @line 4: Route Distinguisher (RD) - set to RD of the MAC-VRF advertising the NLRI, recommended format *<IP>:<VLAN_ID>*
335 @line 5: One of the EVPN route must be set here.
337 @line 15: In some cases, specific extended community presence is required. The route may carry one or more Route Target attributes.
344 * **Ethernet AD per ESI**
348 <mpls-label>0</mpls-label>
350 <vlan-id>4294967295</vlan-id>
353 <arbitrary>AAAAAAAAAAAA</arbitrary>
355 </ethernet-a-d-route>
357 * **Ethernet AD per EVI**
361 <mpls-label>24001</mpls-label>
363 <vlan-id>2200</vlan-id>
366 <arbitrary>AAAAAAAAAAAA</arbitrary>
368 </ethernet-a-d-route>
370 * **MAC/IP Advertisement**
375 <arbitrary>AAAAAAAAAAAA</arbitrary>
378 <vlan-id>2100</vlan-id>
380 <mac-address>f2:0c:dd:80:9f:f7</mac-address>
381 <ip-address>10.0.1.12</ip-address>
382 <mpls-label1>299776</mpls-label1>
386 * **Inclusive Multicast Ethernet Tag**
389 <inc-multi-ethernet-tag-res>
391 <vlan-id>2100</vlan-id>
393 <orig-route-ip>43.43.43.43</orig-route-ip>
394 </inc-multi-ethernet-tag-res>
396 * **Ethernet Segment**
400 <orig-route-ip>43.43.43.43</orig-route-ip>
402 <arbitrary>AAAAAAAAAAAA</arbitrary>
406 **EVPN Ethernet Segment Identifier (ESI):**
409 Indicates an arbitrary 9-octet ESI.
414 <arbitrary>AAAAAAAAAAAA</arbitrary>
418 IEEE 802.1AX LACP is used.
422 <lacp-auto-generated>
423 <ce-lacp-mac-address>f2:0c:dd:80:9f:f7</ce-lacp-mac-address>
424 <ce-lacp-port-key>22</ce-lacp-port-key>
425 </lacp-auto-generated>
428 Indirectly connected hosts via a bridged LAN.
433 <root-bridge-mac-address>f2:0c:dd:80:9f:f7</root-bridge-mac-address>
434 <root-bridge-priority>20</root-bridge-priority>
435 </lan-auto-generated>
443 <system-mac-address>f2:0c:dd:80:9f:f7</system-mac-address>
444 <local-discriminator>2000</local-discriminator>
445 </mac-auto-generated>
452 <router-id-generated>
453 <router-id>43.43.43.43</router-id>
454 <local-discriminator>2000</local-discriminator>
455 </router-id-generated>
464 <local-discriminator>2000</local-discriminator>
469 .. include:: bgp-user-guide-pmsi-attribute.rst
471 **Extended Communities:**
473 * **ESI Label Extended Community**
476 <extended-communities>
477 <transitive>true</transitive>
478 <esi-label-extended-community>
479 <single-active-mode>false</single-active-mode>
480 <esi-label>24001</esi-label>
481 </esi-label-extended-community>
482 </extended-communities>
484 * **ES-Import Route Target**
487 <extended-communities>
488 <transitive>true</transitive>
489 <es-import-route-extended-community>
490 <es-import>f2:0c:dd:80:9f:f7</es-import>
491 </es-import-route-extended-community>
492 </extended-communities>
494 * **MAC Mobility Extended Community**
497 <extended-communities>
498 <transitive>true</transitive>
499 <mac-mobility-extended-community>
500 <static>true</static>
501 <seq-number>200</seq-number>
502 </mac-mobility-extended-community>
503 </extended-communities>
505 * **Default Gateway Extended Community**
508 <extended-communities>
509 <transitive>true</transitive>
510 <default-gateway-extended-community>
511 </default-gateway-extended-community>
512 </extended-communities>
514 * **EVPN Layer 2 attributes extended community**
517 <extended-communities>
518 <transitive>false</transitive>
519 <layer-2-attributes-extended-community>
520 <primary-pe>true</primary-pe>
521 <backup-pe>true</backup-pe>
522 <control-word >true</control-word>
524 </layer-2-attributes-extended-community>
525 </extended-communities>
527 * **BGP Encapsulation extended community**
532 <extended-communities>
533 <transitive>false</transitive>
534 <encapsulation-extended-community>
535 <tunnel-type>vxlan</tunnel-type>
536 </encapsulation-extended-community>
537 </extended-communities>
539 @line 4: `full list of tunnel types <http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#tunnel-types>`_
543 To remove the route added above, following request can be used:
545 **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/0``
547 **Method:** ``DELETE``
551 .. table:: EVPN Routes Usage.
553 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
554 | EVN Route Type | Extended Communities | Usage |
555 +======================================+=====================================================+===========================================+
556 | **Ethernet Auto-discovery** | ESI Label, BGP EncapsulationEVPN Layer 2 attributes | Fast Convergence, Split Horizon, Aliasing |
557 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
558 | **MAC/IP Advertisement** | BGP Encapsulation, MAC Mobility, Default Gateway | MAC address reachability |
559 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
560 | **Inclusive Multicast Ethernet Tag** | PMSI Tunnel, BGP Encapsulation | Handling of Multi-destination traffic |
561 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
562 | **Ethernet Segment** | BGP Encapsulation, ES-Import Route Target | Designated Forwarder Election |
563 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
567 * `BGP MPLS-Based Ethernet VPN <https://tools.ietf.org/html/rfc7432>`_
568 * `Provider Backbone Bridging Combined with Ethernet VPN <https://tools.ietf.org/html/rfc7623>`_
569 * `VPWS support in EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-vpws-07>`_
570 * `A Network Virtualization Overlay Solution using EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-04>`_
571 * `Interconnect Solution for EVPN Overlay networks <https://tools.ietf.org/html/draft-ietf-bess-dci-evpn-overlay-04>`_
572 * `Usage and applicability of BGP MPLS based Ethernet VPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-usage-03>`_