xref: /dragonfly/share/man/man4/ifmedia.4 (revision e6d22e9b)
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.\" 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 August 29, 2020
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 ".Dv IFM_IEEE80211"
61.It Dv IFM_ATM
62Asynchronous Transfer Mode
63.It Dv IFM_CARP
64Common Address Redundancy Protocol
65.It Dv IFM_ETHER
66Ethernet
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 ".Dv IFM_MANUAL"
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 ".Dv 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]
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]
98.It Dv IFM_FLAG0
99Driver-defined flag.  [flag0]
100.It Dv IFM_FLAG1
101Driver-defined flag.  [flag1]
102.It Dv IFM_FLAG2
103Driver-defined flag.  [flag2]
104.It Dv IFM_LOOP
105Place the device into hardware loopback mode.  [hw-loopback]
106.El
107.Sh MEDIA TYPES AND OPTIONS FOR ASYNCHRONOUS TRANSFER MODE
108The following media types are defined for Asynchronous Transfer Mode:
109.Bl -tag -offset indent -width ".Dv IFM_ATM_TAXI_100"
110.It Dv IFM_ATM_UNKNOWN
111Unknown media type.  [Unknown, UNKNOWN]
112.It Dv IFM_ATM_UTP_25
11325Mb/s over unshielded twisted pair.  [UTP/25.6MBit, UTP-25]
114.It Dv IFM_ATM_TAXI_100
115AMD TAXI, 100Mb/s over multi-mode fiber optic cables.  [Taxi/100MBit, TAXI-100]
116.It Dv IFM_ATM_TAXI_140
117AMD TAXI, 140Mb/s over multi-node fiber optic cables.  [Taxi/140MBit, TAXI-140]
118.It Dv IFM_ATM_MM_155
119155Mb/s over multi-mode fiber optic cables. [Multi-mode/155MBit, MM-155]
120.It Dv IFM_ATM_SM_155
121155Mb/s over single-mode fiber optic cables. [Single-mode/155MBit, SM-155]
122.It Dv IFM_ATM_UTP_155
123155Mb/s over unshielded twisted pair. [UTP/155Mbit, UTP-155]
124.It Dv IFM_ATM_MM_622
125622Mb/s over multi-mode fiber optic cables. [Multi-mode/622MBit, MM-622]
126.It Dv IFM_ATM_SM_622
127622Mb/s over single-mode fiber optic cables. [Single-mode/622MBit, SM-622]
128.\".It Dv IFM_ATM_VIRTUAL
129.\"...
130.El
131.Sh MEDIA TYPES AND OPTIONS FOR ETHERNET
132The following media types are defined for Ethernet:
133.Bl -tag -offset indent -width ".Dv IFM_1000_SX"
134.It Dv IFM_HPNA_1
135HomePNA 1.0, 1Mb/s.  [homePNA]
136.It Dv IFM_10_T
13710BASE-T, 10Mb/s over unshielded twisted pair, RJ45 connector.  [10baseT/UTP,
138UTP, 10UTP]
139.It Dv IFM_10_2
14010BASE2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet.
141[10base2/BNC, BNC, 10BNC]
142.It Dv IFM_10_5
14310BASE5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI.
144[10base5/AUI, AUI, 10AUI]
145.It Dv IFM_10_STP
14610BASE-STP, 10Mb/s over shielded twisted pair, DB9 connector.  [10baseSTP,
14710STP]
148.It Dv IFM_10_FL
14910BASE-FL, 10Mb/s over fiber optic cables.  [10baseFL, 10FL]
150.It Dv IFM_100_TX
151100BASE-TX, 100Mb/s over unshielded twisted pair, RJ45 connector.  [100baseTX,
152100TX]
153.It Dv IFM_100_FX
154100BASE-FX, 100Mb/s over fiber optic cables.  [100baseFX, 100FX]
155.It Dv IFM_100_T4
156100BASE-T4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45
157connector.  [100baseT4, 100T4]
158.It Dv IFM_100_T2
159100BASE-T2.  [100baseT2, 100T2]
160.It Dv IFM_100_VG
161100VG-AnyLAN.  [100baseVG, 100VG]
162.It Dv IFM_1000_SX
1631000BASE-SX, 1Gb/s over multi-mode fiber optic cables. (short waves)
164[1000baseSX, 1000SX]
165.It Dv IFM_1000_LX
1661000BASE-LX, 1Gb/s over single-mode fiber optic cables. (long waves)
167[1000baseLX, 1000LX]
168.It Dv IFM_1000_CX
1691000BASE-CX, 1Gb/s over shielded twisted pair. (twinax)
170[1000baseCX, 1000CX]
171.It Dv IFM_1000_T
1721000BASE-T, 1Gb/s over category 5 unshielded twisted pair, 802.3ab, RJ45
173connector.
174[1000baseT, 1000T]
175.It Dv IFM_10G_LR
17610GBASE-LR, 10Gb/s over single-mode fiber optic cables.
177[10Gbase-LR]
178.It Dv IFM_2500_SX
1792500BASE-SX, 2.5Gb/s over multi-mode fiber optic cables.
180[2500BaseSX, 2500SX]
181.It Dv IFM_10G_SR
18210GBASE-SR, 10Gb/s over multi-mode fiber optic cables.
183[10Gbase-SR]
184.It Dv IFM_10G_CX4
18510GBASE-CX4, 10Gb/s over XAUI 4-lane PCS and copper cables.
186[10Gbase-CX4]
187.\".It Dv IFM_10G_LRM
188.It Dv IFM_10G_T
18910GBASE-T, 10Gb/s over unshielded twisted pair, RJ45 connector.
190[10Gbase-T]
191.It Dv IFM_10G_TWINAX
192SFP+ direct attach, 10Gb/s over twinaxial cable.
193[10Gbase-Twinax]
194.\".It Dv IFM_10G_TWINAX_LONG
195.It Dv IFM_40G_CR4
19640GBASE-CR4, 40Gb/s over twin-ax copper cable.
197[40GBASE-CR4]
198.It Dv IFM_40G_SR4
19940GBASE-SR4, 40Gb/s over multi-mode fiber optic cables.
200[40GBASE-SR4]
201.It Dv IFM_40G_LR4
20240GBASE-LR4, 40Gb/s over single-mode fiber optic cables.
203[40GBASE-LR4]
204.El
205.Pp
206The following media options defined for Ethernet:
207.Bl -tag -offset indent -width ".Dv IFM_ETH_TXPAUSE"
208.It Dv IFM_ETH_MASTER
209Configure a 1000BASE-T PHY as the clock master for a 1000BASE-T link.
210This option has no effect
211.Pf ( shows current status only )
212if the media is
213.Dv IFM_AUTO .
214.It Dv IFM_ETH_TXPAUSE
215Configure the device to send PAUSE
216.Pf ( flow control )
217frames.
218This option has no effect
219.Pf ( shows current status only )
220if the media is
221.Dv IFM_AUTO .
222.It Dv IFM_ETH_RXPAUSE
223Configure the device to receive PAUSE
224.Pf ( flow control )
225frames.
226This option has no effect
227.Pf ( shows current status only )
228if the media is
229.Dv IFM_AUTO .
230.El
231.Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN
232The following media types are defined for IEEE802.11 Wireless LAN:
233.Bl -tag -offset indent -width ".Dv IFM_IEEE80211_OFDM12"
234.It Dv IFM_IEEE80211_FH1
235Frequency Hopping 1Mbps.  [FH/1Mbps, FH1, FrequencyHopping/1Mbps]
236.It Dv IFM_IEEE80211_FH2
237Frequency Hopping 2Mbps.  [FH/2Mbps, FH2, FrequencyHopping/2Mbps]
238.It Dv IFM_IEEE80211_DS354k
239Direct Sequence 354Kbps.  [DS/354Kbps, DS354K, DirectSequence/354Kbps]
240.It Dv IFM_IEEE80211_DS512k
241Direct Sequence 512Kbps.  [DS/512Kbps, DS512K, DirectSequence/512Kbps]
242.It Dv IFM_IEEE80211_DS1
243Direct Sequence 1Mbps.  [DS/1Mbps, DS1, DirectSequence/1Mbps, CCK1]
244.It Dv IFM_IEEE80211_DS2
245Direct Sequence 2Mbps.  [DS/2Mbps, DS2, DirectSequence/2Mbps, CCK2]
246.It Dv IFM_IEEE80211_DS5
247Direct Sequence 5Mbps.  [DS/5.5Mbps, DS5, DirectSequence/5.5Mbps, CCK5.5]
248.It Dv IFM_IEEE80211_DS11
249Direct Sequence 11Mbps.  [DS/11Mbps, DS11, DirectSequence/11Mbps, CCK11]
250.It Dv IFM_IEEE80211_DS22
251Direct Sequence 22Mbps.  [DS/22Mbps, DS22, DirectSequence/22Mbps]
252.\".It Dv IFM_IEEE80211_MCS
253.\"...
254.It Dv IFM_IEEE80211_OFDM3
255Orthogonal Frequency Division Multiplexing 3Mbps.  [OFDM/3Mbps OFDM3]
256.It Dv IFM_IEEE80211_OFDM4
257Orthogonal Frequency Division Multiplexing 4.5Mbps.  [OFDM/4.5Mbps OFDM4.5]
258.It Dv IFM_IEEE80211_OFDM6
259Orthogonal Frequency Division Multiplexing 6Mbps.  [OFDM/6Mbps, OFDM6]
260.It Dv IFM_IEEE80211_OFDM9
261Orthogonal Frequency Division Multiplexing 9Mbps.  [OFDM/9Mbps, OFDM9]
262.It Dv IFM_IEEE80211_OFDM12
263Orthogonal Frequency Division Multiplexing 12Mbps.  [OFDM/12Mbps, OFDM12]
264.It Dv IFM_IEEE80211_OFDM18
265Orthogonal Frequency Division Multiplexing 18Mbps.  [OFDM/18Mbps, OFDM18]
266.It Dv IFM_IEEE80211_OFDM24
267Orthogonal Frequency Division Multiplexing 24Mbps.  [OFDM/24Mbps, OFDM24]
268.It Dv IFM_IEEE80211_OFDM27
269Orthogonal Frequency Division Multiplexing 27Mbps.  [OFDM/27Mbps, OFDM27]
270.It Dv IFM_IEEE80211_OFDM36
271Orthogonal Frequency Division Multiplexing 36Mbps.  [OFDM/36Mbps, OFDM36]
272.It Dv IFM_IEEE80211_OFDM48
273Orthogonal Frequency Division Multiplexing 48Mbps.  [OFDM/48Mbps, OFDM48]
274.It Dv IFM_IEEE80211_OFDM54
275Orthogonal Frequency Division Multiplexing 54Mbps.  [OFDM/54Mbps, OFDM54]
276.It Dv IFM_IEEE80211_OFDM72
277Orthogonal Frequency Division Multiplexing 72Mbps.  [OFDM/72Mbps, OFDM72]
278.El
279.Pp
280The following media options are defined for IEEE802.11 Wireless LAN:
281.Bl -tag -offset indent -width ".Dv IFM_IEEE80211_MONITOR"
282.It Dv IFM_IEEE80211_ADHOC
283Ad-hoc mode.  [adhoc]
284.Pp
285In some drivers, it may be used with the
286.Dv IFM_FLAG0
287[flag0] media option to specify non-standard ad-hoc demo mode.
288.It Dv IFM_IEEE80211_HOSTAP
289Access Point mode.  [hostap]
290.It Dv IFM_IEEE80211_IBSS
291IBSS mode.  [ibss]
292.It Dv IFM_IEEE80211_MBSS
293MBSS mode.  [mesh]
294.It Dv IFM_IEEE80211_MONITOR
295Monitor mode.  [monitor]
296.It Dv IFM_IEEE80211_TURBO
297Turbo mode.  [turbo]
298.It Dv IFM_IEEE80211_WDS
299WDS mode.  [wds]
300.El
301.Pp
302The following operating modes are defined for IEEE802.11 Wireless LAN:
303.Bl -tag -offset indent -width ".Dv IFM_IEEE80211_11NA"
304.It Dv IFM_AUTO
305Autoselect the best mode.  [autoselect, auto]
306.It Dv IFM_IEEE80211_11A
307Orthogonal Frequency Division Multiplexing, 5GHz.  [11a]
308.It Dv IFM_IEEE80211_11NA
309High Throughput, 5GHz.  [11na]
310.It Dv IFM_IEEE80211_11B
311Direct Sequence mode.  [11b]
312.It Dv IFM_IEEE80211_11G
313Complementary Code Keying, 2GHz.  [11g]
314.It Dv IFM_IEEE80211_11NG
315High Throughput, 2GHz.  [11ng]
316.It Dv IFM_IEEE80211_FH
317Gaussian Frequency Shift Keying, 2GHz.  [fh]
318.El
319.Sh SEE ALSO
320.Xr netintro 4 ,
321.Xr ifconfig 8
322