netconfcentral logo

ietf-interfaces

HTML

ietf-interfaces.yang



  module ietf-interfaces {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-interfaces";

    prefix if;

    import iana-if-type {
      prefix ianaift;
    }

    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 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).
     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

    revision "2012-02-08" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG Data Model for Interface Configuration";

    }


    typedef interface-ref {
      type leafref {
        path
          "/if:interfaces/if:interface/if:name";
      }
      description
        "This type is used by data models that need to reference
       interfaces.";
    }

    feature snmp-if-mib {
      description
        "This feature indicates that the server implements IF-MIB.";
      reference
        "RFC 2863: The Interfaces Group MIB";

    }

    container interfaces {
      description "Interface parameters.";
      list interface {
        key "name";
        unique "type location";
        description
          "The list of configured interfaces on the device.";
        leaf name {
          type string;
          description
            "An arbitrary name for the interface.

           A device MAY restrict the allowed values for this leaf,
           possibly depending on the type and location.

           For example, if a device has a single array of 8 ethernet
           ports, the name might be restricted to be on the form
          'ethN', where N is an integer between '1' and '8'.

           This leaf MAY be mapped to ifName by an implementation.
           Such an implementation MAY restrict the allowed values
           for this leaf so that it matches the restrictions of
           ifName.";
          reference
            "RFC 2863: The Interfaces Group MIB - ifName";

        }

        leaf description {
          type string;
          description
            "A textual description of the interface.

           This leaf MAY be mapped to ifAlias by an implementation.
           Such an implementation MAY restrict the allowed values
           for this leaf so that it matches the restrictions of
           ifAlias.";
          reference
            "RFC 2863: The Interfaces Group MIB - ifAlias";

        }

        leaf type {
          type ianaift:iana-if-type;
          mandatory true;
          description
            "The type of the interface.

           When an interface entry is created, a server MAY
           initialize the type leaf with a valid value, e.g., if it
           is possible to derive the type from the name of the
           interface.";
        }

        leaf location {
          type string;
          description
            "The device-specific location of the interface of a
           particular type.  The format of the location string
           depends on the interface type and the device.

           Media-specific modules must specify if the location
           is needed for the given type.

           For example, if a device has a single array of 8 ethernet
           ports, the location can be one of '1' to '8'.  As another
           example, if a device has N cards of M ports, the location
           can be on the form 'n/m'.

           When an interface entry is created, a server MAY
           initialize the location leaf with a valid value, e.g., if
           it is possible to derive the location from the name of
           the interface.";
        }

        leaf enabled {
          type boolean;
          default "true";
          description
            "The desired state of the interface.

           This leaf contains the configured, desired state of the
           interface.  Systems that implement the IF-MIB use the
           value of this leaf to set IF-MIB.ifAdminStatus to 'up' or
           'down' after an ifEntry has been initialized, as described
           in RFC 2863.";
          reference
            "RFC 2863: The Interfaces Group MIB - ifAdminStatus";

        }

        leaf if-index {
          if-feature snmp-if-mib;
          type int32 {
            range "1..2147483647";
          }
          config false;
          description
            "The ifIndex value for the ifEntry represented by this
           interface.

           Media-specific modules must specify how the type is
           mapped to entries in the ifTable.";
          reference
            "RFC 2863: The Interfaces Group MIB - ifIndex";

        }

        leaf mtu {
          type uint32;
          description
            "The size, in octets, of the largest packet that the
           interface can send and receive.  This node might not be
           valid for all interface types.

           Media-specific modules must specify any restrictions on
           the mtu for their interface type.";
        }

        leaf link-up-down-trap-enable {
          if-feature snmp-if-mib;
          type enumeration {
            enum "enabled" {
              value 1;
            }
            enum "disabled" {
              value 2;
            }
          }
          description
            "Indicates whether linkUp/linkDown SNMP notifications
           should be generated for this interface.

           If this node is not configured, the value 'enabled' is
           operationally used by the server for interfaces which do
           not operate on top of any other interface (as defined in
           the ifStackTable), and 'disabled' otherwise.";
          reference
            "RFC 2863: The Interfaces Group MIB -
            	  ifLinkUpDownTrapEnable";

        }
      }  // list interface
    }  // container interfaces
  }  // module ietf-interfaces

Summary

  
  
Organization IETF NETMOD (NETCONF Data Modeling Language) Working Group
  
Module ietf-interfaces
Version 2012-02-08
File ietf-interfaces.yang
  
Prefix if
Namespace urn:ietf:params:xml:ns:yang:ietf-interfaces
  
Cooked /cookedmodules/ietf-interfaces/2012-02-08
YANG /src/ietf-interfaces@2012-02-08.yang
XSD /xsd/ietf-interfaces@2012-02-08.xsd
  
Abstract This module contains a collection of YANG definitions for configuring network interfaces. Copyright (c) 2011 IETF Trust and the...
  
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 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).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.

Typedefs

Typedef Base type Abstract
interface-ref leafref This type is used by data models that need to reference interfaces.

Objects

Type Key
Mandatory config
Optional config
Not config
Object Type Abstract
interfaces container Interface parameters.
   interface list The list of configured interfaces on the device.
      description leaf A textual description of the interface. This leaf MAY be mapped to ifAlias by an implementation. Such an implementation MAY restrict the allowed values for this leaf so that it matches the restrictions of ifAlias.
      enabled leaf The desired state of the interface. This leaf contains the configured, desired state of the interface. Systems that implement the IF-MIB use the value of this leaf to set IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry has been initialized, as d...
      if-index leaf The ifIndex value for the ifEntry represented by this interface. Media-specific modules must specify how the type is mapped to entries in the ifTable.
      link-up-down-trap-enable leaf Indicates whether linkUp/linkDown SNMP notifications should be generated for this interface. If this node is not configured, the value 'enabled' is operationally used by the server for interfaces which do not operate on top of any other interface (as def...
      location leaf The device-specific location of the interface of a particular type. The format of the location string depends on the interface type and the device. Media-specific modules must specify if the location is needed for the given type. For example, if a devi...
      mtu leaf The size, in octets, of the largest packet that the interface can send and receive. This node might not be valid for all interface types. Media-specific modules must specify any restrictions on the mtu for their interface type.
      name leaf An arbitrary name for the interface. A device MAY restrict the allowed values for this leaf, possibly depending on the type and location. For example, if a device has a single array of 8 ethernet ports, the name might be restricted to be on the form 'et...
      type leaf The type of the interface. When an interface entry is created, a server MAY initialize the type leaf with a valid value, e.g., if it is possible to derive the type from the name of the interface.