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.
235 Changes in this leaf in the 'running' datastore are
236 reflected in ifAdminStatus, but if ifAdminStatus is
237 changed over SNMP, this leaf is not affected.";
239 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
242 leaf link-up-down-trap-enable {
253 "Controls whether linkUp/linkDown SNMP notifications
254 should be generated for this interface.
256 If this node is not configured, the value 'enabled' is
257 operationally used by the server for interfaces that do
258 not operate on top of any other interface (i.e., there are
259 no 'lower-layer-if' entries), and 'disabled' otherwise.";
261 "RFC 2863: The Interfaces Group MIB -
262 ifLinkUpDownTrapEnable";
268 * Operational state data nodes
271 container interfaces-state {
274 "Data nodes for the operational state of interfaces.";
284 "The list of interfaces on the device.
286 System-controlled interfaces created by the system are
287 always present in this list, whether they are configured or
293 "The name of the interface.
295 A server implementation MAY map this leaf to the ifName
296 MIB object. Such an implementation needs to use some
297 mechanism to handle the differences in size and characters
298 allowed between this leaf and ifName. The definition of
299 such a mechanism is outside the scope of this document.";
301 "RFC 2863: The Interfaces Group MIB - ifName";
310 "The type of the interface.";
312 "RFC 2863: The Interfaces Group MIB - ifType";
321 "Ready to pass packets.";
326 "Not ready to pass packets and not in some test mode.";
334 "In some test mode.";
339 "The desired state of the interface.
341 This leaf has the same read semantics as ifAdminStatus.";
343 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
351 "Ready to pass packets.";
356 "The interface does not pass any packets.";
361 "In some test mode. No operational packets can
367 "Status cannot be determined for some reason.";
372 "Waiting for some external event.";
377 "Some component (typically hardware) is missing.";
379 enum lower-layer-down {
382 "Down due to state of lower-layer interface(s).";
387 "The current operational state of the interface.
389 This leaf has the same semantics as ifOperStatus.";
391 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
395 type yang:date-and-time;
397 "The time the interface entered its current operational
398 state. If the current state was entered prior to the
399 last re-initialization of the local network management
400 subsystem, then this node is not present.";
402 "RFC 2863: The Interfaces Group MIB - ifLastChange";
408 range "1..2147483647";
412 "The ifIndex value for the ifEntry represented by this
415 "RFC 2863: The Interfaces Group MIB - ifIndex";
419 type yang:phys-address;
421 "The interface's address at its protocol sub-layer. For
422 example, for an 802.x interface, this object normally
423 contains a Media Access Control (MAC) address. The
424 interface's media-specific modules must define the bit
427 and byte ordering and the format of the value of this
428 object. For interfaces that do not have such an address
429 (e.g., a serial line), this node is not present.";
431 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
434 leaf-list higher-layer-if {
435 type interface-state-ref;
437 "A list of references to interfaces layered on top of this
440 "RFC 2863: The Interfaces Group MIB - ifStackTable";
443 leaf-list lower-layer-if {
444 type interface-state-ref;
446 "A list of references to interfaces layered underneath this
449 "RFC 2863: The Interfaces Group MIB - ifStackTable";
456 "An estimate of the interface's current bandwidth in bits
457 per second. For interfaces that do not vary in
458 bandwidth or for those where no accurate estimation can
459 be made, this node should contain the nominal bandwidth.
460 For interfaces that have no concept of bandwidth, this
461 node is not present.";
463 "RFC 2863: The Interfaces Group MIB -
464 ifSpeed, ifHighSpeed";
475 container statistics {
477 "A collection of interface-related statistics objects.";
479 leaf discontinuity-time {
480 type yang:date-and-time;
483 "The time on the most recent occasion at which any one or
484 more of this interface's counters suffered a
485 discontinuity. If no such discontinuities have occurred
486 since the last re-initialization of the local management
487 subsystem, then this node contains the time the local
488 management subsystem re-initialized itself.";
494 "The total number of octets received on the interface,
495 including framing characters.
497 Discontinuities in the value of this counter can occur
498 at re-initialization of the management system, and at
499 other times as indicated by the value of
500 'discontinuity-time'.";
502 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
505 leaf in-unicast-pkts {
508 "The number of packets, delivered by this sub-layer to a
509 higher (sub-)layer, that were not addressed to a
510 multicast or broadcast address at this sub-layer.
512 Discontinuities in the value of this counter can occur
513 at re-initialization of the management system, and at
514 other times as indicated by the value of
515 'discontinuity-time'.";
517 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
523 leaf in-broadcast-pkts {
526 "The number of packets, delivered by this sub-layer to a
527 higher (sub-)layer, that were addressed to a broadcast
528 address at this sub-layer.
530 Discontinuities in the value of this counter can occur
531 at re-initialization of the management system, and at
532 other times as indicated by the value of
533 'discontinuity-time'.";
535 "RFC 2863: The Interfaces Group MIB -
536 ifHCInBroadcastPkts";
539 leaf in-multicast-pkts {
542 "The number of packets, delivered by this sub-layer to a
543 higher (sub-)layer, that were addressed to a multicast
544 address at this sub-layer. For a MAC-layer protocol,
545 this includes both Group and Functional addresses.
547 Discontinuities in the value of this counter can occur
548 at re-initialization of the management system, and at
549 other times as indicated by the value of
550 'discontinuity-time'.";
552 "RFC 2863: The Interfaces Group MIB -
553 ifHCInMulticastPkts";
559 "The number of inbound packets that were chosen to be
560 discarded even though no errors had been detected to
561 prevent their being deliverable to a higher-layer
562 protocol. One possible reason for discarding such a
563 packet could be to free up buffer space.
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'.";
572 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
578 "For packet-oriented interfaces, the number of inbound
579 packets that contained errors preventing them from being
580 deliverable to a higher-layer protocol. For character-
581 oriented or fixed-length interfaces, the number of
582 inbound transmission units that contained errors
583 preventing them from being deliverable to a higher-layer
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 - ifInErrors";
594 leaf in-unknown-protos {
597 "For packet-oriented interfaces, the number of packets
598 received via the interface that were discarded because
599 of an unknown or unsupported protocol. For
600 character-oriented or fixed-length interfaces that
601 support protocol multiplexing, the number of
602 transmission units received via the interface that were
603 discarded because of an unknown or unsupported protocol.
604 For any interface that does not support protocol
605 multiplexing, this counter is not present.
607 Discontinuities in the value of this counter can occur
608 at re-initialization of the management system, and at
609 other times as indicated by the value of
610 'discontinuity-time'.";
612 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
622 "The total number of octets transmitted out of the
623 interface, including framing characters.
625 Discontinuities in the value of this counter can occur
626 at re-initialization of the management system, and at
627 other times as indicated by the value of
628 'discontinuity-time'.";
630 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
633 leaf out-unicast-pkts {
636 "The total number of packets that higher-level protocols
637 requested be transmitted, and that were not addressed
638 to a multicast or broadcast address at this sub-layer,
639 including those that were discarded or not sent.
641 Discontinuities in the value of this counter can occur
642 at re-initialization of the management system, and at
643 other times as indicated by the value of
644 'discontinuity-time'.";
646 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
649 leaf out-broadcast-pkts {
652 "The total number of packets that higher-level protocols
653 requested be transmitted, and that were addressed to a
654 broadcast address at this sub-layer, including those
655 that were discarded or not sent.
657 Discontinuities in the value of this counter can occur
658 at re-initialization of the management system, and at
659 other times as indicated by the value of
660 'discontinuity-time'.";
662 "RFC 2863: The Interfaces Group MIB -
663 ifHCOutBroadcastPkts";
667 leaf out-multicast-pkts {
670 "The total number of packets that higher-level protocols
671 requested be transmitted, and that were addressed to a
672 multicast address at this sub-layer, including those
673 that were discarded or not sent. For a MAC-layer
674 protocol, this includes both Group and Functional
677 Discontinuities in the value of this counter can occur
678 at re-initialization of the management system, and at
679 other times as indicated by the value of
680 'discontinuity-time'.";
682 "RFC 2863: The Interfaces Group MIB -
683 ifHCOutMulticastPkts";
689 "The number of outbound packets that were chosen to be
690 discarded even though no errors had been detected to
691 prevent their being transmitted. One possible reason
692 for discarding such a packet could be to free up buffer
695 Discontinuities in the value of this counter can occur
696 at re-initialization of the management system, and at
697 other times as indicated by the value of
698 'discontinuity-time'.";
700 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
706 "For packet-oriented interfaces, the number of outbound
707 packets that could not be transmitted because of errors.
708 For character-oriented or fixed-length interfaces, the
709 number of outbound transmission units that could not be
710 transmitted because of errors.
715 Discontinuities in the value of this counter can occur
716 at re-initialization of the management system, and at
717 other times as indicated by the value of
718 'discontinuity-time'.";
720 "RFC 2863: The Interfaces Group MIB - ifOutErrors";