1 module ietf-interfaces {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces";
6 import ietf-yang-types {
14 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
17 "WG Web: <http://tools.ietf.org/wg/netmod/>
18 WG List: <mailto:netmod@ietf.org>
20 WG Chair: David Kessens
21 <mailto:david.kessens@nsn.com>
23 WG Chair: Juergen Schoenwaelder
24 <mailto:j.schoenwaelder@jacobs-university.de>
26 Editor: Martin Bjorklund
27 <mailto:mbj@tail-f.com>";
30 "This module contains a collection of YANG definitions for
31 managing network interfaces.
33 Copyright (c) 2013 IETF Trust and the persons identified as
34 authors of the code. All rights reserved.
36 Redistribution and use in source and binary forms, with or
37 without modification, is permitted pursuant to, and subject
38 to the license terms contained in, the Simplified BSD License
39 set forth in Section 4.c of the IETF Trust's Legal Provisions
40 Relating to IETF Documents
41 (http://trustee.ietf.org/license-info).
43 This version of this YANG module is part of RFC XXXX; see
44 the RFC itself for full legal notices.";
46 // RFC Ed.: replace XXXX with actual RFC number and remove this
49 // RFC Ed.: update the date below with the date of RFC publication
50 // and remove this note.
55 "RFC XXXX: A YANG Data Model for Interface Management";
60 typedef interface-ref {
62 path "/if:interfaces/if:interface/if:name";
65 "This type is used by data models that need to reference
66 configured interfaces.";
69 typedef interface-state-ref {
71 path "/if:interfaces-state/if:interface/if:name";
74 "This type is used by data models that need to reference
75 the operationally present interfaces.";
80 feature arbitrary-names {
82 "This feature indicates that the device allows user-controlled
83 interfaces to be named arbitrarily.";
86 feature pre-provisioning {
88 "This feature indicates that the device supports
89 pre-provisioning of interface configuration, i.e., it is
90 possible to configure an interface whose physical interface
91 hardware is not present on the device.";
96 "This feature indicates that the device implements IF-MIB.";
98 "RFC 2863: The Interfaces Group MIB";
103 container interfaces {
105 "Interface configuration parameters.";
111 "The list of configured interfaces on the device.
113 The operational state of an interface is available in the
114 /interfaces-state/interface list. If the configuration of a
115 system-controlled interface cannot be used by the system
116 (e.g., the interface hardware present does not match the
117 interface type), then the configuration is not applied to
118 the system-controlled interface shown in the
119 /interfaces-state/interface list. If the the configuration
120 of a user-controlled interface cannot be used by the system,
121 the configured interface is not instantiated in the
122 /interfaces-state/interface list.";
127 "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.
132 For system-controlled interfaces, this leaf is the
133 device-specific name of the interface. The 'config false'
134 list /interfaces-state/interface contains the currently
135 existing interfaces on the device.
137 If a client tries to create configuration for a
138 system-controlled interface that is not present in the
139 /interfaces-state/interface list, the server MAY reject
140 the request, if the implementation does not support
141 pre-provisioning of interfaces, or if the name refers to
142 an interface that can never exist in the system. A
143 NETCONF server MUST reply with an rpc-error with the
144 error-tag 'invalid-value' in this case.
146 If the device supports pre-provisioning of interface
147 configuration, the feature 'pre-provisioning' is
150 If the device allows arbitrarily named user-controlled
151 interfaces, the feature 'arbitrary-names' is advertised.
153 When a configured user-controlled interface is created by
154 the system, it is instantiated with the same name in the
155 /interface-state/interface list. Since the name in that
156 list MAY be mapped to ifName by an implementation, such an
157 implementation MUST restrict the allowed values for this
158 leaf so that it matches the restrictions of ifName.
160 If a NETCONF server that implements this restriction is
161 sent a value that doesn't match the restriction, it MUST
162 reply with an rpc-error with the error-tag
169 "A textual description of the interface.
171 This leaf MAY be mapped to ifAlias by an implementation.
172 Such an implementation MUST restrict the allowed values
173 for this leaf so that it matches the restrictions of
176 If a NETCONF server that implements this restriction is
177 sent a value that doesn't match the restriction, it MUST
178 reply with an rpc-error with the error-tag
181 Since ifAlias is defined to be stored in non-volatile
182 storage, the MIB implementation MUST map ifAlias to the
183 value of 'description' in the persistently stored
186 Specifically, if the device supports ':startup', when
187 ifAlias is read the device MUST return the value of
188 'description' in the 'startup' datastore, and when it is
189 written, it MUST be written to the 'running' and 'startup'
190 datastores. Note that it is up to the implementation if
191 it modifies this single leaf in 'startup', or if it
192 performs an implicit copy-config from 'running' to
195 If the device does not support ':startup', ifAlias MUST
196 be mapped to the 'description' leaf in the 'running'
199 "RFC 2863: The Interfaces Group MIB - ifAlias";
203 type ianaift:iana-if-type;
206 "The type of the interface.
208 When an interface entry is created, a server MAY
209 initialize the type leaf with a valid value, e.g., if it
210 is possible to derive the type from the name of the
213 If a client tries to set the type of an interface to a
214 value that can never be used by the system, e.g., if the
215 type is not supported or if the type does not match the
216 name of the interface, the server MUST reject the request.
217 A NETCONF server MUST reply with an rpc-error with the
218 error-tag 'invalid-value' in this case.";
220 "RFC 2863: The Interfaces Group MIB - ifType";
227 "This leaf contains the configured, desired state of the
230 Systems that implement the IF-MIB use the value of this
231 leaf in the 'running' datastore to set
232 IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
233 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 which 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";
267 container interfaces-state {
270 "Data nodes for the operational state of interfaces.";
276 "The list of interfaces on the device.
278 System-controlled interfaces created by the system are
279 always present in this list, whether they are configured or
285 "The name of the interface.
287 This leaf MAY be mapped to ifName by an implementation.";
289 "RFC 2863: The Interfaces Group MIB - ifName";
293 type ianaift:iana-if-type;
296 "The type of the interface.";
298 "RFC 2863: The Interfaces Group MIB - ifType";
307 "Ready to pass packets.";
312 "Not ready to pass packets and not in some test mode.";
317 "In some test mode.";
322 "The desired state of the interface.
324 This leaf has the same read semantics as ifAdminStatus.";
326 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
334 "Ready to pass packets.";
339 "The interface does not pass any packets.";
344 "In some test mode. No operational packets can
350 "Status cannot be determined for some reason.";
355 "Waiting for some external event.";
360 "Some component (typically hardware) is missing.";
362 enum lower-layer-down {
365 "Down due to state of lower-layer interface(s).";
370 "The current operational state of the interface.
372 This leaf has the same semantics as ifOperStatus.";
374 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
378 type yang:date-and-time;
380 "The time the interface entered its current operational
381 state. If the current state was entered prior to the
382 last re-initialization of the local network management
383 subsystem, then this node is not present.";
385 "RFC 2863: The Interfaces Group MIB - ifLastChange";
391 range "1..2147483647";
395 "The ifIndex value for the ifEntry represented by this
398 "RFC 2863: The Interfaces Group MIB - ifIndex";
402 type yang:phys-address;
404 "The interface's address at its protocol sub-layer. For
405 example, for an 802.x interface, this object normally
406 contains a MAC address. The interface's media-specific
407 modules must define the bit and byte ordering and the
408 format of the value of this object. For interfaces that do
409 not have such an address (e.g., a serial line), this node
412 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
415 leaf-list higher-layer-if {
416 type interface-state-ref;
418 "A list of references to interfaces layered on top of this
421 "RFC 2863: The Interfaces Group MIB - ifStackTable";
424 leaf-list lower-layer-if {
425 type interface-state-ref;
427 "A list of references to interfaces layered underneath this
430 "RFC 2863: The Interfaces Group MIB - ifStackTable";
435 units "bits / second";
437 "An estimate of the interface's current bandwidth in bits
438 per second. For interfaces that do not vary in
439 bandwidth or for those where no accurate estimation can
440 be made, this node should contain the nominal bandwidth.
441 For interfaces that have no concept of bandwidth, this
442 node is not present.";
444 "RFC 2863: The Interfaces Group MIB -
445 ifSpeed, ifHighSpeed";
448 container statistics {
450 "A collection of interface-related statistics objects.";
452 leaf discontinuity-time {
453 type yang:date-and-time;
456 "The time on the most recent occasion at which any one or
457 more of this interface's counters suffered a
458 discontinuity. If no such discontinuities have occurred
459 since the last re-initialization of the local management
460 subsystem, then this node contains the time the local
461 management subsystem re-initialized itself.";
467 "The total number of octets received on the interface,
468 including framing characters.
470 Discontinuities in the value of this counter can occur
471 at re-initialization of the management system, and at
472 other times as indicated by the value of
473 'discontinuity-time'.";
475 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
477 leaf in-unicast-pkts {
480 "The number of packets, delivered by this sub-layer to a
481 higher (sub-)layer, which were not addressed to a
482 multicast or broadcast address at this sub-layer.
484 Discontinuities in the value of this counter can occur
485 at re-initialization of the management system, and at
486 other times as indicated by the value of
487 'discontinuity-time'.";
489 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
491 leaf in-broadcast-pkts {
494 "The number of packets, delivered by this sub-layer to a
495 higher (sub-)layer, which were addressed to a broadcast
496 address at this sub-layer.
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 -
504 ifHCInBroadcastPkts";
506 leaf in-multicast-pkts {
509 "The number of packets, delivered by this sub-layer to a
510 higher (sub-)layer, which were addressed to a multicast
511 address at this sub-layer. For a MAC layer protocol,
512 this includes both Group and Functional addresses.
514 Discontinuities in the value of this counter can occur
515 at re-initialization of the management system, and at
516 other times as indicated by the value of
517 'discontinuity-time'.";
519 "RFC 2863: The Interfaces Group MIB -
520 ifHCInMulticastPkts";
525 "The number of inbound packets which were chosen to be
526 discarded even though no errors had been detected to
527 prevent their being deliverable to a higher-layer
528 protocol. One possible reason for discarding such a
529 packet could be to free up buffer space.
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 - ifInDiscards";
541 "For packet-oriented interfaces, the number of inbound
542 packets that contained errors preventing them from being
543 deliverable to a higher-layer protocol. For character-
544 oriented or fixed-length interfaces, the number of
545 inbound transmission units that contained errors
546 preventing them from being deliverable to a higher-layer
549 Discontinuities in the value of this counter can occur
550 at re-initialization of the management system, and at
551 other times as indicated by the value of
552 'discontinuity-time'.";
554 "RFC 2863: The Interfaces Group MIB - ifInErrors";
556 leaf in-unknown-protos {
559 "For packet-oriented interfaces, the number of packets
560 received via the interface which were discarded because
561 of an unknown or unsupported protocol. For
562 character-oriented or fixed-length interfaces that
563 support protocol multiplexing the number of transmission
564 units received via the interface which were discarded
565 because of an unknown or unsupported protocol. For any
566 interface that does not support protocol multiplexing,
567 this counter is not present.
568 Discontinuities in the value of this counter can occur
569 at re-initialization of the management system, and at
570 other times as indicated by the value of
571 'discontinuity-time'.";
573 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
579 "The total number of octets transmitted out of the
580 interface, including framing characters.
582 Discontinuities in the value of this counter can occur
583 at re-initialization of the management system, and at
584 other times as indicated by the value of
585 'discontinuity-time'.";
587 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
589 leaf out-unicast-pkts {
592 "The total number of packets that higher-level protocols
593 requested be transmitted, and which were not addressed
594 to a multicast or broadcast address at this sub-layer,
595 including those that were discarded or not sent.
597 Discontinuities in the value of this counter can occur
598 at re-initialization of the management system, and at
599 other times as indicated by the value of
600 'discontinuity-time'.";
602 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
604 leaf out-broadcast-pkts {
607 "The total number of packets that higher-level protocols
608 requested be transmitted, and which were addressed to a
609 broadcast address at this sub-layer, including those
610 that were discarded or not sent.
612 Discontinuities in the value of this counter can occur
613 at re-initialization of the management system, and at
614 other times as indicated by the value of
615 'discontinuity-time'.";
617 "RFC 2863: The Interfaces Group MIB -
618 ifHCOutBroadcastPkts";
620 leaf out-multicast-pkts {
623 "The total number of packets that higher-level protocols
624 requested be transmitted, and which were addressed to a
625 multicast address at this sub-layer, including those
626 that were discarded or not sent. For a MAC layer
627 protocol, this includes both Group and Functional
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 -
636 ifHCOutMulticastPkts";
641 "The number of outbound packets which were chosen to be
642 discarded even though no errors had been detected to
643 prevent their being transmitted. One possible reason
644 for discarding such a packet could be to free up buffer
647 Discontinuities in the value of this counter can occur
648 at re-initialization of the management system, and at
649 other times as indicated by the value of
650 'discontinuity-time'.";
652 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
657 "For packet-oriented interfaces, the number of outbound
658 packets that could not be transmitted because of errors.
659 For character-oriented or fixed-length interfaces, the
660 number of outbound transmission units that could not be
661 transmitted because of errors.
663 Discontinuities in the value of this counter can occur
664 at re-initialization of the management system, and at
665 other times as indicated by the value of
666 'discontinuity-time'.";
668 "RFC 2863: The Interfaces Group MIB - ifOutErrors";