1 module ietf-interfaces {
2 namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces";
4 import ietf-yang-types {
8 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
10 "WG Web: <http://tools.ietf.org/wg/netmod/>
11 WG List: <mailto:netmod@ietf.org>
12 WG Chair: Thomas Nadeau
13 <mailto:tnadeau@lucidvision.com>
14 WG Chair: Juergen Schoenwaelder
15 <mailto:j.schoenwaelder@jacobs-university.de>
16 Editor: Martin Bjorklund
17 <mailto:mbj@tail-f.com>";
19 "This module contains a collection of YANG definitions for
20 managing network interfaces.
21 Copyright (c) 2014 IETF Trust and the persons identified as
22 authors of the code. All rights reserved.
23 Redistribution and use in source and binary forms, with or
24 without modification, is permitted pursuant to, and subject
25 to the license terms contained in, the Simplified BSD License
26 set forth in Section 4.c of the IETF Trust's Legal Provisions
27 Relating to IETF Documents
28 (http://trustee.ietf.org/license-info).
29 This version of this YANG module is part of RFC 7223; see
30 the RFC itself for full legal notices.";
35 "RFC 7223: A YANG Data Model for Interface Management";
40 typedef interface-ref {
42 path "/if:interfaces/if:interface/if:name";
45 "This type is used by data models that need to reference
46 configured interfaces.";
48 typedef interface-state-ref {
50 path "/if:interfaces-state/if:interface/if:name";
53 "This type is used by data models that need to reference
54 the operationally present interfaces.";
59 identity interface-type {
61 "Base identity from which specific interface types are
67 feature arbitrary-names {
69 "This feature indicates that the device allows user-controlled
70 interfaces to be named arbitrarily.";
72 feature pre-provisioning {
74 "This feature indicates that the device supports
75 pre-provisioning of interface configuration, i.e., it is
76 possible to configure an interface whose physical interface
77 hardware is not present on the device.";
81 "This feature indicates that the device implements
84 "RFC 2863: The Interfaces Group MIB";
87 * Configuration data nodes
89 container interfaces {
91 "Interface configuration parameters.";
95 "The list of configured interfaces on the device.
96 The operational state of an interface is available in the
97 /interfaces-state/interface list. If the configuration of a
98 system-controlled interface cannot be used by the system
99 (e.g., the interface hardware present does not match the
100 interface type), then the configuration is not applied to
101 the system-controlled interface shown in the
102 /interfaces-state/interface list. If the configuration
103 of a user-controlled interface cannot be used by the system,
104 the configured interface is not instantiated in the
105 /interfaces-state/interface list.";
109 "The name of the interface.
110 A device MAY restrict the allowed values for this leaf,
111 possibly depending on the type of the interface.
112 For system-controlled interfaces, this leaf is the
113 device-specific name of the interface. The 'config false'
114 list /interfaces-state/interface contains the currently
115 existing interfaces on the device.
116 If a client tries to create configuration for a
117 system-controlled interface that is not present in the
118 /interfaces-state/interface list, the server MAY reject
119 the request if the implementation does not support
120 pre-provisioning of interfaces or if the name refers to
121 an interface that can never exist in the system. A
122 NETCONF server MUST reply with an rpc-error with the
123 error-tag 'invalid-value' in this case.
124 If the device supports pre-provisioning of interface
125 configuration, the 'pre-provisioning' feature is
127 If the device allows arbitrarily named user-controlled
128 interfaces, the 'arbitrary-names' feature is advertised.
129 When a configured user-controlled interface is created by
130 the system, it is instantiated with the same name in the
131 /interface-state/interface list.";
136 "A textual description of the interface.
137 A server implementation MAY map this leaf to the ifAlias
138 MIB object. Such an implementation needs to use some
139 mechanism to handle the differences in size and characters
140 allowed between this leaf and ifAlias. The definition of
141 such a mechanism is outside the scope of this document.
142 Since ifAlias is defined to be stored in non-volatile
143 storage, the MIB implementation MUST map ifAlias to the
144 value of 'description' in the persistently stored
146 Specifically, if the device supports ':startup', when
147 ifAlias is read the device MUST return the value of
148 'description' in the 'startup' datastore, and when it is
149 written, it MUST be written to the 'running' and 'startup'
150 datastores. Note that it is up to the implementation to
151 decide whether to modify this single leaf in 'startup' or
152 perform an implicit copy-config from 'running' to
154 If the device does not support ':startup', ifAlias MUST
155 be mapped to the 'description' leaf in the 'running'
158 "RFC 2863: The Interfaces Group MIB - ifAlias";
166 "The type of the interface.
167 When an interface entry is created, a server MAY
168 initialize the type leaf with a valid value, e.g., if it
169 is possible to derive the type from the name of the
171 If a client tries to set the type of an interface to a
172 value that can never be used by the system, e.g., if the
173 type is not supported or if the type does not match the
174 name of the interface, the server MUST reject the request.
175 A NETCONF server MUST reply with an rpc-error with the
176 error-tag 'invalid-value' in this case.";
178 "RFC 2863: The Interfaces Group MIB - ifType";
184 "This leaf contains the configured, desired state of the
186 Systems that implement the IF-MIB use the value of this
187 leaf in the 'running' datastore to set
188 IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
189 has been initialized, as described in RFC 2863.
190 Changes in this leaf in the 'running' datastore are
191 reflected in ifAdminStatus, but if ifAdminStatus is
192 changed over SNMP, this leaf is not affected.";
194 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
196 leaf link-up-down-trap-enable {
207 "Controls whether linkUp/linkDown SNMP notifications
208 should be generated for this interface.
209 If this node is not configured, the value 'enabled' is
210 operationally used by the server for interfaces that do
211 not operate on top of any other interface (i.e., there are
212 no 'lower-layer-if' entries), and 'disabled' otherwise.";
214 "RFC 2863: The Interfaces Group MIB -
215 ifLinkUpDownTrapEnable";
220 * Operational state data nodes
222 container interfaces-state {
225 "Data nodes for the operational state of interfaces.";
229 "The list of interfaces on the device.
230 System-controlled interfaces created by the system are
231 always present in this list, whether they are configured or
236 "The name of the interface.
237 A server implementation MAY map this leaf to the ifName
238 MIB object. Such an implementation needs to use some
239 mechanism to handle the differences in size and characters
240 allowed between this leaf and ifName. The definition of
241 such a mechanism is outside the scope of this document.";
243 "RFC 2863: The Interfaces Group MIB - ifName";
251 "The type of the interface.";
253 "RFC 2863: The Interfaces Group MIB - ifType";
261 "Ready to pass packets.";
266 "Not ready to pass packets and not in some test mode.";
271 "In some test mode.";
276 "The desired state of the interface.
277 This leaf has the same read semantics as ifAdminStatus.";
279 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
286 "Ready to pass packets.";
291 "The interface does not pass any packets.";
296 "In some test mode. No operational packets can
302 "Status cannot be determined for some reason.";
307 "Waiting for some external event.";
312 "Some component (typically hardware) is missing.";
314 enum lower-layer-down {
317 "Down due to state of lower-layer interface(s).";
322 "The current operational state of the interface.
323 This leaf has the same semantics as ifOperStatus.";
325 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
328 type yang:date-and-time;
330 "The time the interface entered its current operational
331 state. If the current state was entered prior to the
332 last re-initialization of the local network management
333 subsystem, then this node is not present.";
335 "RFC 2863: The Interfaces Group MIB - ifLastChange";
340 range "1..2147483647";
344 "The ifIndex value for the ifEntry represented by this
347 "RFC 2863: The Interfaces Group MIB - ifIndex";
350 type yang:phys-address;
352 "The interface's address at its protocol sub-layer. For
353 example, for an 802.x interface, this object normally
354 contains a Media Access Control (MAC) address. The
355 interface's media-specific modules must define the bit
356 and byte ordering and the format of the value of this
357 object. For interfaces that do not have such an address
358 (e.g., a serial line), this node is not present.";
360 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
362 leaf-list higher-layer-if {
363 type interface-state-ref;
365 "A list of references to interfaces layered on top of this
368 "RFC 2863: The Interfaces Group MIB - ifStackTable";
370 leaf-list lower-layer-if {
371 type interface-state-ref;
373 "A list of references to interfaces layered underneath this
376 "RFC 2863: The Interfaces Group MIB - ifStackTable";
382 "An estimate of the interface's current bandwidth in bits
383 per second. For interfaces that do not vary in
384 bandwidth or for those where no accurate estimation can
385 be made, this node should contain the nominal bandwidth.
386 For interfaces that have no concept of bandwidth, this
387 node is not present.";
389 "RFC 2863: The Interfaces Group MIB -
390 ifSpeed, ifHighSpeed";
392 container statistics {
394 "A collection of interface-related statistics objects.";
395 leaf discontinuity-time {
396 type yang:date-and-time;
399 "The time on the most recent occasion at which any one or
400 more of this interface's counters suffered a
401 discontinuity. If no such discontinuities have occurred
402 since the last re-initialization of the local management
403 subsystem, then this node contains the time the local
404 management subsystem re-initialized itself.";
409 "The total number of octets received on the interface,
410 including framing characters.
411 Discontinuities in the value of this counter can occur
412 at re-initialization of the management system, and at
413 other times as indicated by the value of
414 'discontinuity-time'.";
416 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
418 leaf in-unicast-pkts {
421 "The number of packets, delivered by this sub-layer to a
422 higher (sub-)layer, that were not addressed to a
423 multicast or broadcast address at this sub-layer.
424 Discontinuities in the value of this counter can occur
425 at re-initialization of the management system, and at
426 other times as indicated by the value of
427 'discontinuity-time'.";
429 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
431 leaf in-broadcast-pkts {
434 "The number of packets, delivered by this sub-layer to a
435 higher (sub-)layer, that were addressed to a broadcast
436 address at this sub-layer.
437 Discontinuities in the value of this counter can occur
438 at re-initialization of the management system, and at
439 other times as indicated by the value of
440 'discontinuity-time'.";
442 "RFC 2863: The Interfaces Group MIB -
443 ifHCInBroadcastPkts";
445 leaf in-multicast-pkts {
448 "The number of packets, delivered by this sub-layer to a
449 higher (sub-)layer, that were addressed to a multicast
450 address at this sub-layer. For a MAC-layer protocol,
451 this includes both Group and Functional addresses.
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 -
458 ifHCInMulticastPkts";
463 "The number of inbound packets that were chosen to be
464 discarded even though no errors had been detected to
465 prevent their being deliverable to a higher-layer
466 protocol. One possible reason for discarding such a
467 packet could be to free up buffer space.
468 Discontinuities in the value of this counter can occur
469 at re-initialization of the management system, and at
470 other times as indicated by the value of
471 'discontinuity-time'.";
473 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
478 "For packet-oriented interfaces, the number of inbound
479 packets that contained errors preventing them from being
480 deliverable to a higher-layer protocol. For character-
481 oriented or fixed-length interfaces, the number of
482 inbound transmission units that contained errors
483 preventing them from being deliverable to a higher-layer
485 Discontinuities in the value of this counter can occur
486 at re-initialization of the management system, and at
487 other times as indicated by the value of
488 'discontinuity-time'.";
490 "RFC 2863: The Interfaces Group MIB - ifInErrors";
492 leaf in-unknown-protos {
495 "For packet-oriented interfaces, the number of packets
496 received via the interface that were discarded because
497 of an unknown or unsupported protocol. For
498 character-oriented or fixed-length interfaces that
499 support protocol multiplexing, the number of
500 transmission units received via the interface that were
501 discarded because of an unknown or unsupported protocol.
502 For any interface that does not support protocol
503 multiplexing, this counter is not present.
504 Discontinuities in the value of this counter can occur
505 at re-initialization of the management system, and at
506 other times as indicated by the value of
507 'discontinuity-time'.";
509 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
514 "The total number of octets transmitted out of the
515 interface, including framing characters.
516 Discontinuities in the value of this counter can occur
517 at re-initialization of the management system, and at
518 other times as indicated by the value of
519 'discontinuity-time'.";
521 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
523 leaf out-unicast-pkts {
526 "The total number of packets that higher-level protocols
527 requested be transmitted, and that were not addressed
528 to a multicast or broadcast address at this sub-layer,
529 including those that were discarded or not sent.
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 - ifHCOutUcastPkts";
537 leaf out-broadcast-pkts {
540 "The total number of packets that higher-level protocols
541 requested be transmitted, and that were addressed to a
542 broadcast address at this sub-layer, including those
543 that were discarded or not sent.
544 Discontinuities in the value of this counter can occur
545 at re-initialization of the management system, and at
546 other times as indicated by the value of
547 'discontinuity-time'.";
549 "RFC 2863: The Interfaces Group MIB -
550 ifHCOutBroadcastPkts";
552 leaf out-multicast-pkts {
555 "The total number of packets that higher-level protocols
556 requested be transmitted, and that were addressed to a
557 multicast address at this sub-layer, including those
558 that were discarded or not sent. For a MAC-layer
559 protocol, this includes both Group and Functional
561 Discontinuities in the value of this counter can occur
562 at re-initialization of the management system, and at
563 other times as indicated by the value of
564 'discontinuity-time'.";
566 "RFC 2863: The Interfaces Group MIB -
567 ifHCOutMulticastPkts";
572 "The number of outbound packets that were chosen to be
573 discarded even though no errors had been detected to
574 prevent their being transmitted. One possible reason
575 for discarding such a packet could be to free up buffer
577 Discontinuities in the value of this counter can occur
578 at re-initialization of the management system, and at
579 other times as indicated by the value of
580 'discontinuity-time'.";
582 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
587 "For packet-oriented interfaces, the number of outbound
588 packets that could not be transmitted because of errors.
589 For character-oriented or fixed-length interfaces, the
590 number of outbound transmission units that could not be
591 transmitted because of errors.
592 Discontinuities in the value of this counter can occur
593 at re-initialization of the management system, and at
594 other times as indicated by the value of
595 'discontinuity-time'.";
597 "RFC 2863: The Interfaces Group MIB - ifOutErrors";