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) 2012 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
71 feature arbitrary-names {
73 "This feature indicates that the server allows interfaces to
74 be named arbitrarily.";
79 "This feature indicates that the server implements IF-MIB.";
81 "RFC 2863: The Interfaces Group MIB";
86 container interfaces {
88 "Interface parameters.";
92 unique "type location";
95 "The list of interfaces on the device.";
100 "The name of the interface.
102 A device MAY restrict the allowed values for this leaf,
103 possibly depending on the type and location.
105 If the device allows arbitrarily named interfaces, the
106 feature 'arbitrary-names' is advertised.
108 This leaf MAY be mapped to ifName by an implementation.
109 Such an implementation MAY restrict the allowed values for
110 this leaf so that it matches the restrictions of ifName.
111 If a NETCONF server that implements this restriction is
112 sent a value that doesn't match the restriction, it MUST
113 reply with an rpc-error with the error-tag
116 "RFC 2863: The Interfaces Group MIB - ifName";
122 "A textual description of the interface.
124 This leaf MAY be mapped to ifAlias by an implementation.
125 Such an implementation MAY restrict the allowed values for
126 this leaf so that it matches the restrictions of ifAlias.
127 If a NETCONF server that implements this restriction is
128 sent a value that doesn't match the restriction, it MUST
129 reply with an rpc-error with the error-tag
132 "RFC 2863: The Interfaces Group MIB - ifAlias";
136 type ianaift:iana-if-type;
139 "The type of the interface.
141 When an interface entry is created, a server MAY
142 initialize the type leaf with a valid value, e.g., if it
143 is possible to derive the type from the name of the
146 "RFC 2863: The Interfaces Group MIB - ifType";
152 "The device-specific location of the interface of a
153 particular type. The format of the location string
154 depends on the interface type and the device.
156 If the interface's type represents a physical interface,
157 this leaf MUST be set.
159 When an interface entry is created, a server MAY
160 initialize the location leaf with a valid value, e.g., if
161 it is possible to derive the location from the name of
169 "The desired state of the interface.
171 This leaf contains the configured, desired state of the
172 interface. Systems that implement the IF-MIB use the
173 value of this leaf to set IF-MIB.ifAdminStatus to 'up' or
174 'down' after an ifEntry has been initialized, as described
177 "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
185 "Ready to pass packets.";
190 "The interface does not pass any packets.";
195 "In some test mode. No operational packets can
201 "Status cannot be determined for some reason.";
206 "Waiting for some external event.";
211 "Some component is missing.";
213 enum lower-layer-down {
216 "Down due to state of lower-layer interface(s).";
221 "The current operational state of the interface.
223 If 'enabled' is 'false' then 'oper-status'
224 should be 'down'. If 'enabled' is changed to 'true'
225 then 'oper-status' should change to 'up' if the interface
226 is ready to transmit and receive network traffic; it
227 should change to 'dormant' if the interface is waiting for
228 external actions (such as a serial line waiting for an
229 incoming connection); it should remain in the 'down' state
230 if and only if there is a fault that prevents it from
231 going to the 'up' state; it should remain in the
232 'not-present' state if the interface has missing
233 (typically, hardware) components.";
235 "RFC 2863: The Interfaces Group MIB - ifOperStatus";
239 type yang:date-and-time;
242 "The time the interface entered its current operational
243 state. If the current state was entered prior to the
244 last re-initialization of the local network management
245 subsystem, then this node is not present.";
247 "RFC 2863: The Interfaces Group MIB - ifLastChange";
253 range "1..2147483647";
257 "The ifIndex value for the ifEntry represented by this
260 Media-specific modules must specify how the type is
261 mapped to entries in the ifTable.";
263 "RFC 2863: The Interfaces Group MIB - ifIndex";
266 leaf link-up-down-trap-enable {
277 "Indicates whether linkUp/linkDown SNMP notifications
278 should be generated for this interface.
279 If this node is not configured, the value 'enabled' is
280 operationally used by the server for interfaces which do
281 not operate on top of any other interface (i.e., there are
282 no 'lower-layer-if' entries), and 'disabled' otherwise.";
284 "RFC 2863: The Interfaces Group MIB -
285 ifLinkUpDownTrapEnable";
289 type yang:phys-address;
292 "The interface's address at its protocol sub-layer. For
293 example, for an 802.x interface, this object normally
294 contains a MAC address. The interface's media-specific
295 modules must define the bit and byte ordering and the
296 format of the value of this object. For interfaces that do
297 not have such an address (e.g., a serial line), this node
300 "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
303 leaf-list higher-layer-if {
307 "A list of references to interfaces layered on top of this
310 "RFC 2863: The Interfaces Group MIB - ifStackTable";
313 leaf-list lower-layer-if {
317 "A list of references to interfaces layered underneath this
320 "RFC 2863: The Interfaces Group MIB - ifStackTable";
325 units "bits / second";
328 "An estimate of the interface's current bandwidth in bits
329 per second. For interfaces which do not vary in
330 bandwidth or for those where no accurate estimation can
331 be made, this node should contain the nominal bandwidth.
332 For interfaces that has no concept of bandwidth, this
333 node is not present.";
335 "RFC 2863: The Interfaces Group MIB -
336 ifSpeed, ifHighSpeed";
339 container statistics {
342 "A collection of interface-related statistics objects.";
344 leaf discontinuity-time {
345 type yang:date-and-time;
347 "The time on the most recent occasion at which any one or
348 more of this interface's counters suffered a
349 discontinuity. If no such discontinuities have occurred
350 since the last re-initialization of the local management
351 subsystem, then this node contains the time the local
352 management subsystem re-initialized itself.";
358 "The total number of octets received on the interface,
359 including framing characters.
361 Discontinuities in the value of this counter can occur
362 at re-initialization of the management system, and at
363 other times as indicated by the value of
364 'discontinuity-time'.";
366 "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
368 leaf in-unicast-pkts {
371 "The number of packets, delivered by this sub-layer to a
372 higher (sub-)layer, which were not addressed to a
373 multicast or broadcast address at this sub-layer.
375 Discontinuities in the value of this counter can occur
376 at re-initialization of the management system, and at
377 other times as indicated by the value of
378 'discontinuity-time'.";
380 "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
382 leaf in-broadcast-pkts {
385 "The number of packets, delivered by this sub-layer to a
386 higher (sub-)layer, which were addressed to a broadcast
387 address at this sub-layer.
389 Discontinuities in the value of this counter can occur
390 at re-initialization of the management system, and at
391 other times as indicated by the value of
392 'discontinuity-time'.";
394 "RFC 2863: The Interfaces Group MIB -
395 ifHCInBroadcastPkts";
397 leaf in-multicast-pkts {
400 "The number of packets, delivered by this sub-layer to a
401 higher (sub-)layer, which were addressed to a multicast
402 address at this sub-layer. For a MAC layer protocol,
403 this includes both Group and Functional addresses.
405 Discontinuities in the value of this counter can occur
406 at re-initialization of the management system, and at
407 other times as indicated by the value of
408 'discontinuity-time'.";
410 "RFC 2863: The Interfaces Group MIB -
411 ifHCInMulticastPkts";
416 "The number of inbound packets which were chosen to be
417 discarded even though no errors had been detected to
418 prevent their being deliverable to a higher-layer
419 protocol. One possible reason for discarding such a
420 packet could be to free up buffer space.
422 Discontinuities in the value of this counter can occur
423 at re-initialization of the management system, and at
424 other times as indicated by the value of
425 'discontinuity-time'.";
427 "RFC 2863: The Interfaces Group MIB - ifInDiscards";
432 "For packet-oriented interfaces, the number of inbound
433 packets that contained errors preventing them from being
434 deliverable to a higher-layer protocol. For character-
435 oriented or fixed-length interfaces, the number of
436 inbound transmission units that contained errors
437 preventing them from being deliverable to a higher-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 - ifInErrors";
447 leaf in-unknown-protos {
450 "For packet-oriented interfaces, the number of packets
451 received via the interface which were discarded because
452 of an unknown or unsupported protocol. For
453 character-oriented or fixed-length interfaces that
454 support protocol multiplexing the number of transmission
455 units received via the interface which were discarded
456 because of an unknown or unsupported protocol. For any
457 interface that does not support protocol multiplexing,
458 this counter is not present.
460 Discontinuities in the value of this counter can occur
461 at re-initialization of the management system, and at
462 other times as indicated by the value of
463 'discontinuity-time'.";
465 "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
471 "The total number of octets transmitted out of the
472 interface, including framing characters.
474 Discontinuities in the value of this counter can occur
475 at re-initialization of the management system, and at
476 other times as indicated by the value of
477 'discontinuity-time'.";
479 "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
481 leaf out-unicast-pkts {
484 "The total number of packets that higher-level protocols
485 requested be transmitted, and which were not addressed
486 to a multicast or broadcast address at this sub-layer,
487 including those that were discarded or not sent.
489 Discontinuities in the value of this counter can occur
490 at re-initialization of the management system, and at
491 other times as indicated by the value of
492 'discontinuity-time'.";
494 "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
496 leaf out-broadcast-pkts {
499 "The total number of packets that higher-level protocols
500 requested be transmitted, and which were addressed to a
501 broadcast address at this sub-layer, including those
502 that were discarded or not sent.
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 -
510 ifHCOutBroadcastPkts";
512 leaf out-multicast-pkts {
515 "The total number of packets that higher-level protocols
516 requested be transmitted, and which were addressed to a
517 multicast address at this sub-layer, including those
518 that were discarded or not sent. For a MAC layer
519 protocol, this includes both Group and Functional
522 Discontinuities in the value of this counter can occur
523 at re-initialization of the management system, and at
524 other times as indicated by the value of
525 'discontinuity-time'.";
527 "RFC 2863: The Interfaces Group MIB -
528 ifHCOutMulticastPkts";
533 "The number of outbound packets which were chosen to be
534 discarded even though no errors had been detected to
535 prevent their being transmitted. One possible reason
536 for discarding such a packet could be to free up buffer
539 Discontinuities in the value of this counter can occur
540 at re-initialization of the management system, and at
541 other times as indicated by the value of
542 'discontinuity-time'.";
544 "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
549 "For packet-oriented interfaces, the number of outbound
550 packets that could not be transmitted because of errors.
551 For character-oriented or fixed-length interfaces, the
552 number of outbound transmission units that could not be
553 transmitted because of errors.
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 - ifOutErrors";