xref: /netbsd-src/share/man/man4/ifmedia.4 (revision b97d67d71da82f5639e0a5cb066ad6ac889fae34)
1.\"	$NetBSD: ifmedia.4,v 1.30 2018/08/03 05:27:16 msaitoh 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.  The media is typically
47set using the
48.Xr ifconfig 8
49command.
50.Pp
51There are currently four link types supported by
52.Nm :
53.Bl -tag -offset indent -width IFM_IEEE80211 -compact
54.It Dv IFM_ETHER
55Ethernet
56.It Dv IFM_TOKEN
57Token Ring
58.It Dv IFM_FDDI
59FDDI
60.It Dv IFM_IEEE80211
61IEEE802.11 Wireless LAN
62.El
63.Pp
64The following sections describe the possible media settings for each
65link type.  Not all of these are supported by every device; refer to
66your device's manual page for more information.
67.Pp
68The lists below provide the possible names of each media type or option.
69The first name in the list is the canonical name of the media type or
70option.  Additional names are acceptable aliases for the media type or
71option.
72.Sh COMMON MEDIA TYPES AND OPTIONS
73The following media types are shared by all link types:
74.Bl -tag -offset indent -width IFM_MANUAL -compact
75.It Dv IFM_AUTO
76Autoselect the best media.  [autoselect, auto]
77.It Dv IFM_MANUAL
78Jumper or switch on device selects media.  [manual]
79.It Dv IFM_NONE
80Deselect all media.  [none]
81.El
82.Pp
83The following media options are shared by all link types:
84.Bl -tag -offset indent -width IFM_FLAG0
85.It Dv IFM_FDX
86Place the device into full-duplex mode.  This option only has meaning
87if the device is normally not full-duplex.  [full-duplex, fdx]
88.It Dv IFM_HDX
89Place the device into half-duplex mode.  This option only has meaning
90if the device is normally not half-duplex.  [half-duplex, hdx]
91.It Dv IFM_FLOW
92Hardware flow control support.  [flowcontrol, flow]
93.It Dv IFM_FLAG0
94Driver-defined flag.  [flag0]
95.It Dv IFM_FLAG1
96Driver-defined flag.  [flag1]
97.It Dv IFM_FLAG2
98Driver-defined flag.  [flag2]
99.It Dv IFM_LOOP
100Place the device into hardware loopback mode.  [loopback, hw-loopback, loop]
101.El
102.Sh MEDIA TYPES AND OPTIONS FOR ETHERNET
103The following media types are defined for Ethernet:
104.Bl -tag -offset indent -width IFM_1000_FX
105.It Dv IFM_HPNA_1
106HomePNA 1.0, 1Mb/s.  [HomePNA1, HPNA1]
107.It Dv IFM_10_T
10810BASE-T, 10Mb/s over unshielded twisted pair, RJ45 connector.  [10baseT,
109UTP, 10UTP]
110.It Dv IFM_10_2
11110BASE2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet.
112[10base2, BNC, 10BNC]
113.It Dv IFM_10_5
11410BASE5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI.
115[10base5, AUI, 10AUI]
116.It Dv IFM_10_STP
11710BASE-STP, 10Mb/s over shielded twisted pair, DB9 connector.  [10baseSTP,
118STP, 10STP]
119.It Dv IFM_10_FL
12010BASE-FL, 10Mb/s over fiber optic cables.  [10baseFL, FL, 10FL]
121.It Dv IFM_100_TX
122100BASE-TX, 100Mb/s over unshielded twisted pair, RJ45 connector.  [100baseTX,
123100TX]
124.It Dv IFM_100_FX
125100BASE-FX, 100Mb/s over fiber optic cables.  [100baseFX, 100FX]
126.It Dv IFM_100_T4
127100BASE-T4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45
128connector.  [100baseT4, 100T4]
129.It Dv IFM_100_T2
130100BASE-T2.  [100baseT2, 100T2]
131.It Dv IFM_100_VG
132100VG-AnyLAN.  [100baseVG, 100VG]
133.It Dv IFM_1000_SX
1341000BASE-SX, 1Gb/s over multi-mode fiber optic cables. (short waves)
135[1000baseSX, 1000SX]
136.It Dv IFM_1000_LX
1371000BASE-LX, 1Gb/s over single-mode fiber or multi-mode fiber optic cables.
138(long waves)
139[1000baseLX, 1000LX]
140.It Dv IFM_1000_BX10
1411000BASE-BX10, 1Gb/s over bidirectional fiber optic cables. (long waves)
142[1000BASE-BX10]
143.It Dv IFM_1000_CX
1441000BASE-CX, 1Gb/s over shielded twisted pair. (twinax)
145[1000baseCX, 1000CX]
146.It Dv IFM_1000_T
1471000BASE-T, 1Gb/s over category 5 unshielded twisted pair, 802.3ab, RJ45
148connector.
149[1000baseT, 1000T]
150.It Dv IFM_1000_KX
1511000BASE-KX, 1Gb/s backplane.
152[1000BASE-KX, 1000baseKX]
153.It Dv IFM_2500_SX
1542500BASE-SX, 2.5Gb/s over multi-mode fiber optic cables.
155[2500baseSX, 2500SX]
156.It Dv IFM_2500_T
1572.5GBASE-T, 2.5Gb/s over category 5e.
158[2.5GBASE-T, 2500baseT]
159.It Dv IFM_2500_KX
1602500BASE-KX, 2.5Gb/s backplane.
161[2500BASE-KX, 2500baseKX]
162.It Dv IFM_5000_T
1635GBASE-T, 5Gb/s over category 6.
164[5GBASE-T, 5GbaseT]
165.It Dv IFM_10G_CX4
16610GBASE-CX4, 10Gb/s over XAUI 4-lane PCS and copper cables.
167[10GbaseCX4, 10GCX4, 10GBASE-CX4]
168.It Dv IFM_10G_LR
16910GBASE-LR, 10Gb/s over single-mode fiber optic cables.  [10GbaseLR, 10GLR]
170.It Dv IFM_10G_LRM
17110GBASE-LR, 10Gb/s over single-mode fiber optic cables.  [10GbaseLRM]
172.It Dv IFM_10G_SR
17310GBASE-SR, 10Gb/s over multi-mode fiber optic cables.
174[10GbaseSR, 10GSR, 10GBASE-SR]
175.It Dv IFM_10G_T
17610GBASE-T, 10Gb/s over unshielded twisted pair, RJ45 connector.
177[10Gbase-T]
178.It Dv IFM_10G_TWINAX
179SFP+ direct attach, 10Gb/s over twinaxial cable.
180[10Gbase-Twinax]
181.El
182.Pp
183The following media option is defined for Ethernet:
184.Bl -tag -offset indent -width IFM_ETH_TXPAUSE
185.It Dv IFM_ETH_MASTER
186Configure a 1000BASE-T PHY as the clock master for a 1000BASE-T link.
187This option has no effect
188.Pq shows current status only
189if the media is
190.Dv IFM_AUTO .
191.It Dv IFM_ETH_TXPAUSE
192Configure the device to send PAUSE
193.Pq flow control
194frames.
195This option has no effect
196.Pq shows current status only
197if the media is
198.Dv IFM_AUTO .
199.It Dv IFM_ETH_RXPAUSE
200Configure the device to receive PAUSE
201.Pq flow control
202frames.
203This option has no effect
204.Pq shows current status only
205if the media is
206.Dv IFM_AUTO .
207.El
208.Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING
209The following media types are defined for Token Ring:
210.Bl -tag -offset indent -width IFM_TOK_UTP16
211.It Dv IFM_TOK_STP4
2124Mb/s, shielded twisted pair, DB9 connector.  [DB9/4Mbit, 4STP]
213.It Dv IFM_TOK_STP16
21416Mb/s, shielded twisted pair, DB9 connector.  [DB9/16Mbit, 16STP]
215.It Dv IFM_TOK_UTP4
2164Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/4Mbit, 4UTP]
217.It Dv IFM_TOK_UTP16
21816Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/16Mbit, 16UTP]
219.El
220.Pp
221The following media options are defined for Token Ring:
222.Bl -tag -offset indent -width IFM_TOK_SRCRT
223.It Dv IFM_TOK_ETR
224Early token release.  [EarlyTokenRelease, ETR]
225.It Dv IFM_TOK_SRCRT
226Enable source routing features.  [SourceRouting, SRCRT]
227.It Dv IFM_TOK_ALLR
228All routes vs. single route broadcast.  [AllRoutes, ALLR]
229.El
230.Sh MEDIA TYPES AND OPTIONS FOR FDDI
231The following media types are defined for FDDI:
232.Bl -tag -offset indent -width IFM_FDDI_SMF -compact
233.It Dv IFM_FDDI_SMF
234Single-mode fiber.  [Single-mode, SMF]
235.It Dv IFM_FDDI_MMF
236Multi-mode fiber.  [Multi-mode, MMF]
237.It Dv IFM_FDDI_UTP
238Unshielded twisted pair, RJ45 connector.  [UTP, CDDI]
239.El
240.Pp
241The following media options are defined for FDDI:
242.Bl -tag -offset indent -width IFM_FDDI_DA
243.It Dv IFM_FDDI_DA
244Dual-attached station vs. Single-attached station.  [dual-attach, das]
245.El
246.Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN
247The following media types are defined for IEEE802.11 Wireless LAN:
248.Bl -tag -offset indent -width IFM_IEEE80211_OFDM12 -compact
249.It Dv IFM_IEEE80211_FH1
250Frequency Hopping 1Mbps.  [FH1]
251.It Dv IFM_IEEE80211_FH2
252Frequency Hopping 2Mbps.  [FH2]
253.It Dv IFM_IEEE80211_DS1
254Direct Sequence 1Mbps.  [DS1]
255.It Dv IFM_IEEE80211_DS2
256Direct Sequence 2Mbps.  [DS2]
257.It Dv IFM_IEEE80211_DS5
258Direct Sequence 5Mbps.  [DS5]
259.It Dv IFM_IEEE80211_DS11
260Direct Sequence 11Mbps.  [DS11]
261.It Dv IFM_IEEE80211_DS22
262Direct Sequence 22Mbps.  [DS22]
263.It Dv IFM_IEEE80211_OFDM6
264Orthogonal Frequency Division Multiplexing 6Mbps.  [OFDM6]
265.It Dv IFM_IEEE80211_OFDM9
266Orthogonal Frequency Division Multiplexing 9Mbps.  [OFDM9]
267.It Dv IFM_IEEE80211_OFDM12
268Orthogonal Frequency Division Multiplexing 12Mbps.  [OFDM12]
269.It Dv IFM_IEEE80211_OFDM18
270Orthogonal Frequency Division Multiplexing 18Mbps.  [OFDM18]
271.It Dv IFM_IEEE80211_OFDM24
272Orthogonal Frequency Division Multiplexing 24Mbps.  [OFDM24]
273.It Dv IFM_IEEE80211_OFDM36
274Orthogonal Frequency Division Multiplexing 36Mbps.  [OFDM36]
275.It Dv IFM_IEEE80211_OFDM48
276Orthogonal Frequency Division Multiplexing 48Mbps.  [OFDM48]
277.It Dv IFM_IEEE80211_OFDM54
278Orthogonal Frequency Division Multiplexing 54Mbps.  [OFDM54]
279.It Dv IFM_IEEE80211_OFDM72
280Orthogonal Frequency Division Multiplexing 72Mbps.  [OFDM72]
281.El
282.Pp
283The following media options are defined for IEEE802.11 Wireless LAN:
284.Bl -tag -offset indent -width IFM_IEEE80211_MONITOR
285.It Dv IFM_IEEE80211_ADHOC
286Ad-hoc (IBSS) mode. [adhoc, ibss]
287.Lp
288In some drivers, it may be used with the
289.Dv IFM_FLAG0
290[flag0] media option to specify non-standard ad-hoc demo mode.
291.It Dv IFM_IEEE80211_HOSTAP
292Access Point mode [hostap]
293.It Dv IFM_IEEE80211_MONITOR
294Monitor mode [monitor]
295.It Dv IFM_IEEE80211_TURBO
296Turbo mode [turbo]
297.El
298.Sh SEE ALSO
299.Xr netintro 4 ,
300.Xr ifconfig 8
301.Sh HISTORY
302The
303.Nm
304interface first appeared in
305.Bsx 3.0 .
306The implementation that appeared in
307.Nx 1.3
308was written by Jonathan Stone and Jason R. Thorpe to be compatible with
309the BSDI API.  It has since gone through several revisions which have
310extended the API while maintaining backwards compatibility with the
311original API.
312.Pp
313Support for the
314.Sy IEEE802.11 Wireless LAN
315link type was added in
316.Nx 1.5 .
317