xref: /netbsd-src/share/man/man4/ifmedia.4 (revision 2e5c4c01e56412f2a67cde00f670b71e83e312cb)
1.\"	$NetBSD: ifmedia.4,v 1.12 2001/06/28 22:51:17 bjh21 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 <sys/socket.h>
46.Fd #include <net/if.h>
47.Fd #include <net/if_media.h>
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_TX
1441000BASE-TX, 1Gb/s over 4 pair cat 5.  [1000baseTX, 1000TX]
145.El
146.Pp
147The following media option is defined for Ethernet:
148.Bl -tag -offset indent -width IFM_ETH_MASTER
149.It Dv IFM_ETH_MASTER
150Configure a 1000BASE-TX PHY as a MASTER PHY.
151.El
152.Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING
153The following media types are defined for Token Ring:
154.Bl -tag -offset indent -width IFM_TOK_UTP16
155.It Dv IFM_TOK_STP4
1564Mb/s, shielded twisted pair, DB9 connector.  [DB9/4Mbit, 4STP]
157.It Dv IFM_TOK_STP16
15816Mb/s, shielded twisted pair, DB9 connector.  [DB9/16Mbit, 16STP]
159.It Dv IFM_TOK_UTP4
1604Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/4Mbit, 4UTP]
161.It Dv IFM_TOK_UTP16
16216Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/16Mbit, 16UTP]
163.El
164.Pp
165The following media options are defined for Token Ring:
166.Bl -tag -offset indent -width IFM_TOK_SRCRT
167.It Dv IFM_TOK_ETR
168Early token release.  [EarlyTokenRelease, ETR]
169.It Dv IFM_TOK_SRCRT
170Enable source routing features.  [SourceRouting, SRCRT]
171.It Dv IFM_TOK_ALLR
172All routes vs. single route broadcast.  [AllRoutes, ALLR]
173.El
174.Sh MEDIA TYPES AND OPTIONS FOR FDDI
175The following media types are defined for FDDI:
176.Bl -tag -offset indent -width IFM_FDDI_SMF -compact
177.It Dv IFM_FDDI_SMF
178Single-mode fiber.  [Single-mode, SMF]
179.It Dv IFM_FDDI_MMF
180Multi-mode fiber.  [Multi-mode, MMF]
181.It Dv IFM_FDDI_UTP
182Unshielded twisted pair, RJ45 connector.  [UTP, CDDI]
183.El
184.Pp
185The following media options are defined for FDDI:
186.Bl -tag -offset indent -width IFM_FDDI_DA
187.It Dv IFM_FDDI_DA
188Dual-attached station vs. Single-attached station.  [dual-attach, das]
189.El
190.Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN
191The following media types are defined for IEEE802.11 Wireless LAN:
192.Bl -tag -offset indent -width IFM_IEEE80211_DS11 -compact
193.It Dv IFM_IEEE80211_FH1
194Frequency Hopping 1Mbps.  [FH1]
195.It Dv IFM_IEEE80211_FH2
196Frequency Hopping 2Mbps.  [FH2]
197.It Dv IFM_IEEE80211_DS1
198Direct Sequence 1Mbps.  [DS1]
199.It Dv IFM_IEEE80211_DS2
200Direct Sequence 2Mbps.  [DS2]
201.It Dv IFM_IEEE80211_DS5
202Direct Sequence 5Mbps.  [DS5]
203.It Dv IFM_IEEE80211_DS11
204Direct Sequence 11Mbps.  [DS11]
205.El
206.Pp
207The following media options are defined for IEEE802.11 Wireless LAN:
208.Bl -tag -offset indent -width IFM_IEEE80211_ADHOC -compact
209.It Dv IFM_IEEE80211_ADHOC
210adhoc mode vs. infrastructure mode [adhoc]
211.El
212.Sh SEE ALSO
213.Xr ifconfig 8 ,
214.Xr netintro 4
215.Sh HISTORY
216The
217.Nm
218interface first appeared in
219.Bsx 3.0 .
220The implementation that appeared in
221.Nx 1.3
222was written by Jonathan Stone and Jason R. Thorpe to be compatible with
223the BSDI API.  It has since gone through several revisions which have
224extended the API while maintaining backwards compatibility with the
225original API.
226.Pp
227Support for the
228.Sy IEEE802.11 Wireless LAN
229link type was added in
230.Nx 1.5 .
231
232