1 module ietf-interfaces {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces";
6 import ietf-yang-types {
11 "IETF NETMOD (Network Modeling) Working Group";
14 "WG Web: <https://datatracker.ietf.org/wg/netmod/>
15 WG List: <mailto:netmod@ietf.org>
17 Editor: Martin Bjorklund
18 <mailto:mbj@tail-f.com>";
21 "This module contains a collection of YANG definitions for
22 managing network interfaces.
24 Copyright (c) 2018 IETF Trust and the persons identified as
25 authors of the code. All rights reserved.
27 Redistribution and use in source and binary forms, with or
28 without modification, is permitted pursuant to, and subject
29 to the license terms contained in, the Simplified BSD License
30 set forth in Section 4.c of the IETF Trust's Legal Provisions
31 Relating to IETF Documents
32 (https://trustee.ietf.org/license-info).
34 This version of this YANG module is part of RFC 8343; see
35 the RFC itself for full legal notices.";
39 "Updated to support NMDA.";
41 "RFC 8343: A YANG Data Model for Interface Management";
48 "RFC 7223: A YANG Data Model for Interface Management";
55 typedef interface-ref {
57 path "/if:interfaces/if:interface/if:name";
60 "This type is used by data models that need to reference
68 identity interface-type {
70 "Base identity from which specific interface types are
78 feature arbitrary-names {
80 "This feature indicates that the device allows user-controlled
81 interfaces to be named arbitrarily.";
83 feature pre-provisioning {
85 "This feature indicates that the device supports
86 pre-provisioning of interface configuration, i.e., it is
87 possible to configure an interface whose physical interface
88 hardware is not present on the device.";
92 "This feature indicates that the device implements
95 "RFC 2863: The Interfaces Group MIB";
102 container interfaces {
104 "Interface parameters.";
110 "The list of interfaces on the device.
112 The status of an interface is available in this list in the
113 operational state. If the configuration of a
114 system-controlled interface cannot be used by the system
115 (e.g., the interface hardware present does not match the
116 interface type), then the configuration is not applied to
117 the system-controlled interface shown in the operational
118 state. If the configuration of a user-controlled interface
119 cannot be used by the system, the configured interface is
120 not instantiated in the operational state.
122 System-controlled interfaces created by the system are
123 always present in this list in the operational state,
124 whether or not they are configured.";
129 "The name of the interface.
131 A device MAY restrict the allowed values for this leaf,
132 possibly depending on the type of the interface.
133 For system-controlled interfaces, this leaf is the
134 device-specific name of the interface.
136 If a client tries to create configuration for a
137 system-controlled interface that is not present in the
138 operational state, the server MAY reject the request if
139 the implementation does not support pre-provisioning of
140 interfaces or if the name refers to an interface that can
141 never exist in the system. A Network Configuration
142 Protocol (NETCONF) server MUST reply with an rpc-error
143 with the error-tag 'invalid-value' in this case.
145 If the device supports pre-provisioning of interface
146 configuration, the 'pre-provisioning' feature is
149 If the device allows arbitrarily named user-controlled
150 interfaces, the 'arbitrary-names' feature is advertised.
152 When a configured user-controlled interface is created by
153 the system, it is instantiated with the same name in the
156 A server implementation MAY map this leaf to the ifName
157 MIB object. Such an implementation needs to use some
158 mechanism to handle the differences in size and characters
159 allowed between this leaf and ifName. The definition of
160 such a mechanism is outside the scope of this document.";
162 "RFC 2863: The Interfaces Group MIB - ifName";
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 "RFC 2863: The Interfaces Group MIB - ifAlias";
190 "The type of the interface.
192 When an interface entry is created, a server MAY
193 initialize the type leaf with a valid value, e.g., if it
194 is possible to derive the type from the name of the
197 If a client tries to set the type of an interface to a
198 value that can never be used by the system, e.g., if the
199 type is not supported or if the type does not match the
200 name of the interface, the server MUST reject the request.
201 A NETCONF server MUST reply with an rpc-error with the
202 error-tag 'invalid-value' in this case.";
204 "RFC 2863: The Interfaces Group MIB - ifType";
211 "This leaf contains the configured, desired state of the
214 Systems that implement the IF-MIB use the value of this
215 leaf in the intended configuration to set
216 IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
217 has been initialized, as described in RFC 2863.
219 Changes in this leaf in the intended configuration are
220 reflected in ifAdminStatus.";
222 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
225 leaf link-up-down-trap-enable {
231 "The device will generate linkUp/linkDown SNMP
232 notifications for this interface.";
237 "The device will not generate linkUp/linkDown SNMP
238 notifications for this interface.";
242 "Controls whether linkUp/linkDown SNMP notifications
243 should be generated for this interface.
245 If this node is not configured, the value 'enabled' is
246 operationally used by the server for interfaces that do
247 not operate on top of any other interface (i.e., there are
248 no 'lower-layer-if' entries), and 'disabled' otherwise.";
250 "RFC 2863: The Interfaces Group MIB -
251 ifLinkUpDownTrapEnable";
260 "Ready to pass packets.";
265 "Not ready to pass packets and not in some test mode.";
270 "In some test mode.";
276 "The desired state of the interface.
278 This leaf has the same read semantics as ifAdminStatus.";
280 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
288 "Ready to pass packets.";
294 "The interface does not pass any packets.";
299 "In some test mode. No operational packets can
305 "Status cannot be determined for some reason.";
310 "Waiting for some external event.";
315 "Some component (typically hardware) is missing.";
317 enum lower-layer-down {
320 "Down due to state of lower-layer interface(s).";
326 "The current operational state of the interface.
328 This leaf has the same semantics as ifOperStatus.";
330 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
334 type yang:date-and-time;
337 "The time the interface entered its current operational
338 state. If the current state was entered prior to the
339 last re-initialization of the local network management
340 subsystem, then this node is not present.";
342 "RFC 2863: The Interfaces Group MIB - ifLastChange";
348 range "1..2147483647";
353 "The ifIndex value for the ifEntry represented by this
356 "RFC 2863: The Interfaces Group MIB - ifIndex";
360 type yang:phys-address;
363 "The interface's address at its protocol sub-layer. For
364 example, for an 802.x interface, this object normally
365 contains a Media Access Control (MAC) address. The
366 interface's media-specific modules must define the bit
367 and byte ordering and the format of the value of this
368 object. For interfaces that do not have such an address
369 (e.g., a serial line), this node is not present.";
371 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
374 leaf-list higher-layer-if {
378 "A list of references to interfaces layered on top of this
381 "RFC 2863: The Interfaces Group MIB - ifStackTable";
384 leaf-list lower-layer-if {
389 "A list of references to interfaces layered underneath this
392 "RFC 2863: The Interfaces Group MIB - ifStackTable";
400 "An estimate of the interface's current bandwidth in bits
401 per second. For interfaces that do not vary in
402 bandwidth or for those where no accurate estimation can
403 be made, this node should contain the nominal bandwidth.
404 For interfaces that have no concept of bandwidth, this
405 node is not present.";
407 "RFC 2863: The Interfaces Group MIB -
408 ifSpeed, ifHighSpeed";
411 container statistics {
414 "A collection of interface-related statistics objects.";
416 leaf discontinuity-time {
417 type yang:date-and-time;
420 "The time on the most recent occasion at which any one or
421 more of this interface's counters suffered a
422 discontinuity. If no such discontinuities have occurred
423 since the last re-initialization of the local management
424 subsystem, then this node contains the time the local
425 management subsystem re-initialized itself.";
431 "The total number of octets received on the interface,
432 including framing characters.
434 Discontinuities in the value of this counter can occur
435 at re-initialization of the management system and at
436 other times as indicated by the value of
437 'discontinuity-time'.";
439 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
442 leaf in-unicast-pkts {
445 "The number of packets, delivered by this sub-layer to a
446 higher (sub-)layer, that were not addressed to a
447 multicast or broadcast address at this sub-layer.
449 Discontinuities in the value of this counter can occur
450 at re-initialization of the management system and at
451 other times as indicated by the value of
452 'discontinuity-time'.";
454 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
457 leaf in-broadcast-pkts {
460 "The number of packets, delivered by this sub-layer to a
461 higher (sub-)layer, that were addressed to a broadcast
462 address at this sub-layer.
464 Discontinuities in the value of this counter can occur
465 at re-initialization of the management system and at
466 other times as indicated by the value of
467 'discontinuity-time'.";
469 "RFC 2863: The Interfaces Group MIB -
470 ifHCInBroadcastPkts";
473 leaf in-multicast-pkts {
476 "The number of packets, delivered by this sub-layer to a
477 higher (sub-)layer, that were addressed to a multicast
478 address at this sub-layer. For a MAC-layer protocol,
479 this includes both Group and Functional addresses.
481 Discontinuities in the value of this counter can occur
482 at re-initialization of the management system and at
483 other times as indicated by the value of
484 'discontinuity-time'.";
486 "RFC 2863: The Interfaces Group MIB -
487 ifHCInMulticastPkts";
493 "The number of inbound packets that were chosen to be
494 discarded even though no errors had been detected to
495 prevent their being deliverable to a higher-layer
496 protocol. One possible reason for discarding such a
497 packet could be to free up buffer space.
499 Discontinuities in the value of this counter can occur
500 at re-initialization of the management system and at
501 other times as indicated by the value of
502 'discontinuity-time'.";
504 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
510 "For packet-oriented interfaces, the number of inbound
511 packets that contained errors preventing them from being
512 deliverable to a higher-layer protocol. For character-
513 oriented or fixed-length interfaces, the number of
514 inbound transmission units that contained errors
515 preventing them from being deliverable to a higher-layer
518 Discontinuities in the value of this counter can occur
519 at re-initialization of the management system and at
520 other times as indicated by the value of
521 'discontinuity-time'.";
523 "RFC 2863: The Interfaces Group MIB - ifInErrors";
526 leaf in-unknown-protos {
530 "For packet-oriented interfaces, the number of packets
531 received via the interface that were discarded because
532 of an unknown or unsupported protocol. For
533 character-oriented or fixed-length interfaces that
534 support protocol multiplexing, the number of
535 transmission units received via the interface that were
536 discarded because of an unknown or unsupported protocol.
537 For any interface that does not support protocol
538 multiplexing, this counter is not present.
540 Discontinuities in the value of this counter can occur
541 at re-initialization of the management system and at
542 other times as indicated by the value of
543 'discontinuity-time'.";
545 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
551 "The total number of octets transmitted out of the
552 interface, including framing characters.
554 Discontinuities in the value of this counter can occur
555 at re-initialization of the management system and at
556 other times as indicated by the value of
557 'discontinuity-time'.";
559 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
562 leaf out-unicast-pkts {
565 "The total number of packets that higher-level protocols
566 requested be transmitted and that were not addressed
567 to a multicast or broadcast address at this sub-layer,
568 including those that were discarded or not sent.
570 Discontinuities in the value of this counter can occur
571 at re-initialization of the management system and at
572 other times as indicated by the value of
573 'discontinuity-time'.";
575 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
578 leaf out-broadcast-pkts {
581 "The total number of packets that higher-level protocols
582 requested be transmitted and that were addressed to a
583 broadcast address at this sub-layer, including those
584 that were discarded or not sent.
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 -
592 ifHCOutBroadcastPkts";
595 leaf out-multicast-pkts {
598 "The total number of packets that higher-level protocols
599 requested be transmitted and that were addressed to a
600 multicast address at this sub-layer, including those
601 that were discarded or not sent. For a MAC-layer
602 protocol, this includes both Group and Functional
605 Discontinuities in the value of this counter can occur
606 at re-initialization of the management system and at
607 other times as indicated by the value of
608 'discontinuity-time'.";
610 "RFC 2863: The Interfaces Group MIB -
611 ifHCOutMulticastPkts";
617 "The number of outbound packets that were chosen to be
618 discarded even though no errors had been detected to
619 prevent their being transmitted. One possible reason
620 for discarding such a packet could be to free up buffer
623 Discontinuities in the value of this counter can occur
624 at re-initialization of the management system and at
625 other times as indicated by the value of
626 'discontinuity-time'.";
628 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
634 "For packet-oriented interfaces, the number of outbound
635 packets that could not be transmitted because of errors.
636 For character-oriented or fixed-length interfaces, the
637 number of outbound transmission units that could not be
638 transmitted because of errors.
640 Discontinuities in the value of this counter can occur
641 at re-initialization of the management system and at
642 other times as indicated by the value of
643 'discontinuity-time'.";
645 "RFC 2863: The Interfaces Group MIB - ifOutErrors";
656 typedef interface-state-ref {
658 path "/if:interfaces-state/if:interface/if:name";
662 "This type is used by data models that need to reference
663 the operationally present interfaces.";
667 * Legacy operational state data nodes
670 container interfaces-state {
674 "Data nodes for the operational state of interfaces.";
681 "The list of interfaces on the device.
683 System-controlled interfaces created by the system are
684 always present in this list, whether or not they are
691 "The name of the interface.
693 A server implementation MAY map this leaf to the ifName
694 MIB object. Such an implementation needs to use some
695 mechanism to handle the differences in size and characters
696 allowed between this leaf and ifName. The definition of
697 such a mechanism is outside the scope of this document.";
699 "RFC 2863: The Interfaces Group MIB - ifName";
709 "The type of the interface.";
711 "RFC 2863: The Interfaces Group MIB - ifType";
720 "Ready to pass packets.";
725 "Not ready to pass packets and not in some test mode.";
730 "In some test mode.";
736 "The desired state of the interface.
738 This leaf has the same read semantics as ifAdminStatus.";
740 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
748 "Ready to pass packets.";
753 "The interface does not pass any packets.";
758 "In some test mode. No operational packets can
764 "Status cannot be determined for some reason.";
769 "Waiting for some external event.";
774 "Some component (typically hardware) is missing.";
776 enum lower-layer-down {
779 "Down due to state of lower-layer interface(s).";
785 "The current operational state of the interface.
787 This leaf has the same semantics as ifOperStatus.";
789 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
793 type yang:date-and-time;
796 "The time the interface entered its current operational
797 state. If the current state was entered prior to the
798 last re-initialization of the local network management
799 subsystem, then this node is not present.";
801 "RFC 2863: The Interfaces Group MIB - ifLastChange";
807 range "1..2147483647";
812 "The ifIndex value for the ifEntry represented by this
816 "RFC 2863: The Interfaces Group MIB - ifIndex";
820 type yang:phys-address;
823 "The interface's address at its protocol sub-layer. For
824 example, for an 802.x interface, this object normally
825 contains a Media Access Control (MAC) address. The
826 interface's media-specific modules must define the bit
827 and byte ordering and the format of the value of this
828 object. For interfaces that do not have such an address
829 (e.g., a serial line), this node is not present.";
831 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
834 leaf-list higher-layer-if {
835 type interface-state-ref;
838 "A list of references to interfaces layered on top of this
841 "RFC 2863: The Interfaces Group MIB - ifStackTable";
844 leaf-list lower-layer-if {
845 type interface-state-ref;
848 "A list of references to interfaces layered underneath this
851 "RFC 2863: The Interfaces Group MIB - ifStackTable";
859 "An estimate of the interface's current bandwidth in bits
860 per second. For interfaces that do not vary in
861 bandwidth or for those where no accurate estimation can
863 be made, this node should contain the nominal bandwidth.
864 For interfaces that have no concept of bandwidth, this
865 node is not present.";
867 "RFC 2863: The Interfaces Group MIB -
868 ifSpeed, ifHighSpeed";
871 container statistics {
874 "A collection of interface-related statistics objects.";
876 leaf discontinuity-time {
877 type yang:date-and-time;
881 "The time on the most recent occasion at which any one or
882 more of this interface's counters suffered a
883 discontinuity. If no such discontinuities have occurred
884 since the last re-initialization of the local management
885 subsystem, then this node contains the time the local
886 management subsystem re-initialized itself.";
893 "The total number of octets received on the interface,
894 including framing characters.
896 Discontinuities in the value of this counter can occur
897 at re-initialization of the management system and at
898 other times as indicated by the value of
899 'discontinuity-time'.";
901 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
904 leaf in-unicast-pkts {
908 "The number of packets, delivered by this sub-layer to a
909 higher (sub-)layer, that were not addressed to a
910 multicast or broadcast address at this sub-layer.
911 Discontinuities in the value of this counter can occur
912 at re-initialization of the management system and at
913 other times as indicated by the value of
914 'discontinuity-time'.";
916 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
919 leaf in-broadcast-pkts {
923 "The number of packets, delivered by this sub-layer to a
924 higher (sub-)layer, that were addressed to a broadcast
925 address at this sub-layer.
927 Discontinuities in the value of this counter can occur
928 at re-initialization of the management system and at
929 other times as indicated by the value of
930 'discontinuity-time'.";
932 "RFC 2863: The Interfaces Group MIB -
933 ifHCInBroadcastPkts";
936 leaf in-multicast-pkts {
940 "The number of packets, delivered by this sub-layer to a
941 higher (sub-)layer, that were addressed to a multicast
942 address at this sub-layer. For a MAC-layer protocol,
943 this includes both Group and Functional addresses.
945 Discontinuities in the value of this counter can occur
946 at re-initialization of the management system and at
947 other times as indicated by the value of
948 'discontinuity-time'.";
950 "RFC 2863: The Interfaces Group MIB -
951 ifHCInMulticastPkts";
959 "The number of inbound packets that were chosen to be
960 discarded even though no errors had been detected to
961 prevent their being deliverable to a higher-layer
962 protocol. One possible reason for discarding such a
963 packet could be to free up buffer space.
965 Discontinuities in the value of this counter can occur
966 at re-initialization of the management system and at
967 other times as indicated by the value of
968 'discontinuity-time'.";
970 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
977 "For packet-oriented interfaces, the number of inbound
978 packets that contained errors preventing them from being
979 deliverable to a higher-layer protocol. For character-
980 oriented or fixed-length interfaces, the number of
981 inbound transmission units that contained errors
982 preventing them from being deliverable to a higher-layer
985 Discontinuities in the value of this counter can occur
986 at re-initialization of the management system and at
987 other times as indicated by the value of
988 'discontinuity-time'.";
990 "RFC 2863: The Interfaces Group MIB - ifInErrors";
993 leaf in-unknown-protos {
997 "For packet-oriented interfaces, the number of packets
998 received via the interface that were discarded because
999 of an unknown or unsupported protocol. For
1000 character-oriented or fixed-length interfaces that
1001 support protocol multiplexing, the number of
1002 transmission units received via the interface that were
1003 discarded because of an unknown or unsupported protocol.
1004 For any interface that does not support protocol
1005 multiplexing, this counter is not present.
1006 Discontinuities in the value of this counter can occur
1007 at re-initialization of the management system and at
1008 other times as indicated by the value of
1009 'discontinuity-time'.";
1011 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
1015 type yang:counter64;
1018 "The total number of octets transmitted out of the
1019 interface, including framing characters.
1021 Discontinuities in the value of this counter can occur
1022 at re-initialization of the management system and at
1023 other times as indicated by the value of
1024 'discontinuity-time'.";
1026 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
1029 leaf out-unicast-pkts {
1030 type yang:counter64;
1033 "The total number of packets that higher-level protocols
1034 requested be transmitted and that were not addressed
1035 to a multicast or broadcast address at this sub-layer,
1036 including those that were discarded or not sent.
1038 Discontinuities in the value of this counter can occur
1039 at re-initialization of the management system and at
1040 other times as indicated by the value of
1041 'discontinuity-time'.";
1043 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
1046 leaf out-broadcast-pkts {
1047 type yang:counter64;
1051 "The total number of packets that higher-level protocols
1052 requested be transmitted and that were addressed to a
1053 broadcast address at this sub-layer, including those
1054 that were discarded or not sent.
1056 Discontinuities in the value of this counter can occur
1057 at re-initialization of the management system and at
1058 other times as indicated by the value of
1059 'discontinuity-time'.";
1061 "RFC 2863: The Interfaces Group MIB -
1062 ifHCOutBroadcastPkts";
1065 leaf out-multicast-pkts {
1066 type yang:counter64;
1069 "The total number of packets that higher-level protocols
1070 requested be transmitted and that were addressed to a
1071 multicast address at this sub-layer, including those
1072 that were discarded or not sent. For a MAC-layer
1073 protocol, this includes both Group and Functional
1076 Discontinuities in the value of this counter can occur
1077 at re-initialization of the management system and at
1078 other times as indicated by the value of
1079 'discontinuity-time'.";
1081 "RFC 2863: The Interfaces Group MIB -
1082 ifHCOutMulticastPkts";
1086 type yang:counter32;
1089 "The number of outbound packets that were chosen to be
1090 discarded even though no errors had been detected to
1091 prevent their being transmitted. One possible reason
1092 for discarding such a packet could be to free up buffer
1095 Discontinuities in the value of this counter can occur
1096 at re-initialization of the management system and at
1097 other times as indicated by the value of
1098 'discontinuity-time'.";
1100 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
1104 type yang:counter32;
1107 "For packet-oriented interfaces, the number of outbound
1108 packets that could not be transmitted because of errors.
1109 For character-oriented or fixed-length interfaces, the
1110 number of outbound transmission units that could not be
1111 transmitted because of errors.
1113 Discontinuities in the value of this counter can occur
1114 at re-initialization of the management system and at
1115 other times as indicated by the value of
1116 'discontinuity-time'.";
1118 "RFC 2863: The Interfaces Group MIB - ifOutErrors";