draft-ietf-netmod-ip-cfg-06.txt   draft-ietf-netmod-ip-cfg-07.txt 
Network Working Group M. Bjorklund Network Working Group M. Bjorklund
Internet-Draft Tail-f Systems Internet-Draft Tail-f Systems
Intended status: Standards Track September 5, 2012 Intended status: Standards Track November 15, 2012
Expires: March 9, 2013 Expires: May 19, 2013
A YANG Data Model for IP Configuration A YANG Data Model for IP Management
draft-ietf-netmod-ip-cfg-06 draft-ietf-netmod-ip-cfg-07
Abstract Abstract
This document defines a YANG data model for configuration of IP This document defines a YANG data model for management of IP
implementations. implementations.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 9, 2013. This Internet-Draft will expire on May 19, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 12 skipping to change at page 2, line 12
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. IP Data Model . . . . . . . . . . . . . . . . . . . . . . . . 4 2. IP Data Model . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Relationship to IP-MIB . . . . . . . . . . . . . . . . . . . . 6 3. Relationship to IP-MIB . . . . . . . . . . . . . . . . . . . . 6
4. IP configuration YANG Module . . . . . . . . . . . . . . . . . 7 4. IP configuration YANG Module . . . . . . . . . . . . . . . . . 7
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
6. Security Considerations . . . . . . . . . . . . . . . . . . . 15 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.1. Normative References . . . . . . . . . . . . . . . . . . . 17 8.1. Normative References . . . . . . . . . . . . . . . . . . . 19
8.2. Informative References . . . . . . . . . . . . . . . . . . 17 8.2. Informative References . . . . . . . . . . . . . . . . . . 19
Appendix A. Example: NETCONF <get> reply . . . . . . . . . . . . 19 Appendix A. Example: NETCONF <get> reply . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 20 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22
1. Introduction 1. Introduction
This document defines a YANG [RFC6020] data model for configuration This document defines a YANG [RFC6020] data model for management of
of IP implementations. IP implementations.
The initial version of this data model focuses on configuration The initial version of this data model focuses on configuration
parameters for interfaces. Future revisions of this data model might parameters for interfaces. Future revisions of this data model might
add other kinds of IP configuration parameters. add other kinds of IP parameters.
Configuration parameters to control IP routing are defined in Parameters to manage IP routing are defined in
[I-D.ietf-netmod-routing-cfg]. [I-D.ietf-netmod-routing-cfg].
1.1. Terminology 1.1. Terminology
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14, [RFC2119]. 14, [RFC2119].
The following terms are defined in [RFC6241] and are not redefined The following terms are defined in [RFC6241] and are not redefined
skipping to change at page 4, line 19 skipping to change at page 4, line 19
following data nodes, where square brackets are used to enclose a following data nodes, where square brackets are used to enclose a
list's keys, and "?" means that the node is optional. Choice and list's keys, and "?" means that the node is optional. Choice and
case nodes are enclosed in parenthesis, and a case node is marked case nodes are enclosed in parenthesis, and a case node is marked
with a colon (":"). with a colon (":").
+--rw if:interfaces +--rw if:interfaces
+--rw if:interface [name] +--rw if:interface [name]
... ...
+--rw ipv4? +--rw ipv4?
| +--rw enabled? boolean | +--rw enabled? boolean
| +--rw ip-forwarding? boolean | +--rw forwarding? boolean
| +--rw mtu? uint16
| +--rw address [ip] | +--rw address [ip]
| | +--rw ip inet:ipv4-address | | +--rw ip inet:ipv4-address
| | +--rw (subnet)? | | +--rw (subnet)?
| | +--:(prefix-length) | | +--:(prefix-length)
| | | +--rw ip:prefix-length? uint8 | | | +--rw ip:prefix-length? uint8
| | +--:(netmask) | | +--:(netmask)
| | +--rw ip:netmask? inet:ipv4-address | | +--rw ip:netmask? inet:ipv4-address
| +--rw neighbor [ip] | +--rw neighbor [ip]
| +--rw ip inet:ipv4-address | +--rw ip inet:ipv4-address
| +--rw phys-address? yang:phys-address | +--rw phys-address? yang:phys-address
+--rw ipv6? +--rw ipv6?
+--rw enabled? boolean +--rw enabled? boolean
+--rw ip-forwarding? boolean +--rw forwarding? boolean
+--rw mtu? uint32
+--rw address [ip] +--rw address [ip]
| +--rw ip inet:ipv6-address | +--rw ip inet:ipv6-address
| +--rw prefix-length? uint8 | +--rw prefix-length? uint8
+--rw neighbor [ip] +--rw neighbor [ip]
| +--rw ip inet:ipv6-address | +--rw ip inet:ipv6-address
| +--rw phys-address? yang:phys-address | +--rw phys-address? yang:phys-address
+--rw dup-addr-detect-transmits? uint32 +--rw dup-addr-detect-transmits? uint32
+--rw autoconf +--rw autoconf
+--rw create-global-addresses? boolean +--rw create-global-addresses? boolean
+--rw create-temporary-addresses? boolean +--rw create-temporary-addresses? boolean
+--rw temporary-valid-lifetime? uint32 +--rw temporary-valid-lifetime? uint32
+--rw temporary-preferred-lifetime? uint32 +--rw temporary-preferred-lifetime? uint32
The data model defines two containers, "ipv4" and "ipv6", The data model defines two containers, "ipv4" and "ipv6",
representing the IPv4 and IPv6 address families. In each container, representing the IPv4 and IPv6 address families. In each container,
there is a leaf "enabled" that controls if the address family is there is a leaf "enabled" that controls if the address family is
enabled on that interface, and a leaf "ip-forwarding" that controls enabled on that interface, and a leaf "forwarding" that controls if
if ip packet forwarding for the address family is enabled on the ip packet forwarding for the address family is enabled on the
interface. In each container, there is also a list of manually interface. In each container, there is also a list of addresses, and
configured addresses, and a list of manually configured mappings from a list of mappings from ip addresses to physical addresses.
ip addresses to physical addresses.
3. Relationship to IP-MIB 3. Relationship to IP-MIB
If the device implements IP-MIB [RFC4293], each entry in the "ipv4/ If the device implements IP-MIB [RFC4293], each entry in the "ipv4/
address" and "ipv6/address" lists is mapped to one ipAddressEntry, address" and "ipv6/address" lists is mapped to one ipAddressEntry,
where the ipAddressIfIndex refers to the interface where the where the ipAddressIfIndex refers to the "address" entry's interface.
"address" entry is configured.
The IP-MIB defines objects to control IPv6 Router Advertisement. The The IP-MIB defines objects to control IPv6 Router Advertisement. The
corresponding YANG data nodes are defined in corresponding YANG data nodes are defined in
[I-D.ietf-netmod-routing-cfg]. [I-D.ietf-netmod-routing-cfg].
The entries in "ipv4/neighbor" and "ipv6/neighbor" are mapped to The entries in "ipv4/neighbor" and "ipv6/neighbor" are mapped to
ipNetToPhysicalTable. ipNetToPhysicalTable.
The object ipAddressStatus is writable in the IP-MIB but does not The object ipAddressStatus is writable in the IP-MIB but does not
represent configuration, and is thus not mapped to the YANG module. represent configuration, and is thus not mapped to the YANG module.
The following table lists the YANG data nodes with corresponding The following table lists the YANG data nodes with corresponding
objects in the IP-MIB. objects in the IP-MIB.
+--------------------+-----------------------------------+ +-----------------+-----------------------------------+
| YANG data node | IP-MIB object | | YANG data node | IP-MIB object |
+--------------------+-----------------------------------+ +-----------------+-----------------------------------+
| ipv4/enabled | ipv4InterfaceEnableStatus | | ipv4/enabled | ipv4InterfaceEnableStatus |
| ipv4/address | ipAddressEntry | | ipv4/address | ipAddressEntry |
| ipv4/address/ip | ipAddressAddrType / ipAddressAddr | | ipv4/address/ip | ipAddressAddrType / ipAddressAddr |
| ipv4/neighbor | ipNetToPhysicalTable | | ipv4/neighbor | ipNetToPhysicalTable |
| ipv6/enabled | ipv6InterfaceEnableStatus | | ipv6/enabled | ipv6InterfaceEnableStatus |
| ipv6/ip-forwarding | ipv6InterfaceForwarding | | ipv6/forwarding | ipv6InterfaceForwarding |
| ipv6/address | ipAddressEntry | | ipv6/address | ipAddressEntry |
| ipv6/address/ip | ipAddressAddrType / ipAddressAddr | | ipv6/address/ip | ipAddressAddrType / ipAddressAddr |
| ipv6/neighbor | ipNetToPhysicalTable | | ipv6/neighbor | ipNetToPhysicalTable |
+--------------------+-----------------------------------+ +-----------------+-----------------------------------+
Mapping of YANG data nodes to IP-MIB objects Mapping of YANG data nodes to IP-MIB objects
4. IP configuration YANG Module 4. IP configuration YANG Module
This module imports typedefs from [RFC6021] and This module imports typedefs from [RFC6021] and
[I-D.ietf-netmod-interfaces-cfg], and references [RFC0826], [I-D.ietf-netmod-interfaces-cfg], and references [RFC0791],
[RFC4861], [RFC4862], and [RFC4941]. [RFC0826], [RFC2460], [RFC4861], [RFC4862], and [RFC4941].
RFC Ed.: update the date below with the date of RFC publication and RFC Ed.: update the date below with the date of RFC publication and
remove this note. remove this note.
<CODE BEGINS> file "ietf-ip@2012-09-05.yang" <CODE BEGINS> file "ietf-ip@2012-11-15.yang"
module ietf-ip { module ietf-ip {
namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; namespace "urn:ietf:params:xml:ns:yang:ietf-ip";
prefix ip; prefix ip;
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
} }
import ietf-inet-types { import ietf-inet-types {
skipping to change at page 8, line 20 skipping to change at page 8, line 20
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and remove this // RFC Ed.: replace XXXX with actual RFC number and remove this
// note. // note.
// RFC Ed.: update the date below with the date of RFC publication // RFC Ed.: update the date below with the date of RFC publication
// and remove this note. // and remove this note.
revision 2012-09-05 { revision 2012-11-15 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: A YANG Data Model for IP Configuration"; "RFC XXXX: A YANG Data Model for IP Configuration";
} }
/* Features */ /* Features */
feature ipv4-non-contiguous-netmasks { feature ipv4-non-contiguous-netmasks {
description description
skipping to change at page 9, line 17 skipping to change at page 9, line 17
description description
"Parameters for the IPv4 address family."; "Parameters for the IPv4 address family.";
leaf enabled { leaf enabled {
type boolean; type boolean;
default true; default true;
description description
"Controls if IPv4 is enabled or disabled on this "Controls if IPv4 is enabled or disabled on this
interface."; interface.";
} }
leaf ip-forwarding { leaf forwarding {
type boolean; type boolean;
default false; default false;
description description
"Controls if IPv4 packet forwarding is enabled or disabled "Controls if IPv4 packet forwarding is enabled or disabled
on this interface."; on this interface.";
} }
leaf mtu {
type uint16 {
range "68..max";
}
units octets;
description
"The size, in octets, of the largest IPv4 packet that the
interface will send and receive.
The server may restrict the allowed values for this leaf
depending on the interface's type.
If this leaf is not configured, the operationally used mtu
depends on the interface's type.";
reference
"RFC 791: Internet Protocol";
}
list address { list address {
key "ip"; key "ip";
description description
"The list of IPv4 addresses on the interface."; "The list of IPv4 addresses on the interface.";
leaf ip { leaf ip {
type inet:ipv4-address; type inet:ipv4-address;
description description
"The IPv4 address on the interface."; "The IPv4 address on the interface.";
} }
skipping to change at page 10, line 45 skipping to change at page 11, line 14
description description
"Parameters for the IPv6 address family."; "Parameters for the IPv6 address family.";
leaf enabled { leaf enabled {
type boolean; type boolean;
default true; default true;
description description
"Controls if IPv6 is enabled or disabled on this "Controls if IPv6 is enabled or disabled on this
interface."; interface.";
} }
leaf ip-forwarding { leaf forwarding {
type boolean; type boolean;
default false; default false;
description description
"Controls if IPv6 packet forwarding is enabled or disabled "Controls if IPv6 packet forwarding is enabled or disabled
on this interface."; on this interface.";
reference reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6) "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
Section 6.2.1, IsRouter"; Section 6.2.1, IsRouter";
} }
leaf mtu {
type uint32 {
range "1280..max";
}
units octets;
description
"The size, in octets, of the largest IPv6 packet that the
interface will send and receive.
The server may restrict the allowed values for this leaf
depending on the interface's type.
If this leaf is not configured, the operationally used mtu
depends on the interface's type.";
reference
"RFC 2460: IPv6 Specification
Section 5";
}
list address { list address {
key "ip"; key "ip";
description description
"The list of IPv6 addresses on the interface."; "The list of IPv6 addresses on the interface.";
leaf ip { leaf ip {
type inet:ipv6-address; type inet:ipv6-address;
description description
"The IPv6 address on the interface."; "The IPv6 address on the interface.";
} }
skipping to change at page 15, line 36 skipping to change at page 16, line 36
interface or deny access to some or all of the network via that interface or deny access to some or all of the network via that
protocol. protocol.
ipv4/address and ipv6/address: These lists specify the configured IP ipv4/address and ipv6/address: These lists specify the configured IP
addresses on an interface. By modifying this information, an addresses on an interface. By modifying this information, an
attacker can cause a node to either ignore messages destined to it attacker can cause a node to either ignore messages destined to it
or accept (at least at the IP layer) messages it would otherwise or accept (at least at the IP layer) messages it would otherwise
ignore. The use of filtering or security associations may reduce ignore. The use of filtering or security associations may reduce
the potential damage in the latter case. the potential damage in the latter case.
ipv4/ip-forwarding and ipv6/ip-forwarding: These leafs allow a ipv4/forwarding and ipv6/forwarding: These leafs allow a client to
client to enable or disable the forwarding functions on the enable or disable the forwarding functions on the entity. By
entity. By disabling the forwarding functions, an attacker would disabling the forwarding functions, an attacker would possibly be
possibly be able to deny service to users. By enabling the able to deny service to users. By enabling the forwarding
forwarding functions, an attacker could open a conduit into an functions, an attacker could open a conduit into an area. This
area. This might result in the area providing transit for packets might result in the area providing transit for packets it
it shouldn't or might allow the attacker access to the area shouldn't or might allow the attacker access to the area bypassing
bypassing security safeguards. security safeguards.
ipv6/autoconf: The leafs in this branch control the ipv6/autoconf: The leafs in this branch control the
autoconfiguration of IPv6 addresses and in particular whether autoconfiguration of IPv6 addresses and in particular whether
temporary addresses are used or not. By modifying the temporary addresses are used or not. By modifying the
corresponding leafs, an attacker might impact the addresses used corresponding leafs, an attacker might impact the addresses used
by a node and thus indirectly the privacy of the users using the by a node and thus indirectly the privacy of the users using the
node. node.
ipv4/mtu and ipv6/mtu: Setting these leafs to very small values can
be used to slow down interfaces.
7. Acknowledgments 7. Acknowledgments
The author wishes to thank Ladislav Lhotka, Juergen Schoenwaelder, The author wishes to thank Ladislav Lhotka, Juergen Schoenwaelder,
and Dave Thaler for their helpful comments. and Dave Thaler for their helpful comments.
8. References 8. References
8.1. Normative References 8.1. Normative References
[I-D.ietf-netmod-interfaces-cfg] [I-D.ietf-netmod-interfaces-cfg]
Bjorklund, M., "A YANG Data Model for Interface Bjorklund, M., "A YANG Data Model for Interface
Configuration", draft-ietf-netmod-interfaces-cfg-05 (work Configuration", draft-ietf-netmod-interfaces-cfg-05 (work
in progress), July 2012. in progress), July 2012.
[RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791,
September 1981.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", RFC 2460, December 1998.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004. January 2004.
[RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman,
"Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861,
September 2007. September 2007.
[RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless
Address Autoconfiguration", RFC 4862, September 2007. Address Autoconfiguration", RFC 4862, September 2007.
skipping to change at page 19, line 28 skipping to change at page 21, line 28
<type>ethernetCsmacd</type> <type>ethernetCsmacd</type>
<location>0</location> <location>0</location>
<if-index>2</if-index> <if-index>2</if-index>
<ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
<address> <address>
<ip>192.0.2.1</ip> <ip>192.0.2.1</ip>
<prefix-length>24</prefix-length> <prefix-length>24</prefix-length>
</address> </address>
</ipv4> </ipv4>
<ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> <ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
<mtu>1280</mtu>
<address> <address>
<ip>2001:DB8::1</ip> <ip>2001:DB8::1</ip>
<prefix-length>32</prefix-length> <prefix-length>32</prefix-length>
</address> </address>
<dup-addr-detect-transmits>0</dup-addr-detect-transmits> <dup-addr-detect-transmits>0</dup-addr-detect-transmits>
</ipv6> </ipv6>
</interface> </interface>
</interfaces> </interfaces>
</data> </data>
</rpc-reply> </rpc-reply>
 End of changes. 25 change blocks. 
54 lines changed or deleted 99 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/