xref: /netbsd-src/share/man/man4/ifmedia.4 (revision 40782f59e26059fbb2f560349f1060f4927ddda4)
1.\"	$NetBSD: ifmedia.4,v 1.31 2018/08/13 06:04:35 wiz Exp $
2.\"
3.\" Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003, 2004
4.\"	The NetBSD Foundation, Inc.
5.\" All rights reserved.
6.\"
7.\" This code is derived from software contributed to The NetBSD Foundation
8.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9.\" NASA Ames Research Center.
10.\"
11.\" Redistribution and use in source and binary forms, with or without
12.\" modification, are permitted provided that the following conditions
13.\" are met:
14.\" 1. Redistributions of source code must retain the above copyright
15.\"    notice, this list of conditions and the following disclaimer.
16.\" 2. Redistributions in binary form must reproduce the above copyright
17.\"    notice, this list of conditions and the following disclaimer in the
18.\"    documentation and/or other materials provided with the distribution.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30.\" POSSIBILITY OF SUCH DAMAGE.
31.\"
32.Dd August 3, 2018
33.Dt IFMEDIA 4
34.Os
35.Sh NAME
36.Nm ifmedia
37.Nd network interface media settings
38.Sh SYNOPSIS
39.In sys/socket.h
40.In net/if.h
41.In net/if_media.h
42.Sh DESCRIPTION
43The
44.Nm
45interface provides a consistent method for querying and setting
46network interface media and media options.
47The media is typically
48set using the
49.Xr ifconfig 8
50command.
51.Pp
52There are currently four link types supported by
53.Nm :
54.Bl -tag -offset indent -width IFM_IEEE80211 -compact
55.It Dv IFM_ETHER
56Ethernet
57.It Dv IFM_TOKEN
58Token Ring
59.It Dv IFM_FDDI
60FDDI
61.It Dv IFM_IEEE80211
62IEEE802.11 Wireless LAN
63.El
64.Pp
65The following sections describe the possible media settings for each
66link type.
67Not all of these are supported by every device; refer to
68your device's manual page for more information.
69.Pp
70The lists below provide the possible names of each media type or option.
71The first name in the list is the canonical name of the media type or
72option.
73Additional names are acceptable aliases for the media type or
74option.
75.Sh COMMON MEDIA TYPES AND OPTIONS
76The following media types are shared by all link types:
77.Bl -tag -offset indent -width IFM_MANUAL -compact
78.It Dv IFM_AUTO
79Autoselect the best media.
80[autoselect, auto]
81.It Dv IFM_MANUAL
82Jumper or switch on device selects media.
83[manual]
84.It Dv IFM_NONE
85Deselect all media.
86[none]
87.El
88.Pp
89The following media options are shared by all link types:
90.Bl -tag -offset indent -width IFM_FLAG0
91.It Dv IFM_FDX
92Place the device into full-duplex mode.
93This option only has meaning
94if the device is normally not full-duplex.
95[full-duplex, fdx]
96.It Dv IFM_HDX
97Place the device into half-duplex mode.
98This option only has meaning
99if the device is normally not half-duplex.
100[half-duplex, hdx]
101.It Dv IFM_FLOW
102Hardware flow control support.
103[flowcontrol, flow]
104.It Dv IFM_FLAG0
105Driver-defined flag.
106[flag0]
107.It Dv IFM_FLAG1
108Driver-defined flag.
109[flag1]
110.It Dv IFM_FLAG2
111Driver-defined flag.
112[flag2]
113.It Dv IFM_LOOP
114Place the device into hardware loopback mode.
115[loopback, hw-loopback, loop]
116.El
117.Sh MEDIA TYPES AND OPTIONS FOR ETHERNET
118The following media types are defined for Ethernet:
119.Bl -tag -offset indent -width IFM_1000_FX
120.It Dv IFM_HPNA_1
121HomePNA 1.0, 1Mb/s.
122[HomePNA1, HPNA1]
123.It Dv IFM_10_T
12410BASE-T, 10Mb/s over unshielded twisted pair, RJ45 connector.
125[10baseT, UTP, 10UTP]
126.It Dv IFM_10_2
12710BASE2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet.
128[10base2, BNC, 10BNC]
129.It Dv IFM_10_5
13010BASE5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI.
131[10base5, AUI, 10AUI]
132.It Dv IFM_10_STP
13310BASE-STP, 10Mb/s over shielded twisted pair, DB9 connector.
134[10baseSTP, STP, 10STP]
135.It Dv IFM_10_FL
13610BASE-FL, 10Mb/s over fiber optic cables.
137[10baseFL, FL, 10FL]
138.It Dv IFM_100_TX
139100BASE-TX, 100Mb/s over unshielded twisted pair, RJ45 connector.
140[100baseTX, 100TX]
141.It Dv IFM_100_FX
142100BASE-FX, 100Mb/s over fiber optic cables.
143[100baseFX, 100FX]
144.It Dv IFM_100_T4
145100BASE-T4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45
146connector.
147[100baseT4, 100T4]
148.It Dv IFM_100_T2
149100BASE-T2.
150[100baseT2, 100T2]
151.It Dv IFM_100_VG
152100VG-AnyLAN.
153[100baseVG, 100VG]
154.It Dv IFM_1000_SX
1551000BASE-SX, 1Gb/s over multi-mode fiber optic cables.
156(short waves)
157[1000baseSX, 1000SX]
158.It Dv IFM_1000_LX
1591000BASE-LX, 1Gb/s over single-mode fiber or multi-mode fiber optic cables.
160(long waves)
161[1000baseLX, 1000LX]
162.It Dv IFM_1000_BX10
1631000BASE-BX10, 1Gb/s over bidirectional fiber optic cables.
164(long waves)
165[1000BASE-BX10]
166.It Dv IFM_1000_CX
1671000BASE-CX, 1Gb/s over shielded twisted pair.
168(twinax)
169[1000baseCX, 1000CX]
170.It Dv IFM_1000_T
1711000BASE-T, 1Gb/s over category 5 unshielded twisted pair, 802.3ab, RJ45
172connector.
173[1000baseT, 1000T]
174.It Dv IFM_1000_KX
1751000BASE-KX, 1Gb/s backplane.
176[1000BASE-KX, 1000baseKX]
177.It Dv IFM_2500_SX
1782500BASE-SX, 2.5Gb/s over multi-mode fiber optic cables.
179[2500baseSX, 2500SX]
180.It Dv IFM_2500_T
1812.5GBASE-T, 2.5Gb/s over category 5e.
182[2.5GBASE-T, 2500baseT]
183.It Dv IFM_2500_KX
1842500BASE-KX, 2.5Gb/s backplane.
185[2500BASE-KX, 2500baseKX]
186.It Dv IFM_5000_T
1875GBASE-T, 5Gb/s over category 6.
188[5GBASE-T, 5GbaseT]
189.It Dv IFM_10G_CX4
19010GBASE-CX4, 10Gb/s over XAUI 4-lane PCS and copper cables.
191[10GbaseCX4, 10GCX4, 10GBASE-CX4]
192.It Dv IFM_10G_LR
19310GBASE-LR, 10Gb/s over single-mode fiber optic cables.
194[10GbaseLR, 10GLR]
195.It Dv IFM_10G_LRM
19610GBASE-LR, 10Gb/s over single-mode fiber optic cables.
197[10GbaseLRM]
198.It Dv IFM_10G_SR
19910GBASE-SR, 10Gb/s over multi-mode fiber optic cables.
200[10GbaseSR, 10GSR, 10GBASE-SR]
201.It Dv IFM_10G_T
20210GBASE-T, 10Gb/s over unshielded twisted pair, RJ45 connector.
203[10Gbase-T]
204.It Dv IFM_10G_TWINAX
205SFP+ direct attach, 10Gb/s over twinaxial cable.
206[10Gbase-Twinax]
207.El
208.Pp
209The following media option is defined for Ethernet:
210.Bl -tag -offset indent -width IFM_ETH_TXPAUSE
211.It Dv IFM_ETH_MASTER
212Configure a 1000BASE-T PHY as the clock master for a 1000BASE-T link.
213This option has no effect
214.Pq shows current status only
215if the media is
216.Dv IFM_AUTO .
217.It Dv IFM_ETH_TXPAUSE
218Configure the device to send PAUSE
219.Pq flow control
220frames.
221This option has no effect
222.Pq shows current status only
223if the media is
224.Dv IFM_AUTO .
225.It Dv IFM_ETH_RXPAUSE
226Configure the device to receive PAUSE
227.Pq flow control
228frames.
229This option has no effect
230.Pq shows current status only
231if the media is
232.Dv IFM_AUTO .
233.El
234.Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING
235The following media types are defined for Token Ring:
236.Bl -tag -offset indent -width IFM_TOK_UTP16
237.It Dv IFM_TOK_STP4
2384Mb/s, shielded twisted pair, DB9 connector.
239[DB9/4Mbit, 4STP]
240.It Dv IFM_TOK_STP16
24116Mb/s, shielded twisted pair, DB9 connector.
242[DB9/16Mbit, 16STP]
243.It Dv IFM_TOK_UTP4
2444Mb/s, unshielded twisted pair, RJ45 connector.
245[UTP/4Mbit, 4UTP]
246.It Dv IFM_TOK_UTP16
24716Mb/s, unshielded twisted pair, RJ45 connector.
248[UTP/16Mbit, 16UTP]
249.El
250.Pp
251The following media options are defined for Token Ring:
252.Bl -tag -offset indent -width IFM_TOK_SRCRT
253.It Dv IFM_TOK_ETR
254Early token release.
255[EarlyTokenRelease, ETR]
256.It Dv IFM_TOK_SRCRT
257Enable source routing features.
258[SourceRouting, SRCRT]
259.It Dv IFM_TOK_ALLR
260All routes vs. single route broadcast.
261[AllRoutes, ALLR]
262.El
263.Sh MEDIA TYPES AND OPTIONS FOR FDDI
264The following media types are defined for FDDI:
265.Bl -tag -offset indent -width IFM_FDDI_SMF -compact
266.It Dv IFM_FDDI_SMF
267Single-mode fiber.
268[Single-mode, SMF]
269.It Dv IFM_FDDI_MMF
270Multi-mode fiber.
271[Multi-mode, MMF]
272.It Dv IFM_FDDI_UTP
273Unshielded twisted pair, RJ45 connector.
274[UTP, CDDI]
275.El
276.Pp
277The following media options are defined for FDDI:
278.Bl -tag -offset indent -width IFM_FDDI_DA
279.It Dv IFM_FDDI_DA
280Dual-attached station vs. Single-attached station.
281[dual-attach, das]
282.El
283.Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN
284The following media types are defined for IEEE802.11 Wireless LAN:
285.Bl -tag -offset indent -width IFM_IEEE80211_OFDM12 -compact
286.It Dv IFM_IEEE80211_FH1
287Frequency Hopping 1Mbps.
288[FH1]
289.It Dv IFM_IEEE80211_FH2
290Frequency Hopping 2Mbps.
291[FH2]
292.It Dv IFM_IEEE80211_DS1
293Direct Sequence 1Mbps.
294[DS1]
295.It Dv IFM_IEEE80211_DS2
296Direct Sequence 2Mbps.
297[DS2]
298.It Dv IFM_IEEE80211_DS5
299Direct Sequence 5Mbps.
300[DS5]
301.It Dv IFM_IEEE80211_DS11
302Direct Sequence 11Mbps.
303[DS11]
304.It Dv IFM_IEEE80211_DS22
305Direct Sequence 22Mbps.
306[DS22]
307.It Dv IFM_IEEE80211_OFDM6
308Orthogonal Frequency Division Multiplexing 6Mbps.
309[OFDM6]
310.It Dv IFM_IEEE80211_OFDM9
311Orthogonal Frequency Division Multiplexing 9Mbps.
312[OFDM9]
313.It Dv IFM_IEEE80211_OFDM12
314Orthogonal Frequency Division Multiplexing 12Mbps.
315[OFDM12]
316.It Dv IFM_IEEE80211_OFDM18
317Orthogonal Frequency Division Multiplexing 18Mbps.
318[OFDM18]
319.It Dv IFM_IEEE80211_OFDM24
320Orthogonal Frequency Division Multiplexing 24Mbps.
321[OFDM24]
322.It Dv IFM_IEEE80211_OFDM36
323Orthogonal Frequency Division Multiplexing 36Mbps.
324[OFDM36]
325.It Dv IFM_IEEE80211_OFDM48
326Orthogonal Frequency Division Multiplexing 48Mbps.
327[OFDM48]
328.It Dv IFM_IEEE80211_OFDM54
329Orthogonal Frequency Division Multiplexing 54Mbps.
330[OFDM54]
331.It Dv IFM_IEEE80211_OFDM72
332Orthogonal Frequency Division Multiplexing 72Mbps.
333[OFDM72]
334.El
335.Pp
336The following media options are defined for IEEE802.11 Wireless LAN:
337.Bl -tag -offset indent -width IFM_IEEE80211_MONITOR
338.It Dv IFM_IEEE80211_ADHOC
339Ad-hoc (IBSS) mode.
340[adhoc, ibss]
341.Lp
342In some drivers, it may be used with the
343.Dv IFM_FLAG0
344[flag0] media option to specify non-standard ad-hoc demo mode.
345.It Dv IFM_IEEE80211_HOSTAP
346Access Point mode [hostap]
347.It Dv IFM_IEEE80211_MONITOR
348Monitor mode [monitor]
349.It Dv IFM_IEEE80211_TURBO
350Turbo mode [turbo]
351.El
352.Sh SEE ALSO
353.Xr netintro 4 ,
354.Xr ifconfig 8
355.Sh HISTORY
356The
357.Nm
358interface first appeared in
359.Bsx 3.0 .
360The implementation that appeared in
361.Nx 1.3
362was written by Jonathan Stone and Jason R. Thorpe to be compatible with
363the BSDI API.
364It has since gone through several revisions which have
365extended the API while maintaining backwards compatibility with the
366original API.
367.Pp
368Support for the
369.Sy IEEE802.11 Wireless LAN
370link type was added in
371.Nx 1.5 .
372