--- 1/draft-ietf-netmod-interfaces-cfg-03.txt 2012-04-29 22:13:59.294671801 +0200 +++ 2/draft-ietf-netmod-interfaces-cfg-04.txt 2012-04-29 22:13:59.330671119 +0200 @@ -1,18 +1,18 @@ Network Working Group M. Bjorklund Internet-Draft Tail-f Systems -Intended status: Standards Track February 8, 2012 -Expires: August 11, 2012 +Intended status: Standards Track April 29, 2012 +Expires: October 31, 2012 A YANG Data Model for Interface Configuration - draft-ietf-netmod-interfaces-cfg-03 + draft-ietf-netmod-interfaces-cfg-04 Abstract This document defines a YANG data model for the configuration of network interfaces. It is expected that interface type specific configuration data models augment the generic interfaces data model defined in this document. Status of this Memo @@ -22,77 +22,97 @@ 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 August 11, 2012. + This Internet-Draft will expire on October 31, 2012. Copyright Notice Copyright (c) 2012 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 + 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 2. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Interfaces Data Model . . . . . . . . . . . . . . . . . . . . 5 3.1. The interface List . . . . . . . . . . . . . . . . . . . . 5 3.2. Interface References . . . . . . . . . . . . . . . . . . . 6 3.3. Interface Layering . . . . . . . . . . . . . . . . . . . . 6 4. Relationship to the IF-MIB . . . . . . . . . . . . . . . . . . 8 5. Interfaces YANG Module . . . . . . . . . . . . . . . . . . . . 9 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 7. Security Considerations . . . . . . . . . . . . . . . . . . . 15 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16 9. Normative References . . . . . . . . . . . . . . . . . . . . . 17 Appendix A. Example: Ethernet Interface Module . . . . . . . . . 18 Appendix B. Example: Ethernet Bonding Interface Module . . . . . 20 Appendix C. Example: VLAN Interface Module . . . . . . . . . . . 21 Appendix D. Example: NETCONF reply . . . . . . . . . . . . 22 Appendix E. ChangeLog . . . . . . . . . . . . . . . . . . . . . . 23 - E.1. Version -03 . . . . . . . . . . . . . . . . . . . . . . . 23 - E.2. Version -02 . . . . . . . . . . . . . . . . . . . . . . . 23 - E.3. Version -01 . . . . . . . . . . . . . . . . . . . . . . . 23 + E.1. Version -04 . . . . . . . . . . . . . . . . . . . . . . . 23 + E.2. Version -03 . . . . . . . . . . . . . . . . . . . . . . . 23 + E.3. Version -02 . . . . . . . . . . . . . . . . . . . . . . . 23 + E.4. Version -01 . . . . . . . . . . . . . . . . . . . . . . . 23 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 24 1. Introduction This document defines a YANG [RFC6020] data model for the configuration of network interfaces. It is expected that interface type specific configuration data models augment the generic interfaces data model defined in this document. Network interfaces are central to the configuration of many Internet protocols. Thus, it is important to establish a common data model for how interfaces are identified and configured. +1.1. Terminology + The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119]. + The following terms are defined in [RFC6241] and are not redefined + here: + + o client + + o server + + The following terms are defined in [RFC6020] and are not redefined + here: + + o augment + + o data model + + o data node + 2. Objectives This section describes some of the design objectives for the model presented in Section 5. o It is recognized that existing implementations will have to map the interface data model defined in this memo to their proprietary native data model. The new data model should be simple to facilitate such mappings. @@ -176,23 +196,24 @@ that the configuration applies to. For example, if a device has a single array of 8 ethernet ports, the location can be one of the strings "1" to "8". As another example, if a device has N cards of M ports, the location can be on the form "n/m", such as "1/0". How a client can learn which types and locations are present on a certain device is outside the scope of this document. 3.2. Interface References - An interface is uniquely identified by its name. This property is - captured in the "interface-ref" typedef, which other YANG modules - SHOULD use when they need to reference an existing interface. + An interface is identified by its name, which is unique within the + server. This property is captured in the "interface-ref" typedef, + which other YANG modules SHOULD use when they need to reference an + existing interface. 3.3. Interface Layering There is no generic mechanism for how an interface is configured to be layered on top of some other interface. It is expected that interface type specific models define their own nodes for interface layering, by using "interface-ref" types to reference lower layers. Below is an example of a model with such nodes. For a more complete example, see Appendix B. @@ -220,29 +241,51 @@ In most cases, the "name" of an "interface" entry is mapped to ifName. ifName is defined as an DisplayString [RFC2579] which uses a 7-bit ASCII character set. An implementation MAY restrict the allowed values for "name" to match the restrictions of ifName. The IF-MIB allows two different ifEntries to have the same ifName. Devices that support this feature, and also support the configuration of these interfaces using the "interface" list, cannot have a 1-1 mapping between the "name" leaf and ifName. + The IF-MIB also defines the writable object ifPromiscuousMode. Since + this object typically is not a configuration object, it is not mapped + to the "ietf-interfaces" module. + + The following table lists the YANG nodes with corresponding objects + in the IF-MIB. + + +--------------------------+------------------------+ + | YANG node | IF-MIB object | + +--------------------------+------------------------+ + | interface | ifEntry | + | name | ifName | + | description | ifAlias | + | type | ifType | + | enabled | ifAdminStatus | + | if-index | ifIndex | + | mtu | ifMtu | + | link-up-down-trap-enable | ifLinkUpDownTrapEnable | + +--------------------------+------------------------+ + + Mapping of YANG nodes to IF-MIB objects + 5. Interfaces YANG Module This YANG module imports a typedef from [I-D.ietf-netmod-iana-if-type]. RFC Ed.: update the date below with the date of RFC publication and remove this note. - file "ietf-interfaces@2012-02-08.yang" + file "ietf-interfaces@2012-04-29.yang" module ietf-interfaces { namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; prefix if; import iana-if-type { prefix ianaift; } @@ -276,21 +319,21 @@ Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this // note. // RFC Ed.: update the date below with the date of RFC publication // and remove this note. - revision 2012-02-08 { + revision 2012-04-29 { description "Initial revision."; reference "RFC XXXX: A YANG Data Model for Interface Configuration"; } /* Typedefs */ typedef interface-ref { type leafref { @@ -481,44 +524,44 @@ 7. Security Considerations The YANG module defined in this memo is designed to be accessed via the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH [RFC6242]. There are a number of data nodes defined in the YANG module which are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable - in some network environments. Write operations (e.g., edit-config) + in some network environments. Write operations (e.g., ) to these data nodes without proper protection can have a negative effect on network operations. These are the subtrees and data nodes and their sensitivity/vulnerability: - /interfaces/interface: This list specify the configured interfaces + /interfaces/interface: This list specifies the configured interfaces on a device. Unauthorized access to this list could cause the device to ignore packets destined to it. /interfaces/interface/enabled: This leaf controls if an interface is enabled or not. Unauthorized access to this leaf could cause the device to ignore packets destined to it. 8. Acknowledgments The author wishes to thank Per Hedeland, Ladislav Lhotka, and Juergen Schoenwaelder for their helpful comments. 9. Normative References [I-D.ietf-netmod-iana-if-type] - Bjorklund, M., "IANA Interface Type YANG Module", - draft-ietf-netmod-iana-if-type-00 (work in progress), - April 2011. + Bjorklund, M., "IANA Interface Type and Address Family + YANG Modules", draft-ietf-netmod-iana-if-type-02 (work in + progress), April 2012. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2579] McCloghrie, K., Ed., Perkins, D., Ed., and J. Schoenwaelder, Ed., "Textual Conventions for SMIv2", STD 58, RFC 2579, April 1999. [RFC2863] McCloghrie, K. and F. Kastenholz, "The Interfaces Group MIB", RFC 2863, June 2000. @@ -696,33 +739,40 @@ xmlns="http://example.com/vlan">true Appendix E. ChangeLog RFC Editor: remove this section upon publication as an RFC. -E.1. Version -03 +E.1. Version -04 + + o Clarified why ifPromiscuousMode is not part of this data model. + + o Added a table that shows the mapping between this YANG data model + and IF-MIB. + +E.2. Version -03 o Added the section Relationship to the IF-MIB. o Changed if-index to be a leaf instead of leaf-list. o Explained the notation used in the data model tree picture. -E.2. Version -02 +E.3. Version -02 o Editorial fixes -E.3. Version -01 +E.4. Version -01 o Changed leaf "if-admin-status" to leaf "enabled". o Added Security Considerations Author's Address Martin Bjorklund Tail-f Systems