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; } import ietf-yang-types { prefix yang; } 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) 2012 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-09-05 { description "Initial revision."; reference "RFC XXXX: A YANG Data Model for IP Configuration"; } /* Features */ feature ipv4-non-contiguous-netmasks { description "Indicates support for configuring non-contiguous subnet masks."; } feature ipv6-privacy-autoconf { description "Indicates support for Privacy Extensions for Stateless Address Autoconfiguration in IPv6."; reference "RFC 4941: Privacy Extensions for Stateless Address Autoconfiguration in IPv6"; } /* 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 { presence "Configure IPv4 on this interface."; 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 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 ipv4-non-contiguous-netmasks; type inet:ipv4-address; description "The subnet specified as a netmask."; } } } list neighbor { key "ip"; description "A list of mappings from IPv4 addresses to physical addresses. Entries in this list are used as static entries in the ARP cache."; reference "RFC 826: An Ethernet Address Resolution Protocol"; leaf ip { type inet:ipv4-address; description "The IPv4 address of a neighbor node."; } leaf phys-address { type yang:phys-address; description "The physical level address of the neihgbor node."; } } } container ipv6 { presence "Configure IPv6 on this interface."; 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 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."; } } list neighbor { key "ip"; description "A list of mappings from IPv6 addresses to physical addresses. Entries in this list are used as static entries in the Neighbor Cache."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; leaf ip { type inet:ipv6-address; description "The IPv6 address of a neighbor node."; } leaf phys-address { type yang:phys-address; description "The physical level address of the neighbor node."; } } 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-addresses { if-feature ipv6-privacy-autoconf; 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 { if-feature ipv6-privacy-autoconf; type uint32; units "seconds"; default 604800; description "The time period during which the temporary address is valid."; reference "RFC 4941: Privacy Extensions for Stateless Address Autoconfiguration in IPv6 - TEMP_VALID_LIFETIME"; } leaf temporary-preferred-lifetime { if-feature ipv6-privacy-autoconf; type uint32; units "seconds"; default 86400; description "The time period during which the temporary address is preferred."; reference "RFC 4941: Privacy Extensions for Stateless Address Autoconfiguration in IPv6 - TEMP_PREFERED_LIFETIME"; } } } } }