--- 1/draft-ietf-netmod-ip-cfg-00.txt 2011-10-28 11:14:04.642755237 +0200 +++ 2/draft-ietf-netmod-ip-cfg-01.txt 2011-10-28 11:14:04.662756115 +0200 @@ -1,18 +1,18 @@ Network Working Group M. Bjorklund Internet-Draft Tail-f Systems -Intended status: Standards Track September 7, 2011 -Expires: March 10, 2012 +Intended status: Standards Track October 28, 2011 +Expires: April 30, 2012 A YANG Data Model for IP Configuration - draft-ietf-netmod-ip-cfg-00 + draft-ietf-netmod-ip-cfg-01 Abstract This document defines a YANG data model for configuration of IP addresses on network interfaces. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. @@ -20,21 +20,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 March 10, 2012. + This Internet-Draft will expire on April 30, 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 @@ -42,25 +42,25 @@ 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 2. IP Data Model . . . . . . . . . . . . . . . . . . . . . . . . 4 3. IP Address YANG Module . . . . . . . . . . . . . . . . . . . . 5 - 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 - 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 - 6. Normative References . . . . . . . . . . . . . . . . . . . . . 10 - Appendix A. Example: NETCONF reply . . . . . . . . . . . . 11 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 12 + 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 + 5. Security Considerations . . . . . . . . . . . . . . . . . . . 10 + 6. Normative References . . . . . . . . . . . . . . . . . . . . . 11 + Appendix A. Example: NETCONF reply . . . . . . . . . . . . 12 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 13 1. Introduction This document defines a YANG [RFC6020] data model for configuration of IP addresses on network interfaces. 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]. @@ -70,39 +70,43 @@ The module "ietf-ip" augments the "interface" list defined in the "ietf-interfaces" module [I-D.ietf-netmod-interfaces-cfg] with the following nodes: +--rw if:interfaces +--rw if:interface [name] ... +--rw ipv4 | +--rw address [ip] | +--rw ip inet:ipv4-address - | +--rw prefix-length? uint8 + | +--rw (subnet)? + | +--:(prefix-length) + | | +--rw ip:prefix-length? uint8 + | +--:(netmask) + | +--rw ip:netmask? inet:ipv4-address +--rw ipv6 +--rw address [ip] +--rw ip inet:ipv6-address +--rw prefix-length? uint8 The data model defines two containers, "ipv4" and "ipv6", representing the IPv4 and IPv6 address families. In each container, there is a list of manually configured addresses. 3. IP Address YANG Module This module imports typedefs from [RFC6021] and [I-D.ietf-netmod-interfaces-cfg]. RFC Ed.: update the date below with the date of RFC publication and remove this note. - file "ietf-ip@2011-09-07.yang" + file "ietf-ip@2011-10-28.yang" module ietf-ip { namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; prefix ip; import ietf-interfaces { prefix if; } import ietf-inet-types { @@ -140,66 +144,105 @@ (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-09-07 { + revision 2011-10-28 { description "Initial revision."; reference "RFC XXXX: A YANG Data Model for IP Configuration"; } + /* Features */ + + feature non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + /* Data nodes */ + augment "/if:interfaces/if:interface" { + description + "Parameters for configuring IP addresses on interfaces."; + container ipv4 { description "Parameters for the IPv4 address familiy."; list address { key "ip"; description "The list of manually configured IPv4 addresses on the interface."; leaf ip { type inet:ipv4-address; + description + "The IPv4 address on the interface."; } + choice subnet { + default prefix-length; + description + "The subnet can be specified as a prefix-length, or, + if the server supports non-contiguous netmasks, as + a netmask. + + The default subnet is a prefix-length of 32."; leaf prefix-length { type uint8 { range "0..32"; } + default 32; + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature non-contiguous-netmasks; + type inet:ipv4-address; + description + "The subnet specified as a netmask."; + } } } } container ipv6 { description "Parameters for the IPv6 address familiy."; list address { key "ip"; description "The list of manually configured IPv6 addresses on the interface."; leaf ip { type inet:ipv6-address; + description + "The IPv6 address on the interface."; } leaf prefix-length { type uint8 { range "0..128"; } + default 128; + description + "The length of the subnet prefix."; } } } + } } 4. IANA Considerations This document registers a URI in the IETF XML registry [RFC3688]. Following the format in RFC 3688, the following registration is requested to be made.