1 module ietf-interfaces {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces";
6 import ietf-yang-types {
8 revision-date "2013-07-15";
12 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
15 "WG Web: <http://tools.ietf.org/wg/netmod/>
16 WG List: <mailto:netmod@ietf.org>
18 WG Chair: Thomas Nadeau
19 <mailto:tnadeau@lucidvision.com>
21 WG Chair: Juergen Schoenwaelder
22 <mailto:j.schoenwaelder@jacobs-university.de>
24 Editor: Martin Bjorklund
25 <mailto:mbj@tail-f.com>";
28 "This module contains a collection of YANG definitions for
29 managing network interfaces.
31 Copyright (c) 2014 IETF Trust and the persons identified as
32 authors of the code. All rights reserved.
34 Redistribution and use in source and binary forms, with or
35 without modification, is permitted pursuant to, and subject
36 to the license terms contained in, the Simplified BSD License
37 set forth in Section 4.c of the IETF Trust's Legal Provisions
38 Relating to IETF Documents
39 (http://trustee.ietf.org/license-info).
41 This version of this YANG module is part of RFC 7223; see
42 the RFC itself for full legal notices.";
48 "RFC 7223: A YANG Data Model for Interface Management";
55 typedef interface-ref {
57 path "/if:interfaces/if:interface/if:name";
60 "This type is used by data models that need to reference
61 configured interfaces.";
64 typedef interface-state-ref {
66 path "/if:interfaces-state/if:interface/if:name";
69 "This type is used by data models that need to reference
70 the operationally present interfaces.";
77 identity interface-type {
79 "Base identity from which specific interface types are
87 feature arbitrary-names {
89 "This feature indicates that the device allows user-controlled
90 interfaces to be named arbitrarily.";
92 feature pre-provisioning {
94 "This feature indicates that the device supports
95 pre-provisioning of interface configuration, i.e., it is
96 possible to configure an interface whose physical interface
97 hardware is not present on the device.";
102 "This feature indicates that the device implements
105 "RFC 2863: The Interfaces Group MIB";
109 * Configuration data nodes
112 container interfaces {
114 "Interface configuration parameters.";
120 "The list of configured interfaces on the device.
122 The operational state of an interface is available in the
123 /interfaces-state/interface list. If the configuration of a
124 system-controlled interface cannot be used by the system
125 (e.g., the interface hardware present does not match the
126 interface type), then the configuration is not applied to
127 the system-controlled interface shown in the
128 /interfaces-state/interface list. If the configuration
129 of a user-controlled interface cannot be used by the system,
130 the configured interface is not instantiated in the
131 /interfaces-state/interface list.";
136 "The name of the interface.
138 A device MAY restrict the allowed values for this leaf,
139 possibly depending on the type of the interface.
140 For system-controlled interfaces, this leaf is the
141 device-specific name of the interface. The 'config false'
142 list /interfaces-state/interface contains the currently
143 existing interfaces on the device.
145 If a client tries to create configuration for a
146 system-controlled interface that is not present in the
147 /interfaces-state/interface list, the server MAY reject
148 the request if the implementation does not support
149 pre-provisioning of interfaces or if the name refers to
150 an interface that can never exist in the system. A
151 NETCONF server MUST reply with an rpc-error with the
152 error-tag 'invalid-value' in this case.
154 If the device supports pre-provisioning of interface
155 configuration, the 'pre-provisioning' feature is
158 If the device allows arbitrarily named user-controlled
159 interfaces, the 'arbitrary-names' feature is advertised.
161 When a configured user-controlled interface is created by
162 the system, it is instantiated with the same name in the
163 /interface-state/interface list.";
169 "A textual description of the interface.
171 A server implementation MAY map this leaf to the ifAlias
172 MIB object. Such an implementation needs to use some
173 mechanism to handle the differences in size and characters
174 allowed between this leaf and ifAlias. The definition of
175 such a mechanism is outside the scope of this document.
177 Since ifAlias is defined to be stored in non-volatile
178 storage, the MIB implementation MUST map ifAlias to the
179 value of 'description' in the persistently stored
182 Specifically, if the device supports ':startup', when
183 ifAlias is read the device MUST return the value of
184 'description' in the 'startup' datastore, and when it is
185 written, it MUST be written to the 'running' and 'startup'
186 datastores. Note that it is up to the implementation to
188 decide whether to modify this single leaf in 'startup' or
189 perform an implicit copy-config from 'running' to
192 If the device does not support ':startup', ifAlias MUST
193 be mapped to the 'description' leaf in the 'running'
196 "RFC 2863: The Interfaces Group MIB - ifAlias";
205 "The type of the interface.
207 When an interface entry is created, a server MAY
208 initialize the type leaf with a valid value, e.g., if it
209 is possible to derive the type from the name of the
212 If a client tries to set the type of an interface to a
213 value that can never be used by the system, e.g., if the
214 type is not supported or if the type does not match the
215 name of the interface, the server MUST reject the request.
216 A NETCONF server MUST reply with an rpc-error with the
217 error-tag 'invalid-value' in this case.";
219 "RFC 2863: The Interfaces Group MIB - ifType";
226 "This leaf contains the configured, desired state of the
229 Systems that implement the IF-MIB use the value of this
230 leaf in the 'running' datastore to set
231 IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
232 has been initialized, as described in RFC 2863.
236 Changes in this leaf in the 'running' datastore are
237 reflected in ifAdminStatus, but if ifAdminStatus is
238 changed over SNMP, this leaf is not affected.";
240 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
243 leaf link-up-down-trap-enable {
254 "Controls whether linkUp/linkDown SNMP notifications
255 should be generated for this interface.
257 If this node is not configured, the value 'enabled' is
258 operationally used by the server for interfaces that do
259 not operate on top of any other interface (i.e., there are
260 no 'lower-layer-if' entries), and 'disabled' otherwise.";
262 "RFC 2863: The Interfaces Group MIB -
263 ifLinkUpDownTrapEnable";
269 * Operational state data nodes
272 container interfaces-state {
275 "Data nodes for the operational state of interfaces.";
285 "The list of interfaces on the device.
287 System-controlled interfaces created by the system are
288 always present in this list, whether they are configured or
294 "The name of the interface.
296 A server implementation MAY map this leaf to the ifName
297 MIB object. Such an implementation needs to use some
298 mechanism to handle the differences in size and characters
299 allowed between this leaf and ifName. The definition of
300 such a mechanism is outside the scope of this document.";
302 "RFC 2863: The Interfaces Group MIB - ifName";
311 "The type of the interface.";
313 "RFC 2863: The Interfaces Group MIB - ifType";
322 "Ready to pass packets.";
327 "Not ready to pass packets and not in some test mode.";
335 "In some test mode.";
340 "The desired state of the interface.
342 This leaf has the same read semantics as ifAdminStatus.";
344 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
352 "Ready to pass packets.";
357 "The interface does not pass any packets.";
362 "In some test mode. No operational packets can
368 "Status cannot be determined for some reason.";
373 "Waiting for some external event.";
378 "Some component (typically hardware) is missing.";
380 enum lower-layer-down {
383 "Down due to state of lower-layer interface(s).";
388 "The current operational state of the interface.
390 This leaf has the same semantics as ifOperStatus.";
392 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
396 type yang:date-and-time;
398 "The time the interface entered its current operational
399 state. If the current state was entered prior to the
400 last re-initialization of the local network management
401 subsystem, then this node is not present.";
403 "RFC 2863: The Interfaces Group MIB - ifLastChange";
409 range "1..2147483647";
413 "The ifIndex value for the ifEntry represented by this
416 "RFC 2863: The Interfaces Group MIB - ifIndex";
420 type yang:phys-address;
422 "The interface's address at its protocol sub-layer. For
423 example, for an 802.x interface, this object normally
424 contains a Media Access Control (MAC) address. The
425 interface's media-specific modules must define the bit
428 and byte ordering and the format of the value of this
429 object. For interfaces that do not have such an address
430 (e.g., a serial line), this node is not present.";
432 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
435 leaf-list higher-layer-if {
436 type interface-state-ref;
438 "A list of references to interfaces layered on top of this
441 "RFC 2863: The Interfaces Group MIB - ifStackTable";
444 leaf-list lower-layer-if {
445 type interface-state-ref;
447 "A list of references to interfaces layered underneath this
450 "RFC 2863: The Interfaces Group MIB - ifStackTable";
457 "An estimate of the interface's current bandwidth in bits
458 per second. For interfaces that do not vary in
459 bandwidth or for those where no accurate estimation can
460 be made, this node should contain the nominal bandwidth.
461 For interfaces that have no concept of bandwidth, this
462 node is not present.";
464 "RFC 2863: The Interfaces Group MIB -
465 ifSpeed, ifHighSpeed";
476 container statistics {
478 "A collection of interface-related statistics objects.";
480 leaf discontinuity-time {
481 type yang:date-and-time;
484 "The time on the most recent occasion at which any one or
485 more of this interface's counters suffered a
486 discontinuity. If no such discontinuities have occurred
487 since the last re-initialization of the local management
488 subsystem, then this node contains the time the local
489 management subsystem re-initialized itself.";
495 "The total number of octets received on the interface,
496 including framing characters.
498 Discontinuities in the value of this counter can occur
499 at re-initialization of the management system, and at
500 other times as indicated by the value of
501 'discontinuity-time'.";
503 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
506 leaf in-unicast-pkts {
509 "The number of packets, delivered by this sub-layer to a
510 higher (sub-)layer, that were not addressed to a
511 multicast or broadcast address at this sub-layer.
513 Discontinuities in the value of this counter can occur
514 at re-initialization of the management system, and at
515 other times as indicated by the value of
516 'discontinuity-time'.";
518 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
524 leaf in-broadcast-pkts {
527 "The number of packets, delivered by this sub-layer to a
528 higher (sub-)layer, that were addressed to a broadcast
529 address at this sub-layer.
531 Discontinuities in the value of this counter can occur
532 at re-initialization of the management system, and at
533 other times as indicated by the value of
534 'discontinuity-time'.";
536 "RFC 2863: The Interfaces Group MIB -
537 ifHCInBroadcastPkts";
540 leaf in-multicast-pkts {
543 "The number of packets, delivered by this sub-layer to a
544 higher (sub-)layer, that were addressed to a multicast
545 address at this sub-layer. For a MAC-layer protocol,
546 this includes both Group and Functional addresses.
548 Discontinuities in the value of this counter can occur
549 at re-initialization of the management system, and at
550 other times as indicated by the value of
551 'discontinuity-time'.";
553 "RFC 2863: The Interfaces Group MIB -
554 ifHCInMulticastPkts";
560 "The number of inbound packets that were chosen to be
561 discarded even though no errors had been detected to
562 prevent their being deliverable to a higher-layer
563 protocol. One possible reason for discarding such a
564 packet could be to free up buffer space.
566 Discontinuities in the value of this counter can occur
567 at re-initialization of the management system, and at
568 other times as indicated by the value of
569 'discontinuity-time'.";
573 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
579 "For packet-oriented interfaces, the number of inbound
580 packets that contained errors preventing them from being
581 deliverable to a higher-layer protocol. For character-
582 oriented or fixed-length interfaces, the number of
583 inbound transmission units that contained errors
584 preventing them from being deliverable to a higher-layer
587 Discontinuities in the value of this counter can occur
588 at re-initialization of the management system, and at
589 other times as indicated by the value of
590 'discontinuity-time'.";
592 "RFC 2863: The Interfaces Group MIB - ifInErrors";
595 leaf in-unknown-protos {
598 "For packet-oriented interfaces, the number of packets
599 received via the interface that were discarded because
600 of an unknown or unsupported protocol. For
601 character-oriented or fixed-length interfaces that
602 support protocol multiplexing, the number of
603 transmission units received via the interface that were
604 discarded because of an unknown or unsupported protocol.
605 For any interface that does not support protocol
606 multiplexing, this counter is not present.
608 Discontinuities in the value of this counter can occur
609 at re-initialization of the management system, and at
610 other times as indicated by the value of
611 'discontinuity-time'.";
613 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
623 "The total number of octets transmitted out of the
624 interface, including framing characters.
626 Discontinuities in the value of this counter can occur
627 at re-initialization of the management system, and at
628 other times as indicated by the value of
629 'discontinuity-time'.";
631 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
634 leaf out-unicast-pkts {
637 "The total number of packets that higher-level protocols
638 requested be transmitted, and that were not addressed
639 to a multicast or broadcast address at this sub-layer,
640 including those that were discarded or not sent.
642 Discontinuities in the value of this counter can occur
643 at re-initialization of the management system, and at
644 other times as indicated by the value of
645 'discontinuity-time'.";
647 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
650 leaf out-broadcast-pkts {
653 "The total number of packets that higher-level protocols
654 requested be transmitted, and that were addressed to a
655 broadcast address at this sub-layer, including those
656 that were discarded or not sent.
658 Discontinuities in the value of this counter can occur
659 at re-initialization of the management system, and at
660 other times as indicated by the value of
661 'discontinuity-time'.";
663 "RFC 2863: The Interfaces Group MIB -
664 ifHCOutBroadcastPkts";
668 leaf out-multicast-pkts {
671 "The total number of packets that higher-level protocols
672 requested be transmitted, and that were addressed to a
673 multicast address at this sub-layer, including those
674 that were discarded or not sent. For a MAC-layer
675 protocol, this includes both Group and Functional
678 Discontinuities in the value of this counter can occur
679 at re-initialization of the management system, and at
680 other times as indicated by the value of
681 'discontinuity-time'.";
683 "RFC 2863: The Interfaces Group MIB -
684 ifHCOutMulticastPkts";
690 "The number of outbound packets that were chosen to be
691 discarded even though no errors had been detected to
692 prevent their being transmitted. One possible reason
693 for discarding such a packet could be to free up buffer
696 Discontinuities in the value of this counter can occur
697 at re-initialization of the management system, and at
698 other times as indicated by the value of
699 'discontinuity-time'.";
701 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
707 "For packet-oriented interfaces, the number of outbound
708 packets that could not be transmitted because of errors.
709 For character-oriented or fixed-length interfaces, the
710 number of outbound transmission units that could not be
711 transmitted because of errors.
716 Discontinuities in the value of this counter can occur
717 at re-initialization of the management system, and at
718 other times as indicated by the value of
719 'discontinuity-time'.";
721 "RFC 2863: The Interfaces Group MIB - ifOutErrors";