xref: /netbsd/share/man/man4/ifmedia.4 (revision bf9ec67e)
1.\"	$NetBSD: ifmedia.4,v 1.16 2002/02/13 08:17:36 ross Exp $
2.\"
3.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
8.\" NASA Ames Research Center.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\" 3. All advertising materials mentioning features or use of this software
19.\"    must display the following acknowledgement:
20.\"        This product includes software developed by the NetBSD
21.\"        Foundation, Inc. and its contributors.
22.\" 4. Neither the name of The NetBSD Foundation nor the names of its
23.\"    contributors may be used to endorse or promote products derived
24.\"    from this software without specific prior written permission.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36.\" POSSIBILITY OF SUCH DAMAGE.
37.\"
38.Dd July 19, 2000
39.Dt IFMEDIA 4
40.Os
41.Sh NAME
42.Nm ifmedia
43.Nd network interface media settings
44.Sh SYNOPSIS
45.Fd #include \*[Lt]sys/socket.h\*[Gt]
46.Fd #include \*[Lt]net/if.h\*[Gt]
47.Fd #include \*[Lt]net/if_media.h\*[Gt]
48.Sh DESCRIPTION
49The
50.Nm
51interface provides a consistent method for querying and setting
52network interface media and media options.  The media is typically
53set using the
54.Xr ifconfig 8
55command.
56.Pp
57There are currently four link types supported by
58.Nm Ns :
59.Bl -tag -offset indent -width IFM_IEEE80211 -compact
60.It Dv IFM_ETHER
61Ethernet
62.It Dv IFM_TOKEN
63Token Ring
64.It Dv IFM_FDDI
65FDDI
66.It Dv IFM_IEEE80211
67IEEE802.11 Wireless LAN
68.El
69.Pp
70The following sections describe the possible media settings for each
71link type.  Not all of these are supported by every device; refer to
72your device's manual page for more information.
73.Pp
74The lists below provide the possible names of each media type or option.
75The first name in the list is the canonical name of the media type or
76option.  Additional names are acceptable aliases for the media type or
77option.
78.Sh COMMON MEDIA TYPES AND OPTIONS
79The following media types are shared by all link types:
80.Bl -tag -offset indent -width IFM_MANUAL -compact
81.It Dv IFM_AUTO
82Autoselect the best media.  [autoselect, auto]
83.It Dv IFM_MANUAL
84Jumper or switch on device selects media.  [manual]
85.It Dv IFM_NONE
86Deselect all media.  [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.  This option only has meaning
93if the device is normally not full-duplex.  [full-duplex, fdx]
94.It Dv IFM_HDX
95Place the device into half-duplex mode.  This option only has meaning
96if the device is normally not half-duplex.  [half-duplex, hdx]
97.It Dv IFM_FLAG0
98Driver-defined flag.  [flag0]
99.It Dv IFM_FLAG1
100Driver-defined flag.  [flag1]
101.It Dv IFM_FLAG2
102Driver-defined flag.  [flag2]
103.It Dv IFM_LOOP
104Place the device into hardware loopback mode.  [loopback, hw-loopback, loop]
105.El
106.Sh MEDIA TYPES AND OPTIONS FOR ETHERNET
107The following media types are defined for Ethernet:
108.Bl -tag -offset indent -width IFM_1000_FX
109.It Dv IFM_HPNA_1
110HomePNA 1.0, 1Mb/s.  [HomePNA1, HPNA1]
111.It Dv IFM_10_T
11210BASE-T, 10Mb/s over unshielded twisted pair, RJ45 connector.  [10baseT,
113UTP, 10UTP]
114.It Dv IFM_10_2
11510BASE2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet.
116[10base2, BNC, 10BNC]
117.It Dv IFM_10_5
11810BASE5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI.
119[10base5, AUI, 10AUI]
120.It Dv IFM_10_STP
12110BASE-STP, 10Mb/s over shielded twisted pair, DB9 connector.  [10baseSTP,
122STP, 10STP]
123.It Dv IFM_10_FL
12410BASE-FL, 10Mb/s over fiber optic cables.  [10baseFL, FL, 10FL]
125.It Dv IFM_100_TX
126100BASE-TX, 100Mb/s over unshielded twisted pair, RJ45 connector.  [100baseTX,
127100TX]
128.It Dv IFM_100_FX
129100BASE-FX, 100Mb/s over fiber optic cables.  [100baseFX, 100FX]
130.It Dv IFM_100_T4
131100BASE-T4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45
132connector.  [100baseT4, 100T4]
133.It Dv IFM_100_T2
134100BASE-T2.  [100baseT2, 100T2]
135.It Dv IFM_100_VG
136100VG-AnyLAN.  [100baseVG, 100VG]
137.It Dv IFM_1000_SX
1381000BASE-SX, 1Gb/s over multi-mode fiber optic cables.  [1000baseSX, 1000SX]
139.It Dv IFM_1000_LX
1401000BASE-LX, 1Gb/s over single-mode fiber optic cables.  [1000baseLX, 1000LX]
141.It Dv IFM_1000_CX
1421000BASE-CX, 1Gb/s over shielded twisted pair.  [1000baseCX, 1000CX]
143.It Dv IFM_1000_T
1441000BASE-T, 1Gb/s over category 5 unshielded twisted pair, RJ45 connector.
145[1000baseT, 1000T]
146.El
147.Pp
148The following media option is defined for Ethernet:
149.Bl -tag -offset indent -width IFM_ETH_MASTER
150.It Dv IFM_ETH_MASTER
151Configure a 1000BASE-T PHY as a MASTER PHY.
152.El
153.Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING
154The following media types are defined for Token Ring:
155.Bl -tag -offset indent -width IFM_TOK_UTP16
156.It Dv IFM_TOK_STP4
1574Mb/s, shielded twisted pair, DB9 connector.  [DB9/4Mbit, 4STP]
158.It Dv IFM_TOK_STP16
15916Mb/s, shielded twisted pair, DB9 connector.  [DB9/16Mbit, 16STP]
160.It Dv IFM_TOK_UTP4
1614Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/4Mbit, 4UTP]
162.It Dv IFM_TOK_UTP16
16316Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/16Mbit, 16UTP]
164.El
165.Pp
166The following media options are defined for Token Ring:
167.Bl -tag -offset indent -width IFM_TOK_SRCRT
168.It Dv IFM_TOK_ETR
169Early token release.  [EarlyTokenRelease, ETR]
170.It Dv IFM_TOK_SRCRT
171Enable source routing features.  [SourceRouting, SRCRT]
172.It Dv IFM_TOK_ALLR
173All routes vs. single route broadcast.  [AllRoutes, ALLR]
174.El
175.Sh MEDIA TYPES AND OPTIONS FOR FDDI
176The following media types are defined for FDDI:
177.Bl -tag -offset indent -width IFM_FDDI_SMF -compact
178.It Dv IFM_FDDI_SMF
179Single-mode fiber.  [Single-mode, SMF]
180.It Dv IFM_FDDI_MMF
181Multi-mode fiber.  [Multi-mode, MMF]
182.It Dv IFM_FDDI_UTP
183Unshielded twisted pair, RJ45 connector.  [UTP, CDDI]
184.El
185.Pp
186The following media options are defined for FDDI:
187.Bl -tag -offset indent -width IFM_FDDI_DA
188.It Dv IFM_FDDI_DA
189Dual-attached station vs. Single-attached station.  [dual-attach, das]
190.El
191.Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN
192The following media types are defined for IEEE802.11 Wireless LAN:
193.Bl -tag -offset indent -width IFM_IEEE80211_DS11 -compact
194.It Dv IFM_IEEE80211_FH1
195Frequency Hopping 1Mbps.  [FH1]
196.It Dv IFM_IEEE80211_FH2
197Frequency Hopping 2Mbps.  [FH2]
198.It Dv IFM_IEEE80211_DS1
199Direct Sequence 1Mbps.  [DS1]
200.It Dv IFM_IEEE80211_DS2
201Direct Sequence 2Mbps.  [DS2]
202.It Dv IFM_IEEE80211_DS5
203Direct Sequence 5Mbps.  [DS5]
204.It Dv IFM_IEEE80211_DS11
205Direct Sequence 11Mbps.  [DS11]
206.El
207.Pp
208The following media options are defined for IEEE802.11 Wireless LAN:
209.Bl -tag -offset indent -width IFM_IEEE80211_ADHOC -compact
210.It Dv IFM_IEEE80211_ADHOC
211adhoc mode vs. infrastructure mode [adhoc]
212.El
213.Sh SEE ALSO
214.Xr netintro 4 ,
215.Xr ifconfig 8
216.Sh HISTORY
217The
218.Nm
219interface first appeared in
220.Bsx 3.0 .
221The implementation that appeared in
222.Nx 1.3
223was written by Jonathan Stone and Jason R. Thorpe to be compatible with
224the BSDI API.  It has since gone through several revisions which have
225extended the API while maintaining backwards compatibility with the
226original API.
227.Pp
228Support for the
229.Sy IEEE802.11 Wireless LAN
230link type was added in
231.Nx 1.5 .
232