.. _bgp-user-guide-evpn-family: EVPN Family =========== 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. 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. In addition to MPLS, IP tunnelling encapsulation techniques like VXLAN, NVGRE, MPLSoGRE and others can be used for packet transportation. Also, Provider Backbone Bridging (PBB) can be combined with EVPN in order to reduce a number of MAC Advertisement routes. .. contents:: Contents :depth: 2 :local: Configuration ^^^^^^^^^^^^^ This section shows a way to enable EVPN family in BGP speaker and peer configuration. BGP Speaker ''''''''''' To enable EVPN support in BGP plugin, first configure BGP speaker instance: **URL:** ``/rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols`` **Method:** ``POST`` .. tabs:: .. tab:: XML **Content-Type:** ``application/xml`` **Request Body:** .. code-block:: xml bgp-example x:BGP 192.0.2.2 65000 x:L2VPN-EVPN .. tab:: JSON **Content-Type:** ``application/json`` **Request Body:** .. code-block:: json { "protocol": [ { "identifier": "openconfig-policy-types:BGP", "name": "bgp-example", "bgp-openconfig-extensions:bgp": { "global": { "config": { "router-id": "192.0.2.2", "as": 65000 }, "afi-safis": { "afi-safi": [ { "afi-safi-name": "openconfig-bgp-types:L2VPN-EVPN" } ] } } } } ] } BGP Peer '''''''' Here is an example for BGP peer configuration with enabled EVPN family. **URL:** ``/rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/openconfig-network-instance:protocols/protocol=openconfig-policy-types:BGP/bgp-example/bgp/neighbors`` **Method:** ``POST`` .. tabs:: .. tab:: XML **Content-Type:** ``application/xml`` **Request Body:** .. code-block:: xml 192.0.2.1 x:L2VPN-EVPN .. tab:: JSON **Content-Type:** ``application/json`` **Request Body:** .. code-block:: json { "neighbor": [ { "neighbor-address": "192.0.2.1", "afi-safis": { "afi-safi": [ { "afi-safi-name": "openconfig-bgp-types:L2VPN-EVPN" } ] } } ] } EVPN Route API ^^^^^^^^^^^^^^ Following tree illustrate the BGP EVPN route structure. .. code-block:: console :(evpn-routes-case) +--ro evpn-routes +--ro evpn-route* [route-key path-id] +--ro route-key string +--ro path-id path-id +--ro (evpn-choice) | +--:(ethernet-a-d-route-case) | | +--ro ethernet-a-d-route | | +--ro (esi) | | | +--:(arbitrary-case) | | | | +--ro arbitrary | | | | +--ro arbitrary binary | | | +--:(lacp-auto-generated-case) | | | | +--ro lacp-auto-generated | | | | +--ro ce-lacp-mac-address yang:mac-address | | | | +--ro ce-lacp-port-key uint16 | | | +--:(lan-auto-generated-case) | | | | +--ro lan-auto-generated | | | | +--ro root-bridge-mac-address yang:mac-address | | | | +--ro root-bridge-priority uint16 | | | +--:(mac-auto-generated-case) | | | | +--ro mac-auto-generated | | | | +--ro system-mac-address yang:mac-address | | | | +--ro local-discriminator uint24 | | | +--:(router-id-generated-case) | | | | +--ro router-id-generated | | | | +--ro router-id inet:ipv4-address | | | | +--ro local-discriminator uint32 | | | +--:(as-generated-case) | | | +--ro as-generated | | | +--ro as inet:as-number | | | +--ro local-discriminator uint32 | | +--ro ethernet-tag-id | | | +--ro vlan-id uint32 | | +--ro mpls-label netc:mpls-label | +--:(mac-ip-adv-route-case) | | +--ro mac-ip-adv-route | | +--ro (esi) | | | +--:(arbitrary-case) | | | | +--ro arbitrary | | | | +--ro arbitrary binary | | | +--:(lacp-auto-generated-case) | | | | +--ro lacp-auto-generated | | | | +--ro ce-lacp-mac-address yang:mac-address | | | | +--ro ce-lacp-port-key uint16 | | | +--:(lan-auto-generated-case) | | | | +--ro lan-auto-generated | | | | +--ro root-bridge-mac-address yang:mac-address | | | | +--ro root-bridge-priority uint16 | | | +--:(mac-auto-generated-case) | | | | +--ro mac-auto-generated | | | | +--ro system-mac-address yang:mac-address | | | | +--ro local-discriminator uint24 | | | +--:(router-id-generated-case) | | | | +--ro router-id-generated | | | | +--ro router-id inet:ipv4-address | | | | +--ro local-discriminator uint32 | | | +--:(as-generated-case) | | | +--ro as-generated | | | +--ro as inet:as-number | | | +--ro local-discriminator uint32 | | +--ro ethernet-tag-id | | | +--ro vlan-id uint32 | | +--ro mac-address yang:mac-address | | +--ro ip-address? inet:ip-address | | +--ro mpls-label1 netc:mpls-label | | +--ro mpls-label2? netc:mpls-label | +--:(inc-multi-ethernet-tag-res-case) | | +--ro inc-multi-ethernet-tag-res | | +--ro ethernet-tag-id | | | +--ro vlan-id uint32 | | +--ro orig-route-ip? inet:ip-address | +--:(es-route-case) | +--ro es-route | +--ro (esi) | | +--:(arbitrary-case) | | | +--ro arbitrary | | | +--ro arbitrary binary | | +--:(lacp-auto-generated-case) | | | +--ro lacp-auto-generated | | | +--ro ce-lacp-mac-address yang:mac-address | | | +--ro ce-lacp-port-key uint16 | | +--:(lan-auto-generated-case) | | | +--ro lan-auto-generated | | | +--ro root-bridge-mac-address yang:mac-address | | | +--ro root-bridge-priority uint16 | | +--:(mac-auto-generated-case) | | | +--ro mac-auto-generated | | | +--ro system-mac-address yang:mac-address | | | +--ro local-discriminator uint24 | | +--:(router-id-generated-case) | | | +--ro router-id-generated | | | +--ro router-id inet:ipv4-address | | | +--ro local-discriminator uint32 | | +--:(as-generated-case) | | +--ro as-generated | | +--ro as inet:as-number | | +--ro local-discriminator uint32 | +--ro orig-route-ip inet:ip-address +--ro route-distinguisher bgp-t:route-distinguisher +--ro attributes +--ro extended-communities* | +--ro transitive? boolean | +--ro (extended-community)? | +--:(encapsulation-case) | | +--ro encapsulation-extended-community | | +--ro tunnel-type encapsulation-tunnel-type | +--:(esi-label-extended-community-case) | | +--ro esi-label-extended-community | | +--ro single-active-mode? boolean | | +--ro esi-label netc:mpls-label | +--:(es-import-route-extended-community-case) | | +--ro es-import-route-extended-community | | +--ro es-import yang:mac-address | +--:(mac-mobility-extended-community-case) | | +--ro mac-mobility-extended-community | | +--ro static? boolean | | +--ro seq-number uint32 | +--:(default-gateway-extended-community-case) | | +--ro default-gateway-extended-community! | +--:(layer-2-attributes-extended-community-case) | +--ro layer-2-attributes-extended-community | +--ro primary-pe? boolean | +--ro backup-pe? boolean | +--ro control-word? boolean | +--ro l2-mtu uint16 +--ro pmsi-tunnel! +--ro leaf-information-required boolean +--ro mpls-label? netc:mpls-label +--ro (tunnel-identifier)? +--:(rsvp-te-p2mp-lsp) | +--ro rsvp-te-p2mp-lps | +--ro p2mp-id uint32 | +--ro tunnel-id uint16 | +--ro extended-tunnel-id inet:ip-address +--:(mldp-p2mp-lsp) | +--ro mldp-p2mp-lsp | +--ro address-family identityref | +--ro root-node-address inet:ip-address | +--ro opaque-value* | +--ro opaque-type uint8 | +--ro opaque-extended-type? uint16 | +--ro opaque yang:hex-string +--:(pim-ssm-tree) | +--ro pim-ssm-tree | +--ro p-address inet:ip-address | +--ro p-multicast-group inet:ip-address +--:(pim-sm-tree) | +--ro pim-sm-tree | +--ro p-address inet:ip-address | +--ro p-multicast-group inet:ip-address +--:(bidir-pim-tree) | +--ro bidir-pim-tree | +--ro p-address inet:ip-address | +--ro p-multicast-group inet:ip-address +--:(ingress-replication) | +--ro ingress-replication | +--ro receiving-endpoint-address? inet:ip-address +--:(mldp-mp2mp-lsp) +--ro mldp-mp2mp-lsp +--ro opaque-type uint8 +--ro opaque-extended-type? uint16 +--ro opaque ... Usage ^^^^^ The L2VPN EVPN table in an instance of the speaker's Loc-RIB can be verified via REST: **URL:** ``/rests/data/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?content=nonconfig`` **Method:** ``GET`` .. tabs:: .. tab:: XML **Response Body:** .. code-block:: xml AxEAAcCoZAED6AAAAQAgwKhkAQ== 0 192.168.100.1:1000 256 192.168.100.1 172.23.29.104 igp true 65504 AAAD6A== true 20024 192.168.100.1 .. tab:: JSON **Response Body:** .. code-block:: json { "bgp-evpn:evpn-routes": { "evpn-route": { "route-key": "AxEAAcCoZAED6AAAAQAgwKhkAQ==", "path-id": 0, "route-distinguisher": "192.168.100.1:1000", "inc-multi-ethernet-tag-res": { "ethernet-tag-id": { "vlan-id": 256 }, "orig-route-ip": "192.168.100.1" }, "attributes": { "ipv4-next-hop": { "global": "172.23.29.104" }, "origin": { "value": "igp" }, "extended-communities": { "extended-communities": { "transitive": true, "route-target-extended-community": { "global-administrator": 65504, "local-administrator": "AAAD6A==" } } }, "pmsi-tunnel": { "leaf-information-required": true, "mpls-label": 20024, "ingress-replication": { "receiving-endpoint-address": "192.168.100.1" } } } } } } Programming ^^^^^^^^^^^ This examples show how to originate and remove EVPN routes via programmable RIB. There are four different types of EVPN routes, and several extended communities. Routes can be used for variety of use-cases supported by BGP/MPLS EVPN, PBB EVPN and NVO EVPN. Make sure the *Application Peer* is configured first. **URL:** ``/rests/data/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`` **Method:** ``POST`` .. tabs:: .. tab:: XML **Content-Type:** ``application/xml`` **Request Body:** .. code-block:: xml :linenos: :emphasize-lines: 4,5,15 evpn 0 172.12.123.3:200 .... 199.20.166.41 igp .... @line 4: Route Distinguisher (RD) - set to RD of the MAC-VRF advertising the NLRI, recommended format *:* @line 5: One of the EVPN route must be set here. @line 15: In some cases, specific extended community presence is required. The route may carry one or more Route Target attributes. .. tab:: JSON **Content-Type:** ``application/json`` **Request Body:** .. code-block:: json :linenos: :emphasize-lines: 5,14 { "bgp-evpn:evpn-route": { "route-key": "evpn", "path-id": 0, "route-distinguisher": "172.12.123.3:200", "attributes": { "ipv4-next-hop": { "global": "199.20.166.41" }, "origin": { "value": "igp" }, "extended-communities": [ "..." ] } } } @line 4: Route Distinguisher (RD) - set to RD of the MAC-VRF advertising the NLRI, recommended format *:* @line 14: In some cases, specific extended community presence is required. The route may carry one or more Route Target attributes. ----- EVPN Routes ^^^^^^^^^^^ * **Ethernet AD per ESI** .. tabs:: .. tab:: XML .. code-block:: xml 0 4294967295 AAAAAAAAAAAA .. tab:: JSON .. code-block:: json { "ethernet-a-d-route" : { "mpls-label": 0, "ethernet-tag-id": { "vlan-id": "4294967295" }, "arbitrary": { "arbitrary": "AAAAAAAAAAAA" } } } * **Ethernet AD per EVI** .. tabs:: .. tab:: XML .. code-block:: xml 24001 2200 AAAAAAAAAAAA .. tab:: JSON .. code-block:: json { "ethernet-a-d-route" : { "mpls-label": 24001, "ethernet-tag-id": { "vlan-id": "2200" }, "arbitrary": { "arbitrary": "AAAAAAAAAAAA" } } } * **MAC/IP Advertisement** .. tabs:: .. tab:: XML .. code-block:: xml AAAAAAAAAAAA 2100 f2:0c:dd:80:9f:f7 10.0.1.12 299776 .. tab:: JSON .. code-block:: json { "mac-ip-adv-route" : { "arbitrary": { "arbitrary": "AAAAAAAAAAAA" }, "ethernet-tag-id": { "vlan-id": "2100" }, "mac-address": "f2:0c:dd:80:9f:f7", "ip-address": "10.0.1.12", "mpls-label1": 299776 } } * **Inclusive Multicast Ethernet Tag** .. tabs:: .. tab:: XML .. code-block:: xml 2100 43.43.43.43 .. tab:: JSON .. code-block:: json { "inc-multi-ethernet-tag-res" : { "ethernet-tag-id": { "vlan-id": "2100" }, "orig-route-ip": "43.43.43.43" } } * **Ethernet Segment** .. tabs:: .. tab:: XML .. code-block:: xml 43.43.43.43 AAAAAAAAAAAA .. tab:: JSON .. code-block:: json { "es-route" : { "orig-route-ip": "43.43.43.43", "arbitrary": { "arbitrary": "AAAAAAAAAAAA" } } } **EVPN Ethernet Segment Identifier (ESI):** * **Type 0** Indicates an arbitrary 9-octet ESI. .. tabs:: .. tab:: XML .. code-block:: xml AAAAAAAAAAAA .. tab:: JSON .. code-block:: json { "arbitrary" : { "arbitrary": "AAAAAAAAAAAA" } } * **Type 1** IEEE 802.1AX LACP is used. .. tabs:: .. tab:: XML .. code-block:: xml f2:0c:dd:80:9f:f7 22 .. tab:: JSON .. code-block:: json { "lacp-auto-generated" : { "ce-lacp-mac-address": "f2:0c:dd:80:9f:f7", "ce-lacp-port-key": 22 } } * **Type 2** Indirectly connected hosts via a bridged LAN. .. tabs:: .. tab:: XML .. code-block:: xml f2:0c:dd:80:9f:f7 20 .. tab:: JSON .. code-block:: json { "lan-auto-generated" : { "root-bridge-mac-address": "f2:0c:dd:80:9f:f7", "root-bridge-priority": 20 } } * **Type 3** MAC-based ESI. .. tabs:: .. tab:: XML .. code-block:: xml f2:0c:dd:80:9f:f7 2000 .. tab:: JSON .. code-block:: json { "mac-auto-generated" : { "system-mac-address": "f2:0c:dd:80:9f:f7", "local-discriminator": 2000 } } * **Type 4** Router-ID ESI .. tabs:: .. tab:: XML .. code-block:: xml 43.43.43.43 2000 .. tab:: JSON .. code-block:: json { "router-id-generated" : { "router-id": "43.43.43.43", "local-discriminator": 2000 } } * **Type 5** AS-based ESI .. tabs:: .. tab:: XML .. code-block:: xml 16843009 2000 .. tab:: JSON .. code-block:: json { "as-generated" : { "as": 16843009, "local-discriminator": 2000 } } **Attributes:** .. include:: bgp-user-guide-pmsi-attribute.rst **Extended Communities:** * **ESI Label Extended Community** .. tabs:: .. tab:: XML .. code-block:: xml true false 24001 .. tab:: JSON .. code-block:: json { "extended-communities" : { "transitive": true, "esi-label-extended-community": { "single-active-mode": false, "esi-label": 24001 } } } * **ES-Import Route Target** .. tabs:: .. tab:: XML .. code-block:: xml true f2:0c:dd:80:9f:f7 .. tab:: JSON .. code-block:: json { "extended-communities" : { "transitive": "true", "es-import-route-extended-community": { "es-import": "f2:0c:dd:80:9f:f7" } } } * **MAC Mobility Extended Community** .. tabs:: .. tab:: XML .. code-block:: xml true true 200 .. tab:: JSON .. code-block:: json { "extended-communities" : { "transitive": true, "mac-mobility-extended-community": { "static": true, "seq-number": 200 } } } * **Default Gateway Extended Community** .. tabs:: .. tab:: XML .. code-block:: xml true .. tab:: JSON .. code-block:: json { "extended-communities" : { "transitive": "true", "default-gateway-extended-community": [] } } * **EVPN Layer 2 attributes extended community** .. tabs:: .. tab:: XML .. code-block:: xml false true true true 200 .. tab:: JSON .. code-block:: json { "extended-communities" : { "transitive": false, "layer-2-attributes-extended-community": { "primary-pe": true, "backup-pe": true, "control-word": true, "l2-mtu": 200 } } } * **BGP Encapsulation extended community** .. tabs:: .. tab:: XML .. code-block:: xml :linenos: :emphasize-lines: 4 false vxlan @line 4: `full list of tunnel types `_ .. tab:: JSON .. code-block:: json :linenos: :emphasize-lines: 5 { "extended-communities" : { "transitive": "false", "encapsulation-extended-community": { "tunnel-type": "vxlan" } } } @line 5: `full list of tunnel types `_ ----- To remove the route added above, following request can be used: **URL:** ``/rests/data/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`` **Method:** ``DELETE`` ----- .. table:: EVPN Routes Usage. +--------------------------------------+-----------------------------------------------------+-------------------------------------------+ | EVN Route Type | Extended Communities | Usage | +======================================+=====================================================+===========================================+ | **Ethernet Auto-discovery** | ESI Label, BGP EncapsulationEVPN Layer 2 attributes | Fast Convergence, Split Horizon, Aliasing | +--------------------------------------+-----------------------------------------------------+-------------------------------------------+ | **MAC/IP Advertisement** | BGP Encapsulation, MAC Mobility, Default Gateway | MAC address reachability | +--------------------------------------+-----------------------------------------------------+-------------------------------------------+ | **Inclusive Multicast Ethernet Tag** | PMSI Tunnel, BGP Encapsulation | Handling of Multi-destination traffic | +--------------------------------------+-----------------------------------------------------+-------------------------------------------+ | **Ethernet Segment** | BGP Encapsulation, ES-Import Route Target | Designated Forwarder Election | +--------------------------------------+-----------------------------------------------------+-------------------------------------------+ References ^^^^^^^^^^ * `BGP MPLS-Based Ethernet VPN `_ * `Provider Backbone Bridging Combined with Ethernet VPN `_ * `VPWS support in EVPN `_ * `A Network Virtualization Overlay Solution using EVPN `_ * `Interconnect Solution for EVPN Overlay networks `_ * `Usage and applicability of BGP MPLS based Ethernet VPN `_