xref: /illumos-gate/usr/src/man/man7/ieee802.3.7 (revision dd72704bd9e794056c558153663c739e2012d721)
1.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
2.\" Copyright 2016 Joyent, Inc.
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\"    notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright
9.\"    notice, this list of conditions and the following disclaimer in the
10.\"    documentation and/or other materials provided with the distribution.
11.\"
12.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
13.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
16.\" COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
17.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20.\" ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
23.\"
24.Dd "Nov 23, 2016"
25.Dt IEEE802.3 7
26.Os
27.Sh NAME
28.Nm ieee802.3
29.Nd IEEE 802.3 Ethernet parameters and statistics
30.Sh DESCRIPTION
31The IEEE 802.3 standard specifies the details for Ethernet
32networking.
33This page describes the various statistics and tunables that device drivers
34supporting Ethernet commonly offer.
35.
36Note that not every device or driver supports every one of these
37values, and many devices offer additional statistics and tunables that
38are specific to that hardware.
39See the device driver's documentation for those specific details.
40.
41.Lp
42Values that are statistics are visible
43.Xr kstat 8 ,
44whereas properties are visible using the
45.Xr dladm 8
46.Sy show-linkprop
47subcommand.
48Tunables are properties that can be changed using the
49.Xr dladm 8
50.Sy set-linkprop
51subcommand.
52A more useful summary of current operational state can be seen with the
53.Xr dladm 8
54.Sy show-ether
55subcommand.
56.
57.Ss Statistics
58The following statistics are accessible with
59.Xr kstat 8 .
60Note that some statistics are available in both 32- and 64-bit counters,
61in which case the name of the 64 bit statistic will be the same as the
6232-bit, but with
63.Dq Sy 64
64appended.
65For example,
66.Sy ipackets64
67is the 64-bit version of the
68.Sy ipackets
69statistic.
70These are indicated with the special suffix
71.Op Sy 64
72in the table below.
73.
74.Bl -tag -width tx_late_collisions
75.It Sy adv_cap_1000fdx
76Advertises 1000 Mbps full-duplex support.
77.It Sy adv_cap_1000hdx
78Advertises 1000 Mbps half-duplex support.
79.It Sy adv_cap_100fdx
80Advertises 100 Mbps full-duplex support.
81.It Sy adv_cap_100gfdx
82Advertises 100 Gbps support.
83.It Sy adv_cap_100hdx
84Advertises 100 Mbps half-duplex support.
85.It Sy adv_cap_100T4
86Advertises 100BASE-T4 support.
87.It Sy adv_cap_10fdx
88Advertises 10 Mbps full-duplex support.
89.It Sy adv_cap_10gfdx
90Advertises 10 Gbps support.
91.It Sy adv_cap_10hdx
92Advertises 10 Mbps half-duplex support.
93.It Sy adv_cap_2500fdx
94Advertises 2.5 Gbps support.
95.It Sy adv_cap_50gfdx
96Advertises 50 Gbps support.
97.It Sy adv_cap_40gfdx
98Advertises 40 Gbps support.
99.It Sy adv_cap_25gfdx
100Advertises 25 Gbps support.
101.It Sy adv_cap_5000fdx
102Advertises 5 Gbps support.
103.It Sy adv_cap_autoneg
104Advertises auto-negotiation support.
105.It Sy adv_cap_asmpause
106Advertises asymmetric flow control support.
107.It Sy adv_cap_pause
108Advertises flow control support.
109.It Sy adv_rem_fault
110Remote fault status sent to peer.
111.It Sy align_errors
112Mis-aligned frames received.
113.It Sy brdcstrcv
114Broadcast frames received.
115.It Sy brdcstxmt
116Broadcast frames transmitted.
117.It Sy cap_1000fdx
118Device supports 1000 Mbps full-duplex.
119.It Sy cap_1000hdx
120Device supports 1000 Mbps half-duplex.
121.It Sy cap_100fdx
122Device supports 100 Mbps full-duplex.
123.It Sy cap_100gfdx
124Device supports 100 Gbps.
125.It Sy cap_100hdx
126Device supports 100 Mbps half-duplex.
127.It Sy cap_100T4
128Device supports 100BASE-T4.
129.It Sy cap_10fdx
130Device supports 10 Mbps full-duplex.
131.It Sy cap_10gfdx
132Device supports 10 Gpbs.
133.It Sy cap_10hdx
134Device supports 10 Mbps half-duplex.
135.It Sy cap_2500fdx
136Device supports 2.5 Gbps.
137.It Sy cap_50gfdx
138Device supports 50 Gpbs.
139.It Sy cap_40gfdx
140Device supports 40 Gpbs.
141.It Sy cap_25gfdx
142Device supports 25 Gpbs.
143.It Sy cap_5000fdx
144Device supports 5 Gbps.
145.It Sy cap_asmpause
146Device supports asymmetric flow control.
147.It Sy cap_autoneg
148Device supports auto-negotiation.
149.It Sy cap_pause
150Device supports symmetric flow control.
151.It Sy cap_rem_fault
152Device supports remote fault notification.
153.It Sy carrier_errors
154Frames dropped due to loss of link.
155.It Sy collisions
156Collisions.
157.It Sy defer_xmts
158Transmits deferred due to link activity.
159.It Sy ex_collisions
160Frames dropped due to too many collisions.
161.It Sy fcs_errors
162Frames received with bad frame checksum.
163.It Sy first_collisions
164Frames with at least one collision.
165.It Sy ierrors
166Receive errors.
167.It Sy ifspeed
168Link speed in bits per second.
169.It Sy ipackets Ns Op Sy 64
170Frames received successfully.
171.It Sy jabber_errors
172Jabber errors.
173.It Sy link_asmpause
174Asymmetric flow control; works together with
175.Sy link_pause .
176See the description for it below.
177.It Sy link_autoneg
178Link was auto-negotiated.
179.It Sy link_duplex
180Link duplex status, values as follows:
181.Bl -column "0" infinity
182.It 0 Ta Unknown.
183.It 1 Ta Half-duplex.
184.It 2 Ta Full-duplex.
185.El
186.It Sy link_pause
187Link flow control available; works together with
188.Sy link_asmpause .
189The meanings of these bits are:
190.Bl -column "pause" "asmpause"
191.It Sy pause Ta Sy asmpause Ta Sy meaning
192.It 0 Ta 0 Ta "No flow control."
193.It 1 Ta 0 Ta Symmetric flow control.
194.It 0 Ta 1 Ta Honor received pause frames.
195.It 1 Ta 1 Ta Send pause frames when congested.
196.El
197.It Sy link_state
198Link state; 0 for down, 1 for up.
199.It Sy link_up
200Link is up if 1.
201.It Sy lp_cap_1000fdx
202Peer supports 1000 Mbps full-duplex.
203.It Sy lp_cap_1000hdx
204Peer supports 1000 Mbps half-duplex.
205.It Sy lp_cap_100fdx
206Peer supports 100 Mbps full-duplex.
207.It Sy lp_cap_100gfdx
208Peer supports 100 Gbps full-duplex.
209.It Sy lp_cap_100hdx
210Peer supports 100 Mbps half-duplex.
211.It Sy lp_cap_100T4
212Peer supports 100BASE-T4.
213.It Sy lp_cap_10fdx
214Peer supports 10 Mbps full-duplex.
215.It Sy lp_cap_10gfdx
216Peer supports 10 Gbps.
217.It Sy lp_cap_10hdx
218Peer supports 10 Mbps half-duplex.
219.It Sy lp_cap_2500fdx
220Peer supports 2.5 Gbps.
221.It Sy lp_cap_5000fdx
222Peer supports 5 Gbps.
223.It Sy lp_cap_50gfdx
224Peer supports 50 Gbps.
225.It Sy lp_cap_40gfdx
226Peer supports 40 Gbps.
227.It Sy lp_cap_25gfdx
228Peer supports 25 Gbps.
229.It Sy lp_cap_asmpause
230Peer supports asymmetric flow control.
231.It Sy lp_cap_autoneg
232Peer supports auto-negotiation.
233.It Sy lp_cap_pause
234Peer advertises flow control support.
235.It Sy lp_rem_fault
236Peer announces a remote fault.
237.It Sy macrv_errors
238Generic receive errors.
239.It Sy macxmt_errors
240Generic transmit errors.
241.It Sy multi_collisions
242Frames with more than one collision.
243.It Sy multircv
244Multicast frames received.
245.It Sy multixmt
246Multicast frames transmitted.
247.It Sy norcvbuf
248Receive frames dropped due to lack of resources.
249.It Sy noxmtbuf
250Transmit frames dropped due to lack of resources.
251.It Sy obytes Ns Op Sy 64
252Bytes (octets) transmitted successfully.
253.It Sy oerrors
254Transmit errors.
255.It Sy oflo
256Overflow errors.
257.It Sy opackets Ns Op Sy 64
258Frames successfully transmitted.
259.It Sy promisc
260Interface is in promiscuous mode.
261.It Sy rbytes Ns Op Sy 64
262Bytes (octets) received successfully.
263.It Sy runt_errors
264Frames received that were too short.
265.It Sy sqe_errors
266Squelch errors.
267.It Sy toolong_errors
268Frames received that were too long.
269.It Sy tx_late_collisions
270Late collisions on transmit.
271.It Sy uflo
272Underflow errors.
273.It Sy unknowns
274Frames received with no local recipient.
275.It Sy xcvr_addr
276Transceiver address.
277.It Sy xcvr_id
278Transceiver vendor and device ID.
279.It Sy xcvr_inuse
280Identifies the type of transceiver in use.
281Values are as follows:
282.Bl -column "0"
283.It 0 Ta Unknown or undefined.
284.It 1 Ta None.
285.It 2 Ta 10 Mbps
286.It 3 Ta 100BASE-T4
287.It 4 Ta 100BASE-X
288.It 5 Ta 100BASE-T2
289.It 6 Ta 1000BASE-X
290.It 7 Ta 1000BASE-T
291.El
292.El
293.Ss Properties
294The following parameters are accessible with
295.Xr dladm 8 .
296Some of these are normally read-only.
297Other properties that are not specific to IEEE 802.3 / Ethernet links are also
298available via
299.Xr dladm 8 ,
300and are documented in its man page rather than here.
301.
302.Bl -tag -width adv_1000hdx_cap
303.It Sy speed
304Link speed, in Mbps per second (dladm only).
305.It Sy duplex
306Link duplex, either "full" or "half".
307.It Sy state
308Link state, either "up" or "down".
309.It Sy mtu
310Maximum link frame size in bytes.
311See
312.Sx Jumbo Frames .
313.It Sy flowctrl
314Flow control setting, one of \(dqno\(dq, \(dqtx\(dq, \(dqrx\(dq, or \(dqbi\(dq.
315See
316.Sx Flow Control .
317.It Sy adv_10gfdx_cap
318Advertising 10 Gbps support.
319.It Sy en_10gfdx_cap
320Enable 10 Gbps support.
321.
322.It Sy adv_1000fdx_cap
323Advertising 1000 Mbps full-duplex support.
324.It Sy en_1000fdx_cap
325Enable 1000 Mbps full-duplex.
326.
327.It Sy adv_1000hdx_cap
328Advertising 1000 Mbps half-duplex support.
329.It Sy en_1000hdx_cap
330Enable 1000 Mbps half-duplex.
331.
332.It Sy adv_100fdx_cap
333Advertising 100 Mbps full-duplex support.
334.It Sy en_100fdx_cap
335Enable 100 Mbps full-duplex.
336.
337.It Sy adv_100hdx_cap
338Advertising 100 Mbps half-duplex support.
339.It Sy en_100hdx_cap
340Enable 100 Mbps half-duplex.
341.
342.It Sy adv_10fdx_cap
343Advertising 10 Mbps full-duplex support.
344.It Sy en_10fhdx_cap
345Enable 100 Mbps full-duplex.
346.
347.It Sy adv_10hdx_cap
348Advertising 10 Mbps half-duplex support.
349.It Sy en_10fhdx_cap
350Enable 10 Mbps half-duplex.
351.El
352.Ss Auto-negotiation
353With modern devices, auto-negotiation is normally handled automatically.
354With 10 Gbps and 1000 Gbps, it is mandatory (10GBASE-T also requires full-duplex
355operation).
356It is also
357.Em strongly
358recommended for use whenever possible; without auto-negotiation the link
359will usually not operate unless both partners are configured to use the
360same link mode.
361.Lp
362Auto-negotiation, when enabled, takes place by comparing the local capabilities
363that have been advertised (which must also be supported by the local device),
364with the capabilities that have been advertised by the link partner (peer).
365.
366The first of the following modes that is supported by both partners is
367selected as the link negotiation result:
368.Lp
369.Bl -bullet -offset indent -compact
370.It
37110 Gbps (10gfdx)
372.It
3731000 Mbps full-duplex (1000fdx)
374.It
3751000 Mbps half-duplex (1000hdx)
376.It
377100 Mbps full-duplex (100fdx)
378.It
379100BASE-T4 (100T4)
380.It
381100 Mbps half-duplex (100hdx)
382.It
38310 Mbps full-duplex (10fdx)
384.It
38510 Mbps half-duplex (10hdx)
386.El
387.Lp
388Advertisement of these modes can be enabled or disabled by setting the
389appropriate
390.Sy en_
391property in
392.Xr dladm 8 .
393.Lp
394Auto-negotiation may also be disabled, by setting the
395.Sy adv_autoneg_cap
396property to 0.
397In this case, the highest enabled link mode (using the above list) is
398.Dq forced
399for the link.
400.Ss Flow Control
401Link layer flow control is available on many modern devices, and is mandatory
402for operation at 10 Gbps.
403It requires that the link be auto-negotiated, and that the link be full-duplex,
404in order to function.
405.Lp
406Flow control is applied when a receiver becomes congested.
407In this case the receiver can send a special frame, called a pause frame, to
408request its partner cease transmitting for a short period of time.
409.Lp
410Flow control can be said to be either symmetric, in which case both partners
411can send and honor pause frames, or asymmetric, in which case one partner
412may not transmit pause frames.
413.Lp
414The flow control mode used is driven by the
415.Sy flowctrl
416property.
417It has the following meanings:
418.Lp
419.Bl -column -compact -offset indent Dv
420.It \(dqno\(dq Ta Neither send, nor honor pause frames.
421.It \(dqtx\(dq Ta Send pause frames, provided that the peer can support them,
422but do not honor them.
423.It \(dqrx\(dq Ta Receive and honor pause frames.
424.It \(dqbi\(dq Ta Both send and receive (and honor) pause frames.
425.El
426.Lp
427The statistics for flow control
428.Po Sy adv_cap_pause , adv_cap_asmpause , lp_cap_pause , lp_cap_asmpause ,
429.Sy link_pause ,
430and
431.Sy link_asmpause
432.Pc
433are based on the properties exchanged in the auto-negotiation and are
434confusing as a result.
435Administrators are advised to use the
436.Sy flowctrl
437property instead.
438.
439.Ss Jumbo Frames
440The IEEE 802.3 standard specifies a standard frame size of 1518 bytes,
441which includes a 4-byte frame checksum, a 14-byte header, and 1500 bytes
442of payload.
443Most devices support larger frame sizes than this, and when all possible parties
444on the same local network can do so, it may be advantageous to choose a larger
445frame size; 9000 bytes is the most common option, as it allows a transport layer
446to convey 8 KB (8192) of data, while leaving room for various link, network, and
447transport layer headers.
448.Lp
449Note that the use of frames carrying more than 1500 bytes of payload is
450not standardized, even though it is common practice.
451.Lp
452The
453.Sy mtu
454property is used to configure the frame size.
455Note that this is the size of the payload, and excludes the preamble, checksum,
456and header.
457It also excludes the tag for devices that support tagging (see
458.Sx Virtual LANs
459below).
460.Lp
461Care must be taken to ensure that all communication parties agree on the same
462size, or communication may cease to function properly.
463.Lp
464Note that the
465.Sy mtu
466property refers to the link layer property.
467It may be necessary to configure upper layer protocols such as IP to use a
468different size when this changes.
469See
470.Xr ifconfig 8 .
471.
472.Ss Virtual LANs
473Most devices support virtual LANs (and also priority control tagging) though
474the use of a 4-byte tag inserted between the frame header and payload.
475The details of configuration of this are covered in the
476.Xr dladm 8
477manual.
478.
479.Ss Data Link Provider Interface (DLPI) Details
480.
481The correct method for applications to access Ethernet devices directly
482is to use the DLPI.
483See
484.Xr dlpi 4P
485and
486.Xr libdlpi 3LIB
487for further information.
488.Lp
489The following DLPI parameters are presented to applications.
490.Bl -column -offset indent "Broadcast address"
491.It Maximum SDU Ta 1500 (or larger, as determined by the Sy mtu No property.)
492.It Minimum SDU Ta 0
493.It Address length Ta 6
494.It MAC type Ta Dv DL_ETHER
495.It SAP length Ta \(mi2
496.It Service mode Ta Dv DL_CLDLS
497.It Broadcast address Ta Li ff:ff:ff:ff:ff:ff No (6 bytes with all bits set)
498.El
499.Lp
500Note that if the application binds to SAP of 0, then standard IEEE 802.3
501mode is assumed and the frame length is stored in place of the Ethernet type.
502Frames that arrive with the type field set to 1500 or less, are delivered
503to applications that bind to SAP 0.
504.Lp
505Ethernet drivers on the support both DLPI style 1 and style 2 operation.
506Additionally, it is possible to configure provide
507.Dq vanity
508names to interfaces using the
509.Xr dladm 8
510.Sy rename-link
511subcommand.
512Such vanity names are only accessible using DLPI style 1.
513.Sh NOTES
514There may be other mechanisms available to configure link layer properties.
515Historically the
516.Xr ndd 8
517command, and
518.Xr driver.conf 5
519files could be used to do this.
520These methods are deprecated in favor of
521.Xr dladm 8
522properties.
523.
524.Sh INTERFACE STABILITY
525When present, the statistics and properties presented here
526are
527.Sy Committed .
528However, note that not every Ethernet device supports all of these,
529and some devices may support additional statistics and properties.
530.Lp
531The DLPI and IEEE 802.3 itself are
532.Sy Standard .
533.Sh SEE ALSO
534.Xr libdlpi 3LIB ,
535.Xr dlpi 4P ,
536.Xr driver.conf 5 ,
537.Xr dladm 8 ,
538.Xr ifconfig 8 ,
539.Xr kstat 8 ,
540.Xr ndd 8 ,
541.Xr netstat 8
542.Rs
543.%T IEEE 802.3: Ethernet
544.%Q IEEE Standards Association
545.Re
546.Rs
547.%B Data Link Provider Interface (DLPI)
548.%Q The Open Group
549.%D 1997
550.Re
551.Rs
552.%B STREAMs Programming Guide
553.%Q Sun Microsystems, Inc.
554.%D January 2005
555.Re
556