NVO3 WG Fangwei. Hu Internet-Draft Ran. Chen Intended status: Standards Track ZTE Corporation Expires: June 3, 2016 Mallik. Mahalingam Springpath Qiang. Zu Ericsson December 1, 2015 YANG Data Model for VxLAN Protocol draft-chen-nvo3-vxlan-yang-02.txt Abstract This document defines a YANG data model for VxLAN protocol. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on June 3, 2016. Copyright Notice Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Hu, et al. Expires June 3, 2016 [Page 1] Internet-Draft VxLAN YANG December 2015 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 3. YANG Data Model for VxLAN Configuration . . . . . . . . . . . 2 3.1. VxLAN Multicast IP Address . . . . . . . . . . . . . . . 2 3.2. VxLAN Access Type . . . . . . . . . . . . . . . . . . . . 2 3.3. Inner VLAN Tag Handling Mode . . . . . . . . . . . . . . 3 4. Design Tree of Configuration Data Model . . . . . . . . . . . 3 5. Design Tree of Operational State Model . . . . . . . . . . . 5 6. VxLAN YANG Model . . . . . . . . . . . . . . . . . . . . . . 6 7. Security Considerations . . . . . . . . . . . . . . . . . . . 19 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 10. Normative References . . . . . . . . . . . . . . . . . . . . 19 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 1. Introduction YANG[RFC6020]is a data definition language that was introduced to define the contents of a conceptual data store that allows networked devices to be managed using NETCONF [RFC6241]. This document defines a YANG data model for the configuration of VxLAN protocol [RFC7348]. 2. Terminology 3. YANG Data Model for VxLAN Configuration 3.1. VxLAN Multicast IP Address The vxlan-multicast-ip is used to configure the IP multicast group, which the VxLAN VNI of the VTEP is mapping to. 3.2. VxLAN Access Type There are several access types supported for VxLAN: o vlan-1:1: the vxlan access type is VLAN, and each VxLAN is only mapping to one VLAN. o vlan- n:1: the vxlan access type is VLAN, and each VxLAN could be mapped to several VLANs. o L3-interface: the VxLAN access type is layer 3 interface. o mac: the VxLAN access type is MAC address. Hu, et al. Expires June 3, 2016 [Page 2] Internet-Draft VxLAN YANG December 2015 o vlan-l2-interface: the VxLAN access type is VLAN plus Layer 2 interface. 3.3. Inner VLAN Tag Handling Mode There are two handling modes for the inner VLAN tag: discard-inner- vlan mode and no-discard-inner-vlan mode. If the VTEP interface works in the discard-inner-vlan mode, the VxLAN is only mapped to one VLAN. The inner VLAN tag will be stripped when encapsulating the VxLAN frame. On the decapsulation side, if VTEP receives the VxLAN frame with inner VLAN tag, it will discard the frame in this work mode. If the VTEP receives the VxLAN frame without VLAN tag, it will fill in the VLAN tag based on the VxLAN and VLAN mapping. If the VTEP interface works in the no-discard-inner-vlan mode, the VxLAN could be mapped to several VLANs. The inner VLAN tag will not stripped when encapsulating the VxLAN frame in the VxLAN encapsulation side. On the decapsulation side, if VTEP receives the VxLAN frame, it will strip the VxLAN header, and keep the VLAN frame. 4. Design Tree of Configuration Data Model Hu, et al. Expires June 3, 2016 [Page 3] Internet-Draft VxLAN YANG December 2015 module: ietf-vxlan +--rw vxlan +--rw vxlan-instance* [vxlan-id] | +--rw vxlan-id vxlan-id | +--rw (vxlan-access-types)? | | +--:(access-type-vlan) | | | +--rw access-type-vlan? access-type-vlan | | | +--rw access-vlan-list* [vlan-id] | | | +--rw vlan-id vlan | | +--:(access-type-mac) | | | +--rw access-type-mac? empty | | | +--rw mac yang:mac-address | | +--:(access-type-l2interface) | | | +--rw access-type-l2interface? empty | | | +--rw vlan-id vlan | | | +--rw interface-name if:interface-ref | | +--:(access-type-l3interface) | | +--rw access-type-l3interface? empty | | +--rw map-l3interface* [interface-name] | | +--rw interface-name if:interface-ref | +--rw vxlan-evpn | +--rw route-distinguisher? string | +--rw vpn-targets* [rt-value] | +--rw rt-value string | +--rw rt-type bgp-rt-type +--rw interfaces +--rw interface* [name] +--rw name if:interface-ref +--rw vtep-instances* [vtep-id] | +--rw vtep-id uint32 | +--rw vtep-name? string | +--rw source-interface? if:interface-ref | +--rw multicast-ip inet:ip-address | +--rw inner-vlan-handling-mode? inner-vlan-handling-mode | +--rw bind-vxlan-id* [vxlan-id] | +--rw vxlan-id vxlan-id +--rw static-vxlan-tunnel* [vxlan-tunnel-id] +--rw vxlan-tunnel-id uint32 +--rw vxlan-tunnel-name? string +--rw address-family* [af] +--rw af address-family-type +--rw tunnel-source-ip? address-family-type +--rw tunnel-destination-ip? address-family-type +--rw bind-vxlan-id* [vxlan-id] +--rw vxlan-id vxlan-id Hu, et al. Expires June 3, 2016 [Page 4] Internet-Draft VxLAN YANG December 2015 5. Design Tree of Operational State Model +--ro vxlan-state +--ro vxlan-instance | +--ro vxlan-id? vxlan-id | +--ro (vxlan-access-types)? | | +--:(access-type-vlan) | | | +--ro access-type-vlan? access-type-vlan | | | +--ro access-vlan* [vlan-id] | | | +--ro vlan-id vlan | | +--:(vxlan-access-mac) | | | +--ro access-type-mac? empty | | | +--ro mac? yang:mac-address | | +--:(vxlan-access-l2interface) | | | +--ro access-type-l2interface? empty | | | +--ro vlan-id? vlan | | | +--ro interface-name? if:interface-ref | | +--:(vxlan-access-l3interface) | | +--ro access-type-l3interface? empty | | +--ro map-l3interface* [interface-name] | | +--ro interface-name if:interface-ref | +--ro vxlan-evpn | +--ro route-distinguisher? string | +--ro vpn-targets* [rt-value] | +--ro rt-value string | +--ro rt-type bgp-rt-type +--ro vtep-instance | +--ro vtep-id? uint32 | +--ro vtep-name? string | +--ro source-interface? if:interface-ref | +--ro multicast-ip? inet:ip-address | +--ro inner-vlan-handling-mode? inner-vlan-handling-mode | +--ro bind-vxlan-id* [vxlan-id] | +--ro vxlan-id vxlan-id +--ro static-vxlan-tunnel* [vxlan-tunnel-id] +--ro vxlan-tunnel-id uint32 +--ro vxlan-tunnel-name? string +--ro address-family* [af] +--ro af address-family-type +--ro tunnel-source-ip? address-family-type +--ro tunnel-destination-ip? address-family-type +--ro bind-vxlan-id* [vxlan-id] +--ro vxlan-id vxlan-id Hu, et al. Expires June 3, 2016 [Page 5] Internet-Draft VxLAN YANG December 2015 6. VxLAN YANG Model file "ietf-vxlan@2015-12-01.yang" module ietf-vxlan { namespace "urn:ietf:params:xml:ns:yang:ietf-vxlan"; prefix "vxlan"; import ietf-interfaces { prefix "if"; } import ietf-inet-types { prefix "inet"; } import ietf-yang-types { prefix yang; } organization "IETF NVO3(Network Virtualization Overlays) Working Group"; contact " WG List: WG Chair: Matthew Bocci WG Chair: Benson Schliesser Editor: Fangwei Hu Editor: Ran Chen Editor: Mallik Mahalingam Editor: Zu Qiang "; description "The YANG module defines a generic configuration Hu, et al. Expires June 3, 2016 [Page 6] Internet-Draft VxLAN YANG December 2015 model for VxLAN protocol"; revision 2015-12-01 { description "02 revision."; reference "draft-chen-nvo3-vxlan-yang-02"; } revision 2015-10-12 { description "01 revision."; reference "draft-chen-nvo3-vxlan-yang-01"; } revision 2015-05-05 { description "Initial revision"; reference "draft-chen-nvo3-vxlan-yang-00"; } /* Typedefs */ typedef bgp-rt-type { type enumeration { enum import { description "For import"; } enum export { description "For export"; } enum both { description "For both import and export"; } } description "BGP route-target type. Import from BGP YANG"; } typedef vlan { type uint16 { range 1..4094; } description "Typedef for VLAN"; } Hu, et al. Expires June 3, 2016 [Page 7] Internet-Draft VxLAN YANG December 2015 typedef vxlan-id { type uint32; description "Typedef for VxLAN ID."; } typedef access-type-vlan { type enumeration { enum access-type-vlan1to1 { description "Access type is VLAN 1:1."; } enum access-type-vlan1ton { description "Access type is VLAN 1:n."; } } default access-type-vlan1to1 ; description "VxLAN access type is VLAN."; } typedef access-type-mac { type empty ; description "VxLAN access type is MAC."; } typedef inner-vlan-handling-mode { type enumeration { enum discard-inner-vlan { description "Discard inner-VLAN."; } enum no-discard-inner-vlan { description "No discard inner-VLAN."; } } default discard-inner-vlan ; description "Typedef for inner-vlan-handling-mode"; } typedef address-family-type { type enumeration { enum ipv4 { Hu, et al. Expires June 3, 2016 [Page 8] Internet-Draft VxLAN YANG December 2015 description "IPv4"; } enum ipv6 { description "IPv6"; } } description "Typedef for address family type."; } /* Configuration Data */ container vxlan{ list vxlan-instance { key vxlan-id ; leaf vxlan-id { type vxlan-id; description "VxLAN ID."; } choice vxlan-access-types { case access-type-vlan { leaf access-type-vlan { type access-type-vlan; description "Access type is VLAN."; } list access-vlan-list { key vlan-id ; leaf vlan-id { type vlan; description "VLAN ID."; } description "VLAN ID list." ; } description "VxLAN access type choice is VLAN."; } Hu, et al. Expires June 3, 2016 [Page 9] Internet-Draft VxLAN YANG December 2015 case access-type-mac { leaf access-type-mac { type empty ; description "Access type is MAC."; } leaf mac { type yang:mac-address ; mandatory true ; description "MAC Address."; } description "VxLAN access type choice is MAC Address."; } case access-type-l2interface { leaf access-type-l2interface { type empty ; description "VXLAN map layer two interface."; } leaf vlan-id { type vlan; mandatory true ; description "VLAN ID."; } leaf interface-name { type if:interface-ref; mandatory true ; description "Layer two interface name."; } description "VxLAN access type choice is layer two interface."; } case access-type-l3interface { leaf access-type-l3interface { type empty ; description "Access type of VxLAN is layer three interface."; } Hu, et al. Expires June 3, 2016 [Page 10] Internet-Draft VxLAN YANG December 2015 list map-l3interface { key interface-name ; leaf interface-name { type if:interface-ref; description "Layer three interface name."; } description "Layer three interface list."; } description "VxLAN access type choice is layer three interface."; } description "VxLAN access type choice."; } container vxlan-evpn { leaf route-distinguisher { type string; description "VxLAN EVPN BGP RD"; } list vpn-targets { key rt-value; description "VxLAN EVPN Route Targets"; leaf rt-value { type string; description "Route-Target value"; } leaf rt-type { type bgp-rt-type; mandatory true; description "Type of RT"; } } description "EVPN VxLAN parameters."; } description "VxLAN instance."; } container interfaces { list interface{ key name; leaf name { Hu, et al. Expires June 3, 2016 [Page 11] Internet-Draft VxLAN YANG December 2015 type if:interface-ref; description "VTEP interface name."; } list vtep-instances { key vtep-id ; leaf vtep-id { type uint32; description "VTEP ID."; } leaf vtep-name{ type string; description "VTEP instance name."; } leaf source-interface { type if:interface-ref; description "Source interface name."; } leaf multicast-ip { type inet:ip-address; mandatory true ; description "VxLAN multicast IP address."; } leaf inner-vlan-handling-mode { type inner-vlan-handling-mode; description "The inner vlan tag handling mode."; } list bind-vxlan-id { key vxlan-id; leaf vxlan-id { type vxlan-id; description "VxLAN ID."; } description "VxLAN ID list for the VTEP."; } Hu, et al. Expires June 3, 2016 [Page 12] Internet-Draft VxLAN YANG December 2015 description "VTEP instance."; } list static-vxlan-tunnel{ key vxlan-tunnel-id; leaf vxlan-tunnel-id { type uint32; description "Static VxLAN tunnel ID."; } leaf vxlan-tunnel-name { type string; description "Name of the static VxLAN tunnel."; } list address-family { key "af"; leaf af { type address-family-type; description "Address family type value."; } leaf tunnel-source-ip { type address-family-type; description "Source IP address for the static VxLAN tunnel"; } leaf tunnel-destination-ip { type address-family-type; description "Destination IP address for the static VxLAN tunnel"; } list bind-vxlan-id { key vxlan-id; leaf vxlan-id { type vxlan-id; description "VxLAN ID."; } description "VxLAN ID list for the VTEP."; } Hu, et al. Expires June 3, 2016 [Page 13] Internet-Draft VxLAN YANG December 2015 description "Per-af params."; } description "Configure the static VxLAN tunnel"; } description "VTEP interface."; } description "VTEP interfaces configuration."; } description "VxLAN configure model."; } /* Operational data */ container vxlan-state{ container vxlan-instance { leaf vxlan-id { type vxlan-id; description "Show VxLAN ID."; } choice vxlan-access-types { case access-type-vlan { leaf access-type-vlan { type access-type-vlan; description "Access type is VLAN."; } list access-vlan { key vlan-id; leaf vlan-id { type vlan; description "VLAN ID."; } description "VLAN ID list."; } description "VxLAN access type choice is VLAN."; Hu, et al. Expires June 3, 2016 [Page 14] Internet-Draft VxLAN YANG December 2015 } case vxlan-access-mac { leaf access-type-mac { type empty ; description "Access type is MAC."; } leaf mac { type yang:mac-address ; description "MAC Address."; } description "VxLAN access type choice is MAC."; } case vxlan-access-l2interface { leaf access-type-l2interface { type empty ; description "VxLAN access is layer two interface."; } leaf vlan-id { type vlan; description "VLAN ID."; } leaf interface-name { type if:interface-ref; description "Layer two interface name."; } description "VxLAN access type choice is layer two interface."; } case vxlan-access-l3interface { leaf access-type-l3interface { type empty ; description "VxLAN access type is layer three interface."; } list map-l3interface { key interface-name ; Hu, et al. Expires June 3, 2016 [Page 15] Internet-Draft VxLAN YANG December 2015 leaf interface-name { type if:interface-ref; description "Layer three interface name."; } description "VxLAN access layer three interfaces."; } description "VxLAN access type choice is layer three interface."; } description "VxLAN access type choice."; } container vxlan-evpn { leaf route-distinguisher { type string; description "VxLAN EVPN BGP RD"; } list vpn-targets { key rt-value; description "VxLAN EVPN Route Targets"; leaf rt-value { type string; description "Route-Target value"; } leaf rt-type { type bgp-rt-type; mandatory true; description "Type of RT"; } } description "Show EVPN VxLAN parameters."; } description "Show VxLAN instance information."; } container vtep-instance { leaf vtep-id { type uint32; description "Show VTEP ID."; } Hu, et al. Expires June 3, 2016 [Page 16] Internet-Draft VxLAN YANG December 2015 leaf vtep-name { type string; description "Show VTEP name."; } leaf source-interface{ type if:interface-ref; description "Show source interface."; } leaf multicast-ip { type inet:ip-address; description "Show VxLAN multicast IP address."; } leaf inner-vlan-handling-mode { type inner-vlan-handling-mode; default discard-inner-vlan ; description "Show inner vlan tag handling mode." ; } list bind-vxlan-id { key vxlan-id; leaf vxlan-id { type vxlan-id; description "Show VxLAN ID." ; } description "Show VxLAN ID list for the VTEP."; } description "Show VTEP information."; } list static-vxlan-tunnel{ key vxlan-tunnel-id; leaf vxlan-tunnel-id { type uint32; description "Show static VxLAN tunnel ID."; } leaf vxlan-tunnel-name { Hu, et al. Expires June 3, 2016 [Page 17] Internet-Draft VxLAN YANG December 2015 type string; description "Name of the static VxLAN tunnel."; } list address-family { key "af"; leaf af { type address-family-type; description "Address family type value."; } leaf tunnel-source-ip { type address-family-type; description "Show source IP address of the static VxLAN tunnel"; } leaf tunnel-destination-ip { type address-family-type; description "Show destination IP address of the static VxLAN tunnel"; } list bind-vxlan-id { key vxlan-id; leaf vxlan-id { type vxlan-id; description "VxLAN ID."; } description "Show VxLAN ID list for the VTEP."; } description "Per-af params."; } description "Configure the static VxLAN tunnel"; } config "false"; description "Show VxLAN operational state information."; } } Hu, et al. Expires June 3, 2016 [Page 18] Internet-Draft VxLAN YANG December 2015 7. Security Considerations 8. Acknowledgements 9. IANA Considerations This document requires no IANA Actions. Please remove this section before RFC publication. 10. Normative References [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010, . [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, . [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10.17487/RFC6991, July 2013, . [RFC7223] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, . [RFC7348] Mahalingam, M., Dutt, D., Duda, K., Agarwal, P., Kreeger, L., Sridhar, T., Bursell, M., and C. Wright, "Virtual eXtensible Local Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks", RFC 7348, DOI 10.17487/RFC7348, August 2014, . Authors' Addresses Fangwei Hu ZTE Corporation No.889 Bibo Rd Shanghai 201203 China Phone: +86 21 68896273 Email: hu.fangwei@zte.com.cn Hu, et al. Expires June 3, 2016 [Page 19] Internet-Draft VxLAN YANG December 2015 Ran Chen ZTE Corporation No.50 Software Avenue,Yuhuatai District Nanjing, Jiangsu Province 210012 China Phone: +86 025 88014636 Email: chen.ran@zte.com.cn Mallik Mahalingam Springpath 640 W. California Ave, Suite #110 Sunnyvale, CA 94086 USA Email: mallik_mahalingam@yahoo.com Zu Qiang Ericsson 8400, boul. Decarie Ville Mont-Royal, QC Canada Email: Zu.Qiang@Ericsson.com Hu, et al. Expires June 3, 2016 [Page 20]