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:
WG List:
WG Chair: David Kessens
WG Chair: Juergen Schoenwaelder
Editor: Martin Bjorklund
";
description
"This module contains a collection of YANG definitions for
configuring IP implementations.
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 2012-04-29 {
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 on interfaces.
If an interface is not capable of running IP, the server
must not allow the client to configure these parameters.";
container ipv4 {
description
"Parameters for the IPv4 address family.";
leaf enabled {
type boolean;
default true;
description
"Controls if IPv4 is enabled or disabled on this
interface.";
}
leaf ip-forwarding {
type boolean;
default false;
description
"Controls if IPv4 packet forwarding is enabled or disabled
on this interface.";
}
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 family.";
leaf enabled {
type boolean;
default true;
description
"Controls if IPv6 is enabled or disabled on this
interface.";
}
leaf ip-forwarding {
type boolean;
default false;
description
"Controls if IPv6 packet forwarding is enabled or disabled
on this interface.";
reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
Section 6.2.1, IsRouter";
}
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.";
}
}
leaf dup-addr-detect-transmits {
type uint32;
default 1;
description
"The number of consecutive Neighbor Solicitation messages
sent while performing Duplicate Address Detection on a
tentative address. A value of zero indicates that
Duplicate Address Detection is not performed on
tentative addresses. A value of one indicates a single
transmission with no follow-up retransmissions.";
reference
"RFC 4862: IPv6 Stateless Address Autoconfiguration";
}
container autoconf {
description
"Parameters to control the autoconfiguration of IPv6
addresses, as described in RFC 4862.";
reference
"RFC 4862: IPv6 Stateless Address Autoconfiguration";
leaf create-global-addresses {
type boolean;
default true;
description
"If enabled, the host creates global addresses as
described in section 5.5 of RFC 4862.";
reference
"RFC 4862: IPv6 Stateless Address Autoconfiguration";
}
leaf create-temporary-addressed {
type boolean;
default false;
description
"If enabled, the host creates temporary addresses as
described in RFC 4941.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6";
}
leaf temporary-valid-lifetime {
type uint32;
units "seconds";
default 604800;
description
"The time the temporary address is valid.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6
- TEMP_VALID_LIFETIME";
}
leaf temporary-preferred-lifetime {
type uint32;
units "seconds";
default 86400;
description
"The time the temporary address is preferred.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6
- TEMP_PREFERED_LIFETIME";
}
}
}
}
}