1 module ietf-interfaces {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces";
6 import ietf-yang-types {
11 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
14 "WG Web: <http://tools.ietf.org/wg/netmod/>
15 WG List: <mailto:netmod@ietf.org>
16 WG Chair: Thomas Nadeau
17 <mailto:tnadeau@lucidvision.com>
18 WG Chair: Juergen Schoenwaelder
19 <mailto:j.schoenwaelder@jacobs-university.de>
20 Editor: Martin Bjorklund
21 <mailto:mbj@tail-f.com>";
24 "This module contains a collection of YANG definitions for
25 managing network interfaces.
26 Copyright (c) 2014 IETF Trust and the persons identified as
27 authors of the code. All rights reserved.
28 Redistribution and use in source and binary forms, with or
29 without modification, is permitted pursuant to, and subject
30 to the license terms contained in, the Simplified BSD License
31 set forth in Section 4.c of the IETF Trust's Legal Provisions
32 Relating to IETF Documents
33 (http://trustee.ietf.org/license-info).
34 This version of this YANG module is part of RFC 7223; see
35 the RFC itself for full legal notices.";
41 "RFC 7223: A YANG Data Model for Interface Management";
48 typedef interface-ref {
50 path "/if:interfaces/if:interface/if:name";
53 "This type is used by data models that need to reference
54 configured interfaces.";
57 typedef interface-state-ref {
59 path "/if:interfaces-state/if:interface/if:name";
62 "This type is used by data models that need to reference
63 the operationally present interfaces.";
70 identity interface-type {
72 "Base identity from which specific interface types are
80 feature arbitrary-names {
82 "This feature indicates that the device allows user-controlled
83 interfaces to be named arbitrarily.";
85 feature pre-provisioning {
87 "This feature indicates that the device supports
88 pre-provisioning of interface configuration, i.e., it is
89 possible to configure an interface whose physical interface
90 hardware is not present on the device.";
95 "This feature indicates that the device implements
98 "RFC 2863: The Interfaces Group MIB";
102 * Configuration data nodes
105 container interfaces {
107 "Interface configuration parameters.";
113 "The list of configured interfaces on the device.
114 The operational state of an interface is available in the
115 /interfaces-state/interface list. If the configuration of a
116 system-controlled interface cannot be used by the system
117 (e.g., the interface hardware present does not match the
118 interface type), then the configuration is not applied to
119 the system-controlled interface shown in the
120 /interfaces-state/interface list. If the configuration
121 of a user-controlled interface cannot be used by the system,
122 the configured interface is not instantiated in the
123 /interfaces-state/interface list.";
128 "The name of the interface.
129 A device MAY restrict the allowed values for this leaf,
130 possibly depending on the type of the interface.
131 For system-controlled interfaces, this leaf is the
132 device-specific name of the interface. The 'config false'
133 list /interfaces-state/interface contains the currently
134 existing interfaces on the device.
135 If a client tries to create configuration for a
136 system-controlled interface that is not present in the
137 /interfaces-state/interface list, the server MAY reject
138 the request if the implementation does not support
139 pre-provisioning of interfaces or if the name refers to
140 an interface that can never exist in the system. A
141 NETCONF server MUST reply with an rpc-error with the
142 error-tag 'invalid-value' in this case.
143 If the device supports pre-provisioning of interface
144 configuration, the 'pre-provisioning' feature is
146 If the device allows arbitrarily named user-controlled
147 interfaces, the 'arbitrary-names' feature is advertised.
148 When a configured user-controlled interface is created by
149 the system, it is instantiated with the same name in the
150 /interface-state/interface list.";
156 "A textual description of the interface.
157 A server implementation MAY map this leaf to the ifAlias
158 MIB object. Such an implementation needs to use some
159 mechanism to handle the differences in size and characters
160 allowed between this leaf and ifAlias. The definition of
161 such a mechanism is outside the scope of this document.
162 Since ifAlias is defined to be stored in non-volatile
163 storage, the MIB implementation MUST map ifAlias to the
164 value of 'description' in the persistently stored
166 Specifically, if the device supports ':startup', when
167 ifAlias is read the device MUST return the value of
168 'description' in the 'startup' datastore, and when it is
169 written, it MUST be written to the 'running' and 'startup'
170 datastores. Note that it is up to the implementation to
171 decide whether to modify this single leaf in 'startup' or
172 perform an implicit copy-config from 'running' to
174 If the device does not support ':startup', ifAlias MUST
175 be mapped to the 'description' leaf in the 'running'
178 "RFC 2863: The Interfaces Group MIB - ifAlias";
187 "The type of the interface.
188 When an interface entry is created, a server MAY
189 initialize the type leaf with a valid value, e.g., if it
190 is possible to derive the type from the name of the
192 If a client tries to set the type of an interface to a
193 value that can never be used by the system, e.g., if the
194 type is not supported or if the type does not match the
195 name of the interface, the server MUST reject the request.
196 A NETCONF server MUST reply with an rpc-error with the
197 error-tag 'invalid-value' in this case.";
199 "RFC 2863: The Interfaces Group MIB - ifType";
206 "This leaf contains the configured, desired state of the
208 Systems that implement the IF-MIB use the value of this
209 leaf in the 'running' datastore to set
210 IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
211 has been initialized, as described in RFC 2863.
212 Changes in this leaf in the 'running' datastore are
213 reflected in ifAdminStatus, but if ifAdminStatus is
214 changed over SNMP, this leaf is not affected.";
216 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
219 leaf link-up-down-trap-enable {
230 "Controls whether linkUp/linkDown SNMP notifications
231 should be generated for this interface.
232 If this node is not configured, the value 'enabled' is
233 operationally used by the server for interfaces that do
234 not operate on top of any other interface (i.e., there are
235 no 'lower-layer-if' entries), and 'disabled' otherwise.";
237 "RFC 2863: The Interfaces Group MIB -
238 ifLinkUpDownTrapEnable";
244 * Operational state data nodes
247 container interfaces-state {
250 "Data nodes for the operational state of interfaces.";
256 "The list of interfaces on the device.
257 System-controlled interfaces created by the system are
258 always present in this list, whether they are configured or
264 "The name of the interface.
265 A server implementation MAY map this leaf to the ifName
266 MIB object. Such an implementation needs to use some
267 mechanism to handle the differences in size and characters
268 allowed between this leaf and ifName. The definition of
269 such a mechanism is outside the scope of this document.";
271 "RFC 2863: The Interfaces Group MIB - ifName";
280 "The type of the interface.";
282 "RFC 2863: The Interfaces Group MIB - ifType";
291 "Ready to pass packets.";
296 "Not ready to pass packets and not in some test mode.";
302 "In some test mode.";
307 "The desired state of the interface.
308 This leaf has the same read semantics as ifAdminStatus.";
310 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
318 "Ready to pass packets.";
323 "The interface does not pass any packets.";
328 "In some test mode. No operational packets can
334 "Status cannot be determined for some reason.";
339 "Waiting for some external event.";
344 "Some component (typically hardware) is missing.";
346 enum lower-layer-down {
349 "Down due to state of lower-layer interface(s).";
354 "The current operational state of the interface.
355 This leaf has the same semantics as ifOperStatus.";
357 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
361 type yang:date-and-time;
363 "The time the interface entered its current operational
364 state. If the current state was entered prior to the
365 last re-initialization of the local network management
366 subsystem, then this node is not present.";
368 "RFC 2863: The Interfaces Group MIB - ifLastChange";
374 range "1..2147483647";
378 "The ifIndex value for the ifEntry represented by this
381 "RFC 2863: The Interfaces Group MIB - ifIndex";
385 type yang:phys-address;
387 "The interface's address at its protocol sub-layer. For
388 example, for an 802.x interface, this object normally
389 contains a Media Access Control (MAC) address. The
390 interface's media-specific modules must define the bit
391 and byte ordering and the format of the value of this
392 object. For interfaces that do not have such an address
393 (e.g., a serial line), this node is not present.";
395 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
398 leaf-list higher-layer-if {
399 type interface-state-ref;
401 "A list of references to interfaces layered on top of this
404 "RFC 2863: The Interfaces Group MIB - ifStackTable";
407 leaf-list lower-layer-if {
408 type interface-state-ref;
410 "A list of references to interfaces layered underneath this
413 "RFC 2863: The Interfaces Group MIB - ifStackTable";
420 "An estimate of the interface's current bandwidth in bits
421 per second. For interfaces that do not vary in
422 bandwidth or for those where no accurate estimation can
423 be made, this node should contain the nominal bandwidth.
424 For interfaces that have no concept of bandwidth, this
425 node is not present.";
427 "RFC 2863: The Interfaces Group MIB -
428 ifSpeed, ifHighSpeed";
431 container statistics {
433 "A collection of interface-related statistics objects.";
435 leaf discontinuity-time {
436 type yang:date-and-time;
439 "The time on the most recent occasion at which any one or
440 more of this interface's counters suffered a
441 discontinuity. If no such discontinuities have occurred
442 since the last re-initialization of the local management
443 subsystem, then this node contains the time the local
444 management subsystem re-initialized itself.";
450 "The total number of octets received on the interface,
451 including framing characters.
452 Discontinuities in the value of this counter can occur
453 at re-initialization of the management system, and at
454 other times as indicated by the value of
455 'discontinuity-time'.";
457 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
460 leaf in-unicast-pkts {
463 "The number of packets, delivered by this sub-layer to a
464 higher (sub-)layer, that were not addressed to a
465 multicast or broadcast address at this sub-layer.
466 Discontinuities in the value of this counter can occur
467 at re-initialization of the management system, and at
468 other times as indicated by the value of
469 'discontinuity-time'.";
471 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
474 leaf in-broadcast-pkts {
477 "The number of packets, delivered by this sub-layer to a
478 higher (sub-)layer, that were addressed to a broadcast
479 address at this sub-layer.
480 Discontinuities in the value of this counter can occur
481 at re-initialization of the management system, and at
482 other times as indicated by the value of
483 'discontinuity-time'.";
485 "RFC 2863: The Interfaces Group MIB -
486 ifHCInBroadcastPkts";
489 leaf in-multicast-pkts {
492 "The number of packets, delivered by this sub-layer to a
493 higher (sub-)layer, that were addressed to a multicast
494 address at this sub-layer. For a MAC-layer protocol,
495 this includes both Group and Functional addresses.
496 Discontinuities in the value of this counter can occur
497 at re-initialization of the management system, and at
498 other times as indicated by the value of
499 'discontinuity-time'.";
501 "RFC 2863: The Interfaces Group MIB -
502 ifHCInMulticastPkts";
508 "The number of inbound packets that were chosen to be
509 discarded even though no errors had been detected to
510 prevent their being deliverable to a higher-layer
511 protocol. One possible reason for discarding such a
512 packet could be to free up buffer space.
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'.";
519 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
525 "For packet-oriented interfaces, the number of inbound
526 packets that contained errors preventing them from being
527 deliverable to a higher-layer protocol. For character-
528 oriented or fixed-length interfaces, the number of
529 inbound transmission units that contained errors
530 preventing them from being deliverable to a higher-layer
532 Discontinuities in the value of this counter can occur
533 at re-initialization of the management system, and at
534 other times as indicated by the value of
535 'discontinuity-time'.";
537 "RFC 2863: The Interfaces Group MIB - ifInErrors";
540 leaf in-unknown-protos {
543 "For packet-oriented interfaces, the number of packets
544 received via the interface that were discarded because
545 of an unknown or unsupported protocol. For
546 character-oriented or fixed-length interfaces that
547 support protocol multiplexing, the number of
548 transmission units received via the interface that were
549 discarded because of an unknown or unsupported protocol.
550 For any interface that does not support protocol
551 multiplexing, this counter is not present.
552 Discontinuities in the value of this counter can occur
553 at re-initialization of the management system, and at
554 other times as indicated by the value of
555 'discontinuity-time'.";
557 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
563 "The total number of octets transmitted out of the
564 interface, including framing characters.
565 Discontinuities in the value of this counter can occur
566 at re-initialization of the management system, and at
567 other times as indicated by the value of
568 'discontinuity-time'.";
570 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
573 leaf out-unicast-pkts {
576 "The total number of packets that higher-level protocols
577 requested be transmitted, and that were not addressed
578 to a multicast or broadcast address at this sub-layer,
579 including those that were discarded or not sent.
580 Discontinuities in the value of this counter can occur
581 at re-initialization of the management system, and at
582 other times as indicated by the value of
583 'discontinuity-time'.";
585 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
588 leaf out-broadcast-pkts {
591 "The total number of packets that higher-level protocols
592 requested be transmitted, and that were addressed to a
593 broadcast address at this sub-layer, including those
594 that were discarded or not sent.
595 Discontinuities in the value of this counter can occur
596 at re-initialization of the management system, and at
597 other times as indicated by the value of
598 'discontinuity-time'.";
600 "RFC 2863: The Interfaces Group MIB -
601 ifHCOutBroadcastPkts";
604 leaf out-multicast-pkts {
607 "The total number of packets that higher-level protocols
608 requested be transmitted, and that were addressed to a
609 multicast address at this sub-layer, including those
610 that were discarded or not sent. For a MAC-layer
611 protocol, this includes both Group and Functional
613 Discontinuities in the value of this counter can occur
614 at re-initialization of the management system, and at
615 other times as indicated by the value of
616 'discontinuity-time'.";
618 "RFC 2863: The Interfaces Group MIB -
619 ifHCOutMulticastPkts";
625 "The number of outbound packets that were chosen to be
626 discarded even though no errors had been detected to
627 prevent their being transmitted. One possible reason
628 for discarding such a packet could be to free up buffer
630 Discontinuities in the value of this counter can occur
631 at re-initialization of the management system, and at
632 other times as indicated by the value of
633 'discontinuity-time'.";
635 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
641 "For packet-oriented interfaces, the number of outbound
642 packets that could not be transmitted because of errors.
643 For character-oriented or fixed-length interfaces, the
644 number of outbound transmission units that could not be
645 transmitted because of errors.
646 Discontinuities in the value of this counter can occur
647 at re-initialization of the management system, and at
648 other times as indicated by the value of
649 'discontinuity-time'.";
651 "RFC 2863: The Interfaces Group MIB - ifOutErrors";