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>
16 Editor: Martin Bjorklund
17 <mailto:mbj@tail-f.com>";
20 "This module contains a collection of YANG definitions for
21 managing network interfaces.
22 Copyright (c) 2018 IETF Trust and the persons identified as
23 authors of the code. All rights reserved.
24 Redistribution and use in source and binary forms, with or
25 without modification, is permitted pursuant to, and subject
26 to the license terms contained in, the Simplified BSD License
27 set forth in Section 4.c of the IETF Trust's Legal Provisions
28 Relating to IETF Documents
29 (https://trustee.ietf.org/license-info).
30 This version of this YANG module is part of RFC 8343; see
31 the RFC itself for full legal notices.";
35 "Updated to support NMDA.";
37 "RFC 8343: A YANG Data Model for Interface Management";
44 "RFC 7223: A YANG Data Model for Interface Management";
51 typedef interface-ref {
53 path "/if:interfaces/if:interface/if:name";
56 "This type is used by data models that need to reference
64 identity interface-type {
66 "Base identity from which specific interface types are
74 feature arbitrary-names {
76 "This feature indicates that the device allows user-controlled
77 interfaces to be named arbitrarily.";
79 feature pre-provisioning {
81 "This feature indicates that the device supports
82 pre-provisioning of interface configuration, i.e., it is
83 possible to configure an interface whose physical interface
84 hardware is not present on the device.";
88 "This feature indicates that the device implements
91 "RFC 2863: The Interfaces Group MIB";
98 container interfaces {
100 "Interface parameters.";
106 "The list of interfaces on the device.
107 The status of an interface is available in this list in the
108 operational state. If the configuration of a
109 system-controlled interface cannot be used by the system
110 (e.g., the interface hardware present does not match the
111 interface type), then the configuration is not applied to
112 the system-controlled interface shown in the operational
113 state. If the configuration of a user-controlled interface
114 cannot be used by the system, the configured interface is
115 not instantiated in the operational state.
116 System-controlled interfaces created by the system are
117 always present in this list in the operational state,
118 whether or not they are configured.";
123 "The name of the interface.
124 A device MAY restrict the allowed values for this leaf,
125 possibly depending on the type of the interface.
126 For system-controlled interfaces, this leaf is the
127 device-specific name of the interface.
128 If a client tries to create configuration for a
129 system-controlled interface that is not present in the
130 operational state, the server MAY reject the request if
131 the implementation does not support pre-provisioning of
132 interfaces or if the name refers to an interface that can
133 never exist in the system. A Network Configuration
134 Protocol (NETCONF) server MUST reply with an rpc-error
135 with the error-tag 'invalid-value' in this case.
136 If the device supports pre-provisioning of interface
137 configuration, the 'pre-provisioning' feature is
139 If the device allows arbitrarily named user-controlled
140 interfaces, the 'arbitrary-names' feature is advertised.
141 When a configured user-controlled interface is created by
142 the system, it is instantiated with the same name in the
144 A server implementation MAY map this leaf to the ifName
145 MIB object. Such an implementation needs to use some
146 mechanism to handle the differences in size and characters
147 allowed between this leaf and ifName. The definition of
148 such a mechanism is outside the scope of this document.";
150 "RFC 2863: The Interfaces Group MIB - ifName";
156 "A textual description of the interface.
157 A server implementation MAY map this leaf to the ifAlias
158 MIB object. Such an implementation needs to use some
159 mechanism to handle the differences in size and characters
160 allowed between this leaf and ifAlias. The definition of
161 such a mechanism is outside the scope of this document.
162 Since ifAlias is defined to be stored in non-volatile
163 storage, the MIB implementation MUST map ifAlias to the
164 value of 'description' in the persistently stored
167 "RFC 2863: The Interfaces Group MIB - ifAlias";
176 "The type of the interface.
177 When an interface entry is created, a server MAY
178 initialize the type leaf with a valid value, e.g., if it
179 is possible to derive the type from the name of the
181 If a client tries to set the type of an interface to a
182 value that can never be used by the system, e.g., if the
183 type is not supported or if the type does not match the
184 name of the interface, the server MUST reject the request.
185 A NETCONF server MUST reply with an rpc-error with the
186 error-tag 'invalid-value' in this case.";
188 "RFC 2863: The Interfaces Group MIB - ifType";
195 "This leaf contains the configured, desired state of the
197 Systems that implement the IF-MIB use the value of this
198 leaf in the intended configuration to set
199 IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
200 has been initialized, as described in RFC 2863.
201 Changes in this leaf in the intended configuration are
202 reflected in ifAdminStatus.";
204 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
207 leaf link-up-down-trap-enable {
213 "The device will generate linkUp/linkDown SNMP
214 notifications for this interface.";
219 "The device will not generate linkUp/linkDown SNMP
220 notifications for this interface.";
224 "Controls whether linkUp/linkDown SNMP notifications
225 should be generated for this interface.
226 If this node is not configured, the value 'enabled' is
227 operationally used by the server for interfaces that do
228 not operate on top of any other interface (i.e., there are
229 no 'lower-layer-if' entries), and 'disabled' otherwise.";
231 "RFC 2863: The Interfaces Group MIB -
232 ifLinkUpDownTrapEnable";
241 "Ready to pass packets.";
246 "Not ready to pass packets and not in some test mode.";
251 "In some test mode.";
257 "The desired state of the interface.
258 This leaf has the same read semantics as ifAdminStatus.";
260 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
268 "Ready to pass packets.";
274 "The interface does not pass any packets.";
279 "In some test mode. No operational packets can
285 "Status cannot be determined for some reason.";
290 "Waiting for some external event.";
295 "Some component (typically hardware) is missing.";
297 enum lower-layer-down {
300 "Down due to state of lower-layer interface(s).";
306 "The current operational state of the interface.
307 This leaf has the same semantics as ifOperStatus.";
309 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
313 type yang:date-and-time;
316 "The time the interface entered its current operational
317 state. If the current state was entered prior to the
318 last re-initialization of the local network management
319 subsystem, then this node is not present.";
321 "RFC 2863: The Interfaces Group MIB - ifLastChange";
327 range "1..2147483647";
332 "The ifIndex value for the ifEntry represented by this
335 "RFC 2863: The Interfaces Group MIB - ifIndex";
339 type yang:phys-address;
342 "The interface's address at its protocol sub-layer. For
343 example, for an 802.x interface, this object normally
344 contains a Media Access Control (MAC) address. The
345 interface's media-specific modules must define the bit
346 and byte ordering and the format of the value of this
347 object. For interfaces that do not have such an address
348 (e.g., a serial line), this node is not present.";
350 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
353 leaf-list higher-layer-if {
357 "A list of references to interfaces layered on top of this
360 "RFC 2863: The Interfaces Group MIB - ifStackTable";
363 leaf-list lower-layer-if {
368 "A list of references to interfaces layered underneath this
371 "RFC 2863: The Interfaces Group MIB - ifStackTable";
379 "An estimate of the interface's current bandwidth in bits
380 per second. For interfaces that do not vary in
381 bandwidth or for those where no accurate estimation can
382 be made, this node should contain the nominal bandwidth.
383 For interfaces that have no concept of bandwidth, this
384 node is not present.";
386 "RFC 2863: The Interfaces Group MIB -
387 ifSpeed, ifHighSpeed";
390 container statistics {
393 "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.";
410 "The total number of octets received on the interface,
411 including framing characters.
412 Discontinuities in the value of this counter can occur
413 at re-initialization of the management system and at
414 other times as indicated by the value of
415 'discontinuity-time'.";
417 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
420 leaf in-unicast-pkts {
423 "The number of packets, delivered by this sub-layer to a
424 higher (sub-)layer, that were not addressed to a
425 multicast or broadcast address at this sub-layer.
426 Discontinuities in the value of this counter can occur
427 at re-initialization of the management system and at
428 other times as indicated by the value of
429 'discontinuity-time'.";
431 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
434 leaf in-broadcast-pkts {
437 "The number of packets, delivered by this sub-layer to a
438 higher (sub-)layer, that were addressed to a broadcast
439 address at this sub-layer.
440 Discontinuities in the value of this counter can occur
441 at re-initialization of the management system and at
442 other times as indicated by the value of
443 'discontinuity-time'.";
445 "RFC 2863: The Interfaces Group MIB -
446 ifHCInBroadcastPkts";
449 leaf in-multicast-pkts {
452 "The number of packets, delivered by this sub-layer to a
453 higher (sub-)layer, that were addressed to a multicast
454 address at this sub-layer. For a MAC-layer protocol,
455 this includes both Group and Functional addresses.
456 Discontinuities in the value of this counter can occur
457 at re-initialization of the management system and at
458 other times as indicated by the value of
459 'discontinuity-time'.";
461 "RFC 2863: The Interfaces Group MIB -
462 ifHCInMulticastPkts";
468 "The number of inbound packets that were chosen to be
469 discarded even though no errors had been detected to
470 prevent their being deliverable to a higher-layer
471 protocol. One possible reason for discarding such a
472 packet could be to free up buffer space.
473 Discontinuities in the value of this counter can occur
474 at re-initialization of the management system and at
475 other times as indicated by the value of
476 'discontinuity-time'.";
478 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
484 "For packet-oriented interfaces, the number of inbound
485 packets that contained errors preventing them from being
486 deliverable to a higher-layer protocol. For character-
487 oriented or fixed-length interfaces, the number of
488 inbound transmission units that contained errors
489 preventing them from being deliverable to a higher-layer
491 Discontinuities in the value of this counter can occur
492 at re-initialization of the management system and at
493 other times as indicated by the value of
494 'discontinuity-time'.";
496 "RFC 2863: The Interfaces Group MIB - ifInErrors";
499 leaf in-unknown-protos {
503 "For packet-oriented interfaces, the number of packets
504 received via the interface that were discarded because
505 of an unknown or unsupported protocol. For
506 character-oriented or fixed-length interfaces that
507 support protocol multiplexing, the number of
508 transmission units received via the interface that were
509 discarded because of an unknown or unsupported protocol.
510 For any interface that does not support protocol
511 multiplexing, this counter is not present.
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 - ifInUnknownProtos";
523 "The total number of octets transmitted out of the
524 interface, including framing characters.
525 Discontinuities in the value of this counter can occur
526 at re-initialization of the management system and at
527 other times as indicated by the value of
528 'discontinuity-time'.";
530 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
533 leaf out-unicast-pkts {
536 "The total number of packets that higher-level protocols
537 requested be transmitted and that were not addressed
538 to a multicast or broadcast address at this sub-layer,
539 including those that were discarded or not sent.
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 - ifHCOutUcastPkts";
548 leaf out-broadcast-pkts {
551 "The total number of packets that higher-level protocols
552 requested be transmitted and that were addressed to a
553 broadcast address at this sub-layer, including those
554 that were discarded or not sent.
555 Discontinuities in the value of this counter can occur
556 at re-initialization of the management system and at
557 other times as indicated by the value of
558 'discontinuity-time'.";
560 "RFC 2863: The Interfaces Group MIB -
561 ifHCOutBroadcastPkts";
564 leaf out-multicast-pkts {
567 "The total number of packets that higher-level protocols
568 requested be transmitted and that were addressed to a
569 multicast address at this sub-layer, including those
570 that were discarded or not sent. For a MAC-layer
571 protocol, this includes both Group and Functional
573 Discontinuities in the value of this counter can occur
574 at re-initialization of the management system and at
575 other times as indicated by the value of
576 'discontinuity-time'.";
578 "RFC 2863: The Interfaces Group MIB -
579 ifHCOutMulticastPkts";
585 "The number of outbound packets that were chosen to be
586 discarded even though no errors had been detected to
587 prevent their being transmitted. One possible reason
588 for discarding such a packet could be to free up buffer
590 Discontinuities in the value of this counter can occur
591 at re-initialization of the management system and at
592 other times as indicated by the value of
593 'discontinuity-time'.";
595 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
601 "For packet-oriented interfaces, the number of outbound
602 packets that could not be transmitted because of errors.
603 For character-oriented or fixed-length interfaces, the
604 number of outbound transmission units that could not be
605 transmitted because of errors.
606 Discontinuities in the value of this counter can occur
607 at re-initialization of the management system and at
608 other times as indicated by the value of
609 'discontinuity-time'.";
611 "RFC 2863: The Interfaces Group MIB - ifOutErrors";
622 typedef interface-state-ref {
624 path "/if:interfaces-state/if:interface/if:name";
628 "This type is used by data models that need to reference
629 the operationally present interfaces.";
633 * Legacy operational state data nodes
636 container interfaces-state {
640 "Data nodes for the operational state of interfaces.";
647 "The list of interfaces on the device.
648 System-controlled interfaces created by the system are
649 always present in this list, whether or not they are
656 "The name of the interface.
657 A server implementation MAY map this leaf to the ifName
658 MIB object. Such an implementation needs to use some
659 mechanism to handle the differences in size and characters
660 allowed between this leaf and ifName. The definition of
661 such a mechanism is outside the scope of this document.";
663 "RFC 2863: The Interfaces Group MIB - ifName";
673 "The type of the interface.";
675 "RFC 2863: The Interfaces Group MIB - ifType";
684 "Ready to pass packets.";
689 "Not ready to pass packets and not in some test mode.";
694 "In some test mode.";
700 "The desired state of the interface.
701 This leaf has the same read semantics as ifAdminStatus.";
703 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
711 "Ready to pass packets.";
716 "The interface does not pass any packets.";
721 "In some test mode. No operational packets can
727 "Status cannot be determined for some reason.";
732 "Waiting for some external event.";
737 "Some component (typically hardware) is missing.";
739 enum lower-layer-down {
742 "Down due to state of lower-layer interface(s).";
748 "The current operational state of the interface.
749 This leaf has the same semantics as ifOperStatus.";
751 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
755 type yang:date-and-time;
758 "The time the interface entered its current operational
759 state. If the current state was entered prior to the
760 last re-initialization of the local network management
761 subsystem, then this node is not present.";
763 "RFC 2863: The Interfaces Group MIB - ifLastChange";
769 range "1..2147483647";
774 "The ifIndex value for the ifEntry represented by this
778 "RFC 2863: The Interfaces Group MIB - ifIndex";
782 type yang:phys-address;
785 "The interface's address at its protocol sub-layer. For
786 example, for an 802.x interface, this object normally
787 contains a Media Access Control (MAC) address. The
788 interface's media-specific modules must define the bit
789 and byte ordering and the format of the value of this
790 object. For interfaces that do not have such an address
791 (e.g., a serial line), this node is not present.";
793 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
796 leaf-list higher-layer-if {
797 type interface-state-ref;
800 "A list of references to interfaces layered on top of this
803 "RFC 2863: The Interfaces Group MIB - ifStackTable";
806 leaf-list lower-layer-if {
807 type interface-state-ref;
810 "A list of references to interfaces layered underneath this
813 "RFC 2863: The Interfaces Group MIB - ifStackTable";
821 "An estimate of the interface's current bandwidth in bits
822 per second. For interfaces that do not vary in
823 bandwidth or for those where no accurate estimation can
824 be made, this node should contain the nominal bandwidth.
825 For interfaces that have no concept of bandwidth, this
826 node is not present.";
828 "RFC 2863: The Interfaces Group MIB -
829 ifSpeed, ifHighSpeed";
832 container statistics {
835 "A collection of interface-related statistics objects.";
837 leaf discontinuity-time {
838 type yang:date-and-time;
842 "The time on the most recent occasion at which any one or
843 more of this interface's counters suffered a
844 discontinuity. If no such discontinuities have occurred
845 since the last re-initialization of the local management
846 subsystem, then this node contains the time the local
847 management subsystem re-initialized itself.";
854 "The total number of octets received on the interface,
855 including framing characters.
856 Discontinuities in the value of this counter can occur
857 at re-initialization of the management system and at
858 other times as indicated by the value of
859 'discontinuity-time'.";
861 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
864 leaf in-unicast-pkts {
868 "The number of packets, delivered by this sub-layer to a
869 higher (sub-)layer, that were not addressed to a
870 multicast or broadcast address at this sub-layer.
871 Discontinuities in the value of this counter can occur
872 at re-initialization of the management system and at
873 other times as indicated by the value of
874 'discontinuity-time'.";
876 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
879 leaf in-broadcast-pkts {
883 "The number of packets, delivered by this sub-layer to a
884 higher (sub-)layer, that were addressed to a broadcast
885 address at this sub-layer.
886 Discontinuities in the value of this counter can occur
887 at re-initialization of the management system and at
888 other times as indicated by the value of
889 'discontinuity-time'.";
891 "RFC 2863: The Interfaces Group MIB -
892 ifHCInBroadcastPkts";
895 leaf in-multicast-pkts {
899 "The number of packets, delivered by this sub-layer to a
900 higher (sub-)layer, that were addressed to a multicast
901 address at this sub-layer. For a MAC-layer protocol,
902 this includes both Group and Functional addresses.
903 Discontinuities in the value of this counter can occur
904 at re-initialization of the management system and at
905 other times as indicated by the value of
906 'discontinuity-time'.";
908 "RFC 2863: The Interfaces Group MIB -
909 ifHCInMulticastPkts";
917 "The number of inbound packets that were chosen to be
918 discarded even though no errors had been detected to
919 prevent their being deliverable to a higher-layer
920 protocol. One possible reason for discarding such a
921 packet could be to free up buffer space.
922 Discontinuities in the value of this counter can occur
923 at re-initialization of the management system and at
924 other times as indicated by the value of
925 'discontinuity-time'.";
927 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
934 "For packet-oriented interfaces, the number of inbound
935 packets that contained errors preventing them from being
936 deliverable to a higher-layer protocol. For character-
937 oriented or fixed-length interfaces, the number of
938 inbound transmission units that contained errors
939 preventing them from being deliverable to a higher-layer
941 Discontinuities in the value of this counter can occur
942 at re-initialization of the management system and at
943 other times as indicated by the value of
944 'discontinuity-time'.";
946 "RFC 2863: The Interfaces Group MIB - ifInErrors";
949 leaf in-unknown-protos {
953 "For packet-oriented interfaces, the number of packets
954 received via the interface that were discarded because
955 of an unknown or unsupported protocol. For
956 character-oriented or fixed-length interfaces that
957 support protocol multiplexing, the number of
958 transmission units received via the interface that were
959 discarded because of an unknown or unsupported protocol.
960 For any interface that does not support protocol
961 multiplexing, this counter is not present.
962 Discontinuities in the value of this counter can occur
963 at re-initialization of the management system and at
964 other times as indicated by the value of
965 'discontinuity-time'.";
967 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
974 "The total number of octets transmitted out of the
975 interface, including framing characters.
976 Discontinuities in the value of this counter can occur
977 at re-initialization of the management system and at
978 other times as indicated by the value of
979 'discontinuity-time'.";
981 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
984 leaf out-unicast-pkts {
988 "The total number of packets that higher-level protocols
989 requested be transmitted and that were not addressed
990 to a multicast or broadcast address at this sub-layer,
991 including those that were discarded or not sent.
992 Discontinuities in the value of this counter can occur
993 at re-initialization of the management system and at
994 other times as indicated by the value of
995 'discontinuity-time'.";
997 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
1000 leaf out-broadcast-pkts {
1001 type yang:counter64;
1005 "The total number of packets that higher-level protocols
1006 requested be transmitted and that were addressed to a
1007 broadcast address at this sub-layer, including those
1008 that were discarded or not sent.
1009 Discontinuities in the value of this counter can occur
1010 at re-initialization of the management system and at
1011 other times as indicated by the value of
1012 'discontinuity-time'.";
1014 "RFC 2863: The Interfaces Group MIB -
1015 ifHCOutBroadcastPkts";
1018 leaf out-multicast-pkts {
1019 type yang:counter64;
1022 "The total number of packets that higher-level protocols
1023 requested be transmitted and that were addressed to a
1024 multicast address at this sub-layer, including those
1025 that were discarded or not sent. For a MAC-layer
1026 protocol, this includes both Group and Functional
1028 Discontinuities in the value of this counter can occur
1029 at re-initialization of the management system and at
1030 other times as indicated by the value of
1031 'discontinuity-time'.";
1033 "RFC 2863: The Interfaces Group MIB -
1034 ifHCOutMulticastPkts";
1038 type yang:counter32;
1041 "The number of outbound packets that were chosen to be
1042 discarded even though no errors had been detected to
1043 prevent their being transmitted. One possible reason
1044 for discarding such a packet could be to free up buffer
1046 Discontinuities in the value of this counter can occur
1047 at re-initialization of the management system and at
1048 other times as indicated by the value of
1049 'discontinuity-time'.";
1051 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
1055 type yang:counter32;
1058 "For packet-oriented interfaces, the number of outbound
1059 packets that could not be transmitted because of errors.
1060 For character-oriented or fixed-length interfaces, the
1061 number of outbound transmission units that could not be
1062 transmitted because of errors.
1063 Discontinuities in the value of this counter can occur
1064 at re-initialization of the management system and at
1065 other times as indicated by the value of
1066 'discontinuity-time'.";
1068 "RFC 2863: The Interfaces Group MIB - ifOutErrors";