xref: /netbsd-src/share/man/man4/ifmedia.4 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.\"	$NetBSD: ifmedia.4,v 1.29 2009/04/10 17:07:15 joerg 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 October 7, 2006
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 optic cables. (long waves)
138[1000baseLX, 1000LX]
139.It Dv IFM_1000_CX
1401000BASE-CX, 1Gb/s over shielded twisted pair. (twinax)
141[1000baseCX, 1000CX]
142.It Dv IFM_1000_T
1431000BASE-T, 1Gb/s over category 5 unshielded twisted pair, 802.3ab, RJ45
144connector.
145[1000baseT, 1000T]
146.It Dv IFM_10G_LR
14710GBASE-LR, 10Gb/s over single-mode fiber optic cables.  [10GbaseLR, 10GLR]
148.El
149.Pp
150The following media option is defined for Ethernet:
151.Bl -tag -offset indent -width IFM_ETH_TXPAUSE
152.It Dv IFM_ETH_MASTER
153Configure a 1000BASE-T PHY as the clock master for a 1000BASE-T link.
154This option has no effect
155.Pq shows current status only
156if the media is
157.Dv IFM_AUTO .
158.It Dv IFM_ETH_TXPAUSE
159Configure the device to send PAUSE
160.Pq flow control
161frames.
162This option has no effect
163.Pq shows current status only
164if the media is
165.Dv IFM_AUTO .
166.It Dv IFM_ETH_RXPAUSE
167Configure the device to receive PAUSE
168.Pq flow control
169frames.
170This option has no effect
171.Pq shows current status only
172if the media is
173.Dv IFM_AUTO .
174.El
175.Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING
176The following media types are defined for Token Ring:
177.Bl -tag -offset indent -width IFM_TOK_UTP16
178.It Dv IFM_TOK_STP4
1794Mb/s, shielded twisted pair, DB9 connector.  [DB9/4Mbit, 4STP]
180.It Dv IFM_TOK_STP16
18116Mb/s, shielded twisted pair, DB9 connector.  [DB9/16Mbit, 16STP]
182.It Dv IFM_TOK_UTP4
1834Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/4Mbit, 4UTP]
184.It Dv IFM_TOK_UTP16
18516Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/16Mbit, 16UTP]
186.El
187.Pp
188The following media options are defined for Token Ring:
189.Bl -tag -offset indent -width IFM_TOK_SRCRT
190.It Dv IFM_TOK_ETR
191Early token release.  [EarlyTokenRelease, ETR]
192.It Dv IFM_TOK_SRCRT
193Enable source routing features.  [SourceRouting, SRCRT]
194.It Dv IFM_TOK_ALLR
195All routes vs. single route broadcast.  [AllRoutes, ALLR]
196.El
197.Sh MEDIA TYPES AND OPTIONS FOR FDDI
198The following media types are defined for FDDI:
199.Bl -tag -offset indent -width IFM_FDDI_SMF -compact
200.It Dv IFM_FDDI_SMF
201Single-mode fiber.  [Single-mode, SMF]
202.It Dv IFM_FDDI_MMF
203Multi-mode fiber.  [Multi-mode, MMF]
204.It Dv IFM_FDDI_UTP
205Unshielded twisted pair, RJ45 connector.  [UTP, CDDI]
206.El
207.Pp
208The following media options are defined for FDDI:
209.Bl -tag -offset indent -width IFM_FDDI_DA
210.It Dv IFM_FDDI_DA
211Dual-attached station vs. Single-attached station.  [dual-attach, das]
212.El
213.Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN
214The following media types are defined for IEEE802.11 Wireless LAN:
215.Bl -tag -offset indent -width IFM_IEEE80211_OFDM12 -compact
216.It Dv IFM_IEEE80211_FH1
217Frequency Hopping 1Mbps.  [FH1]
218.It Dv IFM_IEEE80211_FH2
219Frequency Hopping 2Mbps.  [FH2]
220.It Dv IFM_IEEE80211_DS1
221Direct Sequence 1Mbps.  [DS1]
222.It Dv IFM_IEEE80211_DS2
223Direct Sequence 2Mbps.  [DS2]
224.It Dv IFM_IEEE80211_DS5
225Direct Sequence 5Mbps.  [DS5]
226.It Dv IFM_IEEE80211_DS11
227Direct Sequence 11Mbps.  [DS11]
228.It Dv IFM_IEEE80211_DS22
229Direct Sequence 22Mbps.  [DS22]
230.It Dv IFM_IEEE80211_OFDM6
231Orthogonal Frequency Division Multiplexing 6Mbps.  [OFDM6]
232.It Dv IFM_IEEE80211_OFDM9
233Orthogonal Frequency Division Multiplexing 9Mbps.  [OFDM9]
234.It Dv IFM_IEEE80211_OFDM12
235Orthogonal Frequency Division Multiplexing 12Mbps.  [OFDM12]
236.It Dv IFM_IEEE80211_OFDM18
237Orthogonal Frequency Division Multiplexing 18Mbps.  [OFDM18]
238.It Dv IFM_IEEE80211_OFDM24
239Orthogonal Frequency Division Multiplexing 24Mbps.  [OFDM24]
240.It Dv IFM_IEEE80211_OFDM36
241Orthogonal Frequency Division Multiplexing 36Mbps.  [OFDM36]
242.It Dv IFM_IEEE80211_OFDM48
243Orthogonal Frequency Division Multiplexing 48Mbps.  [OFDM48]
244.It Dv IFM_IEEE80211_OFDM54
245Orthogonal Frequency Division Multiplexing 54Mbps.  [OFDM54]
246.It Dv IFM_IEEE80211_OFDM72
247Orthogonal Frequency Division Multiplexing 72Mbps.  [OFDM72]
248.El
249.Pp
250The following media options are defined for IEEE802.11 Wireless LAN:
251.Bl -tag -offset indent -width IFM_IEEE80211_MONITOR
252.It Dv IFM_IEEE80211_ADHOC
253Ad-hoc (IBSS) mode. [adhoc, ibss]
254.Lp
255In some drivers, it may be used with the
256.Dv IFM_FLAG0
257[flag0] media option to specify non-standard ad-hoc demo mode.
258.It Dv IFM_IEEE80211_HOSTAP
259Access Point mode [hostap]
260.It Dv IFM_IEEE80211_MONITOR
261Monitor mode [monitor]
262.It Dv IFM_IEEE80211_TURBO
263Turbo mode [turbo]
264.El
265.Sh SEE ALSO
266.Xr netintro 4 ,
267.Xr ifconfig 8
268.Sh HISTORY
269The
270.Nm
271interface first appeared in
272.Bsx 3.0 .
273The implementation that appeared in
274.Nx 1.3
275was written by Jonathan Stone and Jason R. Thorpe to be compatible with
276the BSDI API.  It has since gone through several revisions which have
277extended the API while maintaining backwards compatibility with the
278original API.
279.Pp
280Support for the
281.Sy IEEE802.11 Wireless LAN
282link type was added in
283.Nx 1.5 .
284