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>
17 WG Chair: Thomas Nadeau
18 <mailto:tnadeau@lucidvision.com>
20 WG Chair: Juergen Schoenwaelder
21 <mailto:j.schoenwaelder@jacobs-university.de>
23 Editor: Martin Bjorklund
24 <mailto:mbj@tail-f.com>";
27 "This module contains a collection of YANG definitions for
28 managing network interfaces.
30 Copyright (c) 2014 IETF Trust and the persons identified as
31 authors of the code. All rights reserved.
33 Redistribution and use in source and binary forms, with or
34 without modification, is permitted pursuant to, and subject
35 to the license terms contained in, the Simplified BSD License
36 set forth in Section 4.c of the IETF Trust's Legal Provisions
37 Relating to IETF Documents
38 (http://trustee.ietf.org/license-info).
40 This version of this YANG module is part of RFC 7223; see
41 the RFC itself for full legal notices.";
47 "RFC 7223: A YANG Data Model for Interface Management";
54 typedef interface-ref {
56 path "/if:interfaces/if:interface/if:name";
59 "This type is used by data models that need to reference
60 configured interfaces.";
63 typedef interface-state-ref {
65 path "/if:interfaces-state/if:interface/if:name";
68 "This type is used by data models that need to reference
69 the operationally present interfaces.";
76 identity interface-type {
78 "Base identity from which specific interface types are
86 feature arbitrary-names {
88 "This feature indicates that the device allows user-controlled
89 interfaces to be named arbitrarily.";
91 feature pre-provisioning {
93 "This feature indicates that the device supports
94 pre-provisioning of interface configuration, i.e., it is
95 possible to configure an interface whose physical interface
96 hardware is not present on the device.";
101 "This feature indicates that the device implements
104 "RFC 2863: The Interfaces Group MIB";
108 * Configuration data nodes
111 container interfaces {
113 "Interface configuration parameters.";
119 "The list of configured interfaces on the device.
121 The operational state of an interface is available in the
122 /interfaces-state/interface list. If the configuration of a
123 system-controlled interface cannot be used by the system
124 (e.g., the interface hardware present does not match the
125 interface type), then the configuration is not applied to
126 the system-controlled interface shown in the
127 /interfaces-state/interface list. If the configuration
128 of a user-controlled interface cannot be used by the system,
129 the configured interface is not instantiated in the
130 /interfaces-state/interface list.";
135 "The name of the interface.
137 A device MAY restrict the allowed values for this leaf,
138 possibly depending on the type of the interface.
139 For system-controlled interfaces, this leaf is the
140 device-specific name of the interface. The 'config false'
141 list /interfaces-state/interface contains the currently
142 existing interfaces on the device.
144 If a client tries to create configuration for a
145 system-controlled interface that is not present in the
146 /interfaces-state/interface list, the server MAY reject
147 the request if the implementation does not support
148 pre-provisioning of interfaces or if the name refers to
149 an interface that can never exist in the system. A
150 NETCONF server MUST reply with an rpc-error with the
151 error-tag 'invalid-value' in this case.
153 If the device supports pre-provisioning of interface
154 configuration, the 'pre-provisioning' feature is
157 If the device allows arbitrarily named user-controlled
158 interfaces, the 'arbitrary-names' feature is advertised.
160 When a configured user-controlled interface is created by
161 the system, it is instantiated with the same name in the
162 /interface-state/interface list.";
168 "A textual description of the interface.
170 A server implementation MAY map this leaf to the ifAlias
171 MIB object. Such an implementation needs to use some
172 mechanism to handle the differences in size and characters
173 allowed between this leaf and ifAlias. The definition of
174 such a mechanism is outside the scope of this document.
176 Since ifAlias is defined to be stored in non-volatile
177 storage, the MIB implementation MUST map ifAlias to the
178 value of 'description' in the persistently stored
181 Specifically, if the device supports ':startup', when
182 ifAlias is read the device MUST return the value of
183 'description' in the 'startup' datastore, and when it is
184 written, it MUST be written to the 'running' and 'startup'
185 datastores. Note that it is up to the implementation to
187 decide whether to modify this single leaf in 'startup' or
188 perform an implicit copy-config from 'running' to
191 If the device does not support ':startup', ifAlias MUST
192 be mapped to the 'description' leaf in the 'running'
195 "RFC 2863: The Interfaces Group MIB - ifAlias";
204 "The type of the interface.
206 When an interface entry is created, a server MAY
207 initialize the type leaf with a valid value, e.g., if it
208 is possible to derive the type from the name of the
211 If a client tries to set the type of an interface to a
212 value that can never be used by the system, e.g., if the
213 type is not supported or if the type does not match the
214 name of the interface, the server MUST reject the request.
215 A NETCONF server MUST reply with an rpc-error with the
216 error-tag 'invalid-value' in this case.";
218 "RFC 2863: The Interfaces Group MIB - ifType";
225 "This leaf contains the configured, desired state of the
228 Systems that implement the IF-MIB use the value of this
229 leaf in the 'running' datastore to set
230 IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
231 has been initialized, as described in RFC 2863.
233 Changes in this leaf in the 'running' datastore are
234 reflected in ifAdminStatus, but if ifAdminStatus is
235 changed over SNMP, this leaf is not affected.";
237 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
240 leaf link-up-down-trap-enable {
251 "Controls whether linkUp/linkDown SNMP notifications
252 should be generated for this interface.
254 If this node is not configured, the value 'enabled' is
255 operationally used by the server for interfaces that do
256 not operate on top of any other interface (i.e., there are
257 no 'lower-layer-if' entries), and 'disabled' otherwise.";
259 "RFC 2863: The Interfaces Group MIB -
260 ifLinkUpDownTrapEnable";
266 * Operational state data nodes
269 container interfaces-state {
272 "Data nodes for the operational state of interfaces.";
278 "The list of interfaces on the device.
280 System-controlled interfaces created by the system are
281 always present in this list, whether they are configured or
287 "The name of the interface.
289 A server implementation MAY map this leaf to the ifName
290 MIB object. Such an implementation needs to use some
291 mechanism to handle the differences in size and characters
292 allowed between this leaf and ifName. The definition of
293 such a mechanism is outside the scope of this document.";
295 "RFC 2863: The Interfaces Group MIB - ifName";
304 "The type of the interface.";
306 "RFC 2863: The Interfaces Group MIB - ifType";
315 "Ready to pass packets.";
320 "Not ready to pass packets and not in some test mode.";
326 "In some test mode.";
331 "The desired state of the interface.
333 This leaf has the same read semantics as ifAdminStatus.";
335 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
343 "Ready to pass packets.";
348 "The interface does not pass any packets.";
353 "In some test mode. No operational packets can
359 "Status cannot be determined for some reason.";
364 "Waiting for some external event.";
369 "Some component (typically hardware) is missing.";
371 enum lower-layer-down {
374 "Down due to state of lower-layer interface(s).";
379 "The current operational state of the interface.
381 This leaf has the same semantics as ifOperStatus.";
383 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
387 type yang:date-and-time;
389 "The time the interface entered its current operational
390 state. If the current state was entered prior to the
391 last re-initialization of the local network management
392 subsystem, then this node is not present.";
394 "RFC 2863: The Interfaces Group MIB - ifLastChange";
400 range "1..2147483647";
404 "The ifIndex value for the ifEntry represented by this
407 "RFC 2863: The Interfaces Group MIB - ifIndex";
411 type yang:phys-address;
413 "The interface's address at its protocol sub-layer. For
414 example, for an 802.x interface, this object normally
415 contains a Media Access Control (MAC) address. The
416 interface's media-specific modules must define the bit
418 and byte ordering and the format of the value of this
419 object. For interfaces that do not have such an address
420 (e.g., a serial line), this node is not present.";
422 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
425 leaf-list higher-layer-if {
426 type interface-state-ref;
428 "A list of references to interfaces layered on top of this
431 "RFC 2863: The Interfaces Group MIB - ifStackTable";
434 leaf-list lower-layer-if {
435 type interface-state-ref;
437 "A list of references to interfaces layered underneath this
440 "RFC 2863: The Interfaces Group MIB - ifStackTable";
447 "An estimate of the interface's current bandwidth in bits
448 per second. For interfaces that do not vary in
449 bandwidth or for those where no accurate estimation can
450 be made, this node should contain the nominal bandwidth.
451 For interfaces that have no concept of bandwidth, this
452 node is not present.";
454 "RFC 2863: The Interfaces Group MIB -
455 ifSpeed, ifHighSpeed";
458 container statistics {
460 "A collection of interface-related statistics objects.";
462 leaf discontinuity-time {
463 type yang:date-and-time;
466 "The time on the most recent occasion at which any one or
467 more of this interface's counters suffered a
468 discontinuity. If no such discontinuities have occurred
469 since the last re-initialization of the local management
470 subsystem, then this node contains the time the local
471 management subsystem re-initialized itself.";
477 "The total number of octets received on the interface,
478 including framing characters.
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 - ifHCInOctets";
488 leaf in-unicast-pkts {
491 "The number of packets, delivered by this sub-layer to a
492 higher (sub-)layer, that were not addressed to a
493 multicast or broadcast address at this sub-layer.
495 Discontinuities in the value of this counter can occur
496 at re-initialization of the management system, and at
497 other times as indicated by the value of
498 'discontinuity-time'.";
500 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
503 leaf in-broadcast-pkts {
506 "The number of packets, delivered by this sub-layer to a
507 higher (sub-)layer, that were addressed to a broadcast
508 address at this sub-layer.
510 Discontinuities in the value of this counter can occur
511 at re-initialization of the management system, and at
512 other times as indicated by the value of
513 'discontinuity-time'.";
515 "RFC 2863: The Interfaces Group MIB -
516 ifHCInBroadcastPkts";
519 leaf in-multicast-pkts {
522 "The number of packets, delivered by this sub-layer to a
523 higher (sub-)layer, that were addressed to a multicast
524 address at this sub-layer. For a MAC-layer protocol,
525 this includes both Group and Functional addresses.
527 Discontinuities in the value of this counter can occur
528 at re-initialization of the management system, and at
529 other times as indicated by the value of
530 'discontinuity-time'.";
532 "RFC 2863: The Interfaces Group MIB -
533 ifHCInMulticastPkts";
539 "The number of inbound packets that were chosen to be
540 discarded even though no errors had been detected to
541 prevent their being deliverable to a higher-layer
542 protocol. One possible reason for discarding such a
543 packet could be to free up buffer space.
545 Discontinuities in the value of this counter can occur
546 at re-initialization of the management system, and at
547 other times as indicated by the value of
548 'discontinuity-time'.";
551 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
557 "For packet-oriented interfaces, the number of inbound
558 packets that contained errors preventing them from being
559 deliverable to a higher-layer protocol. For character-
560 oriented or fixed-length interfaces, the number of
561 inbound transmission units that contained errors
562 preventing them from being deliverable to a higher-layer
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 - ifInErrors";
573 leaf in-unknown-protos {
576 "For packet-oriented interfaces, the number of packets
577 received via the interface that were discarded because
578 of an unknown or unsupported protocol. For
579 character-oriented or fixed-length interfaces that
580 support protocol multiplexing, the number of
581 transmission units received via the interface that were
582 discarded because of an unknown or unsupported protocol.
583 For any interface that does not support protocol
584 multiplexing, this counter is not present.
586 Discontinuities in the value of this counter can occur
587 at re-initialization of the management system, and at
588 other times as indicated by the value of
589 'discontinuity-time'.";
591 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
597 "The total number of octets transmitted out of the
598 interface, including framing characters.
600 Discontinuities in the value of this counter can occur
601 at re-initialization of the management system, and at
602 other times as indicated by the value of
603 'discontinuity-time'.";
605 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
608 leaf out-unicast-pkts {
611 "The total number of packets that higher-level protocols
612 requested be transmitted, and that were not addressed
613 to a multicast or broadcast address at this sub-layer,
614 including those that were discarded or not sent.
616 Discontinuities in the value of this counter can occur
617 at re-initialization of the management system, and at
618 other times as indicated by the value of
619 'discontinuity-time'.";
621 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
624 leaf out-broadcast-pkts {
627 "The total number of packets that higher-level protocols
628 requested be transmitted, and that were addressed to a
629 broadcast address at this sub-layer, including those
630 that were discarded or not sent.
632 Discontinuities in the value of this counter can occur
633 at re-initialization of the management system, and at
634 other times as indicated by the value of
635 'discontinuity-time'.";
637 "RFC 2863: The Interfaces Group MIB -
638 ifHCOutBroadcastPkts";
641 leaf out-multicast-pkts {
644 "The total number of packets that higher-level protocols
645 requested be transmitted, and that were addressed to a
646 multicast address at this sub-layer, including those
647 that were discarded or not sent. For a MAC-layer
648 protocol, this includes both Group and Functional
651 Discontinuities in the value of this counter can occur
652 at re-initialization of the management system, and at
653 other times as indicated by the value of
654 'discontinuity-time'.";
656 "RFC 2863: The Interfaces Group MIB -
657 ifHCOutMulticastPkts";
663 "The number of outbound packets that were chosen to be
664 discarded even though no errors had been detected to
665 prevent their being transmitted. One possible reason
666 for discarding such a packet could be to free up buffer
669 Discontinuities in the value of this counter can occur
670 at re-initialization of the management system, and at
671 other times as indicated by the value of
672 'discontinuity-time'.";
674 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
680 "For packet-oriented interfaces, the number of outbound
681 packets that could not be transmitted because of errors.
682 For character-oriented or fixed-length interfaces, the
683 number of outbound transmission units that could not be
684 transmitted because of errors.
686 Discontinuities in the value of this counter can occur
687 at re-initialization of the management system, and at
688 other times as indicated by the value of
689 'discontinuity-time'.";
691 "RFC 2863: The Interfaces Group MIB - ifOutErrors";