1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
36 .Nd configure network interface parameters
80 utility is used to assign an address
81 to a network interface and/or configure
82 network interface parameters.
85 utility must be used at boot time to define the network address
86 of each interface present on a machine; it may also be used at
87 a later time to redefine an interface's address
88 or other operating parameters.
90 The following options are available:
91 .Bl -tag -width indent
94 .Tn DARPA Ns -Internet
96 the address is either a host name present in the host name data
101 Internet address expressed in the Internet standard
104 It is also possible to use the CIDR notation (also known as the
105 slash notation) to include the netmask.
106 That is, one can specify an address like
111 family, it is also possible to specify the prefix length using the slash
116 parameter below for more information.
117 .\" For the Xerox Network Systems(tm) family,
119 .\" .Ar net:a.b.c.d.e.f ,
122 .\" is the assigned network number (in decimal),
123 .\" and each of the six bytes of the host number,
127 .\" are specified in hexadecimal.
128 .\" The host number may be omitted on IEEE 802 protocol
129 .\" (Ethernet, FDDI, and Token Ring) interfaces,
130 .\" which use the hardware physical address,
131 .\" and on interfaces other than the first.
134 .\" family, addresses are specified as a long hexadecimal string,
135 .\" as in the Xerox family.
136 .\" However, two consecutive dots imply a zero
137 .\" byte, and the dots are optional, if the user wishes to (carefully)
138 .\" count out long strings of digits in network byte order.
143 is specified as a series of colon-separated hex digits.
145 e.g.\& set a new MAC address on an ethernet interface, though the
146 mechanism used is not ethernet-specific.
147 If the interface is already
148 up when this option is used, it will be briefly brought down and
149 then brought back up again in order to ensure that the receive
150 filter in the underlying ethernet hardware is properly reprogrammed.
151 .It Ar address_family
154 which affects interpretation of the remaining parameters.
155 Since an interface can receive transmissions in differing protocols
156 with different naming schemes, specifying the address family is recommended.
157 The address or protocol families currently
176 Specify the address of the correspondent on the other end
177 of a point to point link.
180 parameter is a string of the form
185 List the interfaces in the given group.
188 The following parameters may be set with
190 .Bl -tag -width indent
195 Introduced for compatibility
199 Establish an additional network address for this interface.
200 This is sometimes useful when changing network numbers, and
201 one wishes to accept packets addressed to the old interface.
202 If the address is on the same subnet as the first network address
203 for this interface, a non-conflicting netmask must be given.
208 Remove the network address specified.
209 This would be used if you incorrectly specified an alias, or it
210 was no longer needed.
211 If you have incorrectly set an NS address having the side effect
212 of specifying the host portion, removing all NS addresses will
213 allow you to respecify the host portion.
216 Specify that the address configured is an anycast address.
217 Based on the current specification,
218 only routers may configure anycast addresses.
219 Anycast address will not be used as source address of any of outgoing
222 Enable the use of the Address Resolution Protocol
225 between network level addresses and link level addresses (default).
226 This is currently implemented for mapping between
231 802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses).
233 Disable the use of the Address Resolution Protocol
236 If the Address Resolution Protocol is enabled,
237 the host will only reply to requests for its addresses,
238 and will never send any requests.
240 If the Address Resolution Protocol is enabled,
241 the host will perform normally,
242 sending out requests and listening for replies.
245 Specify the address to use to represent broadcasts to the
247 The default broadcast address is the address with a host part of all 1's.
249 Enable driver dependent debugging code; usually, this turns on
250 extra console error logging.
252 Disable driver dependent debugging code.
254 Put interface into permanently promiscuous mode.
256 Disable permanently promiscuous mode.
264 When an interface is marked
266 the system will not attempt to
267 transmit messages through that interface.
268 If possible, the interface will be reset to disable reception as well.
269 This action does not automatically disable routes using the interface.
270 .It Cm group Ar group-name
271 Assign the interface to a
273 Any interface can be in multiple groups.
275 Cloned interfaces are members of their interface family group by default.
276 For example, a PPP interface such as
278 is a member of the PPP interface family group,
280 .\" The interface(s) the default route(s) point to are members of the
283 .It Cm -group Ar group-name
284 Remove the interface from the given
289 (lowermost 64bit of an IPv6 address)
292 This is used to specify an Internet host who is willing to receive
293 IP packets encapsulating IPX packets bound for a remote network.
294 An apparent point to point link is constructed, and
295 the address specified will be taken as the IPX address and network
297 .It Cm maclabel Ar label
298 If Mandatory Access Control support is enabled in the kernel,
302 .\" .Xr maclabel 7 ) .
304 If the driver supports the media selection system, set the media type
307 Some interfaces support the mutually exclusive use of one of several
308 different physical media connectors.
309 For example, a 10Mbit/s Ethernet
310 interface might support the use of either
312 or twisted pair connectors.
313 Setting the media type to
315 would change the currently active connector to the AUI port.
318 would activate twisted pair.
319 Refer to the interfaces' driver
320 specific documentation or man page for a complete list of the
322 .It Cm mediaopt Ar opts
323 If the driver supports the media selection system, set the specified
324 media options on the interface.
328 is a comma delimited list of options to apply to the interface.
329 Refer to the interfaces' driver specific man page for a complete
330 list of available options.
331 .It Fl mediaopt Ar opts
332 If the driver supports the media selection system, disable the
333 specified media options on the interface.
335 If the driver supports the media selection system, set the specified
336 operating mode on the interface to
338 For IEEE 802.11 wireless interfaces that support multiple operating modes
339 this directive is used to select between 802.11a
346 .It Cm inst Ar minst , Cm instance Ar minst
347 Set the media instance to
349 This is useful for devices which have multiple physical layer interfaces
352 Set the interface name to
354 .It Cm rxcsum , txcsum
355 If the driver supports user-configurable checksum offloading,
356 enable receive (or transmit) checksum offloading on the interface.
357 Some drivers may not be able to enable these flags independently
358 of each other, so setting one may also set the other.
359 The driver will offload as much checksum work as it can reliably
360 support, the exact level of offloading varies between drivers.
361 .It Fl rxcsum , txcsum
362 If the driver supports user-configurable checksum offloading,
363 disable receive (or transmit) checksum offloading on the interface.
364 These settings may not always be independent of each other.
366 If the driver supports
368 segmentation offloading, enable TSO on the interface.
369 Some drivers may not be able to support TSO for
373 packets, so they may enable only one of them.
375 If the driver supports
377 segmentation offloading, disable TSO on the interface.
378 It will always disable TSO for
383 If the driver supports
385 large receive offloading, enable LRO on the interface.
387 If the driver supports
389 large receive offloading, disable LRO on the interface.
390 .It Cm vlanmtu , vlanhwtag
391 If the driver offers user-configurable VLAN support, enable
392 reception of extended frames or tag processing in hardware,
394 Note that this must be issued on a physical interface associated with
399 .It Fl vlanmtu , vlanhwtag
400 If the driver offers user-configurable VLAN support, disable
401 reception of extended frames or tag processing in hardware,
406 feature and disable interrupts on the interface, if driver supports
411 feature and enable interrupt mode on the interface.
413 Create the specified network pseudo-device.
414 If the interface is given without a unit number, try to create a new
415 device with an arbitrary unit number.
416 If creation of an arbitrary device is successful, the new device name is
417 printed to standard output unless the interface is renamed or destroyed
422 Destroy the specified network pseudo-device.
438 Set the routing metric of the interface to
441 The routing metric is used by the routing protocol
443 Higher metrics have the effect of making a route
444 less favorable; metrics are counted as additional hops
445 to the destination network or host.
447 Set the maximum transmission unit of the interface to
449 default is interface specific.
450 The MTU is used to limit the size of packets that are transmitted on an
452 Not all interfaces support setting the MTU, and some interfaces have
454 .It Cm netmask Ar mask
457 Specify how much of the address to reserve for subdividing
458 networks into sub-networks.
459 The mask includes the network part of the local address
460 and the subnet part, which is taken from the host field of the address.
461 The mask can be specified as a single hexadecimal number
464 with a dot-notation Internet address,
465 or with a pseudo-network name listed in the network table
467 The mask contains 1's for the bit positions in the 32-bit address
468 which are to be used for the network and subnet parts,
469 and 0's for the host part.
470 The mask should contain at least the standard network portion,
471 and the subnet field should be contiguous with the network
474 The netmask can also be specified in CIDR notation after the address.
477 option above for more information.
478 .It Cm prefixlen Ar len
482 bits are reserved for subdividing networks into sub-networks.
485 must be integer, and for syntactical reason it must be between 0 to 128.
486 It is almost always 64 under the current IPv6 assignment rule.
487 If the parameter is omitted, 64 is used.
489 The prefix can also be specified using the slash notation after the address.
492 option above for more information.
495 .\" .It Cm nsellength Ar n
498 .\" This specifies a trailing number of bytes for a received
500 .\" used for local identification, the remaining leading part of which is
503 .\" (Network Entity Title).
504 .\" The default value is 1, which is conformant to US
506 .\" When an ISO address is set in an ifconfig command,
509 .\" which is being specified.
512 .\" 20 hex digits should be
515 .\" to be assigned to the interface.
516 .\" There is some evidence that a number different from 1 may be useful
519 .\" 37 type addresses.
520 .It Cm range Ar netrange
521 Under appletalk, set the interface to respond to a
524 .Ar startnet Ns - Ns Ar endnet .
525 Appletalk uses this scheme instead of
528 implements it internally as a set of netmasks.
533 Introduced for compatibility
537 The argument following this specifies the version (phase) of the
538 Appletalk network attached to the interface.
539 Values of 1 or 2 are permitted.
541 .It Cm link Op Cm 0 No - Cm 2
543 Enable special processing of the link level of the interface.
544 These three options are interface specific in actual effect, however,
545 they are in general used to select special modes of operation.
547 of this is to enable SLIP compression, or to select the connector type
548 for some Ethernet cards.
549 Refer to the man page for the specific driver
550 for more information.
552 .It Fl link Op Cm 0 No - Cm 2
554 Disable special processing at the link level with the specified interface.
556 Put the interface in monitor mode.
557 No packets are transmitted, and received packets are discarded after
561 Take the interface out of monitor mode.
565 This may be used to enable an interface after an
567 It happens automatically when setting the first address on an interface.
568 If the interface was reset when previously marked down,
569 the hardware will be re-initialized.
572 The following parameters are specific to IEEE 802.11 wireless interfaces:
573 .Bl -tag -width indent
575 When operating as an access point, pass packets between
576 wireless clients directly (default).
577 To instead let them pass up through the
578 system and be forwarded using some other mechanism, use
580 Disabling the internal bridging
581 is useful when traffic is to be processed with
583 .It Cm authmode Ar mode
584 Set the desired authentication mode in infrastructure mode.
585 Not all adaptors support all modes.
588 .Cm none , open , shared
594 (IEEE WPA/WPA2/802.11i).
599 modes are only useful when using an authentication service
600 (a supplicant for client operation or an authenticator when
601 operating as an access point).
602 Modes are case insensitive.
604 Enable background scanning when operating as a station.
605 Background scanning is a technique whereby a station associated to
606 an access point will temporarily leave the channel to scan for
607 neighboring stations.
608 This allows a station to maintain a cache of nearby access points
609 so that roaming between access points can be done without doing
610 a lengthy scan operation.
611 Background scanning is done only when a station is not busy and
612 any outbound traffic will cancel a scan operation.
613 Background scanning should never cause packets to be lost though
614 there may be some small latency if outbound traffic interrupts a
616 By default background scanning is enabled if the device is capable.
617 To disable background scanning, use
619 Background scanning is controlled by the
624 Background scanning must be enabled for roaming; this is an artifact
625 of the current implementation and may not be required in the future.
626 .It Cm bgscanidle Ar idletime
627 Set the minimum time a station must be idle (not transmitting or
628 receiving frames) before a background scan is initiated.
631 parameter is specified in milliseconds.
632 By default a station must be idle at least 250 milliseconds before
633 a background scan is initiated.
634 The idle time may not be set to less than 100 milliseconds.
635 .It Cm bgscanintvl Ar interval
636 Set the interval at which background scanning is attempted.
639 parameter is specified in seconds.
640 By default a background scanning is considered every 300 seconds (5 minutes).
643 may not be set to less than 15 seconds.
644 .It Cm bintval Ar interval
645 Set the interval at which beacon frames are sent when operating in
649 parameter is specified in TU's (1024 usecs).
650 By default beacon frames are transmitted every 100 TU's.
651 .It Cm bmissthreshold Ar count
652 Set the number of consecutive missed beacons at which the station
653 will attempt to roam (i.e., search for a new access point).
656 parameter must be in the range 1 to 255; though the
657 upper bound may be reduced according to device capabilities.
658 The default threshold is 7 consecutive missed beacons; but
659 this may be overridden by the device driver.
664 .It Cm bssid Ar address
665 Specify the MAC address of the access point to use when operating
666 as a station in a BSS network.
667 This overrides any automatic selection done by the system.
668 To disable a previously selected access point, supply
673 This option is useful when more than one access point uses the same SSID.
679 Enable packet bursting.
680 Packet bursting is a transmission technique whereby the wireless
681 medium is acquired once to send multiple frames and the interframe
683 This technique can significantly increase throughput by reducing
684 transmission overhead.
685 Packet bursting is supported by the 802.11e QoS specification
686 and some devices that do not support QoS may still be capable.
687 By default packet bursting is enabled if a device is capable
689 To disable packet bursting, use
691 .It Cm chanlist Ar channels
692 Set the desired channels to use when scanning for access
693 points, neighbors in an IBSS network, or looking for unoccupied
694 channels when operating as an access point.
695 The set of channels is specified as a comma-separated list with
696 each element in the list representing either a single channel number or a range
699 Channel numbers must be in the range 1 to 255 and be permissible
700 according to the operating characteristics of the device.
701 .It Cm channel Ar number
702 Set a single desired channel.
703 Channels range from 1 to 255, but the exact selection available
704 depends on the region your adaptor was manufactured for.
711 will give you the default for your adaptor.
713 adaptors ignore this setting unless you are in ad-hoc mode.
714 Alternatively the frequency, in megahertz, may be specified
715 instead of the channel number.
717 When there are several ways to use a channel the channel
718 number/frequency may be appended with attributes to clarify.
719 For example, if a device is capable of operating on channel 6
720 with 802.11n and 802.11g then one can specify that g-only use
721 should be used by specifying ``6:g''.
722 Similarly the channel width can be specified by appending it
723 with ``/''; e.g. ``6/40'' specifies a 40MHz wide channel,
724 These attributes can be combined as in: ``6:ht/40''.
725 The full set of flags specified following a `:'' are:
731 (Atheros Dynamic Turbo mode),
739 (Atheros Static Turbo mode),
742 (Atheros Dynamic Turbo mode, or appended to ``st'' and ``dt'').
743 The full set of channel widths following a '/' are:
745 (5MHz aka quarter-rate channel),
747 (10MHz aka half-rate channel),
749 (20MHz mostly for use in specifying ht20),
752 (40MHz mostly for use in specifying ht40),
754 a 40MHz HT channel specification may include the location
755 of the extension channel by appending ``+'' or ``-'' for above and below,
756 respectively; e.g. ``2437:ht/40+'' specifies 40MHz wide HT operation
757 with the center channel at frequency 2437 and the extension channel above.
759 Enable inclusion of an 802.11h country information element in beacon
760 frames transmitted when operating as an access point.
761 By default 802.11h is enabled if the device is capable.
762 To disable 802.11h use
764 .It Cm deftxkey Ar index
765 Set the default key to use for transmission.
766 Typically this is only set when using WEP encryption.
769 is an alias for this request; it is provided for backwards compatibility.
770 .It Cm dtimperiod Ar period
773 period for transmitting buffered multicast data frames when
774 operating in ap mode.
777 specifies the number of beacon intervals between DTIM
778 and must be in the range 1 to 15.
779 By default DTIM is 1 (i.e., DTIM occurs at each beacon).
781 Enable the use of Atheros Dynamic Turbo mode when communicating with
782 another Dynamic Turbo-capable station.
783 Dynamic Turbo mode is an Atheros-specific mechanism by which
784 stations switch between normal 802.11 operation and a ``boosted''
785 mode in which a 40MHz wide channel is used for communication.
786 Stations using Dynamic Turbo mode operate boosted only when the
787 channel is free of non-dturbo stations; when a non-dturbo station
788 is identified on the channel all stations will automatically drop
789 back to normal operation.
790 By default, Dynamic Turbo mode is not enabled, even if the device is capable.
791 Note that turbo mode (dynamic or static) is only allowed on some
792 channels depending on the regulatory constraints; use the
794 command to identify the channels where turbo mode may be used.
795 To disable Dynamic Turbo mode use
797 .It Cm fragthreshold Ar length
798 Set the threshold for which transmitted frames are broken into fragments.
801 argument is the frame size in bytes and must be in the range 256 to 2346.
809 disables transmit fragmentation.
810 Not all adaptors honor the fragmentation threshold.
812 When operating as an access point, do not broadcast the SSID
813 in beacon frames or respond to probe request frames unless
814 they are directed to the ap (i.e., they include the ap's SSID).
815 By default, the SSID is included in beacon frames and
816 undirected probe request frames are answered.
817 To re-enable the broadcast of the SSID etc., use
820 Enable the user of Atheros Fast Frames when communicating with
821 another Fast Frames-capable station.
822 Fast Frames are an encapsulation technique by which two 802.3
823 frames are transmitted in a single 802.11 frame.
824 This can noticeably improve throughput but requires that the
825 receiving station understand how to decapsulate the frame.
826 Fast frame use is negotiated using the Atheros 802.11 vendor-specific
827 protocol extension so enabling use is safe when communicating with
829 By default, use of fast frames is enabled if the device is capable.
830 To explicitly disable fast frames, use
833 Display the list of channels available for use taking into account
834 any restrictions set with the
837 See the description of
839 for more information.
841 Display the adaptor's capabilities, including the operating
844 Display the list of channels available for use.
845 Channels are shown with their IEEE channel number, equivalent
846 frequency, and usage modes.
847 Channels identified as
852 Channels identified as
854 may be used only for Atheros' Static Turbo mode
856 . Cm mediaopt turbo ) .
857 Channels marked with a
859 have a regulatory constraint that they be passively scanned.
860 This means a station is not permitted to transmit on the channel until
861 it identifies the channel is being used for 802.11 communication;
862 typically by hearing a beacon frame from an access point operating
865 is another way of requesting this information.
867 Display the current MAC Access Control List state.
868 Each address is prefixed with a character that indicates the
869 current policy applied to it:
871 indicates the address is allowed access,
873 indicates the address is denied access,
875 indicates the address is present but the current policy open
876 (so the ACL is not consulted).
878 Display the access points and/or ad-hoc neighbors
879 located in the vicinity.
882 flag may be used to display long SSIDs.
883 This information may be updated automatically by the adaptor
886 request or through background scanning.
888 is another way of requesting this information.
890 When operating as an access point display the stations that are
891 currently associated.
892 When operating in ad-hoc mode display stations identified as
893 neighbors in the IBSS.
894 When operating in station mode display the access point.
895 Capabilities advertised by the stations are described under
899 Depending on the capabilities of the stations the following
900 flags can be included in the output:
904 Indicates that the station is permitted to send/receive data frames.
906 Extended Rate Phy (ERP).
907 Indicates that the station is operating in an 802.11g network
908 using extended transmit rates.
910 High Throughput (HT).
911 Indicates that the station is using MCS to send/receive frames.
914 Indicates that the station is operating in power save mode.
916 Quality of Service (QoS).
917 Indicates that the station is using QoS encapsulation for
919 QoS encapsulation is enabled only when WME mode is enabled.
922 Display the current parameters to use when operating in WME mode.
923 When WME mode is enabled for an adaptor this information will be
924 displayed with the regular status; this command is mostly useful
925 for examining parameters when WME mode is disabled.
926 See the description of the
928 directive for information on the various parameters.
929 .It Cm mcastrate Ar rate
930 Set the rate for transmitting multicast/broadcast frames.
931 Rates are specified as megabits/second in decimal; e.g.\& 5.5 for 5.5 Mb/s.
932 This rate should be valid for the current operating conditions;
933 if an invalid rate is specified drivers are free to chose an
936 Enable powersave operation.
937 When operating as a client, the station will conserve power by
938 periodically turning off the radio and listening for
939 messages from the access point telling it there are packets waiting.
940 The station must then retrieve the packets.
941 Not all devices support power save operation as a client.
942 The 802.11 specification requires that all access points support
943 power save but some drivers do not.
946 to disable powersave operation when operating as a client.
947 .It Cm powersavesleep Ar sleep
948 Set the desired max powersave sleep time in TU's (1024 usecs).
949 By default the max powersave sleep time is 100 TU's.
950 .It Cm protmode Ar technique
951 For interfaces operating in 802.11g, use the specified
953 for protecting OFDM frames in a mixed 11b/11g network.
954 The set of valid techniques is
960 Technique names are case insensitive.
961 Not all devices support
963 as a protection technique.
965 When operating as an access point in 802.11g mode allow only
966 11g-capable stations to associate (11b-only stations are not
967 permitted to associate).
968 To allow both 11g and 11b-only stations to associate, use
970 .It Cm roaming Ar mode
971 When operating as a station, control how the system will
972 behave when communication with the current access point
976 argument may be one of
978 (leave it to the hardware device to decide),
980 (handle either in the device or the operating system\[em]as appropriate),
982 (do nothing until explicitly instructed).
983 By default, the device is left to handle this if it is
984 capable; otherwise, the operating system will automatically
985 attempt to reestablish communication.
986 Manual mode is used by applications such as
988 that want to control the selection of an access point.
989 .It Cm roam:rssi11a Ar rssi
990 Set the threshold for controlling roaming when operating in an
994 parameter specifies the receive signal strength in .5 dBm units
995 at which roaming should be considered.
996 If the current rssi drops below this setting and background scanning
997 is enabled, then the system will check if a more desirable access point is
998 available and switch over to it.
999 The current scan cache contents are used if they are considered
1000 valid according to the
1002 parameter; otherwise a background scan operation is triggered before
1003 any selection occurs.
1007 .It Cm roam:rssi11b Ar rssi
1008 Set the threshold for controlling roaming when operating in an
1012 for a description of this parameter.
1016 .It Cm roam:rssi11g Ar rssi
1017 Set the threshold for controlling roaming when operating in a
1018 (mixed) 802.11g BSS.
1021 for a description of this parameter.
1025 .It Cm roam:rate11a Ar rate
1026 Set the threshold for controlling roaming when operating in an
1030 parameter specifies the transmit rate in megabits
1031 at which roaming should be considered.
1032 If the current transmit rate drops below this setting and background scanning
1033 is enabled, then the system will check if a more desirable access point is
1034 available and switch over to it.
1035 The current scan cache contents are used if they are considered
1036 valid according to the
1038 parameter; otherwise a background scan operation is triggered before
1039 any selection occurs.
1043 .It Cm roam:rate11b Ar rate
1044 Set the threshold for controlling roaming when operating in an
1048 for a description of this parameter.
1052 .It Cm roam:rate11g Ar rate
1053 Set the threshold for controlling roaming when operating in a
1054 (mixed) 802.11g BSS.
1057 for a description of this parameter.
1061 .It Cm rtsthreshold Ar length
1062 Set the threshold for which
1063 transmitted frames are preceded by transmission of an
1069 is the frame size in bytes and must be in the range 1 to 2346.
1077 disables transmission of RTS frames.
1078 Not all adaptors support setting the RTS threshold.
1080 Set the desired Service Set Identifier (aka network name).
1081 The SSID is a string up to 32 characters
1082 in length and may be specified as either a normal string or in
1083 hexadecimal when preceded by
1085 Additionally, the SSID may be cleared by setting it to
1088 Initiate a scan of neighboring stations, wait for it to complete, and
1089 display all stations found.
1090 Only the super-user can initiate a scan.
1091 Depending on the capabilities of the APs, the following
1092 flags can be included in the output:
1096 Indicates that the station support channel hopping as described by the
1097 IEEE 802.11b specification.
1099 Packet Binary Convolution Code (PBCC).
1100 A modulation alternative to the standard OFDM method.
1106 Direct Sequence Spread Spectrum (DSSSOFDM).
1107 Indicates the the station supports DSSS modulation.
1109 Extended Service Set (ESS).
1110 Indicates that the station is part of an infrastructure network
1111 (in contrast to an IBSS/ad-hoc network).
1113 IBSS/ad-hoc network.
1114 Indicates that the station is part of an ad-hoc network
1115 (in contrast to an ESS network).
1118 Data confidentiality is required for all data frames
1119 exchanged within the BSS.
1120 This means that this BSS requires the station to
1121 use cryptographic means such as WEP, TKIP or AES-CCMP to
1122 encrypt/decrypt data frames being exchanged with others.
1124 Robust Security Network (RSN).
1125 Indicates that the station supports the IEEE 802.11i authentication
1126 and key management protocol.
1129 Indicates that the network is using short preambles (defined
1130 in 802.11b High Rate/DSSS PHY, short preamble utilizes a
1131 56 bit sync field in contrast to a 128 bit field used in long
1135 Indicates that the network is using a short slot time.
1138 Interesting information elements captured from the neighboring
1139 stations are displayed at the end of each row.
1140 Possible elements are:
1142 (station supports WME),
1144 (station supports WPA),
1146 (station supports 802.11i/RSN),
1148 (station supports 802.11n/HT communication),
1150 (station supoprts Atheros protocol extensions),
1152 (station supports unknown vendor-specific extensions).
1155 flag is used the information element contents will be shown.
1159 request can be used to show recent scan results without
1160 initiating a new scan.
1164 flag may be used to prevent the shortening of long SSIDs.
1165 .It Cm scanvalid Ar threshold
1166 Set the maximum time the scan cache contents are considered valid;
1167 i.e. will be used without first triggering a scan operation to
1171 parameter is specified in seconds and defaults to 60 seconds.
1172 The minimum setting for
1175 One should take care setting this threshold; if it is set too low
1176 then attempts to roam to another access point may trigger unnecessary
1177 background scan operations.
1178 .It Cm stationname Ar name
1179 Set the name of this station.
1180 It appears that the station name is not really part of the IEEE 802.11
1181 protocol though all interfaces seem to support it.
1183 seems to be meaningful to identical or virtually identical equipment.
1184 Setting the station name is identical in syntax to setting the SSID.
1185 .It Cm txpower Ar power
1186 Set the power used to transmit frames.
1190 is a unitless value in the range 0 to 100 that is interpreted
1191 by drivers to derive a device-specific value.
1192 Out of range values are truncated.
1193 Typically only a few discreet power settings are available and
1194 the driver will use the setting closest to the specified value.
1195 Not all adaptors support changing the transmit power.
1196 .It Cm wepmode Ar mode
1197 Set the desired WEP mode.
1198 Not all adaptors support all modes.
1199 The set of valid modes is
1205 mode explicitly tells the adaptor to allow association with access
1206 points which allow both encrypted and unencrypted traffic.
1209 means that the access point must only allow encrypted connections.
1212 is generally another name for
1214 Modes are case insensitive.
1215 .It Cm weptxkey Ar index
1216 Set the WEP key to be used for transmission.
1217 This is the same as setting the default transmission key with
1219 .It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key
1220 Set the selected WEP key.
1223 is not given, key 1 is set.
1224 A WEP key will be either 5 or 13
1225 characters (40 or 104 bits) depending of the local network and the
1226 capabilities of the adaptor.
1227 It may be specified either as a plain
1228 string or as a string of hexadecimal digits preceded by
1230 For maximum portability, hex keys are recommended;
1231 the mapping of text keys to WEP encryption is usually driver-specific.
1234 drivers do this mapping differently to
1236 A key may be cleared by setting it to
1238 If WEP is supported then there are at least four keys.
1239 Some adaptors support more than four keys.
1240 If that is the case, then the first four keys
1241 (1-4) will be the standard temporary keys and any others will be adaptor
1242 specific keys such as permanent keys stored in NVRAM.
1244 Enable Wireless Multimedia Extensions (WME) support, if available,
1245 for the specified interface.
1246 WME is a subset of the IEEE 802.11e standard to support the
1247 efficient communication of realtime and multimedia data.
1248 To disable WME support, use
1251 The following parameters are meaningful only when WME support is in use.
1252 Parameters are specified per-AC (Access Category) and
1253 split into those that are used by a station when acting
1254 as an access point and those for client stations in the BSS.
1255 The latter are received from the access point and may not be changed
1257 The following Access Categories are recognized:
1259 .Bl -tag -width ".Cm AC_BK" -compact
1263 best effort delivery,
1278 AC parameters are case-insensitive.
1279 Traffic classification is done in the operating system using the
1280 vlan priority associated with data frames or the
1281 ToS (Type of Service) indication in IP-encapsulated frames.
1282 If neither information is present, traffic is assigned to the
1283 Best Effort (BE) category.
1284 .Bl -tag -width indent
1286 Set the ACK policy for QoS transmissions by the local station;
1287 this controls whether or not data frames transmitted by a station
1288 require an ACK response from the receiving station.
1289 To disable waiting for an ACK use
1291 This parameter is applied only to the local station.
1293 Enable the Admission Control Mandatory (ACM) mechanism
1294 for transmissions by the local station.
1295 To disable the ACM use
1297 On stations in a BSS this parameter is read-only and indicates
1298 the setting received from the access point.
1299 NB: ACM is not supported right now.
1300 .It Cm aifs Ar ac Ar count
1301 Set the Arbitration Inter Frame Spacing (AIFS)
1302 channel access parameter to use for transmissions
1303 by the local station.
1304 On stations in a BSS this parameter is read-only and indicates
1305 the setting received from the access point.
1306 .It Cm cwmin Ar ac Ar count
1307 Set the CWmin channel access parameter to use for transmissions
1308 by the local station.
1309 On stations in a BSS this parameter is read-only and indicates
1310 the setting received from the access point.
1311 .It Cm cwmax Ar ac Ar count
1312 Set the CWmax channel access parameter to use for transmissions
1313 by the local station.
1314 On stations in a BSS this parameter is read-only and indicates
1315 the setting received from the access point.
1316 .It Cm txoplimit Ar ac Ar limit
1317 Set the Transmission Opportunity Limit channel access parameter
1318 to use for transmissions by the local station.
1319 This parameter defines an interval of time when a WME station
1320 has the right to initiate transmissions onto the wireless medium.
1321 On stations in a BSS this parameter is read-only and indicates
1322 the setting received from the access point.
1323 .It Cm bss:aifs Ar ac Ar count
1324 Set the AIFS channel access parameter to send to stations in a BSS.
1325 This parameter is meaningful only when operating in ap mode.
1326 .It Cm bss:cwmin Ar ac Ar count
1327 Set the CWmin channel access parameter to send to stations in a BSS.
1328 This parameter is meaningful only when operating in ap mode.
1329 .It Cm bss:cwmax Ar ac Ar count
1330 Set the CWmax channel access parameter to send to stations in a BSS.
1331 This parameter is meaningful only when operating in ap mode.
1332 .It Cm bss:txoplimit Ar ac Ar limit
1333 Set the TxOpLimit channel access parameter to send to stations in a BSS.
1334 This parameter is meaningful only when operating in ap mode.
1338 The following parameters support an optional access control list
1339 feature available with some adaptors when operating in ap mode; see
1341 This facility allows an access point to accept/deny association
1342 requests based on the MAC address of the station.
1343 Note that this feature does not significantly enhance security
1344 as MAC address spoofing is easy to do.
1345 .Bl -tag -width indent
1346 .It Cm mac:add Ar address
1347 Add the specified MAC address to the database.
1348 Depending on the policy setting association requests from the
1349 specified station will be allowed or denied.
1351 Set the ACL policy to permit association only by
1352 stations registered in the database.
1353 .It Cm mac:del Ar address
1354 Delete the specified MAC address from the database.
1356 Set the ACL policy to deny association only by
1357 stations registered in the database.
1358 .It Cm mac:kick Ar address
1359 Force the specified station to be deauthenticated.
1360 This typically is done to block a station after updating the
1363 Set the ACL policy to allow all stations to associate.
1365 Delete all entries in the database.
1368 The following parameters are for compatibility with other systems:
1369 .Bl -tag -width indent
1371 Another name for the
1377 .It Cm station Ar name
1378 Another name for the
1385 Another way of saying
1391 Another way of saying
1397 Another way of saying:
1398 .Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" .
1404 .Ar n : k1 , k2 , k3 , k4
1407 Another way of saying
1408 .Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" .
1413 Another way of saying
1420 The following parameters are specific to bridge interfaces:
1421 .Bl -tag -width indent
1422 .It Cm addm Ar interface
1423 Add the interface named by
1425 as a member of the bridge.
1426 The interface is put into promiscuous mode
1427 so that it can receive every packet sent on the network.
1428 .It Cm deletem Ar interface
1429 Remove the interface named by
1432 Promiscuous mode is disabled on the interface when
1433 it is removed from the bridge.
1434 .It Cm maxaddr Ar size
1435 Set the size of the bridge address cache to
1437 The default is 100 entries.
1438 .It Cm timeout Ar seconds
1439 Set the timeout of address cache entries to
1444 is zero, then address cache entries will not be expired.
1445 The default is 240 seconds.
1447 Display the addresses that have been learned by the bridge.
1448 .It Cm static Ar interface-name Ar address
1449 Add a static entry into the address cache pointing to
1450 .Ar interface-name .
1451 Static entries are never aged out of the cache or re-placed, even if the
1452 address is seen on a different interface.
1453 .It Cm deladdr Ar address
1456 from the address cache.
1458 Delete all dynamically-learned addresses from the address cache.
1460 Delete all addresses, including static addresses, from the address cache.
1461 .It Cm discover Ar interface
1462 Mark an interface as a
1465 When the bridge has no address cache entry
1466 (either dynamic or static)
1467 for the destination address of a packet,
1468 the bridge will forward the packet to all
1469 member interfaces marked as
1471 This is the default for all interfaces added to a bridge.
1472 .It Cm -discover Ar interface
1475 attribute on a member interface.
1476 For packets without the
1478 attribute, the only packets forwarded on the interface are broadcast
1479 or multicast packets and packets for which the destination address
1480 is known to be on the interface's segment.
1481 .It Cm learn Ar interface
1482 Mark an interface as a
1485 When a packet arrives on such an interface, the source
1486 address of the packet is entered into the address cache as being a
1487 destination address on the interface's segment.
1488 This is the default for all interfaces added to a bridge.
1489 .It Cm -learn Ar interface
1492 attribute on a member interface.
1493 .It Cm sticky Ar interface
1494 Mark an interface as a
1497 Dynamically learned address entries are treated at static once entered into
1499 Sticky entries are never aged out of the cache or replaced, even if the
1500 address is seen on a different interface.
1501 .It Cm -sticky Ar interface
1504 attribute on a member interface.
1505 .It Cm span Ar interface
1506 Add the interface named by
1508 as a span port on the bridge.
1509 Span ports transmit a copy of every frame received by the bridge.
1510 This is most useful for snooping a bridged network passively on
1511 another host connected to one of the span ports of the bridge.
1512 .It Cm -span Ar interface
1513 Delete the interface named by
1515 from the list of span ports of the bridge.
1516 .It Cm stp Ar interface
1517 Enable Spanning Tree protocol on
1521 driver has support for the IEEE 802.1D Spanning Tree protocol (STP).
1522 Spanning Tree is used to detect and remove loops in a network topology.
1523 .It Cm -stp Ar interface
1524 Disable Spanning Tree protocol on
1526 This is the default for all interfaces added to a bridge.
1527 .It Cm edge Ar interface
1531 An edge port connects directly to end stations cannot create bridging
1532 loops in the network, this allows it to transition straight to forwarding.
1533 .It Cm -edge Ar interface
1534 Disable edge status on
1536 .It Cm autoedge Ar interface
1539 to automatically detect edge status.
1540 This is the default for all interfaces added to a bridge.
1541 .It Cm -autoedge Ar interface
1542 Disable automatic edge status on
1544 .It Cm ptp Ar interface
1547 as a point to point link.
1548 This is required for straight transitions to forwarding and
1549 should be enabled on a direct link to another RSTP capable switch.
1550 .It Cm -ptp Ar interface
1551 Disable point to point link status on
1553 This should be disabled for a half duplex link and for an interface
1554 connected to a shared network segment,
1555 like a hub or a wireless network.
1556 .It Cm autoptp Ar interface
1557 Automatically detect the point to point status on
1559 by checking the full duplex link status.
1560 This is the default for interfaces added to the bridge.
1561 .It Cm -autoptp Ar interface
1562 Disable automatic point to point link detection on
1564 .It Cm maxage Ar seconds
1565 Set the time that a Spanning Tree protocol configuration is valid.
1566 The default is 20 seconds.
1567 The minimum is 6 seconds and the maximum is 40 seconds.
1568 .It Cm fwddelay Ar seconds
1569 Set the time that must pass before an interface begins forwarding
1570 packets when Spanning Tree is enabled.
1571 The default is 15 seconds.
1572 The minimum is 4 seconds and the maximum is 30 seconds.
1573 .It Cm hellotime Ar seconds
1574 Set the time between broadcasting of Spanning Tree protocol
1575 configuration messages.
1576 The hello time may only be changed when operating in legacy stp mode.
1577 The default is 2 seconds.
1578 The minimum is 1 second and the maximum is 2 seconds.
1579 .It Cm priority Ar value
1580 Set the bridge priority for Spanning Tree.
1581 The default is 32768.
1582 The minimum is 0 and the maximum is 61440.
1583 .It Cm proto Ar value
1584 Set the Spanning Tree protocol.
1585 The default is rstp.
1586 The available options are stp and rstp.
1587 .It Cm holdcnt Ar value
1588 Set the transmit hold count for Spanning Tree.
1589 This is the number of packets transmitted before being rate limited.
1591 The minimum is 1 and the maximum is 10.
1592 .It Cm ifpriority Ar interface Ar value
1593 Set the Spanning Tree priority of
1598 The minimum is 0 and the maximum is 240.
1599 .It Cm ifpathcost Ar interface Ar value
1600 Set the Spanning Tree path cost of
1604 The default is calculated from the link speed.
1605 To change a previously selected path cost back to automatic, set the
1607 The minimum is 1 and the maximum is 200000000.
1610 The following parameters are specific to lagg interfaces:
1611 .Bl -tag -width indent
1612 .It Cm laggport Ar interface
1613 Add the interface named by
1615 as a port of the aggregation interface.
1616 .It Cm -laggport Ar interface
1617 Remove the interface named by
1619 from the aggregation interface.
1620 .It Cm laggproto Ar proto
1621 Set the aggregation protocol.
1622 The default is failover.
1623 The available options are failover, fec, lacp, loadbalance, roundrobin and
1627 The following parameters are specific to IP tunnel interfaces,
1629 .Bl -tag -width indent
1630 .It Cm tunnel Ar src_addr dest_addr
1631 Configure the physical source and destination address for IP tunnel
1637 are interpreted as the outer source/destination for the encapsulating
1640 Unconfigure the physical source and destination address for IP tunnel
1641 interfaces previously configured with
1644 Another name for the
1649 The following parameters are specific to
1652 .Bl -tag -width indent
1654 Set the maximum number of updates for a single state which
1655 can be collapsed into one.
1656 This is an 8-bit number; the default value is 128.
1659 The following parameters are specific to
1662 .Bl -tag -width indent
1663 .It Cm vlan Ar vlan_tag
1664 Set the VLAN tag value to
1666 This value is a 16-bit number which is used to create an 802.1Q
1667 VLAN header for packets sent from the
1674 must both be set at the same time.
1675 .It Cm vlandev Ar iface
1676 Associate the physical interface
1681 Packets transmitted through the
1684 diverted to the specified physical interface
1686 with 802.1Q VLAN encapsulation.
1687 Packets with 802.1Q encapsulation received
1688 by the parent interface with the correct VLAN tag will be diverted to
1694 interface is assigned a
1695 copy of the parent interface's flags and the parent's ethernet address.
1700 must both be set at the same time.
1703 interface already has
1704 a physical interface associated with it, this command will fail.
1706 change the association to another physical interface, the existing
1707 association must be cleared first.
1709 Note: if the hardware tagging capability
1710 is set on the parent interface, the
1713 interface's behavior changes:
1716 interface recognizes that the
1717 parent interface supports insertion and extraction of VLAN tags on its
1718 own (usually in firmware) and that it should pass packets to and from
1719 the parent unaltered.
1720 .It Fl vlandev Op Ar iface
1723 pseudo device, disassociate the parent interface from it.
1724 This breaks the link between the
1726 interface and its parent,
1727 clears its VLAN tag, flags and its link address and shuts the interface down.
1730 argument is useless and hence deprecated.
1733 The following parameters are specific to
1736 .Bl -tag -width indent
1737 .It Cm advbase Ar seconds
1738 Specifies the base of the advertisement interval in seconds.
1739 The acceptable values are 1 to 255.
1740 The default value is 1.
1741 .\" The default value is
1742 .\" .Dv CARP_DFLTINTV .
1743 .It Cm advskew Ar interval
1744 Specifies the skew to add to the base advertisement interval to
1745 make one host advertise slower than another host.
1746 It is specified in 1/256 of seconds.
1747 The acceptable values are 1 to 254.
1748 The default value is 0.
1749 .It Cm pass Ar phrase
1750 Set the authentication key to
1753 Set the virtual host ID.
1754 This is a required setting.
1755 Acceptable values are 1 to 255.
1760 utility displays the current configuration for a network interface
1761 when no optional parameters are supplied.
1762 If a protocol family is specified,
1764 will report only the details specific to that protocol family.
1768 flag is passed before an interface name,
1770 will display the capability list and all
1771 of the supported media for the specified interface.
1774 flag is supplied, address lifetime is displayed for IPv6 addresses,
1775 as time offset string.
1779 flag may be used instead of an interface name.
1782 to display information about all interfaces in the system.
1785 flag limits this to interfaces that are down, and
1787 limits this to interfaces that are up.
1788 When no arguments are given,
1794 flag may be used to list all available interfaces on the system, with
1795 no other additional information.
1796 Use of this flag is mutually exclusive
1797 with all other flags and commands, except for
1799 (only list interfaces that are down)
1802 (only list interfaces that are up).
1806 flag may be used to get more verbose status for an interface.
1810 flag may be used to list all of the interface cloners available on
1811 the system, with no additional information.
1812 Use of this flag is mutually exclusive with all other flags and commands.
1816 flag causes keying information for the interface, if available, to be
1818 For example, the values of 802.11 WEP keys will be printed, if accessible to
1820 This information is not printed by default, as it may be considered
1823 If the network interface driver is not present in the kernel then
1825 will attempt to load it.
1828 flag disables this behavior.
1830 Only the super-user may modify the configuration of a network interface.
1832 The media selection system is relatively new and only some drivers support
1833 it (or have need for it).
1835 Assign the IPv4 address
1837 with a network mask of
1841 .Dl # ifconfig fxp0 inet 192.0.2.10 netmask 255.255.255.0
1843 Add the IPv4 address
1845 with the CIDR network prefix
1851 as a synonym for the canonical form of the option
1853 .Dl # ifconfig ed0 inet 192.0.2.45/28 add
1855 Remove the IPv4 address
1859 .Dl # ifconfig ed0 inet 192.0.2.45 -alias
1861 Add the IPv6 address
1862 .Li 2001:DB8:DBDB::123/48
1865 .Dl # ifconfig em0 inet6 2001:db8:bdbd::123 prefixlen 48 alias
1866 Note that lower case hexadecimal IPv6 addresses are acceptable.
1868 Remove the IPv6 address added in the above example,
1871 character as shorthand for the network prefix,
1874 as a synonym for the canonical form of the option
1876 .Dl # ifconfig em0 inet6 2001:db8:bdbd::123/48 delete
1878 Configure the interface
1880 to use 100baseTX, full duplex Ethernet media options:
1881 .Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex
1883 Create the software network interface
1885 .Dl # ifconfig gif1 create
1887 Destroy the software network interface
1889 .Dl # ifconfig gif1 destroy
1891 Messages indicating the specified interface does not exist, the
1892 requested address is unknown, or the user is not privileged and
1893 tried to alter an interface's configuration.
1911 Basic IPv6 node operation requires a link-local address on each
1912 interface configured for IPv6.
1913 Normally, such an address is automatically configured by the
1914 kernel on each interface added to the system; this behaviour may
1915 be disabled by setting the sysctl MIB variable
1916 .Va net.inet6.ip6.auto_linklocal
1919 If you delete such an address using
1921 the kernel may act very odd.
1922 Do this at your own risk.