1 // vi: set smarttab et sw=4 tabstop=4:
4 namespace "urn:opendaylight:params:xml:ns:yang:bgp-evpn";
7 import bgp-types { prefix bgp-t; revision-date 2018-03-29; }
8 import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
9 import ietf-yang-types {prefix yang; revision-date 2013-07-15;}
10 import network-concepts { prefix netc; revision-date 2013-11-25; }
11 import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; }
12 import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; }
13 import bgp-message { prefix bgp-msg; revision-date 2018-03-29; }
14 import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; }
15 import pmsi-tunnel { prefix pmsi; revision-date 2018-03-29; }
17 organization "Cisco Systems, Inc.";
19 contact "Claudio D. Gasparini <cgaspari@cisco.com>";
22 "This module contains the base data model of a BGP flow specification.
23 It rolls up the definitions contained in RFC7432.
25 Copyright (c)2016 Cisco Systems, Inc. All rights reserved.
27 This program and the accompanying materials are made available
28 under the terms of the Eclipse Public License v1.0 which
29 accompanies this distribution, and is available at
30 http://www.eclipse.org/legal/epl-v10.html";
32 revision "2018-03-29" {
33 description "Add support for add-path for all afi/safi.";
36 revision "2017-12-13" {
37 description "Support draft https://tools.ietf.org/html/draft-sajassi-bess-evpn-vpws-fxc-01";
40 revision "2017-12-07" {
41 description "Add support for add-path in base BGP NLRI.";
44 revision "2016-03-21" {
47 reference "https://tools.ietf.org/html/rfc7432";
50 identity l2vpn-address-family {
51 reference "https://tools.ietf.org/html/rfc7432#section-20";
52 base bgp-t:address-family;
55 identity evpn-subsequent-address-family {
56 reference "https://tools.ietf.org/html/rfc7432#section-20";
57 base bgp-t:subsequent-address-family;
61 reference "https://tools.ietf.org/html/rfc7432#section-7";
69 enum inc-mult-eth-tag {
79 reference "https://tools.ietf.org/html/rfc7432#section-5";
84 enum lacp-auto-generated {
87 enum lan-auto-generated {
90 enum mac-auto-generated {
93 enum router-id-generated {
104 range "0 .. 16777215";
107 "24-bit unsigned integer.";
110 grouping ethernet-tag-id {
111 reference "https://tools.ietf.org/html/rfc7432#section-7.1";
112 description "An Ethernet Tag ID is a 32-bit field containing either
113 a 12-bit or 24-bit identifier that identifies a particular
114 broadcast domain (e.g., a VLAN) in an EVPN instance";
116 container ethernet-tag-id {
124 grouping local-discriminator {
125 leaf local-discriminator {
132 reference "https://tools.ietf.org/html/rfc7432#section-5";
133 description "Ethernet segment (ES) are identified by a unique non-zero identifier
134 called an Ethernet Segment Identifier (ESI). An ESI is encoded as a 10-octet
135 integer in line format with the most significant octet sent first";
139 case arbitrary-case {
140 container arbitrary {
141 description "Type 0 indicates an arbitrary 9-octet ESI
142 value, which is managed and configured by the operator";
152 case lacp-auto-generated-case {
153 container lacp-auto-generated {
154 description "When IEEE 802.1AX LACP is used between the PEs and CEs,
155 ESI type 1 indicates an auto-generated ESI value determined from LACP";
157 leaf ce-lacp-mac-address {
158 type yang:mac-address;
161 leaf ce-lacp-port-key {
167 case lan-auto-generated-case {
168 container lan-auto-generated {
169 description "Type 2 is used in the case of indirectly connected hosts via a bridged
170 LAN between the CEs and the PEs. The ESI Value is auto-generated and determined
171 based on the Layer 2 bridge protocol";
173 leaf root-bridge-mac-address {
174 type yang:mac-address;
177 leaf root-bridge-priority {
183 case mac-auto-generated-case {
184 container mac-auto-generated {
185 description "Type 3 indicates a MAC-based ESI Value that
186 can be auto-generated or configured by the operator.";
188 leaf system-mac-address {
189 type yang:mac-address;
192 leaf local-discriminator {
198 case router-id-generated-case {
199 container router-id-generated {
200 description "Type 4 indicates a router-ID ESI Value that
201 can be auto-generated or configured by the operator";
204 type inet:ipv4-address;
207 uses local-discriminator;
210 case as-generated-case {
211 container as-generated {
212 description "Type 5 indicates an Autonomous System (AS)-based ESI
213 Value that can be auto-generated or configured by the operator";
219 uses local-discriminator;
225 grouping ethernet-a-d-route {
226 container ethernet-a-d-route {
227 reference "https://tools.ietf.org/html/rfc7432#section-7.1";
228 description "Ethernet Auto-Discovery (A-D) route";
231 uses ethernet-tag-id;
233 type netc:mpls-label;
239 grouping mac-ip-adv-route {
240 container mac-ip-adv-route {
241 reference "https://tools.ietf.org/html/rfc7432#section-7.2";
242 description "MAC/IP Advertisement route";
245 uses ethernet-tag-id;
247 type yang:mac-address;
251 type inet:ip-address;
254 type netc:mpls-label;
258 type netc:mpls-label;
263 grouping inc-multi-ethernet-tag-res {
264 container inc-multi-ethernet-tag-res {
265 reference "https://tools.ietf.org/html/rfc7432#section-7.3";
266 description "Inclusive Multicast Ethernet Tag route";
268 uses ethernet-tag-id;
269 uses bgp-t:orig-route-ip-grouping;
275 reference "https://tools.ietf.org/html/rfc7432#section-7.4";
276 description "Ethernet Segment route";
279 uses bgp-t:orig-route-ip-grouping;
283 grouping esi-label-extended-community {
284 container esi-label-extended-community {
285 reference "https://tools.ietf.org/html/rfc7432#section-7.5";
286 description "The ESI Label Extended Community is a transitive Extended
287 Community that may be advertised along with Ethernet Auto-discovery
288 routes, and it enables split-horizon procedures for multihomed sites";
290 leaf single-active-mode {
295 type netc:mpls-label;
301 grouping es-import-route-extended-community {
302 container es-import-route-extended-community {
303 reference "https://tools.ietf.org/html/rfc7432#section-7.6";
305 "New transitive Route Target extended community carried with
306 the Ethernet Segment route. When used, it enables all the PEs
307 connected to the same multihomed site to import the Ethernet Segment
311 type yang:mac-address;
317 grouping mac-mobility-extended-community {
318 container mac-mobility-extended-community {
319 reference "https://tools.ietf.org/html/rfc7432#section-7.7";
321 "The MAC Mobility Extended Community is a transitive Extended Community
322 that may be advertised along with MAC/IP Advertisement routes.";
335 grouping default-gateway-extended-community {
336 container default-gateway-extended-community {
338 "The Default Gateway community is an Extended Community of an
341 reference "https://tools.ietf.org/html/rfc7432#section-7.8";
344 "The Default Gateway community is an Extended Community of an
349 typedef operational-mode {
351 enum vlan-aware-fxc {
354 enum vlan-unaware-fxc {
360 typedef normalization-type {
371 grouping layer-2-attributes-extended-community {
372 container layer-2-attributes-extended-community {
373 reference "https://tools.ietf.org/html/draft-ietf-bess-evpn-vpws-02#section-3.1";
375 "The EVPN Layer 2 attributes extended community is a extended community
376 to be included with Ethernet A-D per EVI route.
377 This attribute is mandatory if multihoming is enabled.";
391 leaf mode-of-operation {
392 reference "https://tools.ietf.org/html/draft-sajassi-bess-evpn-vpws-fxc-01#section-5";
393 type operational-mode;
396 reference "https://tools.ietf.org/html/draft-sajassi-bess-evpn-vpws-fxc-01#section-5";
397 type normalization-type;
406 grouping evpn-destination {
407 list evpn-destination {
409 uses bgp-msg:path-id-grouping;
413 grouping evpn-routes {
414 container evpn-routes {
416 key "route-key path-id";
418 uses pmsi:bgp-rib-route {
419 augment "attributes/extended-communities/extended-community" {
420 case esi-label-extended-community-case {
421 uses esi-label-extended-community;
423 case es-import-route-extended-community-case {
424 uses es-import-route-extended-community;
426 case mac-mobility-extended-community-case {
427 uses mac-mobility-extended-community;
429 case default-gateway-extended-community-case {
430 uses default-gateway-extended-community;
432 case layer-2-attributes-extended-community-case {
433 uses layer-2-attributes-extended-community;
442 reference "https://tools.ietf.org/html/rfc7432#section-7";
443 description "The EVPN NLRI is carried in BGP [RFC4271] using BGP Multiprotocol
444 Extensions [RFC4760] with an Address Family Identifier (AFI) of 25 (L2VPN)
445 and a Subsequent Address Family Identifier (SAFI) of 70 (EVPN)";
448 case ethernet-a-d-route-case {
449 uses ethernet-a-d-route;
451 case mac-ip-adv-route-case {
452 uses mac-ip-adv-route;
454 case inc-multi-ethernet-tag-res-case {
455 uses inc-multi-ethernet-tag-res;
463 uses bgp-t:route-distinguisher-grouping;
466 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
467 case destination-evpn-case {
468 container destination-evpn {
469 uses evpn-destination;
474 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
475 case destination-evpn-case {
476 container destination-evpn {
477 uses evpn-destination;
482 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
483 case evpn-routes-case {
488 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
489 case evpn-routes-case {
494 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
495 case evpn-routes-case {
500 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
501 case evpn-routes-case {
506 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
507 case evpn-routes-case {
512 augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" {
513 case evpn-routes-case {
518 augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" {
519 case evpn-routes-case {
524 augment "/bgp-msg:update/bgp-msg:attributes/bgp-msg:extended-communities/bgp-msg:extended-community" {
525 case esi-label-extended-community-case {
526 uses esi-label-extended-community;
528 case es-import-route-extended-community-case {
529 uses es-import-route-extended-community;
531 case mac-mobility-extended-community-case {
532 uses mac-mobility-extended-community;
534 case default-gateway-extended-community-case {
535 uses default-gateway-extended-community;
537 case layer-2-attributes-extended-community-case {
538 uses layer-2-attributes-extended-community;