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