--- 1/draft-ietf-netmod-interfaces-cfg-01.txt 2011-09-07 23:16:41.000000000 +0200 +++ 2/draft-ietf-netmod-interfaces-cfg-02.txt 2011-09-07 23:16:41.000000000 +0200 @@ -1,18 +1,18 @@ Network Working Group M. Bjorklund Internet-Draft Tail-f Systems -Intended status: Standards Track May 20, 2011 -Expires: November 21, 2011 +Intended status: Standards Track September 7, 2011 +Expires: March 10, 2012 A YANG Data Model for Interface Configuration - draft-ietf-netmod-interfaces-cfg-01 + draft-ietf-netmod-interfaces-cfg-02 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,21 +22,21 @@ 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 November 21, 2011. + This Internet-Draft will expire on March 10, 2012. Copyright Notice Copyright (c) 2011 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 @@ -55,25 +55,25 @@ 3.2. Interface References . . . . . . . . . . . . . . . . . . . 6 3.3. Interface Layering . . . . . . . . . . . . . . . . . . . . 6 4. Interfaces YANG Module . . . . . . . . . . . . . . . . . . . . 7 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 6. Security Considerations . . . . . . . . . . . . . . . . . . . 13 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 14 8. Normative References . . . . . . . . . . . . . . . . . . . . . 15 Appendix A. Example: Ethernet Interface Module . . . . . . . . . 16 Appendix B. Example: Ethernet Bonding Interface Module . . . . . 18 Appendix C. Example: VLAN Interface Module . . . . . . . . . . . 19 - Appendix D. Example: IP Module . . . . . . . . . . . . . . . . . 20 - Appendix E. Example: NETCONF reply . . . . . . . . . . . . 21 - Appendix F. ChangeLog . . . . . . . . . . . . . . . . . . . . . . 22 - F.1. Version -01 . . . . . . . . . . . . . . . . . . . . . . . 22 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 23 + Appendix D. Example: NETCONF reply . . . . . . . . . . . . 20 + Appendix E. ChangeLog . . . . . . . . . . . . . . . . . . . . . . 21 + E.1. Version -02 . . . . . . . . . . . . . . . . . . . . . . . 21 + E.2. Version -01 . . . . . . . . . . . . . . . . . . . . . . . 21 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22 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 @@ -90,23 +90,20 @@ presented in Section 4. 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. o The data model should be suitable for new implementations to use as-is, without requiring a mapping to a different native model. - o The data model must be extensible for different specific interface - types, including vendor-specific types. - o References to interfaces should be as simple as possible, preferably by using a single leafref. o The mapping to ifIndex [RFC2863] used by SNMP to identify interfaces must be clear. o The model must support interface layering, both simple layering where one interface is layered on top of exactly one other interface, and more complex scenarios where one interface is aggregated over N other interfaces, or when N interfaces are @@ -120,21 +117,21 @@ provisioning. 3. Interfaces Data Model The module "ietf-interfaces" has the following structure: +--rw interfaces +--rw interface [name] +--rw name string +--rw description? string - +--rw type ift:iana-if-type + +--rw type ianaift:iana-if-type +--rw location? string +--rw enabled? boolean +--ro if-index* int32 +--rw mtu? uint32 +--rw link-up-down-trap-enable? enumeration This module defines one YANG feature: snmp-if-mib: Indicates that the server implements IF-MIB [RFC2863]. @@ -183,54 +180,57 @@ 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. 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 objects for interface + 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 objects. For a more - complete example, see Appendix B. + Below is an example of a model with such nodes. For a more complete + example, see Appendix B. augment "/if:interfaces/if:interface" { when "if:type = 'ieee8023adLag'"; leaf-list slave-if { type if:interface-ref; must "/if:interfaces/if:interface[if:name = current()]" - + "/if:type = 'eth:ethernet'" { + + "/if:type = 'ethernetCsmacd'" { description "The type of a slave interface must be ethernet"; } } // other bonding config params, failover times etc. } 4. 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@2011-05-20.yang" + file "ietf-interfaces@2011-09-07.yang" module ietf-interfaces { namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; prefix if; import iana-if-type { - prefix ift; + prefix ianaift; } organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: WG List: WG Chair: David Kessens @@ -248,30 +248,29 @@ Copyright (c) 2011 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions 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 2011-05-20 { + revision 2011-09-07 { description "Initial revision."; reference "RFC XXXX: A YANG Data Model for Interface Configuration"; } /* Typedefs */ typedef interface-ref { type leafref { @@ -327,21 +325,21 @@ This leaf MAY be mapped to ifAlias by an implementation. Such an implementation MAY restrict the length of the value of this leaf so that it matches the restrictions of ifAlias."; reference "RFC 2863: The Interfaces Group MIB - ifAlias"; } leaf type { - type ift:iana-if-type; + type ianaift:iana-if-type; mandatory true; description "The type of the interface. When an interface entry is created, a server MAY initialize the type leaf with a valid value, e.g., if it is possible to derive the type from the name of the interface."; } @@ -452,73 +450,73 @@ This document registers a YANG module in the YANG Module Names registry [RFC6020]. name: ietf-interfaces namespace: urn:ietf:params:xml:ns:yang:ietf-interfaces prefix: if reference: RFC XXXX 6. Security Considerations - The YANG module and submodules defined in this memo are designed to - be accessed via the NETCONF protocol [I-D.ietf-netconf-4741bis]. The - lowest NETCONF layer is the secure transport layer and the mandatory- - to-implement secure transport is SSH [I-D.ietf-netconf-rfc4742bis]. + 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 and - submodules 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) 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: + 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) + 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 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. 7. Acknowledgments The author wishes to thank Per Hedeland, Ladislav Lhotka, and Juergen Schoenwaelder for their helpful comments. 8. Normative References - [I-D.ietf-netconf-4741bis] - Enns, R., Bjorklund, M., Schoenwaelder, J., and A. - Bierman, "Network Configuration Protocol (NETCONF)", - draft-ietf-netconf-4741bis-10 (work in progress), - March 2011. - - [I-D.ietf-netconf-rfc4742bis] - Wasserman, M. and T. Goddard, "Using the NETCONF - Configuration Protocol over Secure Shell (SSH)", - draft-ietf-netconf-rfc4742bis-08 (work in progress), - March 2011. + [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. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2863] McCloghrie, K. and F. Kastenholz, "The Interfaces Group MIB", RFC 2863, June 2000. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. + [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. + Bierman, "Network Configuration Protocol (NETCONF)", + RFC 6241, June 2011. + + [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure + Shell (SSH)", RFC 6242, June 2011. + Appendix A. Example: Ethernet Interface Module This section gives a simple example of how an Ethernet interface module could be defined. It demonstrates how media-specific configuration parameters can be conditionally augmented to the generic interface list. It is not intended as a complete module for ethernet configuration. module ex-ethernet { namespace "http://example.com/ethernet"; @@ -636,99 +634,70 @@ } leaf vlan-id { type uint16 { range "1..4094"; } must "../base-interface"; } } } -Appendix D. Example: IP Module - - This section gives an example how an IP module can be defined. - - module ex-ip { - - namespace "http://example.com/ip"; - prefix "ip"; - - import ietf-interfaces { - prefix if; - } - - import ietf-inet-types { - prefix inet; - } - - augment "/if:interfaces/if:interface" { - container ip { - list address { - key "ip"; - leaf ip { - type inet:ip-address; - } - leaf prefix-length { - type uint16; - // range depends on type of address - } - } - } - } - } - -Appendix E. Example: NETCONF reply +Appendix D. Example: NETCONF reply This section gives an example of a reply to the NETCOMF request for a device that implements the example data models above. eth0 ethernetCsmacd 0 - up + true 2
192.0.2.1 24
eth1 ethernetCsmacd 1 - up + true 7
192.168.1.1 24
-Appendix F. ChangeLog +Appendix E. ChangeLog RFC Editor: remove this section upon publication as an RFC. -F.1. Version -01 +E.1. Version -02 + + o Editorial fixes + +E.2. Version -01 o Changed leaf "if-admin-status" to leaf "enabled". o Added Security Considerations Author's Address Martin Bjorklund Tail-f Systems