.\" $NetBSD: ifmedia.4,v 1.26 2005/10/03 18:08:03 rpaulo Exp $ .\" $DragonFly: src/share/man/man4/ifmedia.4,v 1.1 2006/09/10 04:14:01 swildner Exp $ .\" .\" Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003, 2004 .\" The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, .\" NASA Ames Research Center. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the NetBSD .\" Foundation, Inc. and its contributors. .\" 4. Neither the name of The NetBSD Foundation nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd September 9, 2006 .Dt IFMEDIA 4 .Os .Sh NAME .Nm ifmedia .Nd network interface media settings .Sh SYNOPSIS .In sys/socket.h .In net/if.h .In net/if_media.h .Sh DESCRIPTION The .Nm interface provides a consistent method for querying and setting network interface media and media options. The media is typically set using the .Xr ifconfig 8 command. .Pp There are currently four link types supported by .Nm : .Bl -tag -offset indent -width ".Dv IFM_IEEE80211" .It Dv IFM_ETHER Ethernet .It Dv IFM_TOKEN Token Ring .It Dv IFM_FDDI FDDI .It Dv IFM_IEEE80211 IEEE802.11 Wireless LAN .El .Pp The following sections describe the possible media settings for each link type. Not all of these are supported by every device; refer to your device's manual page for more information. .Pp The lists below provide the possible names of each media type or option. The first name in the list is the canonical name of the media type or option. Additional names are acceptable aliases for the media type or option. .Sh COMMON MEDIA TYPES AND OPTIONS The following media types are shared by all link types: .Bl -tag -offset indent -width ".Dv IFM_MANUAL" .It Dv IFM_AUTO Autoselect the best media. [autoselect, auto] .It Dv IFM_MANUAL Jumper or switch on device selects media. [manual] .It Dv IFM_NONE Deselect all media. [none] .El .Pp The following media options are shared by all link types: .Bl -tag -offset indent -width ".Dv IFM_FLAG0" .It Dv IFM_FDX Place the device into full-duplex mode. This option only has meaning if the device is normally not full-duplex. [full-duplex] .It Dv IFM_HDX Place the device into half-duplex mode. This option only has meaning if the device is normally not half-duplex. [half-duplex] .It Dv IFM_FLAG0 Driver-defined flag. [flag0] .It Dv IFM_FLAG1 Driver-defined flag. [flag1] .It Dv IFM_FLAG2 Driver-defined flag. [flag2] .It Dv IFM_LOOP Place the device into hardware loopback mode. [hw-loopback] .El .Sh MEDIA TYPES AND OPTIONS FOR ETHERNET The following media types are defined for Ethernet: .Bl -tag -offset indent -width ".Dv IFM_1000_FX" .It Dv IFM_HPNA_1 HomePNA 1.0, 1Mb/s. [homePNA] .It Dv IFM_10_T 10BASE-T, 10Mb/s over unshielded twisted pair, RJ45 connector. [10baseT/UTP, UTP, 10UTP] .It Dv IFM_10_2 10BASE2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet. [10base2/BNC, BNC, 10BNC] .It Dv IFM_10_5 10BASE5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI. [10base5/AUI, AUI, 10AUI] .It Dv IFM_10_STP 10BASE-STP, 10Mb/s over shielded twisted pair, DB9 connector. [10baseSTP, 10STP] .It Dv IFM_10_FL 10BASE-FL, 10Mb/s over fiber optic cables. [10baseFL, 10FL] .It Dv IFM_100_TX 100BASE-TX, 100Mb/s over unshielded twisted pair, RJ45 connector. [100baseTX, 100TX] .It Dv IFM_100_FX 100BASE-FX, 100Mb/s over fiber optic cables. [100baseFX, 100FX] .It Dv IFM_100_T4 100BASE-T4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45 connector. [100baseT4, 100T4] .It Dv IFM_100_T2 100BASE-T2. [100baseT2, 100T2] .It Dv IFM_100_VG 100VG-AnyLAN. [100baseVG, 100VG] .It Dv IFM_1000_SX 1000BASE-SX, 1Gb/s over multi-mode fiber optic cables. [1000baseSX, 1000SX] .It Dv IFM_1000_LX 1000BASE-LX, 1Gb/s over single-mode fiber optic cables. [1000baseLX, 1000LX] .It Dv IFM_1000_CX 1000BASE-CX, 1Gb/s over shielded twisted pair. [1000baseCX, 1000CX] .It Dv IFM_1000_T 1000BASE-T, 1Gb/s over category 5 unshielded twisted pair, RJ45 connector. [1000baseT, 1000T] .El .Pp The following media options defined for Ethernet: .Bl -tag -offset indent -width ".Dv IFM_ETH_TXPAUSE" .It Dv IFM_ETH_MASTER Configure a 1000BASE-T PHY as the clock master for a 1000BASE-T link. This option has no effect .Pf ( shows current status only ) if the media is .Dv IFM_AUTO . .It Dv IFM_ETH_TXPAUSE Configure the device to send PAUSE .Pf ( flow control ) frames. This option has no effect .Pf ( shows current status only ) if the media is .Dv IFM_AUTO . .It Dv IFM_ETH_RXPAUSE Configure the device to receive PAUSE .Pf ( flow control ) frames. This option has no effect .Pf ( shows current status only ) if the media is .Dv IFM_AUTO . .El .Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING The following media types are defined for Token Ring: .Bl -tag -offset indent -width ".Dv IFM_TOK_UTP100" .It Dv IFM_TOK_STP4 4Mb/s, shielded twisted pair, DB9 connector. [DB9/4Mbit, 4STP] .It Dv IFM_TOK_STP16 16Mb/s, shielded twisted pair, DB9 connector. [DB9/16Mbit, 16STP] .It Dv IFM_TOK_STP100 100Mb/s, shielded twisted pair, DB9 connector. [STP/100Mbit, 100STP] .It Dv IFM_TOK_UTP4 4Mb/s, unshielded twisted pair, RJ45 connector. [UTP/4Mbit, 4UTP] .It Dv IFM_TOK_UTP16 16Mb/s, unshielded twisted pair, RJ45 connector. [UTP/16Mbit, 16UTP] .It Dv IFM_TOK_UTP100 100Mb/s, unshielded twisted pair, RJ45 connector. [UTP/100Mbit, 100UTP] .El .Pp The following media options are defined for Token Ring: .Bl -tag -offset indent -width ".Dv IFM_TOK_CLASSIC" .It Dv IFM_TOK_ETR Early token release. [EarlyTokenRelease] .It Dv IFM_TOK_SRCRT Enable source routing features. [SourceRouting] .It Dv IFM_TOK_ALLR All routes vs. single route broadcast. [AllRoutes] .It Dv IFM_TOK_DTR Dedicated token ring. [Dedicated] .It Dv IFM_TOK_CLASSIC Classic token ring. [Classic] .El .Sh MEDIA TYPES AND OPTIONS FOR FDDI The following media types are defined for FDDI: .Bl -tag -offset indent -width ".Dv IFM_FDDI_SMF" .It Dv IFM_FDDI_SMF Single-mode fiber. [Single-mode, SMF] .It Dv IFM_FDDI_MMF Multi-mode fiber. [Multi-mode, MMF] .It Dv IFM_FDDI_UTP Unshielded twisted pair, RJ45 connector. [UTP, CDDI] .El .Pp The following media options are defined for FDDI: .Bl -tag -offset indent -width ".Dv IFM_FDDI_DA" .It Dv IFM_FDDI_DA Dual-attached station vs. Single-attached station. [Dual-attach] .El .Sh MEDIA TYPES AND OPTIONS FOR IEEE802.11 WIRELESS LAN The following media types are defined for IEEE802.11 Wireless LAN: .Bl -tag -offset indent -width ".Dv IFM_IEEE80211_OFDM12" .It Dv IFM_IEEE80211_FH1 Frequency Hopping 1Mbps. [FH/1Mbps, FH1, FrequencyHopping/1Mbps] .It Dv IFM_IEEE80211_FH2 Frequency Hopping 2Mbps. [FH/2Mbps, FH2, FrequencyHopping/2Mbps] .It Dv IFM_IEEE80211_DS1 Direct Sequence 1Mbps. [DS/1Mbps, DS1, DirectSequence/1Mbps] .It Dv IFM_IEEE80211_DS2 Direct Sequence 2Mbps. [DS/2Mbps, DS2, DirectSequence/2Mbps] .It Dv IFM_IEEE80211_DS5 Direct Sequence 5Mbps. [DS/5.5Mbps, DS5, DirectSequence/5.5Mbps] .It Dv IFM_IEEE80211_DS11 Direct Sequence 11Mbps. [DS/11Mbps, DS11, DirectSequence/11Mbps] .It Dv IFM_IEEE80211_DS22 Direct Sequence 22Mbps. [DS/22Mbps, DS22, DirectSequence/22Mbps] .It Dv IFM_IEEE80211_OFDM6 Orthogonal Frequency Division Multiplexing 6Mbps. [OFDM/6Mbps, OFDM6] .It Dv IFM_IEEE80211_OFDM9 Orthogonal Frequency Division Multiplexing 9Mbps. [OFDM/9Mbps, OFDM9] .It Dv IFM_IEEE80211_OFDM12 Orthogonal Frequency Division Multiplexing 12Mbps. [OFDM/12Mbps, OFDM12] .It Dv IFM_IEEE80211_OFDM18 Orthogonal Frequency Division Multiplexing 18Mbps. [OFDM/18Mbps, OFDM18] .It Dv IFM_IEEE80211_OFDM24 Orthogonal Frequency Division Multiplexing 24Mbps. [OFDM/24Mbps, OFDM24] .It Dv IFM_IEEE80211_OFDM36 Orthogonal Frequency Division Multiplexing 36Mbps. [OFDM/36Mbps, OFDM36] .It Dv IFM_IEEE80211_OFDM48 Orthogonal Frequency Division Multiplexing 48Mbps. [OFDM/48Mbps, OFDM48] .It Dv IFM_IEEE80211_OFDM54 Orthogonal Frequency Division Multiplexing 54Mbps. [OFDM/54Mbps, OFDM54] .It Dv IFM_IEEE80211_OFDM72 Orthogonal Frequency Division Multiplexing 72Mbps. [OFDM/72Mbps, OFDM72] .El .Pp The following media options are defined for IEEE802.11 Wireless LAN: .Bl -tag -offset indent -width ".Dv IFM_IEEE80211_IBSSMASTER" .It Dv IFM_IEEE80211_ADHOC Ad-hoc mode. [adhoc] .br In some drivers, it may be used with the .Dv IFM_FLAG0 [flag0] media option to specify non-standard ad-hoc demo mode. .It Dv IFM_IEEE80211_HOSTAP Access Point mode. [hostap] .It Dv IFM_IEEE80211_IBSS IBSS mode. [ibss] .It Dv IFM_IEEE80211_IBSSMASTER Operate as an IBSS master. [ibss-master] .It Dv IFM_IEEE80211_MONITOR Monitor mode. [monitor] .It Dv IFM_IEEE80211_TURBO Turbo mode. [turbo] .El .Pp The following operating modes are defined for IEEE802.11 Wireless LAN: .Bl -tag -offset indent -width ".Dv IFM_IEEE80211_11A" .It Dv IFM_AUTO Autoselect the best mode. [autoselect, auto] .It Dv IFM_IEEE80211_11A Orthogonal Frequency Division Multiplexing, 5GHz. [11a] .It Dv IFM_IEEE80211_11B Direct Sequence mode. [11b] .It Dv IFM_IEEE80211_11G Orthogonal Frequency Division Multiplexing, 2GHz. [11g] .It Dv IFM_IEEE80211_FH Gaussian Frequency Shift Keying, 2GHz. [fh] .El .Sh SEE ALSO .Xr netintro 4 , .Xr ifconfig 8