Network Working Group M. Bjorklund
Internet-Draft Tail-f Systems
Intended status: Standards Track May 20, 2011
Expires: November 21, 2011
A YANG Data Model for IP Configuration
draft-bjorklund-netmod-ip-cfg-00
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.
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.
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
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.
Bjorklund Expires November 21, 2011 [Page 1]
Internet-Draft YANG IP Configuration May 2011
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 <get-config> reply . . . . . . . . . 11
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 12
Bjorklund Expires November 21, 2011 [Page 2]
Internet-Draft YANG IP Configuration May 2011
1. Introduction
This document defines a YANG [RFC6020] data model for configuration
of IP addresses on network interfaces.
+-------------------------------------------------------------------+
| Open Question |
+-------------------------------------------------------------------+
| What is the proper scope of this document? IP addresses only, or |
| IP configuration in general? |
+-------------------------------------------------------------------+
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].
Bjorklund Expires November 21, 2011 [Page 3]
Internet-Draft YANG IP Configuration May 2011
2. IP Data Model
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 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.
Bjorklund Expires November 21, 2011 [Page 4]
Internet-Draft YANG IP Configuration May 2011
3. IP Address YANG Module
RFC Ed.: update the date below with the date of RFC publication and
remove this note.
<CODE BEGINS> file "ietf-ip@2011-05-20.yang"
module ietf-ip {
namespace "urn:ietf:params:xml:ns:yang:ietf-ip";
prefix ip;
import ietf-interfaces {
prefix if;
}
import ietf-inet-types {
prefix inet;
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
WG Chair: David Kessens
<mailto:david.kessens@nsn.com>
WG Chair: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Editor: Martin Bjorklund
<mailto:mbj@tail-f.com>";
description
"This module contains a collection of YANG definitions for
configuring IP addresses on network interfaces.
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).
Bjorklund Expires November 21, 2011 [Page 5]
Internet-Draft YANG IP Configuration May 2011
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 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for IP Configuration";
}
augment "/if:interfaces/if:interface" {
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;
}
leaf prefix-length {
type uint8 {
range "0..32";
}
}
}
}
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;
}
leaf prefix-length {
Bjorklund Expires November 21, 2011 [Page 6]
Internet-Draft YANG IP Configuration May 2011
type uint8 {
range "0..128";
}
}
}
}
}
}
<CODE ENDS>
Bjorklund Expires November 21, 2011 [Page 7]
Internet-Draft YANG IP Configuration May 2011
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.
URI: urn:ietf:params:xml:ns:yang:ietf-ip
Registrant Contact: The NETMOD WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
This document registers a YANG module in the YANG Module Names
registry [RFC6020].
name: ietf-ip
namespace: urn:ietf:params:xml:ns:yang:ietf-ip
prefix: ip
reference: RFC XXXX
Bjorklund Expires November 21, 2011 [Page 8]
Internet-Draft YANG IP Configuration May 2011
5. Security Considerations
The YANG module defined in this memo is 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].
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:
<list subtrees and data nodes and state why they are sensitive>
Some of the readable data nodes in the YANG module may be considered
sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get, get-config, or
notification) to these data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability:
<list subtrees and data nodes and state why they are sensitive>
Bjorklund Expires November 21, 2011 [Page 9]
Internet-Draft YANG IP Configuration May 2011
6. 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-interfaces-cfg]
Bjorklund, M., "A YANG Data Model for Interface
Configuration", draft-ietf-netmod-interfaces-cfg-01 (work
in progress), May 2011.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[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.
Bjorklund Expires November 21, 2011 [Page 10]
Internet-Draft YANG IP Configuration May 2011
Appendix A. Example: NETCONF <get-config> reply
This section gives an example of a reply to the NETCOMF <get> request
for a device that implements the example data models above.
<rpc-reply
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="101">
<data>
<interfaces
xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>eth0</name>
<type>ethernetCsmacd</type>
<location>0</location>
<if-index>2</if-index>
<ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
<address>
<ip>192.0.2.1</ip>
<prefix-length>24</prefix-length>
</address>
</ipv4>
</interface>
</interfaces>
</data>
</rpc-reply>
Bjorklund Expires November 21, 2011 [Page 11]
Internet-Draft YANG IP Configuration May 2011
Author's Address
Martin Bjorklund
Tail-f Systems
Email: mbj@tail-f.com
Bjorklund Expires November 21, 2011 [Page 12]