xref: /netbsd-src/share/man/man4/ifmedia.4 (revision aaf4ece63a859a04e37cf3a7229b5fab0157cc06)
1.\"	$NetBSD: ifmedia.4,v 1.26 2005/10/03 18:08:03 rpaulo 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.\" 3. All advertising materials mentioning features or use of this software
20.\"    must display the following acknowledgement:
21.\"        This product includes software developed by the NetBSD
22.\"        Foundation, Inc. and its contributors.
23.\" 4. Neither the name of The NetBSD Foundation nor the names of its
24.\"    contributors may be used to endorse or promote products derived
25.\"    from this software without specific prior written permission.
26.\"
27.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
28.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
31.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37.\" POSSIBILITY OF SUCH DAMAGE.
38.\"
39.Dd October 3, 2005
40.Dt IFMEDIA 4
41.Os
42.Sh NAME
43.Nm ifmedia
44.Nd network interface media settings
45.Sh SYNOPSIS
46.In sys/socket.h
47.In net/if.h
48.In net/if_media.h
49.Sh DESCRIPTION
50The
51.Nm
52interface provides a consistent method for querying and setting
53network interface media and media options.  The media is typically
54set using the
55.Xr ifconfig 8
56command.
57.Pp
58There are currently four link types supported by
59.Nm :
60.Bl -tag -offset indent -width IFM_IEEE80211 -compact
61.It Dv IFM_ETHER
62Ethernet
63.It Dv IFM_TOKEN
64Token Ring
65.It Dv IFM_FDDI
66FDDI
67.It Dv IFM_IEEE80211
68IEEE802.11 Wireless LAN
69.El
70.Pp
71The following sections describe the possible media settings for each
72link type.  Not all of these are supported by every device; refer to
73your device's manual page for more information.
74.Pp
75The lists below provide the possible names of each media type or option.
76The first name in the list is the canonical name of the media type or
77option.  Additional names are acceptable aliases for the media type or
78option.
79.Sh COMMON MEDIA TYPES AND OPTIONS
80The following media types are shared by all link types:
81.Bl -tag -offset indent -width IFM_MANUAL -compact
82.It Dv IFM_AUTO
83Autoselect the best media.  [autoselect, auto]
84.It Dv IFM_MANUAL
85Jumper or switch on device selects media.  [manual]
86.It Dv IFM_NONE
87Deselect all media.  [none]
88.El
89.Pp
90The following media options are shared by all link types:
91.Bl -tag -offset indent -width IFM_FLAG0
92.It Dv IFM_FDX
93Place the device into full-duplex mode.  This option only has meaning
94if the device is normally not full-duplex.  [full-duplex, fdx]
95.It Dv IFM_HDX
96Place the device into half-duplex mode.  This option only has meaning
97if the device is normally not half-duplex.  [half-duplex, hdx]
98.It Dv IFM_FLOW
99Hardware flow control support.  [flowcontrol, flow]
100.It Dv IFM_FLAG0
101Driver-defined flag.  [flag0]
102.It Dv IFM_FLAG1
103Driver-defined flag.  [flag1]
104.It Dv IFM_FLAG2
105Driver-defined flag.  [flag2]
106.It Dv IFM_LOOP
107Place the device into hardware loopback mode.  [loopback, hw-loopback, loop]
108.El
109.Sh MEDIA TYPES AND OPTIONS FOR ETHERNET
110The following media types are defined for Ethernet:
111.Bl -tag -offset indent -width IFM_1000_FX
112.It Dv IFM_HPNA_1
113HomePNA 1.0, 1Mb/s.  [HomePNA1, HPNA1]
114.It Dv IFM_10_T
11510BASE-T, 10Mb/s over unshielded twisted pair, RJ45 connector.  [10baseT,
116UTP, 10UTP]
117.It Dv IFM_10_2
11810BASE2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet.
119[10base2, BNC, 10BNC]
120.It Dv IFM_10_5
12110BASE5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI.
122[10base5, AUI, 10AUI]
123.It Dv IFM_10_STP
12410BASE-STP, 10Mb/s over shielded twisted pair, DB9 connector.  [10baseSTP,
125STP, 10STP]
126.It Dv IFM_10_FL
12710BASE-FL, 10Mb/s over fiber optic cables.  [10baseFL, FL, 10FL]
128.It Dv IFM_100_TX
129100BASE-TX, 100Mb/s over unshielded twisted pair, RJ45 connector.  [100baseTX,
130100TX]
131.It Dv IFM_100_FX
132100BASE-FX, 100Mb/s over fiber optic cables.  [100baseFX, 100FX]
133.It Dv IFM_100_T4
134100BASE-T4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45
135connector.  [100baseT4, 100T4]
136.It Dv IFM_100_T2
137100BASE-T2.  [100baseT2, 100T2]
138.It Dv IFM_100_VG
139100VG-AnyLAN.  [100baseVG, 100VG]
140.It Dv IFM_1000_SX
1411000BASE-SX, 1Gb/s over multi-mode fiber optic cables.  [1000baseSX, 1000SX]
142.It Dv IFM_1000_LX
1431000BASE-LX, 1Gb/s over single-mode fiber optic cables.  [1000baseLX, 1000LX]
144.It Dv IFM_1000_CX
1451000BASE-CX, 1Gb/s over shielded twisted pair.  [1000baseCX, 1000CX]
146.It Dv IFM_1000_T
1471000BASE-T, 1Gb/s over category 5 unshielded twisted pair, RJ45 connector.
148[1000baseT, 1000T]
149.It Dv IFM_10G_LR
15010GBASE-LR, 10Gb/s over single-mode fiber optic cables.  [10GbaseLR, 10GLR]
151.El
152.Pp
153The following media option is defined for Ethernet:
154.Bl -tag -offset indent -width IFM_ETH_TXPAUSE
155.It Dv IFM_ETH_MASTER
156Configure a 1000BASE-T PHY as the clock master for a 1000BASE-T link.
157This option has no effect
158.Pq shows current status only
159if the media is
160.Dv IFM_AUTO .
161.It Dv IFM_ETH_TXPAUSE
162Configure the device to send PAUSE
163.Pq flow control
164frames.
165This option has no effect
166.Pq shows current status only
167if the media is
168.Dv IFM_AUTO .
169.It Dv IFM_ETH_RXPAUSE
170Configure the device to receive PAUSE
171.Pq flow control
172frames.
173This option has no effect
174.Pq shows current status only
175if the media is
176.Dv IFM_AUTO .
177.El
178.Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING
179The following media types are defined for Token Ring:
180.Bl -tag -offset indent -width IFM_TOK_UTP16
181.It Dv IFM_TOK_STP4
1824Mb/s, shielded twisted pair, DB9 connector.  [DB9/4Mbit, 4STP]
183.It Dv IFM_TOK_STP16
18416Mb/s, shielded twisted pair, DB9 connector.  [DB9/16Mbit, 16STP]
185.It Dv IFM_TOK_UTP4
1864Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/4Mbit, 4UTP]
187.It Dv IFM_TOK_UTP16
18816Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/16Mbit, 16UTP]
189.El
190.Pp
191The following media options are defined for Token Ring:
192.Bl -tag -offset indent -width IFM_TOK_SRCRT
193.It Dv IFM_TOK_ETR
194Early token release.  [EarlyTokenRelease, ETR]
195.It Dv IFM_TOK_SRCRT
196Enable source routing features.  [SourceRouting, SRCRT]
197.It Dv IFM_TOK_ALLR
198All routes vs. single route broadcast.  [AllRoutes, ALLR]
199.El
200.Sh MEDIA TYPES AND OPTIONS FOR FDDI
201The following media types are defined for FDDI:
202.Bl -tag -offset indent -width IFM_FDDI_SMF -compact
203.It Dv IFM_FDDI_SMF
204Single-mode fiber.  [Single-mode, SMF]
205.It Dv IFM_FDDI_MMF
206Multi-mode fiber.  [Multi-mode, MMF]
207.It Dv IFM_FDDI_UTP
208Unshielded twisted pair, RJ45 connector.  [UTP, CDDI]
209.El
210.Pp
211The following media options are defined for FDDI:
212.Bl -tag -offset indent -width IFM_FDDI_DA
213.It Dv IFM_FDDI_DA
214Dual-attached station vs. Single-attached station.  [dual-attach, das]
215.El
216.Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN
217The following media types are defined for IEEE802.11 Wireless LAN:
218.Bl -tag -offset indent -width IFM_IEEE80211_OFDM12 -compact
219.It Dv IFM_IEEE80211_FH1
220Frequency Hopping 1Mbps.  [FH1]
221.It Dv IFM_IEEE80211_FH2
222Frequency Hopping 2Mbps.  [FH2]
223.It Dv IFM_IEEE80211_DS1
224Direct Sequence 1Mbps.  [DS1]
225.It Dv IFM_IEEE80211_DS2
226Direct Sequence 2Mbps.  [DS2]
227.It Dv IFM_IEEE80211_DS5
228Direct Sequence 5Mbps.  [DS5]
229.It Dv IFM_IEEE80211_DS11
230Direct Sequence 11Mbps.  [DS11]
231.It Dv IFM_IEEE80211_DS22
232Direct Sequence 22Mbps.  [DS22]
233.It Dv IFM_IEEE80211_OFDM6
234Orthogonal Frequency Division Multiplexing 6Mbps.  [OFDM6]
235.It Dv IFM_IEEE80211_OFDM9
236Orthogonal Frequency Division Multiplexing 9Mbps.  [OFDM9]
237.It Dv IFM_IEEE80211_OFDM12
238Orthogonal Frequency Division Multiplexing 12Mbps.  [OFDM12]
239.It Dv IFM_IEEE80211_OFDM18
240Orthogonal Frequency Division Multiplexing 18Mbps.  [OFDM18]
241.It Dv IFM_IEEE80211_OFDM24
242Orthogonal Frequency Division Multiplexing 24Mbps.  [OFDM24]
243.It Dv IFM_IEEE80211_OFDM36
244Orthogonal Frequency Division Multiplexing 36Mbps.  [OFDM36]
245.It Dv IFM_IEEE80211_OFDM48
246Orthogonal Frequency Division Multiplexing 48Mbps.  [OFDM48]
247.It Dv IFM_IEEE80211_OFDM54
248Orthogonal Frequency Division Multiplexing 54Mbps.  [OFDM54]
249.It Dv IFM_IEEE80211_OFDM72
250Orthogonal Frequency Division Multiplexing 72Mbps.  [OFDM72]
251.El
252.Pp
253The following media options are defined for IEEE802.11 Wireless LAN:
254.Bl -tag -offset indent -width IFM_IEEE80211_MONITOR -compact
255.It Dv IFM_IEEE80211_ADHOC
256Ad-hoc (IBSS) mode. [adhoc, ibss]
257.br
258In some drivers,
259it may be used with the
260.Dv IFM_FLAG0
261[flag0] media option to specify non-standard ad-hoc demo mode.
262.It Dv IFM_IEEE80211_HOSTAP
263Access Point mode [hostap]
264.It Dv IFM_IEEE80211_MONITOR
265Monitor mode [monitor]
266.It Dv IFM_IEEE80211_TURBO
267Turbo mode [turbo]
268.El
269.Sh SEE ALSO
270.Xr netintro 4 ,
271.Xr ifconfig 8
272.Sh HISTORY
273The
274.Nm
275interface first appeared in
276.Bsx 3.0 .
277The implementation that appeared in
278.Nx 1.3
279was written by Jonathan Stone and Jason R. Thorpe to be compatible with
280the BSDI API.  It has since gone through several revisions which have
281extended the API while maintaining backwards compatibility with the
282original API.
283.Pp
284Support for the
285.Sy IEEE802.11 Wireless LAN
286link type was added in
287.Nx 1.5 .
288