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``
24 **RFC8040 URL:** ``/rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols``
32 **Content-Type:** ``application/xml``
38 <protocol xmlns="http://openconfig.net/yang/network-instance">
39 <name>bgp-example</name>
40 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
41 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
44 <router-id>192.0.2.2</router-id>
49 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
58 **Content-Type:** ``application/json``
67 "identifier": "openconfig-policy-types:BGP",
68 "name": "bgp-example",
69 "bgp-openconfig-extensions:bgp": {
72 "router-id": "192.0.2.2",
78 "afi-safi-name": "openconfig-bgp-types:L2VPN-EVPN"
90 Here is an example for BGP peer configuration with enabled EVPN family.
92 **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``
100 **Content-Type:** ``application/xml``
106 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
107 <neighbor-address>192.0.2.1</neighbor-address>
110 <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
117 **Content-Type:** ``application/json``
126 "neighbor-address": "192.0.2.1",
130 "afi-safi-name": "openconfig-bgp-types:L2VPN-EVPN"
140 Following tree illustrate the BGP EVPN route structure.
142 .. code-block:: console
146 +--ro evpn-route* [route-key path-id]
147 +--ro route-key string
148 +--ro path-id path-id
150 | +--:(ethernet-a-d-route-case)
151 | | +--ro ethernet-a-d-route
153 | | | +--:(arbitrary-case)
154 | | | | +--ro arbitrary
155 | | | | +--ro arbitrary binary
156 | | | +--:(lacp-auto-generated-case)
157 | | | | +--ro lacp-auto-generated
158 | | | | +--ro ce-lacp-mac-address yang:mac-address
159 | | | | +--ro ce-lacp-port-key uint16
160 | | | +--:(lan-auto-generated-case)
161 | | | | +--ro lan-auto-generated
162 | | | | +--ro root-bridge-mac-address yang:mac-address
163 | | | | +--ro root-bridge-priority uint16
164 | | | +--:(mac-auto-generated-case)
165 | | | | +--ro mac-auto-generated
166 | | | | +--ro system-mac-address yang:mac-address
167 | | | | +--ro local-discriminator uint24
168 | | | +--:(router-id-generated-case)
169 | | | | +--ro router-id-generated
170 | | | | +--ro router-id inet:ipv4-address
171 | | | | +--ro local-discriminator uint32
172 | | | +--:(as-generated-case)
173 | | | +--ro as-generated
174 | | | +--ro as inet:as-number
175 | | | +--ro local-discriminator uint32
176 | | +--ro ethernet-tag-id
177 | | | +--ro vlan-id uint32
178 | | +--ro mpls-label netc:mpls-label
179 | +--:(mac-ip-adv-route-case)
180 | | +--ro mac-ip-adv-route
182 | | | +--:(arbitrary-case)
183 | | | | +--ro arbitrary
184 | | | | +--ro arbitrary binary
185 | | | +--:(lacp-auto-generated-case)
186 | | | | +--ro lacp-auto-generated
187 | | | | +--ro ce-lacp-mac-address yang:mac-address
188 | | | | +--ro ce-lacp-port-key uint16
189 | | | +--:(lan-auto-generated-case)
190 | | | | +--ro lan-auto-generated
191 | | | | +--ro root-bridge-mac-address yang:mac-address
192 | | | | +--ro root-bridge-priority uint16
193 | | | +--:(mac-auto-generated-case)
194 | | | | +--ro mac-auto-generated
195 | | | | +--ro system-mac-address yang:mac-address
196 | | | | +--ro local-discriminator uint24
197 | | | +--:(router-id-generated-case)
198 | | | | +--ro router-id-generated
199 | | | | +--ro router-id inet:ipv4-address
200 | | | | +--ro local-discriminator uint32
201 | | | +--:(as-generated-case)
202 | | | +--ro as-generated
203 | | | +--ro as inet:as-number
204 | | | +--ro local-discriminator uint32
205 | | +--ro ethernet-tag-id
206 | | | +--ro vlan-id uint32
207 | | +--ro mac-address yang:mac-address
208 | | +--ro ip-address? inet:ip-address
209 | | +--ro mpls-label1 netc:mpls-label
210 | | +--ro mpls-label2? netc:mpls-label
211 | +--:(inc-multi-ethernet-tag-res-case)
212 | | +--ro inc-multi-ethernet-tag-res
213 | | +--ro ethernet-tag-id
214 | | | +--ro vlan-id uint32
215 | | +--ro orig-route-ip? inet:ip-address
216 | +--:(es-route-case)
219 | | +--:(arbitrary-case)
220 | | | +--ro arbitrary
221 | | | +--ro arbitrary binary
222 | | +--:(lacp-auto-generated-case)
223 | | | +--ro lacp-auto-generated
224 | | | +--ro ce-lacp-mac-address yang:mac-address
225 | | | +--ro ce-lacp-port-key uint16
226 | | +--:(lan-auto-generated-case)
227 | | | +--ro lan-auto-generated
228 | | | +--ro root-bridge-mac-address yang:mac-address
229 | | | +--ro root-bridge-priority uint16
230 | | +--:(mac-auto-generated-case)
231 | | | +--ro mac-auto-generated
232 | | | +--ro system-mac-address yang:mac-address
233 | | | +--ro local-discriminator uint24
234 | | +--:(router-id-generated-case)
235 | | | +--ro router-id-generated
236 | | | +--ro router-id inet:ipv4-address
237 | | | +--ro local-discriminator uint32
238 | | +--:(as-generated-case)
239 | | +--ro as-generated
240 | | +--ro as inet:as-number
241 | | +--ro local-discriminator uint32
242 | +--ro orig-route-ip inet:ip-address
243 +--ro route-distinguisher bgp-t:route-distinguisher
245 +--ro extended-communities*
246 | +--ro transitive? boolean
247 | +--ro (extended-community)?
248 | +--:(encapsulation-case)
249 | | +--ro encapsulation-extended-community
250 | | +--ro tunnel-type encapsulation-tunnel-type
251 | +--:(esi-label-extended-community-case)
252 | | +--ro esi-label-extended-community
253 | | +--ro single-active-mode? boolean
254 | | +--ro esi-label netc:mpls-label
255 | +--:(es-import-route-extended-community-case)
256 | | +--ro es-import-route-extended-community
257 | | +--ro es-import yang:mac-address
258 | +--:(mac-mobility-extended-community-case)
259 | | +--ro mac-mobility-extended-community
260 | | +--ro static? boolean
261 | | +--ro seq-number uint32
262 | +--:(default-gateway-extended-community-case)
263 | | +--ro default-gateway-extended-community!
264 | +--:(layer-2-attributes-extended-community-case)
265 | +--ro layer-2-attributes-extended-community
266 | +--ro primary-pe? boolean
267 | +--ro backup-pe? boolean
268 | +--ro control-word? boolean
269 | +--ro l2-mtu uint16
271 +--ro leaf-information-required boolean
272 +--ro mpls-label? netc:mpls-label
273 +--ro (tunnel-identifier)?
274 +--:(rsvp-te-p2mp-lsp)
275 | +--ro rsvp-te-p2mp-lps
276 | +--ro p2mp-id uint32
277 | +--ro tunnel-id uint16
278 | +--ro extended-tunnel-id inet:ip-address
280 | +--ro mldp-p2mp-lsp
281 | +--ro address-family identityref
282 | +--ro root-node-address inet:ip-address
283 | +--ro opaque-value*
284 | +--ro opaque-type uint8
285 | +--ro opaque-extended-type? uint16
286 | +--ro opaque yang:hex-string
289 | +--ro p-address inet:ip-address
290 | +--ro p-multicast-group inet:ip-address
293 | +--ro p-address inet:ip-address
294 | +--ro p-multicast-group inet:ip-address
296 | +--ro bidir-pim-tree
297 | +--ro p-address inet:ip-address
298 | +--ro p-multicast-group inet:ip-address
299 +--:(ingress-replication)
300 | +--ro ingress-replication
301 | +--ro receiving-endpoint-address? inet:ip-address
304 +--ro opaque-type uint8
305 +--ro opaque-extended-type? uint16
311 The L2VPN EVPN table in an instance of the speaker's Loc-RIB can be verified via REST:
313 **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``
325 <evpn-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
327 <route-key>AxEAAcCoZAED6AAAAQAgwKhkAQ==</route-key>
329 <route-distinguisher>192.168.100.1:1000</route-distinguisher>
330 <inc-multi-ethernet-tag-res>
332 <vlan-id>256</vlan-id>
334 <orig-route-ip>192.168.100.1</orig-route-ip>
335 </inc-multi-ethernet-tag-res>
338 <global>172.23.29.104</global>
344 <extended-communities>
345 <extended-communities>
346 <transitive>true</transitive>
347 <route-target-extended-community>
348 <global-administrator>65504</global-administrator>
349 <local-administrator>AAAD6A==</local-administrator>
350 </route-target-extended-community>
351 </extended-communities>
352 </extended-communities>
354 <leaf-information-required>true</leaf-information-required>
355 <mpls-label>20024</mpls-label>
356 <ingress-replication>
357 <receiving-endpoint-address>192.168.100.1</receiving-endpoint-address>
358 </ingress-replication>
371 "bgp-evpn:evpn-routes": {
373 "route-key": "AxEAAcCoZAED6AAAAQAgwKhkAQ==",
375 "route-distinguisher": "192.168.100.1:1000",
376 "inc-multi-ethernet-tag-res": {
380 "orig-route-ip": "192.168.100.1"
384 "global": "172.23.29.104"
389 "extended-communities": {
390 "extended-communities": {
392 "route-target-extended-community": {
393 "global-administrator": 65504,
394 "local-administrator": "AAAD6A=="
399 "leaf-information-required": true,
401 "ingress-replication": {
402 "receiving-endpoint-address": "192.168.100.1"
412 This examples show how to originate and remove EVPN routes via programmable RIB.
413 There are four different types of EVPN routes, and several extended communities.
414 Routes can be used for variety of use-cases supported by BGP/MPLS EVPN, PBB EVPN and NVO EVPN.
415 Make sure the *Application Peer* is configured first.
417 **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``
425 **Content-Type:** ``application/xml``
431 :emphasize-lines: 4,5,15
433 <evpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-evpn">
434 <route-key>evpn</route-key>
436 <route-distinguisher>172.12.123.3:200</route-distinguisher>
440 <global>199.20.166.41</global>
446 <extended-communities>
448 </extended-communities>
452 @line 4: Route Distinguisher (RD) - set to RD of the MAC-VRF advertising the NLRI, recommended format *<IP>:<VLAN_ID>*
454 @line 5: One of the EVPN route must be set here.
456 @line 15: In some cases, specific extended community presence is required. The route may carry one or more Route Target attributes.
460 **Content-Type:** ``application/json``
466 :emphasize-lines: 5,14
469 "bgp-evpn:evpn-route": {
472 "route-distinguisher": "172.12.123.3:200",
475 "global": "199.20.166.41"
480 "extended-communities": [
487 @line 4: Route Distinguisher (RD) - set to RD of the MAC-VRF advertising the NLRI, recommended format *<IP>:<VLAN_ID>*
489 @line 14: In some cases, specific extended community presence is required. The route may carry one or more Route Target attributes.
496 * **Ethernet AD per ESI**
505 <mpls-label>0</mpls-label>
507 <vlan-id>4294967295</vlan-id>
510 <arbitrary>AAAAAAAAAAAA</arbitrary>
512 </ethernet-a-d-route>
519 "ethernet-a-d-route" : {
522 "vlan-id": "4294967295"
525 "arbitrary": "AAAAAAAAAAAA"
530 * **Ethernet AD per EVI**
539 <mpls-label>24001</mpls-label>
541 <vlan-id>2200</vlan-id>
544 <arbitrary>AAAAAAAAAAAA</arbitrary>
546 </ethernet-a-d-route>
553 "ethernet-a-d-route" : {
559 "arbitrary": "AAAAAAAAAAAA"
564 * **MAC/IP Advertisement**
574 <arbitrary>AAAAAAAAAAAA</arbitrary>
577 <vlan-id>2100</vlan-id>
579 <mac-address>f2:0c:dd:80:9f:f7</mac-address>
580 <ip-address>10.0.1.12</ip-address>
581 <mpls-label1>299776</mpls-label1>
589 "mac-ip-adv-route" : {
591 "arbitrary": "AAAAAAAAAAAA"
596 "mac-address": "f2:0c:dd:80:9f:f7",
597 "ip-address": "10.0.1.12",
598 "mpls-label1": 299776
602 * **Inclusive Multicast Ethernet Tag**
610 <inc-multi-ethernet-tag-res>
612 <vlan-id>2100</vlan-id>
614 <orig-route-ip>43.43.43.43</orig-route-ip>
615 </inc-multi-ethernet-tag-res>
622 "inc-multi-ethernet-tag-res" : {
626 "orig-route-ip": "43.43.43.43"
630 * **Ethernet Segment**
639 <orig-route-ip>43.43.43.43</orig-route-ip>
641 <arbitrary>AAAAAAAAAAAA</arbitrary>
651 "orig-route-ip": "43.43.43.43",
653 "arbitrary": "AAAAAAAAAAAA"
658 **EVPN Ethernet Segment Identifier (ESI):**
661 Indicates an arbitrary 9-octet ESI.
670 <arbitrary>AAAAAAAAAAAA</arbitrary>
679 "arbitrary": "AAAAAAAAAAAA"
684 IEEE 802.1AX LACP is used.
692 <lacp-auto-generated>
693 <ce-lacp-mac-address>f2:0c:dd:80:9f:f7</ce-lacp-mac-address>
694 <ce-lacp-port-key>22</ce-lacp-port-key>
695 </lacp-auto-generated>
702 "lacp-auto-generated" : {
703 "ce-lacp-mac-address": "f2:0c:dd:80:9f:f7",
704 "ce-lacp-port-key": 22
709 Indirectly connected hosts via a bridged LAN.
718 <root-bridge-mac-address>f2:0c:dd:80:9f:f7</root-bridge-mac-address>
719 <root-bridge-priority>20</root-bridge-priority>
720 </lan-auto-generated>
727 "lan-auto-generated" : {
728 "root-bridge-mac-address": "f2:0c:dd:80:9f:f7",
729 "root-bridge-priority": 20
743 <system-mac-address>f2:0c:dd:80:9f:f7</system-mac-address>
744 <local-discriminator>2000</local-discriminator>
745 </mac-auto-generated>
752 "mac-auto-generated" : {
753 "system-mac-address": "f2:0c:dd:80:9f:f7",
754 "local-discriminator": 2000
767 <router-id-generated>
768 <router-id>43.43.43.43</router-id>
769 <local-discriminator>2000</local-discriminator>
770 </router-id-generated>
777 "router-id-generated" : {
778 "router-id": "43.43.43.43",
779 "local-discriminator": 2000
794 <local-discriminator>2000</local-discriminator>
804 "local-discriminator": 2000
810 .. include:: bgp-user-guide-pmsi-attribute.rst
812 **Extended Communities:**
814 * **ESI Label Extended Community**
822 <extended-communities>
823 <transitive>true</transitive>
824 <esi-label-extended-community>
825 <single-active-mode>false</single-active-mode>
826 <esi-label>24001</esi-label>
827 </esi-label-extended-community>
828 </extended-communities>
835 "extended-communities" : {
837 "esi-label-extended-community": {
838 "single-active-mode": false,
844 * **ES-Import Route Target**
852 <extended-communities>
853 <transitive>true</transitive>
854 <es-import-route-extended-community>
855 <es-import>f2:0c:dd:80:9f:f7</es-import>
856 </es-import-route-extended-community>
857 </extended-communities>
864 "extended-communities" : {
865 "transitive": "true",
866 "es-import-route-extended-community": {
867 "es-import": "f2:0c:dd:80:9f:f7"
872 * **MAC Mobility Extended Community**
880 <extended-communities>
881 <transitive>true</transitive>
882 <mac-mobility-extended-community>
883 <static>true</static>
884 <seq-number>200</seq-number>
885 </mac-mobility-extended-community>
886 </extended-communities>
893 "extended-communities" : {
895 "mac-mobility-extended-community": {
902 * **Default Gateway Extended Community**
910 <extended-communities>
911 <transitive>true</transitive>
912 <default-gateway-extended-community>
913 </default-gateway-extended-community>
914 </extended-communities>
921 "extended-communities" : {
922 "transitive": "true",
923 "default-gateway-extended-community": []
927 * **EVPN Layer 2 attributes extended community**
935 <extended-communities>
936 <transitive>false</transitive>
937 <layer-2-attributes-extended-community>
938 <primary-pe>true</primary-pe>
939 <backup-pe>true</backup-pe>
940 <control-word >true</control-word>
942 </layer-2-attributes-extended-community>
943 </extended-communities>
950 "extended-communities" : {
952 "layer-2-attributes-extended-community": {
955 "control-word": true,
961 * **BGP Encapsulation extended community**
971 <extended-communities>
972 <transitive>false</transitive>
973 <encapsulation-extended-community>
974 <tunnel-type>vxlan</tunnel-type>
975 </encapsulation-extended-community>
976 </extended-communities>
978 @line 4: `full list of tunnel types <http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#tunnel-types>`_
987 "extended-communities" : {
988 "transitive": "false",
989 "encapsulation-extended-community": {
990 "tunnel-type": "vxlan"
995 @line 5: `full list of tunnel types <http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#tunnel-types>`_
999 To remove the route added above, following request can be used:
1001 **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``
1003 **Method:** ``DELETE``
1007 .. table:: EVPN Routes Usage.
1009 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
1010 | EVN Route Type | Extended Communities | Usage |
1011 +======================================+=====================================================+===========================================+
1012 | **Ethernet Auto-discovery** | ESI Label, BGP EncapsulationEVPN Layer 2 attributes | Fast Convergence, Split Horizon, Aliasing |
1013 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
1014 | **MAC/IP Advertisement** | BGP Encapsulation, MAC Mobility, Default Gateway | MAC address reachability |
1015 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
1016 | **Inclusive Multicast Ethernet Tag** | PMSI Tunnel, BGP Encapsulation | Handling of Multi-destination traffic |
1017 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
1018 | **Ethernet Segment** | BGP Encapsulation, ES-Import Route Target | Designated Forwarder Election |
1019 +--------------------------------------+-----------------------------------------------------+-------------------------------------------+
1023 * `BGP MPLS-Based Ethernet VPN <https://tools.ietf.org/html/rfc7432>`_
1024 * `Provider Backbone Bridging Combined with Ethernet VPN <https://tools.ietf.org/html/rfc7623>`_
1025 * `VPWS support in EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-vpws-07>`_
1026 * `A Network Virtualization Overlay Solution using EVPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-overlay-04>`_
1027 * `Interconnect Solution for EVPN Overlay networks <https://tools.ietf.org/html/draft-ietf-bess-dci-evpn-overlay-04>`_
1028 * `Usage and applicability of BGP MPLS based Ethernet VPN <https://tools.ietf.org/html/draft-ietf-bess-evpn-usage-03>`_