Tech-invite   World Map
3GPPspecs     Glossaries     IETF     RFCs     Groups     SIP     ABNFs

RFC 8343

Proposed STD
Pages: 49
Top     in Index     Prev     Next
in Group Index     Prev in Group     Next in Group     Group: NETMOD

A YANG Data Model for Interface Management

Part 1 of 3, p. 1 to 10
None       Next Section

Obsoletes:    7223


Top       ToC       Page 1 
Internet Engineering Task Force (IETF)                      M. Bjorklund
Request for Comments: 8343                                Tail-f Systems
Obsoletes: 7223                                               March 2018
Category: Standards Track
ISSN: 2070-1721


               A YANG Data Model for Interface Management

Abstract

   This document defines a YANG data model for the management of network
   interfaces.  It is expected that interface-type-specific data models
   augment the generic interfaces data model defined in this document.
   The data model includes definitions for configuration and system
   state (status information and counters for the collection of
   statistics).

   The YANG data model in this document conforms to the Network
   Management Datastore Architecture (NMDA) defined in RFC 8342.

   This document obsoletes RFC 7223.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8343.

Top      ToC       Page 2 
Copyright Notice

   Copyright (c) 2018 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
   (https://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.

Table of Contents

   1. Introduction ....................................................3
      1.1. Summary of Changes from RFC 7223 ...........................3
      1.2. Terminology ................................................3
      1.3. Tree Diagrams ..............................................4
   2. Objectives ......................................................5
   3. Interfaces Data Model ...........................................5
      3.1. The Interface List .........................................6
      3.2. Interface References .......................................8
      3.3. Interface Layering .........................................8
   4. Relationship to the IF-MIB ......................................9
   5. Interfaces YANG Module .........................................10
   6. IANA Considerations ............................................34
   7. Security Considerations ........................................35
   8. References .....................................................36
      8.1. Normative References ......................................36
      8.2. Informative References ....................................37
   Appendix A.  Example: Ethernet Interface Module ...................38
   Appendix B.  Example: Ethernet Bonding Interface Module ...........39
   Appendix C.  Example: VLAN Interface Module .......................40
   Appendix D.  Example: NETCONF <get-config> Reply ..................41
   Appendix E.  Example: NETCONF <get-data> Reply ....................42
   Appendix F.  Examples: Interface Naming Schemes ...................44
     F.1.  Router with Restricted Interface Names ....................44
     F.2.  Router with Arbitrary Interface Names .....................45
     F.3.  Ethernet Switch with Restricted Interface Names ...........46
     F.4.  Generic Host with Restricted Interface Names ..............47
     F.5.  Generic Host with Arbitrary Interface Names ...............48
   Acknowledgments ...................................................49
   Author's Address ..................................................49

Top      ToC       Page 3 
1.  Introduction

   This document defines a YANG data model [RFC7950] for the management
   of network interfaces.  It is expected that interface-type-specific
   data models will augment the generic interfaces data model defined in
   this document.

   Network interfaces are central to the management of many Internet
   protocols.  Thus, it is important to establish a common data model
   for how interfaces are identified, configured, and monitored.

   The data model includes configuration data and state data (status
   information and counters for the collection of statistics).

   This version of the interfaces data model supports the Network
   Management Datastore Architecture (NMDA) [RFC8342].

1.1.  Summary of Changes from RFC 7223

   The "/interfaces-state" subtree with "config false" data nodes is
   deprecated.  All "config false" data nodes are now present in the
   "/interfaces" subtree.

   Servers that do not implement NMDA, or that wish to support clients
   that do not implement NMDA, MAY implement the deprecated
   "/interfaces-state" tree.

1.2.  Terminology

   The key words "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] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   The following terms are used within this document:

   o  system-controlled interface: An interface is said to be system-
      controlled if the system creates and deletes the interface
      independently of what has been explicitly configured.  Examples
      are interfaces representing physical hardware that appear and
      disappear when hardware (e.g., a line card or hot-pluggable
      wireless interface) is added or removed.  System-controlled
      interfaces may also appear if a certain functionality is enabled
      (e.g., a loopback interface might appear if the IP protocol stack
      is enabled).

Top      ToC       Page 4 
   o  user-controlled interface: An interface is said to be user-
      controlled if the creation of the interface is controlled by
      adding explicit interface configuration to the intended
      configuration and the removal of the interface is controlled by
      removing explicit interface configuration from the intended
      configuration.  Examples are VLAN interfaces configured on a
      system-controlled Ethernet interface.

   The following terms are defined in [RFC8342] and are not redefined
   here:

   o  client

   o  server

   o  configuration

   o  system state

   o  operational state

   o  intended configuration

   o  running configuration datastore

   o  operational state datastore

   The following terms are defined in [RFC7950] and are not redefined
   here:

   o  augment

   o  data model

   o  data node

1.3.  Tree Diagrams

   Tree diagrams used in this document follow the notation defined in
   [RFC8340].

Top      ToC       Page 5 
2.  Objectives

   This section describes some of the design objectives for the model
   presented in Section 5.

   o  It is recognized that existing implementations will have to map
      the interface data model defined in this memo to their proprietary
      native data model.  To facilitate such mappings, the data model
      should be simple.

   o  The data model should be suitable for new implementations to use
      as is, without requiring a mapping to a different native model.

   o  References to interfaces should be as simple as possible,
      preferably by using a single leafref.

   o  The mapping to ifIndex [RFC2863] used by the Simple Network
      Management Protocol (SNMP) to identify interfaces must be clear.

   o  The model must support interface layering: both (1) simple
      layering, where one interface is layered on top of exactly one
      other interface, and (2) more complex scenarios, where one
      interface results from the aggregation of N other interfaces or
      when N interfaces are multiplexed over one other interface.

   o  The data model should support the pre-provisioning of interface
      configuration; that is, it should be possible to configure an
      interface whose physical interface hardware is not present on the
      device.  It is recommended that devices that support dynamic
      addition and removal of physical interfaces also support
      pre-provisioning.

   o  The data model should support physical interfaces as well as
      logical interfaces.

   o  The data model should include read-only counters in order to
      gather statistics for sent and received octets and packets,
      received packets with errors, and packets that could not be sent
      due to errors.

3.  Interfaces Data Model

   This document defines the YANG module "ietf-interfaces", which has
   the following structure, excluding the deprecated "/interfaces-state"
   subtree:

Top      ToC       Page 6 
   module: ietf-interfaces
     +--rw interfaces
        +--rw interface* [name]
           +--rw name                        string
           +--rw description?                string
           +--rw type                        identityref
           +--rw enabled?                    boolean
           +--rw link-up-down-trap-enable?   enumeration {if-mib}?
           +--ro admin-status                enumeration {if-mib}?
           +--ro oper-status                 enumeration
           +--ro last-change?                yang:date-and-time
           +--ro if-index                    int32 {if-mib}?
           +--ro phys-address?               yang:phys-address
           +--ro higher-layer-if*            interface-ref
           +--ro lower-layer-if*             interface-ref
           +--ro speed?                      yang:gauge64
           +--ro statistics
              +--ro discontinuity-time    yang:date-and-time
              +--ro in-octets?            yang:counter64
              +--ro in-unicast-pkts?      yang:counter64
              +--ro in-broadcast-pkts?    yang:counter64
              +--ro in-multicast-pkts?    yang:counter64
              +--ro in-discards?          yang:counter32
              +--ro in-errors?            yang:counter32
              +--ro in-unknown-protos?    yang:counter32
              +--ro out-octets?           yang:counter64
              +--ro out-unicast-pkts?     yang:counter64
              +--ro out-broadcast-pkts?   yang:counter64
              +--ro out-multicast-pkts?   yang:counter64
              +--ro out-discards?         yang:counter32
              +--ro out-errors?           yang:counter32

3.1.  The Interface List

   The data model for interfaces presented in this document uses a flat
   list of interfaces ("/interfaces/interface").  Each interface in the
   list is identified by its name.  Furthermore, each interface has a
   mandatory "type" leaf.

   The "iana-if-type" module [RFC7224] defines YANG identities for the
   interface types in the IANA-maintained "ifType definitions" registry.

   It is expected that interface-type-specific data models augment the
   interface list and possibly use the "type" leaf to make the
   augmentation conditional.

Top      ToC       Page 7 
   As an example of such an interface-type-specific augmentation,
   consider this YANG snippet.  For a more complete example, see
   Appendix A.

     import interfaces {
         prefix "if";
     }
     import iana-if-type {
       prefix ianaift;
     }

     augment "/if:interfaces/if:interface" {
         when "if:type = 'ianaift:ethernetCsmacd'";

         container ethernet {
             leaf duplex {
                 ...
             }
         }
     }

   For system-controlled interfaces, the "name" is the device-specific
   name of the interface.

   If the device supports arbitrarily named user-controlled interfaces,
   then the server will advertise the "arbitrary-names" feature.  If the
   server does not advertise this feature, the names of user-controlled
   interfaces MUST match the device's naming scheme.  How a client can
   learn the naming scheme of such devices is outside the scope of this
   document.  See Appendices F.1 and F.2 for examples.

   When a system-controlled interface is created in the operational
   state by the system, the system tries to apply the interface
   configuration in the intended configuration with the same name as the
   new interface.  If no such interface configuration is found, or if
   the configured type does not match the real interface type, the
   system creates the interface without applying explicit configuration.

   When a user-controlled interface is created, the configuration
   determines the name of the interface.

   Depending on the operating system and the physical attachment point
   to which a network interface may be attached or removed, it may be
   impossible for an implementation to provide predictable and
   consistent names for system-controlled interfaces across insertion/
   removal cycles as well as in anticipation of initial insertion.  The
   ability to provide configurations for such interfaces is therefore
   dependent on the implementation and cannot be assumed in all cases.

Top      ToC       Page 8 
3.2.  Interface References

   An interface is identified by its name, which is unique within the
   server.  This property is captured in the "interface-ref" typedef,
   which other YANG modules SHOULD use when they need to reference an
   interface.

3.3.  Interface Layering

   There is no generic mechanism for how an interface is configured to
   be layered on top of some other interface.  It is expected that
   interface-type-specific models define their own data nodes for
   interface layering by using "interface-ref" types to reference lower
   layers.

   Below is an example of a model with such nodes.  For a more complete
   example, see Appendix B.

     import interfaces {
         prefix "if";
     }
     import iana-if-type {
       prefix ianaift;
     }

     augment "/if:interfaces/if:interface" {
         when "if:type = 'ianaift:ieee8023adLag'";

         leaf-list slave-if {
             type if:interface-ref;
             must "/if:interfaces/if:interface[if:name = current()]"
                + "/if:type = 'ianaift:ethernetCsmacd'" {
                 description
                     "The type of a slave interface must be
                      'ethernetCsmacd'.";
             }
         }
         // other bonding config params, failover times, etc.
     }

   While the interface layering is configured in interface-type-specific
   models, two generic state data leaf-lists, "higher-layer-if" and
   "lower-layer-if", represent a read-only view of the interface
   layering hierarchy.

Top      ToC       Page 9 
4.  Relationship to the IF-MIB

   If the device implements the IF-MIB [RFC2863], each entry in the
   "/interfaces/interface" list in the operational state is typically
   mapped to one ifEntry.  The "if-index" leaf MUST contain the value of
   the corresponding ifEntry's ifIndex.

   In most cases, the "name" of an "/interfaces/interface" entry is
   mapped to ifName.  The IF-MIB allows two different ifEntries to have
   the same ifName.  Devices that support this feature and also support
   the data model defined in this document cannot have a 1-1 mapping
   between the "name" leaf and ifName.

   The configured "description" of an "interface" has traditionally been
   mapped to ifAlias in some implementations.  This document allows this
   mapping, but implementers should be aware of the differences in the
   value space and persistence for these objects.  See the YANG module
   definition of the leaf "description" in Section 5 for details.

   The IF-MIB also defines the writable object ifPromiscuousMode.  Since
   this object typically is not implemented as a configuration object by
   SNMP agents, it is not mapped to the "ietf-interfaces" module.

   The ifMtu object from the IF-MIB is not mapped to the
   "ietf-interfaces" module.  It is expected that interface-type-
   specific YANG modules provide interface-type-specific MTU leafs by
   augmenting the "ietf-interfaces" model.

   There are a number of counters in the IF-MIB that exist in two
   versions: one with 32 bits and one with 64 bits.  The 64-bit versions
   were added to support high-speed interfaces with a data rate greater
   than 20,000,000 bits/second.  Today's implementations generally
   support such high-speed interfaces; hence, only 64-bit counters are
   provided in this data model.  Note that the server that implements
   this module and an SNMP agent may differ in the time granularity in
   which they provide access to the counters.  For example, it is common
   that SNMP implementations cache counter values for some time.

   The objects ifDescr and ifConnectorPresent from the IF-MIB are not
   mapped to the "ietf-interfaces" module.

   The following table lists the YANG data nodes with corresponding
   objects in the IF-MIB.

Top      ToC       Page 10 
   +--------------------------------------+----------------------------+
   | YANG data node in                    | IF-MIB object              |
   | /interfaces/interface                |                            |
   +--------------------------------------+----------------------------+
   | name                                 | ifName                     |
   | type                                 | ifType                     |
   | description                          | ifAlias                    |
   | admin-status                         | ifAdminStatus              |
   | oper-status                          | ifOperStatus               |
   | last-change                          | ifLastChange               |
   | if-index                             | ifIndex                    |
   | link-up-down-trap-enable             | ifLinkUpDownTrapEnable     |
   | phys-address                         | ifPhysAddress              |
   | higher-layer-if and lower-layer-if   | ifStackTable               |
   | speed                                | ifSpeed and ifHighSpeed    |
   | discontinuity-time                   | ifCounterDiscontinuityTime |
   | in-octets                            | ifHCInOctets               |
   | in-unicast-pkts                      | ifHCInUcastPkts            |
   | in-broadcast-pkts                    | ifHCInBroadcastPkts        |
   | in-multicast-pkts                    | ifHCInMulticastPkts        |
   | in-discards                          | ifInDiscards               |
   | in-errors                            | ifInErrors                 |
   | in-unknown-protos                    | ifInUnknownProtos          |
   | out-octets                           | ifHCOutOctets              |
   | out-unicast-pkts                     | ifHCOutUcastPkts           |
   | out-broadcast-pkts                   | ifHCOutBroadcastPkts       |
   | out-multicast-pkts                   | ifHCOutMulticastPkts       |
   | out-discards                         | ifOutDiscards              |
   | out-errors                           | ifOutErrors                |
   +--------------------------------------+----------------------------+

                YANG Data Nodes and Related IF-MIB Objects



(page 10 continued on part 2)

Next Section