1 module openconfig-if-ethernet {
6 namespace "http://openconfig.net/yang/interfaces/ethernet";
10 // import some basic types
11 import openconfig-interfaces { prefix oc-if; }
12 import iana-if-type { prefix ift; }
13 import openconfig-yang-types { prefix oc-yang; }
14 import openconfig-extensions { prefix oc-ext; }
17 organization "OpenConfig working group";
20 "OpenConfig working group
21 netopenconfig@googlegroups.com";
24 "Model for managing Ethernet interfaces -- augments the OpenConfig
25 model for interface configuration and state.";
27 oc-ext:openconfig-version "2.3.0";
29 revision "2018-01-05" {
31 "Add logical loopback to interface.";
35 revision "2017-12-21" {
37 "Added IPv6 router advertisement configuration.";
41 revision "2017-07-14" {
43 "Added Ethernet/IP state data; Add dhcp-client;
44 migrate to OpenConfig types modules; Removed or
45 renamed opstate values";
49 revision "2016-12-22" {
51 "Fixes to Ethernet interfaces model";
55 // extension statements
59 // identity statements
61 identity ETHERNET_SPEED {
62 description "base type to specify available Ethernet link
68 description "10 Mbps Ethernet";
71 identity SPEED_100MB {
73 description "100 Mbps Ethernet";
78 description "1 GBps Ethernet";
83 description "10 GBps Ethernet";
88 description "25 GBps Ethernet";
93 description "40 GBps Ethernet";
98 description "50 GBps Ethernet";
101 identity SPEED_100GB {
103 description "100 GBps Ethernet";
106 identity SPEED_UNKNOWN {
109 "Interface speed is unknown. Systems may report
110 speed UNKNOWN when an interface is down or unpopuplated (e.g.,
111 pluggable not present).";
114 // typedef statements
117 // grouping statements
119 grouping ethernet-interface-config {
120 description "Configuration items for Ethernet interfaces";
123 type oc-yang:mac-address;
125 "Assigns a MAC address to the Ethernet interface. If not
126 specified, the corresponding operational state leaf is
127 expected to show the system-assigned MAC address.";
130 leaf auto-negotiate {
134 "Set to TRUE to request the interface to auto-negotiate
135 transmission parameters with its peer interface. When
136 set to FALSE, the transmission parameters are specified
139 "IEEE 802.3-2012 auto-negotiation transmission parameters";
145 description "Full duplex mode";
148 description "Half duplex mode";
152 "When auto-negotiate is TRUE, this optionally sets the
153 duplex mode that will be advertised to the peer. If
154 unspecified, the interface should negotiate the duplex mode
155 directly (typically full-duplex). When auto-negotiate is
156 FALSE, this sets the duplex mode on the interface directly.";
164 "When auto-negotiate is TRUE, this optionally sets the
165 port-speed mode that will be advertised to the peer for
166 negotiation. If unspecified, it is expected that the
167 interface will select the highest speed available based on
168 negotiation. When auto-negotiate is set to FALSE, sets the
169 link speed to a fixed value -- supported values are defined
170 by ETHERNET_SPEED identities";
173 leaf enable-flow-control {
177 "Enable or disable flow control for this interface.
178 Ethernet flow control is a mechanism by which a receiver
179 may send PAUSE frames to a sender to stop transmission for
182 This setting should override auto-negotiated flow control
183 settings. If left unspecified, and auto-negotiate is TRUE,
184 flow control mode is negotiated with the peer interface.";
190 grouping ethernet-interface-state-counters {
192 "Ethernet-specific counters and statistics";
196 leaf in-mac-control-frames {
197 type oc-yang:counter64;
199 "MAC layer control frames received on the interface";
202 leaf in-mac-pause-frames {
203 type oc-yang:counter64;
205 "MAC layer PAUSE frames received on the interface";
208 leaf in-oversize-frames {
209 type oc-yang:counter64;
211 "Number of oversize frames received on the interface";
214 leaf in-jabber-frames {
215 type oc-yang:counter64;
217 "Number of jabber frames received on the
218 interface. Jabber frames are typically defined as oversize
219 frames which also have a bad CRC. Implementations may use
220 slightly different definitions of what constitutes a jabber
221 frame. Often indicative of a NIC hardware problem.";
224 leaf in-fragment-frames {
225 type oc-yang:counter64;
227 "Number of fragment frames received on the interface.";
230 leaf in-8021q-frames {
231 type oc-yang:counter64;
233 "Number of 802.1q tagged frames received on the interface";
237 type oc-yang:counter64;
239 "Number of receive error events due to FCS/CRC check
245 leaf out-mac-control-frames {
246 type oc-yang:counter64;
248 "MAC layer control frames sent on the interface";
251 leaf out-mac-pause-frames {
252 type oc-yang:counter64;
254 "MAC layer PAUSE frames sent on the interface";
257 leaf out-8021q-frames {
258 type oc-yang:counter64;
260 "Number of 802.1q tagged frames sent on the interface";
264 grouping ethernet-interface-state {
266 "Grouping for defining Ethernet-specific operational state";
268 leaf hw-mac-address {
269 type oc-yang:mac-address;
271 "Represenets the 'burned-in', or system-assigned, MAC
272 address for the Ethernet interface.";
275 leaf negotiated-duplex-mode {
278 description "Full duplex mode";
281 description "Half duplex mode";
285 "When auto-negotiate is set to TRUE, and the interface has
286 completed auto-negotiation with the remote peer, this value
287 shows the duplex mode that has been negotiated.";
290 leaf negotiated-port-speed {
295 "When auto-negotiate is set to TRUE, and the interface has
296 completed auto-negotiation with the remote peer, this value
297 shows the interface speed that has been negotiated.";
301 description "Ethernet interface counters";
303 uses ethernet-interface-state-counters;
309 // data definition statements
311 grouping ethernet-top {
312 description "top-level Ethernet config and state containers";
316 "Top-level container for ethernet configuration
320 description "Configuration data for ethernet interfaces";
322 uses ethernet-interface-config;
329 description "State variables for Ethernet interfaces";
331 uses ethernet-interface-config;
332 uses ethernet-interface-state;
339 // augment statements
341 augment "/oc-if:interfaces/oc-if:interface" {
342 description "Adds addtional Ethernet-specific configuration to
346 when "oc-if:state/oc-if:type = 'ift:ethernetCsmacd'" {
347 description "Additional interface configuration parameters when
348 the interface type is Ethernet";
355 // notification statements